Commit f9b62b89 authored by Natanael Copa's avatar Natanael Copa
Browse files

abuild: automatically add libgcc to depends when libpthread is found

parent a5937e5c
......@@ -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"
# special case for libpthread: we need depend on libgcc
if grep -q -w '^*' "$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"
for i in $(cat "$dir"/.needs-so 2>/dev/null); do
......@@ -509,6 +516,7 @@ trace_apk_deps() {
list_has "$found" $autodeps || autodeps="$autodeps $found"
msg "Added '$found' as dependency as it has $i"
[ -z "$autodeps" ] && return 0
echo "# automatically detected:" >> "$dir"/.PKGINFO
for i in $autodeps; do
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment