From owner-freebsd-gnome@FreeBSD.ORG Fri Dec 16 12:49:03 2011 Return-Path: Delivered-To: gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CB48106566C for ; Fri, 16 Dec 2011 12:49:03 +0000 (UTC) (envelope-from danfe@regency.nsu.ru) Received: from mx.nsu.ru (r2b9.nsu.ru [212.192.164.39]) by mx1.freebsd.org (Postfix) with ESMTP id DEA9E8FC12 for ; Fri, 16 Dec 2011 12:49:02 +0000 (UTC) Received: from regency.nsu.ru ([193.124.210.26]) by mx.nsu.ru with esmtp (Exim 4.69) (envelope-from ) id 1RbXDP-000371-CJ; Fri, 16 Dec 2011 19:48:43 +0700 Received: from regency.nsu.ru (localhost [127.0.0.1]) by regency.nsu.ru (8.14.2/8.14.2) with ESMTP id pBGCo3oF069313; Fri, 16 Dec 2011 19:50:03 +0700 (NOVT) (envelope-from danfe@regency.nsu.ru) Received: (from danfe@localhost) by regency.nsu.ru (8.14.2/8.14.2/Submit) id pBGCnw3r069295; Fri, 16 Dec 2011 19:49:58 +0700 (NOVT) (envelope-from danfe) Date: Fri, 16 Dec 2011 19:49:57 +0700 From: Alexey Dokuchaev To: Boris Samorodov Message-ID: <20111216124957.GA67841@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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <20111216123722.GA63869@regency.nsu.ru> User-Agent: Mutt/1.4.2.1i Cc: gnome@freebsd.org Subject: Re: gconf schemas + .desktop file question X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 12:49:03 -0000 --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 +.include .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 |' \ ${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 +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 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--