aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2013-04-17 05:21:25 +0800
committerkwm <kwm@FreeBSD.org>2013-04-17 05:21:25 +0800
commit6d7ee2ac18574d0e9159f386bfe7b4869c979ed0 (patch)
tree7034af2637b3d824c8f291b541ef127ad8af9124 /Mk/Uses
parentc00b78307a4b0be0007531fb5b857122cd5de1f8 (diff)
downloadfreebsd-ports-gnome-6d7ee2ac18574d0e9159f386bfe7b4869c979ed0.tar.gz
freebsd-ports-gnome-6d7ee2ac18574d0e9159f386bfe7b4869c979ed0.tar.zst
freebsd-ports-gnome-6d7ee2ac18574d0e9159f386bfe7b4869c979ed0.zip
Add desktop-file-utils and share-mime-info Uses. These will take care of all
the magic. Approved by: portmgr (bapt) Feature safe: yes
Diffstat (limited to 'Mk/Uses')
-rw-r--r--Mk/Uses/desktop-file-utils.mk34
-rw-r--r--Mk/Uses/shared-mime-info.mk34
2 files changed, 68 insertions, 0 deletions
diff --git a/Mk/Uses/desktop-file-utils.mk b/Mk/Uses/desktop-file-utils.mk
new file mode 100644
index 000000000000..34989cb7fd46
--- /dev/null
+++ b/Mk/Uses/desktop-file-utils.mk
@@ -0,0 +1,34 @@
+# $FreeBSD$
+#
+# handle dependency depends on desktop-file-info and package regen
+#
+# MAINTAINER: gnome@FreeBSD.org
+#
+# Feature: desktop-file-info
+# Usage: USES=desktop-file-info
+# Valid ARGS: does not require args
+#
+#
+.if !defined(_INCLUDE_USES_DESKTOP_FILE_INFO_MK)
+_INCLUDE_USES_DESKTOP_FILE_INFO_MK= yes
+
+.if defined(desktop-file-info_ARGS)
+IGNORE= USES=desktop-file-info does not require args
+.endif
+
+BUILD_DEPENDS+= update-desktop-database:${PORTSDIR}/devel/desktop-file-utils
+RUN_DEPENDS+= update-desktop-database:${PORTSDIR}/devel/desktop-file-utils
+
+# bolt our post-install target to post-install
+post-install: desktop-file-post-install
+
+desktop-file-post-install:
+# run for port post-install
+ @-update-desktop-database
+# plist entries for packages.
+ @${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-desktop-database > /dev/null || /usr/bin/true" \
+ >> ${TMPPLIST}; \
+ ${ECHO_CMD} "@unexec ${LOCALBASE}/bin/update-desktop-database > /dev/null || /usr/bin/true" \
+ >> ${TMPPLIST}
+
+.endif
diff --git a/Mk/Uses/shared-mime-info.mk b/Mk/Uses/shared-mime-info.mk
new file mode 100644
index 000000000000..1e52879566ae
--- /dev/null
+++ b/Mk/Uses/shared-mime-info.mk
@@ -0,0 +1,34 @@
+# $FreeBSD$
+#
+# handle dependency depends on shared-mime-info and package regen
+#
+# MAINTAINER: gnome@FreeBSD.org
+#
+# Feature: shared-mime-info
+# Usage: USES=shared-mime-info
+# Valid ARGS: does not require args
+#
+#
+.if !defined(_INCLUDE_USES_SHARED_MIME_INFO_MK)
+_INCLUDE_USES_SHARED_MIME_INFO_MK= yes
+
+.if defined(shared-mime-info_ARGS)
+IGNORE= USES=shared-mime-info does not require args
+.endif
+
+BUILD_DEPENDS+= update-mime-database:${PORTSDIR}/misc/shared-mime-info
+RUN_DEPENDS+= update-mime-database:${PORTSDIR}/misc/shared-mime-info
+
+# bolt our post-install target to post-install
+post-install: shared-mime-post-install
+
+shared-mime-post-install:
+# run for port post-install
+ @-update-desktop-database
+# plist entries for packages.
+ @${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-mime-database %D/share/mime" \
+ >> ${TMPPLIST}; \
+ ${ECHO_CMD} "@unexec ${LOCALBASE}/bin/update-mime-database %D/share/mime" \
+ >> ${TMPPLIST}
+
+.endif