Date: Fri, 16 Dec 2011 19:49:57 +0700 From: Alexey Dokuchaev <danfe@nsu.ru> To: Boris Samorodov <bsam@passap.ru> Cc: gnome@freebsd.org Subject: Re: gconf schemas + .desktop file question Message-ID: <20111216124957.GA67841@regency.nsu.ru> In-Reply-To: <20111216123722.GA63869@regency.nsu.ru> References: <20111209184403.GA17862@regency.nsu.ru> <4EE296DA.60409@freebsd.org> <20111215122654.GA3380@regency.nsu.ru> <4EEA384A.70802@freebsd.org> <20111216103716.GA39744@regency.nsu.ru> <4EEB2B40.3080005@passap.ru> <20111216121009.GA57825@regency.nsu.ru> <20111216123722.GA63869@regency.nsu.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 16, 2011 at 07:37:22PM +0700, Alexey Dokuchaev wrote: > On the second thought (and look), I guess I can install .desktop file > unconditionally without simple hack. I will send another diff for review. Here we go (untested, my tindy is occupied with something else now). ./danfe --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ufraw-gnome2.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 12:42:56 -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,11 +82,23 @@ 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 -# Avoid conflict with `graphics/dcraw' and rename the binary +# Fix GConf2 schemas installation path; unconditionalize installation of +# .desktop file; avoid conflict with `graphics/dcraw' (rename the binary) @${REINPLACE_CMD} -e '/@schemasdir/s|datadir|sysconfdir| ; \ + /@app/s|@INSTALL_MIME_TRUE@|| ; \ s|dcraw\$$(EXEEXT)|${PORTNAME}-&|' ${WRKSRC}/Makefile.in .for i in ${PC_FALSE} @${REINPLACE_CMD} -e '/PKG_CONFIG.*${i}/s|$$PKG_CONFIG|${FALSE}|' \ @@ -96,4 +109,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 16 Dec 2011 12:44:12 -0000 @@ -2,6 +2,7 @@ bin/ufraw-batch bin/ufraw-dcraw %%GIMP%%libexec/gimp/2.2/plug-ins/ufraw-gimp +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 @@ -25,6 +26,8 @@ @dirrmtry share/locale/sr@latin/LC_MESSAGES @dirrmtry share/locale/sr@latin @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 --WIyZ46R2i8wDzkSu--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111216124957.GA67841>