From 5486d877c587d957e0a8f55063c580e1cbb61071 Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 15 Aug 2019 13:19:59 -0400 Subject: abuild: -static depends on -dev by default When you have `-dev` and install `-libs-static`, for example, it helps to only need to add one to `makedepends` instead of both. After a grep of the current aports, it turns out matching the prefix of `subpkgname` will be more useful. --- abuild.in | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/abuild.in b/abuild.in index e2df5ce..43adc7d 100644 --- a/abuild.in +++ b/abuild.in @@ -1767,7 +1767,23 @@ dev() { # predefined splitfunc static default_static() { - local i= + local i= devpkg + + # search for -dev package matching our prefix + if [ -z "$depends_static" ]; then + # remove common suffixes to get our prefix + for devpkg in \ + "${subpkgname%-static}" \ + "${subpkgname%-libs-static}" \ + ; + do + devpkg="$devpkg-dev" + if subpackages_has "$devpkg"; then + depends_static="$devpkg" + fi + done + fi + depends="$depends_static" pkgdesc="$pkgdesc (static library)" -- cgit v1.2.3-60-g2f50