aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2013-10-11 01:09:33 +0800
committerantoine <antoine@FreeBSD.org>2013-10-11 01:09:33 +0800
commit42b9275c6f7db42b21a2d8712c89619c4736cbc4 (patch)
tree0c949085419182faa444c8e311b7657704285513 /Mk
parent0231dbb892ee20a04227dffb89edf3190b12dba5 (diff)
downloadfreebsd-ports-gnome-42b9275c6f7db42b21a2d8712c89619c4736cbc4.tar.gz
freebsd-ports-gnome-42b9275c6f7db42b21a2d8712c89619c4736cbc4.tar.zst
freebsd-ports-gnome-42b9275c6f7db42b21a2d8712c89619c4736cbc4.zip
Add two QA tests for staged ports:
- check for desktop files handling MIME types - check for share MIME-Info database Approved by: portmgr (bapt)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/qa.sh22
-rw-r--r--Mk/bsd.stage.mk4
2 files changed, 24 insertions, 2 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index c9a3915bc9f3..a8faa6e6213b 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -71,7 +71,27 @@ stripped() {
done
}
-checks="shebang symlinks paths stripped"
+desktopfileutils() {
+ if [ -z "${USESDESKTOPFILEUTILS}" ]; then
+ grep -q MimeType= ${STAGEDIR}${PREFIX}/share/applications/*.desktop 2>/dev/null &&
+ warn "you need USES=desktop-file-utils"
+ else
+ grep -q MimeType= ${STAGEDIR}${PREFIX}/share/applications/*.desktop 2>/dev/null ||
+ warn "you may not need USES=desktop-file-utils"
+ fi
+}
+
+sharedmimeinfo() {
+ if [ -z "${USESSHAREDMIMEINFO}" ]; then
+ find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null &&
+ warn "you need USES=shared-mime-info"
+ else
+ find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null ||
+ warn "you may not need USES=shared-mime-info"
+ fi
+}
+
+checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
ret=0
cd ${STAGEDIR}
diff --git a/Mk/bsd.stage.mk b/Mk/bsd.stage.mk
index 3c78e30bf7d0..265276231fae 100644
--- a/Mk/bsd.stage.mk
+++ b/Mk/bsd.stage.mk
@@ -7,7 +7,9 @@ DESTDIRNAME?= DESTDIR
MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR}
QA_ENV+= STAGEDIR=${STAGEDIR} PREFIX=${PREFIX} \
- LOCALBASE=${LOCALBASE}
+ LOCALBASE=${LOCALBASE} \
+ USESDESKTOPFILEUTILS=${USES:Mdesktop-file-utils} \
+ USESSHAREDMIMEINFO=${USES:Mshared-mime-info}
.if !target(stage-dir)
stage-dir: