Date: Thu, 10 Oct 2013 17:09:33 +0000 (UTC) From: Antoine Brodin <antoine@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r330020 - in head/Mk: . Scripts Message-ID: <201310101709.r9AH9XNa047943@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: antoine Date: Thu Oct 10 17:09:33 2013 New Revision: 330020 URL: http://svnweb.freebsd.org/changeset/ports/330020 Log: Add two QA tests for staged ports: - check for desktop files handling MIME types - check for share MIME-Info database Approved by: portmgr (bapt) Modified: head/Mk/Scripts/qa.sh head/Mk/bsd.stage.mk Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Thu Oct 10 16:56:42 2013 (r330019) +++ head/Mk/Scripts/qa.sh Thu Oct 10 17:09:33 2013 (r330020) @@ -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} Modified: head/Mk/bsd.stage.mk ============================================================================== --- head/Mk/bsd.stage.mk Thu Oct 10 16:56:42 2013 (r330019) +++ head/Mk/bsd.stage.mk Thu Oct 10 17:09:33 2013 (r330020) @@ -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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310101709.r9AH9XNa047943>