From e9ccd0e2a8a966f55315def2f1533d288009436b Mon Sep 17 00:00:00 2001 From: Tijl Coosemans Date: Tue, 6 May 2014 11:57:22 +0000 Subject: [PATCH] Let stage-qa detect .la libraries and warn that a port needs USES=libtool. PR: ports/189255 Approved by: portmgr (antoine) --- Mk/Scripts/qa.sh | 13 ++++++++++++- Mk/bsd.stage.mk | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) 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