From owner-svn-ports-head@FreeBSD.ORG Thu Jun 12 09:10:16 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F20F91FA; Thu, 12 Jun 2014 09:10:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2E01222D; Thu, 12 Jun 2014 09:10:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5C9AFSP027357; Thu, 12 Jun 2014 09:10:15 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5C9AFMZ027355; Thu, 12 Jun 2014 09:10:15 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201406120910.s5C9AFMZ027355@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Thu, 12 Jun 2014 09:10:15 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r357572 - head/graphics/darktable X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 09:10:16 -0000 Author: dumbbell (src committer) Date: Thu Jun 12 09:10:15 2014 New Revision: 357572 URL: http://svnweb.freebsd.org/changeset/ports/357572 QAT: https://qat.redports.org/buildarchive/r357572/ Log: graphics/darktable: Simplify options-dependent parts Use variables prefixed by option names. This removes the need to use .if blocks. Use OPTIONS_SUB=yes and %%OPTION%% markers in pkg-plist. This fixes pkg-plist for at least the LUA option [1]. Remove the post-patch target. It's not needed anymore, as the changes were committed upstream. Replace the usage of bsd.port.pre.mk/bsd.port.post.mk by bsd.port.options.mk/bsd.port.mk. Fix the build when WITH_DEBUG=1 is set. darktable's CMakeLists.txt throws a fatal error if CMAKE_BUILD_TYPE is set to Debug and suggests to use RelWithDebInfo: we now follow this advice. Sort USES and options-prefixed variables alphabetically. PR: 190516 [1] Phabricator: D178 Submitted by: Matthieu Volat (previous patch to fix [1]) Reviewed by: bapt@ Approved by: bapt@ Modified: head/graphics/darktable/Makefile head/graphics/darktable/pkg-plist Modified: head/graphics/darktable/Makefile ============================================================================== --- head/graphics/darktable/Makefile Thu Jun 12 08:49:38 2014 (r357571) +++ head/graphics/darktable/Makefile Thu Jun 12 09:10:15 2014 (r357572) @@ -20,7 +20,7 @@ LIB_DEPENDS= libexiv2.so:${PORTSDIR}/gra ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= uses SSE extensions -USES= cmake:outsource pkgconfig tar:xz ninja desktop-file-utils +USES= cmake:outsource desktop-file-utils ninja pkgconfig tar:xz USE_GNOME= librsvg2 USE_SQLITE= yes USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME} @@ -39,140 +39,75 @@ SLIDESHOW_DESC= Build OpenGL/SDL slidesh OPTIONS_DEFAULT=COLORD FB_PICASA FLICKR GEO GPHOTO LUA NLS OPENEXR \ OPENJPEG RAWSPEED WEBP +OPTIONS_SUB= yes CMAKE_ARGS+= -DBINARY_PACKAGE_BUILD=1 -.include +# darktable 1.4 can use colord but provides its own libcolord, +# statically linked to libdarktable.so. +COLORD_LIB_DEPENDS= libcolord.so:${PORTSDIR}/graphics/colord +COLORD_CMAKE_OFF= -DUSE_COLORD:BOOL=OFF -.if ${PORT_OPTIONS:MGPHOTO} -LIB_DEPENDS+= libgphoto2.so:${PORTSDIR}/graphics/libgphoto2 -PLIST_FILES+= lib/darktable/plugins/lighttable/libcamera.so \ - lib/darktable/plugins/lighttable/libcapture.so \ - lib/darktable/plugins/lighttable/liblive_view.so \ - lib/darktable/views/libcapture.so -.else -CMAKE_ARGS+= -DUSE_CAMERA_SUPPORT:BOOL=OFF -.endif +FB_PICASA_LIB_DEPENDS= libjson-glib-1.0.so:${PORTSDIR}/devel/json-glib +FB_PICASA_CMAKE_OFF= -DUSE_GLIBJSON:BOOL=OFF -.if ${PORT_OPTIONS:MGEO} -LIB_DEPENDS+= libsoup-2.4.so:${PORTSDIR}/devel/libsoup -PLIST_FILES+= lib/darktable/plugins/lighttable/libgeotagging.so \ - lib/darktable/plugins/lighttable/liblocation.so \ - lib/darktable/plugins/lighttable/libmap_settings.so \ - lib/darktable/views/libmap.so -.else -CMAKE_ARGS+= -DUSE_GEO:BOOL=OFF -.endif +FLICKR_LIB_DEPENDS= libflickcurl.so:${PORTSDIR}/www/flickcurl +FLICKR_CMAKE_OFF= -DUSE_FLICKR:BOOL=OFF -.if ${PORT_OPTIONS:MFLICKR} -LIB_DEPENDS+= libflickcurl.so:${PORTSDIR}/www/flickcurl -PLIST_FILES+= lib/darktable/plugins/imageio/storage/libflickr.so -.else -CMAKE_ARGS+= -DUSE_FLICKR:BOOL=OFF -.endif +GEO_LIB_DEPENDS= libsoup-2.4.so:${PORTSDIR}/devel/libsoup +GEO_CMAKE_OFF= -DUSE_GEO:BOOL=OFF -.if ${PORT_OPTIONS:MFB_PICASA} -LIB_DEPENDS+= libjson-glib-1.0.so:${PORTSDIR}/devel/json-glib -PLIST_FILES+= lib/darktable/plugins/imageio/storage/libfacebook.so \ - lib/darktable/plugins/imageio/storage/libpicasa.so -.else -CMAKE_ARGS+= -DUSE_GLIBJSON:BOOL=OFF -.endif +GNOMEKEYRING_LIB_DEPENDS=libgnome-keyring.so:${PORTSDIR}/security/libgnome-keyring +GNOMEKEYRING_CMAKE_OFF= -DUSE_GNOME_KEYRING:BOOL=OFF -.if ${PORT_OPTIONS:MGNOMEKEYRING} -LIB_DEPENDS+= libgnome-keyring.so:${PORTSDIR}/security/libgnome-keyring -.else -CMAKE_ARGS+= -DUSE_GNOME_KEYRING:BOOL=OFF -.endif +GPHOTO_LIB_DEPENDS= libgphoto2.so:${PORTSDIR}/graphics/libgphoto2 +GPHOTO_CMAKE_OFF= -DUSE_CAMERA_SUPPORT:BOOL=OFF -.if ! ${PORT_OPTIONS:MRAWSPEED} -CMAKE_ARGS+= -DDONT_USE_RAWSPEED:BOOL=ON -.endif +GRAPHMAGICK_LIB_DEPENDS=libGraphicsMagick.so:${PORTSDIR}/graphics/GraphicsMagick13 +GRAPHMAGICK_CMAKE_OFF= -DUSE_GRAPHICSMAGICK:BOOL=OFF -.if ${PORT_OPTIONS:MOPENEXR} -LIB_DEPENDS+= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR -PLIST_FILES+= lib/darktable/plugins/imageio/format/libexr.so -.else -CMAKE_ARGS+= -DUSE_OPENEXR:BOOL=OFF -.endif +LUA_USES= lua +LUA_CMAKE_OFF= -DUSE_LUA:BOOL=OFF -.if ${PORT_OPTIONS:MOPENJPEG} -LIB_DEPENDS+= libopenjpeg.so:${PORTSDIR}/graphics/openjpeg15 -PLIST_FILES+= lib/darktable/plugins/imageio/format/libj2k.so -.else -CMAKE_ARGS+= -DUSE_OPENJPEG:BOOL=OFF -.endif +NLS_USES= gettext +NLS_CMAKE_OFF= -DUSE_NLS:BOOL=OFF -.if ${PORT_OPTIONS:MCOLORD} -# darktable 1.4 can use colord but provides its own libcolord, -# statically linked to libdarktable.so. -LIB_DEPENDS+= libcolord.so:${PORTSDIR}/graphics/colord -.else -CMAKE_ARGS+= -DUSE_COLORD:BOOL=OFF -.endif +OPENEXR_LIB_DEPENDS= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR +OPENEXR_CMAKE_OFF= -DUSE_OPENEXR:BOOL=OFF -.if ${PORT_OPTIONS:MGRAPHMAGICK} -LIB_DEPENDS+= libGraphicsMagick.so:${PORTSDIR}/graphics/GraphicsMagick13 -.else -CMAKE_ARGS+= -DUSE_GRAPHICSMAGICK:BOOL=OFF -.endif +OPENJPEG_LIB_DEPENDS= libopenjpeg.so:${PORTSDIR}/graphics/openjpeg15 +OPENJPEG_CMAKE_OFF= -DUSE_OPENJPEG:BOOL=OFF -.if ${PORT_OPTIONS:MLUA} -USES+= lua -PLIST_FILES+= %%DATADIR%%/lua/darktable/debug.lua \ - %%DATADIR%%/luarc -.else -CMAKE_ARGS+= -DUSE_LUA:BOOL=OFF -.endif +RAWSPEED_CMAKE_OFF= -DDONT_USE_RAWSPEED:BOOL=ON -.if ${PORT_OPTIONS:MSQUISH} -BUILD_DEPENDS+= ${LOCALBASE}/lib/libsquish.a:${PORTSDIR}/graphics/squish -.else -CMAKE_ARGS+= -DUSE_SQUISH:BOOL=OFF -.endif +SLIDESHOW_USE= GL=gl SDL=sdl +SLIDESHOW_CMAKE_OFF= -DBUILD_SLIDESHOW:BOOL=OFF -.if ${PORT_OPTIONS:MSLIDESHOW} -USE_GL= gl -USE_SDL= sdl -PLIST_FILES+= bin/darktable-viewer -.else -CMAKE_ARGS+= -DBUILD_SLIDESHOW:BOOL=OFF -.endif +SQUISH_BUILD_DEPENDS= ${LOCALBASE}/lib/libsquish.a:${PORTSDIR}/graphics/squish +SQUISH_CMAKE_OFF= -DUSE_SQUISH:BOOL=OFF -.if ${PORT_OPTIONS:MWEBP} -LIB_DEPENDS+= libwebp.so:${PORTSDIR}/graphics/webp -PLIST_FILES+= lib/darktable/plugins/imageio/format/libwebp.so -.else -CMAKE_ARGS+= -DUSE_WEBP:BOOL=OFF -.endif +WEBP_LIB_DEPENDS= libwebp.so:${PORTSDIR}/graphics/webp +WEBP_CMAKE_OFF= -DUSE_WEBP:BOOL=OFF -.if ${PORT_OPTIONS:MNLS} -USES+= gettext -.else -CMAKE_ARGS+= -DUSE_NLS:BOOL=OFF -.endif +.include .if ${OSVERSION} < 1000000 USE_GCC= yes .endif -post-patch: - @${REINPLACE_CMD} -e 's,__APPLE__,__${OPSYS}__,' \ - ${WRKSRC}/src/common/utility.c -# Do not install useless (to end-user) documentation; adjust manpages path - @${REINPLACE_CMD} -e '/DOC_FILES/d ; s,share/man/man1,man/man1,' \ - ${WRKSRC}/doc/CMakeLists.txt +.if defined(WITH_DEBUG) +CMAKE_BUILD_TYPE?= RelWithDebInfo +STRIP= +.endif -post-install: .if ! ${PORT_OPTIONS:MDOCS} - @${RM} ${STAGEDIR}${DOCSDIR}/darktablerc.html - @${RMDIR} ${STAGEDIR}${DOCSDIR} -.endif -.if ! ${PORT_OPTIONS:MRAWSPEED} - @${REINPLACE_CMD} -e '/rawspeed/d' ${TMPPLIST} -.endif -.if ! ${PORT_OPTIONS:MNLS} - @${REINPLACE_CMD} -e '/LC_MESSAGES/d' ${TMPPLIST} +post-install: + ${RM} ${STAGEDIR}${DOCSDIR}/AUTHORS + ${RM} ${STAGEDIR}${DOCSDIR}/LICENSE + ${RM} ${STAGEDIR}${DOCSDIR}/README + ${RM} ${STAGEDIR}${DOCSDIR}/TRANSLATORS + ${RM} ${STAGEDIR}${DOCSDIR}/darktablerc.html + ${RMDIR} ${STAGEDIR}${DOCSDIR} .endif -.include +.include Modified: head/graphics/darktable/pkg-plist ============================================================================== --- head/graphics/darktable/pkg-plist Thu Jun 12 08:49:38 2014 (r357571) +++ head/graphics/darktable/pkg-plist Thu Jun 12 09:10:15 2014 (r357572) @@ -1,17 +1,24 @@ bin/darktable bin/darktable-cli bin/darktable-cltest +%%SLIDESHOW%%bin/darktable-viewer lib/darktable/libdarktable.so lib/darktable/plugins/imageio/format/libcopy.so +%%OPENEXR%%lib/darktable/plugins/imageio/format/libexr.so +%%OPENJPEG%%lib/darktable/plugins/imageio/format/libj2k.so lib/darktable/plugins/imageio/format/libjpeg.so lib/darktable/plugins/imageio/format/libpfm.so lib/darktable/plugins/imageio/format/libpng.so lib/darktable/plugins/imageio/format/libppm.so lib/darktable/plugins/imageio/format/libtiff.so +%%WEBP%%lib/darktable/plugins/imageio/format/libwebp.so lib/darktable/plugins/imageio/storage/libdisk.so lib/darktable/plugins/imageio/storage/libemail.so +%%FB_PICASA%%lib/darktable/plugins/imageio/storage/libfacebook.so +%%FLICKR%%lib/darktable/plugins/imageio/storage/libflickr.so lib/darktable/plugins/imageio/storage/libgallery.so lib/darktable/plugins/imageio/storage/liblatex.so +%%FB_PICASA%%lib/darktable/plugins/imageio/storage/libpicasa.so lib/darktable/plugins/libatrous.so lib/darktable/plugins/libbasecurve.so lib/darktable/plugins/libbilat.so @@ -70,6 +77,8 @@ lib/darktable/plugins/libvignette.so lib/darktable/plugins/libwatermark.so lib/darktable/plugins/libzonesystem.so lib/darktable/plugins/lighttable/libbackgroundjobs.so +%%GPHOTO%%lib/darktable/plugins/lighttable/libcamera.so +%%GPHOTO%%lib/darktable/plugins/lighttable/libcapture.so lib/darktable/plugins/lighttable/libcollect.so lib/darktable/plugins/lighttable/libcolorlabels.so lib/darktable/plugins/lighttable/libcolorpicker.so @@ -78,6 +87,7 @@ lib/darktable/plugins/lighttable/libdark lib/darktable/plugins/lighttable/libexport.so lib/darktable/plugins/lighttable/libfilmstrip.so lib/darktable/plugins/lighttable/libfilter.so +%%GEO%%lib/darktable/plugins/lighttable/libgeotagging.so lib/darktable/plugins/lighttable/libglobal_toolbox.so lib/darktable/plugins/lighttable/libhinter.so lib/darktable/plugins/lighttable/libhistogram.so @@ -85,6 +95,9 @@ lib/darktable/plugins/lighttable/libhist lib/darktable/plugins/lighttable/libimage.so lib/darktable/plugins/lighttable/libimport.so lib/darktable/plugins/lighttable/liblighttable_mode.so +%%GPHOTO%%lib/darktable/plugins/lighttable/liblive_view.so +%%GEO%%lib/darktable/plugins/lighttable/liblocation.so +%%GEO%%lib/darktable/plugins/lighttable/libmap_settings.so lib/darktable/plugins/lighttable/libmasks.so lib/darktable/plugins/lighttable/libmetadata.so lib/darktable/plugins/lighttable/libmetadata_view.so @@ -100,8 +113,10 @@ lib/darktable/plugins/lighttable/libstyl lib/darktable/plugins/lighttable/libtagging.so lib/darktable/plugins/lighttable/libview_toolbox.so lib/darktable/plugins/lighttable/libviewswitcher.so +%%GPHOTO%%lib/darktable/views/libcapture.so lib/darktable/views/libdarkroom.so lib/darktable/views/liblighttable.so +%%GEO%%lib/darktable/views/libmap.so man/man1/darktable-cli.1.gz man/man1/darktable.1.gz share/appdata/darktable.appdata.xml @@ -132,6 +147,8 @@ share/applications/darktable.desktop %%DATADIR%%/kernels/sharpen.cl %%DATADIR%%/kernels/soften.cl %%DATADIR%%/latex/photobook.cls +%%LUA%%%%DATADIR%%/lua/darktable/debug.lua +%%LUA%%%%DATADIR%%/luarc %%DATADIR%%/pixmaps/dt_logo_128x128.png %%DATADIR%%/pixmaps/idbutton-2.png %%DATADIR%%/pixmaps/idbutton.png @@ -187,8 +204,8 @@ share/applications/darktable.desktop %%DATADIR%%/pixmaps/plugins/darkroom/vignette.png %%DATADIR%%/pixmaps/plugins/darkroom/watermark.png %%DATADIR%%/pixmaps/plugins/darkroom/zonesystem.png -%%DATADIR%%/rawspeed/cameras.xml -%%DATADIR%%/rawspeed/showcameras.xsl +%%RAWSPEED%%%%DATADIR%%/rawspeed/cameras.xml +%%RAWSPEED%%%%DATADIR%%/rawspeed/showcameras.xsl %%DATADIR%%/style/bullet.gif %%DATADIR%%/style/close.gif %%DATADIR%%/style/closelabel.gif @@ -205,6 +222,10 @@ share/applications/darktable.desktop %%DATADIR%%/watermarks/darktable.svg %%DATADIR%%/watermarks/hasselblad.svg %%DATADIR%%/watermarks/promo.svg +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/LICENSE +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/TRANSLATORS %%PORTDOCS%%%%DOCSDIR%%/darktablerc.html share/icons/hicolor/16x16/apps/darktable.png share/icons/hicolor/22x22/apps/darktable.png @@ -215,40 +236,40 @@ share/icons/hicolor/48x48/apps/darktable share/icons/hicolor/64x64/apps/darktable.png share/icons/hicolor/scalable/apps/darktable-2.svg share/icons/hicolor/scalable/apps/darktable.svg -share/locale/cs/LC_MESSAGES/darktable.mo -share/locale/da/LC_MESSAGES/darktable.mo -share/locale/de/LC_MESSAGES/darktable.mo -share/locale/el/LC_MESSAGES/darktable.mo -share/locale/es/LC_MESSAGES/darktable.mo -share/locale/fr/LC_MESSAGES/darktable.mo -share/locale/it/LC_MESSAGES/darktable.mo -share/locale/ja/LC_MESSAGES/darktable.mo -share/locale/nl/LC_MESSAGES/darktable.mo -share/locale/pl/LC_MESSAGES/darktable.mo -share/locale/pt_BR/LC_MESSAGES/darktable.mo -share/locale/pt_PT/LC_MESSAGES/darktable.mo -share/locale/ru/LC_MESSAGES/darktable.mo -share/locale/sq/LC_MESSAGES/darktable.mo -share/locale/sv/LC_MESSAGES/darktable.mo -share/locale/uk/LC_MESSAGES/darktable.mo -%%PORTDOCS%%@dirrmtry %%DOCSDIR%% -@dirrmtry %%DATADIR%%/watermarks -@dirrmtry %%DATADIR%%/style -@dirrmtry %%DATADIR%%/rawspeed -@dirrmtry %%DATADIR%%/pixmaps/plugins/darkroom -@dirrmtry %%DATADIR%%/pixmaps/plugins -@dirrmtry %%DATADIR%%/pixmaps -@dirrmtry %%DATADIR%%/lua/darktable -@dirrmtry %%DATADIR%%/lua -@dirrmtry %%DATADIR%%/latex -@dirrmtry %%DATADIR%%/kernels -@dirrmtry %%DATADIR%%/js -@dirrmtry %%DATADIR%% -@dirrmtry share/appdata -@dirrmtry lib/darktable/views -@dirrmtry lib/darktable/plugins/lighttable -@dirrmtry lib/darktable/plugins/imageio/storage +%%NLS%%share/locale/cs/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/da/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/de/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/el/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/es/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/fr/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/it/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/ja/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/nl/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/pl/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/pt_BR/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/pt_PT/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/ru/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/sq/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/sv/LC_MESSAGES/darktable.mo +%%NLS%%share/locale/uk/LC_MESSAGES/darktable.mo @dirrmtry lib/darktable/plugins/imageio/format +@dirrmtry lib/darktable/plugins/imageio/storage @dirrmtry lib/darktable/plugins/imageio +@dirrmtry lib/darktable/plugins/lighttable @dirrmtry lib/darktable/plugins +@dirrmtry lib/darktable/views @dirrmtry lib/darktable +@dirrmtry share/appdata +@dirrmtry %%DATADIR%%/js +@dirrmtry %%DATADIR%%/kernels +@dirrmtry %%DATADIR%%/latex +%%LUA%%@dirrmtry %%DATADIR%%/lua/darktable +%%LUA%%@dirrmtry %%DATADIR%%/lua +@dirrmtry %%DATADIR%%/pixmaps/plugins/darkroom +@dirrmtry %%DATADIR%%/pixmaps/plugins +@dirrmtry %%DATADIR%%/pixmaps +%%RAWSPEED%%@dirrmtry %%DATADIR%%/rawspeed +@dirrmtry %%DATADIR%%/style +@dirrmtry %%DATADIR%%/watermarks +@dirrmtry %%DATADIR%% +%%PORTDOCS%%@dirrmtry %%DOCSDIR%%