diff options
author | tcely <tcely@users.noreply.github.com> | 2019-08-15 13:19:59 -0400 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-09-30 11:58:20 +0000 |
commit | 5486d877c587d957e0a8f55063c580e1cbb61071 (patch) | |
tree | 90b9b6afef548ed5f77ea54093193e346543dbf5 | |
parent | 7a8b3a8e7d252d5e8393d032e70e3c1deedd8c61 (diff) | |
download | abuild-5486d877c587d957e0a8f55063c580e1cbb61071.tar.bz2 abuild-5486d877c587d957e0a8f55063c580e1cbb61071.tar.xz |
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.
-rw-r--r-- | abuild.in | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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)" |