From ecd25b51ffd7b36539be5d252849594d3912d846 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Sat, 17 Dec 2011 17:41:57 +0000 Subject: [PATCH] - Reenable LensFun library support by default as I believe it should not crash anymore (and thus bump port revision) - Provide GNOME option to register .desktop file and GConf2 schemas (off by default) - Include instead of after OPTIONS to avoid having to define WANT_GNOME - Minor non-functional Makefile adjustments Reviewed by: gnome@ (feedback from marcus, dougb, bsam) --- graphics/ufraw/Makefile | 41 ++++++++++++++++++++++++++++++---------- graphics/ufraw/pkg-plist | 3 +++ 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/graphics/ufraw/Makefile b/graphics/ufraw/Makefile index d6c7637d4d27..9fbb1a132e73 100644 --- a/graphics/ufraw/Makefile +++ b/graphics/ufraw/Makefile @@ -7,12 +7,12 @@ PORTNAME= ufraw PORTVERSION= 0.18 -PORTREVISION= 1 -CATEGORIES= graphics gnome +PORTREVISION= 2 +CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org -COMMENT= Read and manipulate raw images from digital cameras +COMMENT= Read and manipulate raw images from various digital cameras LICENSE= GPLv2 @@ -32,15 +32,16 @@ PC_FALSE= cinepaint MAN1= ufraw.1 -OPTIONS= CONTRAST "Enable contrast setting" on \ +OPTIONS= CONTRAST "Enable contrast setting option" on \ DST "Use local time for timestamps" off \ EXIV2 "Enable EXIF support via exiv2 library" on \ - LENSFUN "Enable LensFun library support" off \ + LENSFUN "Enable LensFun library support" on \ FITS "Enable FITS output support" off \ - GIMP "Install GIMP UFRaw plugin" off \ - GTK "Build the Gtk+2 GUI" on + GIMP "Install GIMP plugin" off \ + GTK "Build 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 @@ LIB_DEPENDS+= gtkimageview.0:${PORTSDIR}/x11-toolkits/gtkimageview 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 @@ pre-build: @${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 diff --git a/graphics/ufraw/pkg-plist b/graphics/ufraw/pkg-plist index 60fa418b5113..a116b9eaf8ae 100644 --- a/graphics/ufraw/pkg-plist +++ b/graphics/ufraw/pkg-plist @@ -2,6 +2,7 @@ bin/nikon-curve 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 @@ share/pixmaps/ufraw.png @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