aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2014-05-06 19:57:22 +0800
committertijl <tijl@FreeBSD.org>2014-05-06 19:57:22 +0800
commite683f30076ad2813c89f6a624151b2f017431674 (patch)
tree0e667521b086effdd2b6f88a099e8a3e3e81fdf3 /Mk
parentd369d8f924a3a17cc78d60bc4b6f2d24befc6f2a (diff)
downloadfreebsd-ports-gnome-e683f30076ad2813c89f6a624151b2f017431674.tar.gz
freebsd-ports-gnome-e683f30076ad2813c89f6a624151b2f017431674.tar.zst
freebsd-ports-gnome-e683f30076ad2813c89f6a624151b2f017431674.zip
Let stage-qa detect .la libraries and warn that a port needs USES=libtool.
PR: ports/189255 Approved by: portmgr (antoine)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/qa.sh13
-rw-r--r--Mk/bsd.stage.mk3
2 files changed, 15 insertions, 1 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index c54010a15500..d9736ef03552 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -172,7 +172,18 @@ suidfiles() {
return 0
}
-checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles"
+libtool() {
+ if [ -z "${USESLIBTOOL}" ]; then
+ find ${STAGEDIR} -type f -name '*.la' | while read f; do
+ grep -q 'libtool library' "${f}" &&
+ warn ".la libraries found, port needs USES=libtool" &&
+ return 0 || true
+ done
+ # The return above continues here.
+ fi
+}
+
+checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool"
ret=0
cd ${STAGEDIR}
diff --git a/Mk/bsd.stage.mk b/Mk/bsd.stage.mk
index d05e7718f97b..64e674b3185e 100644
--- a/Mk/bsd.stage.mk
+++ b/Mk/bsd.stage.mk
@@ -17,6 +17,9 @@ QA_ENV+= STAGEDIR=${STAGEDIR} \
.if !empty(USES:Mdesktop-file-utils)
QA_ENV+= USESDESKTOPFILEUTILS=yes
.endif
+.if !empty(USES:Mlibtool*)
+QA_ENV+= USESLIBTOOL=yes
+.endif
.if !empty(USES:Mshared-mime-info)
QA_ENV+= USESSHAREDMIMEINFO=yes
.endif