cvs commit: ports/x11/xterm Makefile pkg-plist

Doug Barton dougb at FreeBSD.org
Wed Sep 21 20:05:16 UTC 2011


On 09/21/2011 12:08, Emanuel Haupt wrote:
> Doug Barton <dougb at FreeBSD.org> wrote:
>> On 09/21/2011 02:58, Emanuel Haupt wrote:
>>> Peter Jeremy <peterjeremy at acm.org> wrote:
>>
>>>> This is a bit belated but why does xterm need a hard dependency
>>>> on gnome?  Could you please look at making this optional so that
>>>> those of us who don't run bloatware can turn it off.
>>>
>>> Good point. I've just committed a patch that makes the installation
>>> of desktop entries conditional.
>>
>> What isn't clear to me is why the installation of the desktop entry
>> depends on gnome at all. Why not just install the file? I ask because
>> (at least) xfce also uses the desktop entries, so having them is
>> useful for non-gnome cases as well.
> 
> From what I understand "desktopfileutils" needs to be set in (USE|
> WANT)_GNOME if there are *.desktop files installed. This is where some
> gnome dependencies are pulled in.

Yes, I understand that this is your understanding, otherwise you
wouldn't have done it that way. :)  I am attempting to challenge that
understanding. IOW, can the installation of the desktop file be split
out from the gnome desktopfileutils part?

The attached works for the non-gnome case, and the xterm.desktop file
appears as expected for xfce.


Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/x11/xterm/Makefile,v
retrieving revision 1.89
diff -u -r1.89 Makefile
--- Makefile	21 Sep 2011 09:57:30 -0000	1.89
+++ Makefile	21 Sep 2011 20:02:44 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	xterm
 PORTVERSION=	275
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11
 MASTER_SITES=	ftp://invisible-island.net/xterm/ \
 		CRITICAL
@@ -27,7 +27,7 @@
 		256_COLOR "enable 256-color support" off \
 		DEC_LOCATOR "enable DECterm Locator support" off \
 		PCRE "use PCRE for regular-expressions" off \
-		DESKTOP "install desktop entries" off
+		GNOME "include gnome support for .desktop file" off
 
 CPPFLAGS+=	-I${LOCALBASE}/include
 
@@ -55,11 +55,11 @@
 LIB_DEPENDS=		pcre.0:${PORTSDIR}/devel/pcre
 .endif
 
-.if defined(WITH_DESKTOP)
+.if defined(WITH_GNOME)
 USE_GNOME=		desktopfileutils
-PLIST_SUB+=		DESKTOP=""
+PLIST_SUB+=		GNOME=""
 .else
-PLIST_SUB+=		DESKTOP="@comment "
+PLIST_SUB+=		GNOME="@comment "
 .endif
 
 MAN1=		resize.1 koi8rxterm.1 uxterm.1 xterm.1
@@ -74,9 +74,9 @@
 .for f in koi8rxterm resize uxterm xterm
 	@${CHMOD} ${BINMODE} ${PREFIX}/bin/${f}
 .endfor
-.if defined(WITH_DESKTOP)
 	@${MKDIR} ${PREFIX}/share/applications/
 	@${INSTALL_DATA} ${WRKSRC}/xterm.desktop ${PREFIX}/share/applications/
+.if defined(WITH_GNOME)
 	@-update-desktop-database
 .endif
 
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/x11/xterm/pkg-plist,v
retrieving revision 1.9
diff -u -r1.9 pkg-plist
--- pkg-plist	21 Sep 2011 09:57:30 -0000	1.9
+++ pkg-plist	21 Sep 2011 20:02:44 -0000
@@ -8,11 +8,11 @@
 lib/X11/app-defaults/UXTerm-color
 lib/X11/app-defaults/XTerm
 lib/X11/app-defaults/XTerm-color
-%%DESKTOP%%share/applications/xterm.desktop
+share/applications/xterm.desktop
 share/pixmaps/xterm-color_32x32.xpm
 share/pixmaps/xterm-color_48x48.xpm
 share/pixmaps/xterm_32x32.xpm
 share/pixmaps/xterm_48x48.xpm
-%%DESKTOP%%@dirrmtry share/applications
-%%DESKTOP%%@exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
-%%DESKTOP%%@unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
+ at dirrmtry share/applications
+%%GNOME%%@exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true
+%%GNOME%%@unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true


More information about the cvs-ports mailing list