aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/darktable
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2011-07-27 16:32:52 +0800
committerdanfe <danfe@FreeBSD.org>2011-07-27 16:32:52 +0800
commit9fec5b6aecbe52b6596c2c52913a4ff3d0bc3177 (patch)
tree20de639372bc1a0a34dff6f2f57890363a210660 /graphics/darktable
parent014c100a1d9eb2192b330cbf9f94ad976ff204dc (diff)
downloadfreebsd-ports-gnome-9fec5b6aecbe52b6596c2c52913a4ff3d0bc3177.tar.gz
freebsd-ports-gnome-9fec5b6aecbe52b6596c2c52913a4ff3d0bc3177.tar.zst
freebsd-ports-gnome-9fec5b6aecbe52b6596c2c52913a4ff3d0bc3177.zip
- Bring in patch from Gentoo which adds more options and allows to correctly
disable them without introducing implicit dependencies; retire local hacks used for that purpose since they're not needed anymore - Add missing library path to USE_LDCONFIG knob [*] - Move BROKEN statement higher in the Makefile PR: ports/159207 [*]
Diffstat (limited to 'graphics/darktable')
-rw-r--r--graphics/darktable/Makefile51
-rw-r--r--graphics/darktable/files/patch-CMakeLists.txt129
2 files changed, 159 insertions, 21 deletions
diff --git a/graphics/darktable/Makefile b/graphics/darktable/Makefile
index 0680be4b3c43..c7ea6823671d 100644
--- a/graphics/darktable/Makefile
+++ b/graphics/darktable/Makefile
@@ -27,17 +27,23 @@ CMAKE_VERBOSE= yes
USE_GETTEXT= yes
USE_GNOME= librsvg2
USE_SQLITE= yes
-USE_LDCONFIG= yes
+USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}
INSTALLS_ICONS= yes
MAN1= ${PORTNAME}.1
OPTIONS= GCONF "Enable GConf backend" off \
GPHOTO "Enable camera support via libgphoto2" on \
FLICKR "Enable Flickr support via flickcurl" off \
+ SLIDESHOW "Build OpenGL/SDL slideshow viewer" off \
KWALLET "Enable KWallet support (requires dbus-glib)" off \
- GKEYRING "Enable GNOME Keyring support" off
+ GKEYRING "Enable GNOME Keyring support" off \
+ NLS "Enable Native Language Support" off
-.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "sparc64"
+BROKEN= does not compile on sparc64: invokes i386 assembler
+.endif
.if defined(WITH_GCONF)
USE_GNOME+= gconf2
@@ -60,14 +66,32 @@ CMAKE_ARGS+= -DUSE_CAMERA_SUPPORT:BOOL=OFF
.if defined(WITH_FLICKR)
LIB_DEPENDS+= flickcurl.0:${PORTSDIR}/www/flickcurl
PLIST_FILES+= lib/darktable/plugins/imageio/storage/libflickr.so
+.else
+CMAKE_ARGS+= -DUSE_FLICKR:BOOL=OFF
+.endif
+
+.if defined(WITH_SLIDESHOW)
+USE_GL= gl
+USE_SDL= sdl
+PLIST_FILES+= bin/darktable-viewer
+.else
+CMAKE_ARGS+= -DBUILD_SLIDESHOW:BOOL=OFF
.endif
.if defined(WITH_KWALLET)
LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib
+.else
+CMAKE_ARGS+= -DUSE_KWALLET:BOOL=OFF
.endif
.if defined(WITH_GKEYRING)
LIB_DEPENDS+= gnome-keyring.0:${PORTSDIR}/security/libgnome-keyring
+.else
+CMAKE_ARGS+= -DUSE_GNOME_KEYRING:BOOL=OFF
+.endif
+
+.if defined(WITHOUT_NLS)
+CMAKE_ARGS+= -DUSE_NLS:BOOL=OFF
.endif
post-patch:
@@ -88,25 +112,10 @@ post-patch:
# Adjust manpages path
@${REINPLACE_CMD} -e 's,share/man/man1,man/man1,' \
${WRKSRC}/doc/CMakeLists.txt
-# Comment out optional components to prevent unregistered dependencies if
-# they are not explicitly selected via OPTIONS (make config)
-.if !defined(WITH_FLICKR)
- @${REINPLACE_CMD} -e '/FLICKCURL/s,^find_package,#&,' \
- ${WRKSRC}/src/CMakeLists.txt
-.endif
-.if !defined(WITH_KWALLET)
- @${REINPLACE_CMD} -e '/DBUSGLIB/s,^find_package,#&,' \
- ${WRKSRC}/src/CMakeLists.txt
-.endif
-.if !defined(WITH_GKEYRING)
- @${REINPLACE_CMD} -e '/GnomeKeyring/s,^find_package,#&,' \
- ${WRKSRC}/src/CMakeLists.txt
-.endif
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "sparc64"
-BROKEN= Does not compile on sparc64: invokes i386 assembler
+post-install:
+.if defined(WITHOUT_NLS)
+ @${REINPLACE_CMD} -e '/LC_MESSAGES/d' ${TMPPLIST}
.endif
.include <bsd.port.post.mk>
diff --git a/graphics/darktable/files/patch-CMakeLists.txt b/graphics/darktable/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..e927c39b237d
--- /dev/null
+++ b/graphics/darktable/files/patch-CMakeLists.txt
@@ -0,0 +1,129 @@
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -4,6 +4,11 @@
+
+ option(USE_GCONF_BACKEND "Detect and use gconf backend if available." ON)
+ option(USE_CAMERA_SUPPORT "Detect and use camera support if available." ON)
++option(USE_NLS "Build Native Language Support (using gettext)" ON)
++option(USE_FLICKR "Enable Flickr support" ON)
++option(USE_KWALLET "Build kwallet password storage backend" ON)
++option(USE_GNOME_KEYRING "Build gnome-keyring password storage backend" ON)
++option(BUILD_SLIDESHOW "Build the opengl slideshow viewer" ON)
+ option(USE_OPENMP "Use openmp threading support." ON)
+ option(USE_OPENCL "Use OpenCL support." ON)
+ option(USE_DARKTABLE_PROFILING OFF)
+@@ -101,6 +106,7 @@
+ mark_as_advanced(LIB_INSTALL)
+
+ #need to put here do setting LOCALE_DIR variable
++if(USE_NLS)
+ find_package(Gettext)
+ if(Gettext_FOUND)
+ if(NOT LOCALE_DIR)
+@@ -125,6 +131,7 @@
+ endif()
+ endif(NOT LOCALE_DIR)
+ endif(Gettext_FOUND)
++endif(USE_NLS)
+
+ # needed to generate file "create_preferences.sh" accordingly
+ if(USE_OPENCL)
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -124,51 +124,61 @@
+ add_definitions(${${lib}_DEFINITIONS})
+ endforeach(lib)
+
+-find_package(Gettext)
+-if(Gettext_FOUND)
+- include_directories(${Gettext_INCLUDE_DIRS})
+- list(APPEND LIBS ${Gettext_LIBRARIES})
+- add_definitions("-DUSE_GETTEXT")
+- message(STATUS "Internationalization: Enabled")
+-else()
+- message(STATUS "Internationalization: Disabled (libintl not found)")
+-endif()
+-
+-find_package(FLICKCURL)
+-if(FLICKCURL_FOUND)
+- include_directories(${FLICKCURL_INCLUDE_DIRS})
+- list(APPEND LIBS ${FLICKCURL_LIBRARIES})
+- add_definitions(${FLICKCURL_DEFINITIONS})
+-endif(FLICKCURL_FOUND)
++if(USE_NLS)
++ find_package(Gettext)
++ if(Gettext_FOUND)
++ include_directories(${Gettext_INCLUDE_DIRS})
++ list(APPEND LIBS ${Gettext_LIBRARIES})
++ add_definitions("-DUSE_GETTEXT")
++ message(STATUS "Internationalization: Enabled")
++ else()
++ message(STATUS "Internationalization: Disabled (libintl not found)")
++ endif()
++endif(USE_NLS)
++
++if(USE_FLICKR)
++ find_package(FLICKCURL)
++ if(FLICKCURL_FOUND)
++ include_directories(${FLICKCURL_INCLUDE_DIRS})
++ list(APPEND LIBS ${FLICKCURL_LIBRARIES})
++ add_definitions(${FLICKCURL_DEFINITIONS})
++ endif(FLICKCURL_FOUND)
++endif(USE_FLICKR)
+
+ #
+ # Detect compile of optional pwstorage backends
+ #
++if(USE_KWALLET)
+ find_package(DBUSGLIB)
+-if(DBUSGLIB_FOUND)
+- list(APPEND SOURCES "common/pwstorage/backend_kwallet.c")
+- include_directories(${DBUSGLIB_INCLUDE_DIRS})
+- list(APPEND LIBS ${DBUSGLIB_LIBRARIES})
+- add_definitions("-DHAVE_KWALLET")
+-endif(DBUSGLIB_FOUND)
+-
+-find_package(GnomeKeyring)
+-if(GNOMEKEYRING_FOUND)
+- set(SOURCES ${SOURCES} "common/pwstorage/backend_gkeyring.c")
+- include_directories(${GnomeKeyring_INCLUDE_DIRS})
+- list(APPEND LIBS ${GnomeKeyring_LIBRARIES})
+- add_definitions("-DHAVE_GKEYRING")
+-endif(GNOMEKEYRING_FOUND)
++ if(DBUSGLIB_FOUND)
++ list(APPEND SOURCES "common/pwstorage/backend_kwallet.c")
++ include_directories(${DBUSGLIB_INCLUDE_DIRS})
++ list(APPEND LIBS ${DBUSGLIB_LIBRARIES})
++ add_definitions("-DHAVE_KWALLET")
++ endif(DBUSGLIB_FOUND)
++endif(USE_KWALLET)
++
++if(USE_GNOME_KEYRING)
++ find_package(GnomeKeyring)
++ if(GNOMEKEYRING_FOUND)
++ set(SOURCES ${SOURCES} "common/pwstorage/backend_gkeyring.c")
++ include_directories(${GnomeKeyring_INCLUDE_DIRS})
++ list(APPEND LIBS ${GnomeKeyring_LIBRARIES})
++ add_definitions("-DHAVE_GKEYRING")
++ endif(GNOMEKEYRING_FOUND)
++endif(USE_GNOME_KEYRING)
+
+ # have a small test program, to be run as root on some systems to enable the driver to run cl stuff
+ add_subdirectory(cltest)
+
+ # build opengl slideshow viewer?
+-find_package(SDL)
+-find_package(OpenGL)
+-if(SDL_FOUND AND OPENGL_FOUND)
+- add_subdirectory(dtview)
+-endif(SDL_FOUND AND OPENGL_FOUND)
++if(BUILD_SLIDESHOW)
++ find_package(SDL)
++ find_package(OpenGL)
++ if(SDL_FOUND AND OPENGL_FOUND)
++ add_subdirectory(dtview)
++ endif(SDL_FOUND AND OPENGL_FOUND)
++endif(BUILD_SLIDESHOW)
+
+ # needed for the file manager
+ if(APRIL_FOOLS)