FreeBSD Bugzilla – Attachment 52485 Details for
Bug 79509
add .desktop file facilities to bsd.port.mk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 4.30 KB, created by
Jean-Yves Lefort
on 2005-04-03 18:10:06 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Jean-Yves Lefort
Created:
2005-04-03 18:10:06 UTC
Size:
4.30 KB
patch
obsolete
>--- bsd.port.mk.orig Fri Mar 18 00:22:07 2005 >+++ bsd.port.mk Sun Apr 3 18:59:27 2005 >@@ -844,6 +844,36 @@ > # DATADIR - Name of the directory to install the packages shared data in. > # Default: ${PREFIX}/share/${PORTNAME} > # >+# DESKTOPDIR - Name of the directory to install ${DESKTOP_ENTRIES} in. >+# Default: ${PREFIX}/share/applications >+# DESKTOP_ENTRIES >+# - List of desktop entry files to generate and install in >+# ${DESKTOPDIR}. The format is >+# "Name" "Comment" "Icon" "Exec" "Categories" StartupNotify >+# Rules: >+# * Only add desktop entries for applications which do not >+# require a terminal (ie. X applications). >+# * If the upstream distribution already installs .desktop >+# files, you do not need to use this. >+# * If you require a more elaborate .desktop file than this >+# variable permits, write it yourself and install it >+# in ${DESKTOPDIR}. >+# Notes: >+# * Comment and Icon may be empty strings (""). The other >+# fields are mandatory. >+# * Exec will also be used to name the .desktop file. >+# * The files will be automatically added to ${PLIST}. >+# Example: >+# "X Window Information" \ >+# "Get information about X windows" \ >+# "wininfo.png" \ >+# "wininfo" \ >+# "Application;System;" \ >+# true >+# See http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html >+# for an explanation of the fields. If you need to create more >+# than one file, just chain them into a single variable. >+# > # Note that the install target will automatically add manpages (see > # above) and also substitute special sequences of characters (delimited > # by "%%") as defined in PLIST_SUB to generate ${TMPPLIST}. For >@@ -2718,6 +2748,14 @@ > EXAMPLESDIR="${EXAMPLESDIR:S,^${PREFIX}/,,}" \ > DATADIR="${DATADIR:S,^${PREFIX}/,,}" > >+DESKTOPDIR?= ${PREFIX}/share/applications >+_DESKTOPDIR_REL= ${DESKTOPDIR:S,^${PREFIX}/,,}/ >+ >+.if ${_DESKTOPDIR_REL} == ${DESKTOPDIR}/ >+# DESKTOPDIR is not beneath PREFIX >+_DESKTOPDIR_REL= >+.endif >+ > # Put this as far down as possible so it will catch all PLIST_SUB definitions. > > .if defined(INSTALLS_SHLIB) >@@ -3715,10 +3753,10 @@ > run-depends lib-depends apply-slist pre-install \ > pre-install-script generate-plist check-already-installed > _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \ >- pre-su-install-script do-install post-install \ >- post-install-script add-plist-info add-plist-docs \ >- add-plist-post install-rc-script compress-man run-ldconfig \ >- fake-pkg security-check >+ pre-su-install-script do-install install-desktop-entries \ >+ post-install post-install-script add-plist-info \ >+ add-plist-docs add-plist-post install-rc-script compress-man \ >+ run-ldconfig fake-pkg security-check > _PACKAGE_DEP= install > _PACKAGE_SEQ= package-message pre-package pre-package-script \ > do-package post-package-script >@@ -5139,6 +5177,44 @@ > @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ > (cd $$dir; ${MAKE} rmconfig); \ > done >+.endif >+ >+.if !target(install-desktop-entries) >+install-desktop-entries: >+.if defined(DESKTOP_ENTRIES) >+ @(${MKDIR} "${DESKTOPDIR}" 2> /dev/null) || \ >+ (${ECHO_MSG} "===> Cannot create ${DESKTOPDIR}, check permissions"; exit 1) >+ @set ${DESKTOP_ENTRIES} XXX; \ >+ if [ -z "${_DESKTOPDIR_REL}" ]; then \ >+ ${ECHO_CMD} "@cwd ${DESKTOPDIR}" >> ${TMPPLIST}; \ >+ fi; \ >+ while [ $$# -gt 6 ]; do \ >+ filename="$$4.desktop"; \ >+ pathname="${DESKTOPDIR}/$$filename"; \ >+ ${ECHO_CMD} "${_DESKTOPDIR_REL}$$filename" >> ${TMPPLIST}; \ >+ ${ECHO_CMD} "[Desktop Entry]" > $$pathname; \ >+ ${ECHO_CMD} "Type=Application" >> $$pathname; \ >+ ${ECHO_CMD} "Version=0.9.4" >> $$pathname; \ >+ ${ECHO_CMD} "Encoding=UTF-8" >> $$pathname; \ >+ ${ECHO_CMD} "Name=$$1" >> $$pathname; \ >+ if [ -n "$$2" ]; then \ >+ ${ECHO_CMD} "Comment=$$2" >> $$pathname; \ >+ fi; \ >+ if [ -n "$$3" ]; then \ >+ ${ECHO_CMD} "Icon=$$3" >> $$pathname; \ >+ fi; \ >+ ${ECHO_CMD} "Exec=$$4" >> $$pathname; \ >+ ${ECHO_CMD} "Categories=$$5" >> $$pathname; \ >+ ${ECHO_CMD} "StartupNotify=$$6" >> $$pathname; \ >+ shift 6; \ >+ done; \ >+ ${ECHO_CMD} "@unexec rmdir ${DESKTOPDIR} 2>/dev/null || true" >> ${TMPPLIST}; \ >+ if [ -z "${_DESKTOPDIR_REL}" ]; then \ >+ ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ >+ fi >+.else >+ @${DO_NADA} >+.endif > .endif > > .endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 79509
: 52485 |
52486