Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2011 17:37:16 +0700
From:      Alexey Dokuchaev <danfe@nsu.ru>
To:        gnome@freebsd.org
Subject:   Re: gconf schemas + .desktop file question
Message-ID:  <20111216103716.GA39744@regency.nsu.ru>
In-Reply-To: <4EEA384A.70802@freebsd.org>
References:  <20111209184403.GA17862@regency.nsu.ru> <4EE296DA.60409@freebsd.org> <20111215122654.GA3380@regency.nsu.ru> <4EEA384A.70802@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Dec 15, 2011 at 01:11:22PM -0500, Joe Marcus Clarke wrote:
> On 12/15/11 7:26 AM, Alexey Dokuchaev wrote:
> > On Fri, Dec 09, 2011 at 06:16:42PM -0500, Joe Marcus Clarke wrote:
> >> You need to run gconftool-2 to properly install schema, which means that
> >> gconf will need to be installed.  For the .desktop file, look at
> >> x11/xterm.  They do a good job of making this optional.
> >>
> >> For gconf schema installation, look at deskutils/akamaru.
> > 
> > hmm, while x11/xterm calls `update-desktop-database' both for port (in
> > post-install target) and package (via @exec/@unexec), deskutils/akamaru
> > has suspiciously short pkg-plist..  looks like schemas won't be properly
> > installed from package, no?  or it is handled somewhere in bsd.gnome.mk?
> 
> bsd.gnome.mk handles schema installation when you set GCONF_SCHEMAS.

right, i see.

i've attached proposed changes to the port; if someone from the gnome team
could provide a review, i'd appreciate it.

./danfe

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ufraw-gnome.diff"

Index: Makefile
===================================================================
RCS file: /home/danfe/fbsd/FreeBSD-CVS/ports/graphics/ufraw/Makefile,v
retrieving revision 1.51
diff -u -r1.51 Makefile
--- Makefile	30 Nov 2011 10:14:01 -0000	1.51
+++ Makefile	16 Dec 2011 10:29:27 -0000
@@ -8,7 +8,7 @@
 PORTNAME=	ufraw
 PORTVERSION=	0.18
 PORTREVISION=	1
-CATEGORIES=	graphics gnome
+CATEGORIES=	graphics
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
@@ -38,9 +38,10 @@
 		LENSFUN	"Enable LensFun library support"	off \
 		FITS	"Enable FITS output support"		off \
 		GIMP	"Install GIMP UFRaw plugin"		off \
-		GTK	"Build the Gtk+2 GUI"			on
+		GTK	"Build the Gtk+2 GUI"			on \
+		GNOME	"Register .desktop file and GConf2 schemas" off
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 .if defined(WITH_CONTRAST)
 CONFIGURE_ARGS+=	--enable-contrast
@@ -81,6 +82,16 @@
 PLIST_FILES+=	bin/ufraw
 .endif
 
+.if defined(WITH_GNOME)
+CATEGORIES+=	gnome
+USE_GNOME=	desktopfileutils gconf2
+CONFIGURE_ARGS+=	--enable-mime
+GCONF_SCHEMAS=	${PORTNAME}.schemas
+PLIST_SUB+=	GNOME=""
+.else
+PLIST_SUB+=	GNOME="@comment "
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e '18s|^$$|#include <sys/types.h>|' \
 		${WRKSRC}/dcraw.h
@@ -96,4 +107,12 @@
 	@${INSTALL_SCRIPT} ${LOCALBASE}/share/glib-2.0/gettext/mkinstalldirs \
 		${WRKSRC}
 
-.include <bsd.port.post.mk>
+post-install:
+.if defined(WITH_GNOME)
+	@${SETENV} GCONF_CONFIG_SOURCE=${GCONF_CONFIG_SOURCE} \
+		gconftool-2 --makefile-install-rule \
+		${PREFIX}/etc/gconf/schemas/${PORTNAME}.schemas
+	@-update-desktop-database
+.endif
+
+.include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /home/danfe/fbsd/FreeBSD-CVS/ports/graphics/ufraw/pkg-plist,v
retrieving revision 1.16
diff -u -r1.16 pkg-plist
--- pkg-plist	30 Nov 2011 10:14:01 -0000	1.16
+++ pkg-plist	15 Dec 2011 12:15:42 -0000
@@ -2,6 +2,7 @@
 bin/ufraw-batch
 bin/ufraw-dcraw
 %%GIMP%%libexec/gimp/2.2/plug-ins/ufraw-gimp
+%%GNOME%%share/applications/ufraw.desktop
 share/locale/ca/LC_MESSAGES/ufraw.mo
 share/locale/cs/LC_MESSAGES/ufraw.mo
 share/locale/da/LC_MESSAGES/ufraw.mo
@@ -24,7 +25,9 @@
 share/pixmaps/ufraw.png
 @dirrmtry share/locale/sr@latin/LC_MESSAGES
 @dirrmtry share/locale/sr@latin
-@dirrmtry share/applications
+%%GNOME%%@dirrmtry share/applications
+%%GNOME%%@exec %D/bin/update-desktop-database > /dev/null || /usr/bin/true
+%%GNOME%%@unexec %D/bin/update-desktop-database > /dev/null || /usr/bin/true
 %%GIMP%%@dirrmtry libexec/gimp/2.2/plug-ins
 %%GIMP%%@dirrmtry libexec/gimp/2.2
 %%GIMP%%@dirrmtry libexec/gimp

--OXfL5xGRrasGEqWY--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111216103716.GA39744>