summaryrefslogtreecommitdiffstats
path: root/newapkbuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'newapkbuild.in')
-rw-r--r--newapkbuild.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/newapkbuild.in b/newapkbuild.in
index b0349c6..d19e197 100644
--- a/newapkbuild.in
+++ b/newapkbuild.in
@@ -207,6 +207,12 @@ __EOF__
done
echo "builddir=$builddir" >> APKBUILD
+ # Subpackage -dev is usually required only for C/C++. Since depends_dev
+ # confuses a lot people, remove it if there's no .h or .hpp file.
+ find "$sdir" -name "*.h" -o -name "*.hpp" -maxdepth 3 \
+ | head -n 1 | grep -q ".*" \
+ || sed -i -e '/^depends_dev=.*/d' -e 's/\$depends_dev\s*//' APKBUILD
+
# Check if its autotools
if [ -z "$buildtype" ]; then
if [ -x "$sdir"/configure ]; then