summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 24920d5..c01c9bf 100755
--- a/abuild.in
+++ b/abuild.in
@@ -483,7 +483,14 @@ trace_apk_deps() {
if [ -d "$pkgbasedir"/$name/usr/lib/pkgconfig ] \
&& ! grep -q '^depend = pkgconfig' "$dir"/.PKGINFO; then
msg "Added pkgconfig as dependency"
- echo "depend = pkgconfig" >> "$dir"/.PKGINFO
+ autodeps="$autodeps pkgconfig"
+ fi
+
+ # special case for libpthread: we need depend on libgcc
+ if grep -q -w '^libpthread.so.*' "$dir"/.needs-so 2>/dev/null \
+ && ! grep -q -w "^depend = libgcc" "$dir"/.PKGINFO; then
+ autodeps="$autodeps libgcc"
+ msg "Added libgcc as dependency due to libpthread"
fi
for i in $(cat "$dir"/.needs-so 2>/dev/null); do
found=
@@ -509,6 +516,7 @@ trace_apk_deps() {
list_has "$found" $autodeps || autodeps="$autodeps $found"
msg "Added '$found' as dependency as it has $i"
done
+
[ -z "$autodeps" ] && return 0
echo "# automatically detected:" >> "$dir"/.PKGINFO
for i in $autodeps; do