summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-gfx/darktable/ChangeLog11
-rw-r--r--media-gfx/darktable/Manifest24
-rw-r--r--media-gfx/darktable/darktable-0.9.3.ebuild110
-rw-r--r--media-gfx/darktable/files/darktable-0.9.3-cflags.patch43
-rw-r--r--media-gfx/darktable/files/darktable-0.9.3-no-rawspeed.patch48
-rw-r--r--media-gfx/darktable/files/darktable-0.9.3-opencl-kernels.patch12
-rw-r--r--media-gfx/darktable/files/darktable-0.9.3-system-libraw.patch85
-rw-r--r--media-gfx/darktable/metadata.xml1
8 files changed, 324 insertions, 10 deletions
diff --git a/media-gfx/darktable/ChangeLog b/media-gfx/darktable/ChangeLog
index da4359a8a2a7..4fcb57aed93f 100644
--- a/media-gfx/darktable/ChangeLog
+++ b/media-gfx/darktable/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for media-gfx/darktable
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/darktable/ChangeLog,v 1.10 2011/09/21 18:39:29 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/darktable/ChangeLog,v 1.11 2011/11/09 17:48:17 radhermit Exp $
+
+*darktable-0.9.3 (09 Nov 2011)
+
+ 09 Nov 2011; Tim Harder <radhermit@gentoo.org> +darktable-0.9.3.ebuild,
+ +files/darktable-0.9.3-cflags.patch,
+ +files/darktable-0.9.3-no-rawspeed.patch,
+ +files/darktable-0.9.3-opencl-kernels.patch,
+ +files/darktable-0.9.3-system-libraw.patch, metadata.xml:
+ Version bump. Add opencl use flag.
21 Sep 2011; Tim Harder <radhermit@gentoo.org> darktable-0.9.2-r2.ebuild,
+files/darktable-0.9.2-zlib-header.patch:
diff --git a/media-gfx/darktable/Manifest b/media-gfx/darktable/Manifest
index 468befc453fe..ac5d3c7f56c2 100644
--- a/media-gfx/darktable/Manifest
+++ b/media-gfx/darktable/Manifest
@@ -5,19 +5,25 @@ AUX darktable-0.9-cflags.patch 1756 RMD160 0d758421e2517659f005f5e00dc6e9acbfdc1
AUX darktable-0.9.1-no-rawspeed.patch 2458 RMD160 fb5528db7f378f3a46690556e1902c86fe127214 SHA1 c5b083edabb3b23fbf9d9f2370a7117d6d19254a SHA256 fcb0be4c37a27a0594260a2adacff66e63b2896c0fe7644f2027a839eef9dee2
AUX darktable-0.9.2-system-libraw.patch 3249 RMD160 2bf77c9f5807fa42f4bb64e554695c8b9ffa57f3 SHA1 c60612c58eb90c7c64d526541c171b3974564d02 SHA256 fd9a15e3d1f4b2709d357ad25f35f6d27a073f61791f572d1e21bb1956c20084
AUX darktable-0.9.2-zlib-header.patch 211 RMD160 174894e9b57473378fb698e04ca1253975d25876 SHA1 94845e9893b1d980c8fc95b7c00164a59d4123a7 SHA256 e2521deded9f92d89325a570af55561d3c443d3dfc369903ab9459fd57e1695b
+AUX darktable-0.9.3-cflags.patch 1450 RMD160 494b741496ec7801baeb2b2513cf570e3e7bbd3c SHA1 ebe77bd85357b275b41072d70920a15135bb2754 SHA256 0f1ea7b5951032c39f2fa92cc7b1a739d3df8ff360e1e41d75b277228e3b2e4a
+AUX darktable-0.9.3-no-rawspeed.patch 2454 RMD160 9df715206f184983fe314e302299f19f6a1cfb14 SHA1 ec6738e3960c0da9eb7823673d0ae1f51019c207 SHA256 d865b01d46813a5ef3f803230a8313a94464e040c4a221f757b222cbb32bef83
+AUX darktable-0.9.3-opencl-kernels.patch 452 RMD160 e28537acbf4f3d2178401ebef45cf8c6a12c87be SHA1 001137eeee0e41c45160cd98f75695cc8eec3be5 SHA256 e7bea66a1538f2f8acc97b80aba090bbaecb78c7b1be132ee06cfcc23b71ef77
+AUX darktable-0.9.3-system-libraw.patch 3027 RMD160 85bcd48e42df239a191ed7c0075758cc18c34db2 SHA1 c7b494b3b8e0a04dab04a4fd5298502e9c780bbb SHA256 9bb49769e5fd98c6a4c48f66448383f50c8b601362a3e2974e2b8745bbd04db7
DIST darktable-0.9.2.tar.gz 2269319 RMD160 95b5f28afd787070d5e8c236f7e3bb2d27522cae SHA1 5527854edd10cca074bd956772b81d646a796293 SHA256 c7f17961db67f430c449e5294ff4a59ae2a649ba17af0fa55f3e9c5bec9ca20a
+DIST darktable-0.9.3.tar.gz 2330605 RMD160 a7c51262a52fae0b33179fb4d9030eb78444305d SHA1 36ed6c1102b920096cf80affd71adfa66ae85381 SHA256 1cd75253355bd70b698dc78c2463c1b70867ac96cb6f23337a3b6dec6277892a
EBUILD darktable-0.9.2-r1.ebuild 2288 RMD160 390848cae5ae9a4f20d74ce81bf8310f7bc357f3 SHA1 4b4f2e6bf65d9e9113e88907958276f75a804554 SHA256 78066186d7dcc24334b71568d3a7c70a47eb32e20a24e5c9f6d1b508a0685354
EBUILD darktable-0.9.2-r2.ebuild 2345 RMD160 a10b1eb09f12fdf9b2114b58461d1980b9ae3db1 SHA1 f4f21e6c2773280c2e186d8bbabadb7c11f3d1f1 SHA256 d207ca6a3099031bcff2a4b39c3d90ca102aafabb73a1889ed826408239f5632
-MISC ChangeLog 2635 RMD160 129ab16581b01603c862f7210b3388085212894a SHA1 d41dbc96158bca3dec6af7c2d49db33c07688d5e SHA256 119f4fb5b4f8784626f71f0dcdf6418712565d18d8119a7555945533ef56e9b9
-MISC metadata.xml 465 RMD160 bbc3e655a5e60e0004f3a4803b2d3c20ad247233 SHA1 c362f75afc307f82e72173127817721333094b36 SHA256 83c7149b821c50794200e14c0673636ff1b9b035b7f8079b40747642e1e06a23
+EBUILD darktable-0.9.3.ebuild 2652 RMD160 fb2ccdde3d6654c5caadd23840e089312b327436 SHA1 66242a7fa5a704f934613fdd979d1005880111d1 SHA256 c4c709e13d4442a96e298c8490cc12df5c2a12e82aa3b144b7ae1db5c7ff8d2b
+MISC ChangeLog 2969 RMD160 bd7b7411c5e8dbb1219efea5d341bf8d7f46951a SHA1 318a2d48f2a22a0d8ce3f9b92faea5f05526a8d6 SHA256 d6f44ea267386e45816d362014cd0db70caf605a29998b1a9fad72a5925deffc
+MISC metadata.xml 516 RMD160 ca94973ccca803f6f5dd1646f9c9ca3624712144 SHA1 3508593304c9b41001b6721d03f56c94a0183599 SHA256 486fbce594db4aad661bcabd94e398edcf55da660d802bebf7ea0838f7cf26e1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iQEcBAEBCgAGBQJOei9nAAoJEEqz6FtPBkyjyPQH/0khvxOhWRL3TME9ObZ7avDw
-sYo6Ykj5t0enrsaCDNB72Larps2c48/iqSA9kR3UK9dreezcRINDlr5ilyHNGmWJ
-luSYeA+PHbClQUN5juEEA/jmIzh9ybOZnuyw4G6vzBwt5kEMlP9vkwYBRCtWlb2a
-Txel9M9xXX1+k8A5xyj25NAfkfeWo5s+fY7tZaxshS4lOmI6vjG5hbYFMwNZj56U
-K0MfaWfLQf73hkTfmP/394ob4dZJAARUwx2r/oGVG9Gjb2dIiQMBDfSnm7ipjdXY
-t4yZqE6xyMcSwIp8gUGF7a6uw9Pv/POrRTfWF7+NX33LTOna3l7xVYHZadwGci0=
-=0cTM
+iQEcBAEBCgAGBQJOurzqAAoJEEqz6FtPBkyjRXMH/100vo+omqPt18CPFzQsVmM+
+QxM1MQw9TL0kWCw9MS6OmN/z0tyPD08EcDx+1kB05rj9n0ZnlT0qOX3MlP/j6VKc
+nv+o8z3+eOGIGWR0tEqBklX9AGxnO3GphUqwg6NtKJixF9KmsEN1gkWaa13kFUyR
+OhtzYivFbWjjUoV/XCOd7/XB6Cw1LaxsYeFM/VUZP/USqxuNZ1A09cvSLApQ2vy0
+UG52XbLmMX/RPSb97bweqT09Md9c2qoVSYVKbZ1dtknHhzrc01or4OnZWCaU4jMp
+Wi6Zxwrg9zkFgwjxIJx0z+jaQL9sTmAqRtjfYeJ+LobOWtTDnEHW+TeqIv9mXQU=
+=/fAr
-----END PGP SIGNATURE-----
diff --git a/media-gfx/darktable/darktable-0.9.3.ebuild b/media-gfx/darktable/darktable-0.9.3.ebuild
new file mode 100644
index 000000000000..d888eed1c778
--- /dev/null
+++ b/media-gfx/darktable/darktable-0.9.3.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/darktable/darktable-0.9.3.ebuild,v 1.1 2011/11/09 17:48:17 radhermit Exp $
+
+EAPI="4"
+GCONF_DEBUG="no"
+
+inherit gnome2 cmake-utils toolchain-funcs
+
+DESCRIPTION="A virtual lighttable and darkroom for photographers"
+HOMEPAGE="http://darktable.sf.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="debug flickr gnome gphoto2 kde nls opencl openmp +rawspeed +slideshow video_cards_nvidia"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-db/sqlite:3
+ dev-libs/libxml2:2
+ flickr? ( media-libs/flickcurl )
+ gnome? (
+ gnome-base/gconf
+ gnome-base/gnome-keyring
+ )
+ gnome-base/librsvg:2
+ gphoto2? ( media-libs/libgphoto2 )
+ kde? ( dev-libs/dbus-glib )
+ media-gfx/exiv2
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.3
+ media-libs/libpng
+ >=media-libs/libraw-0.13.4[demosaic]
+ media-libs/openexr
+ media-libs/tiff
+ net-misc/curl
+ opencl? ( video_cards_nvidia? (
+ x11-drivers/nvidia-drivers
+ >=dev-util/nvidia-cuda-toolkit-3.1
+ ) )
+ slideshow? (
+ media-libs/libsdl
+ virtual/opengl
+ )
+ virtual/jpeg
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-system-libraw.patch
+ "${FILESDIR}"/${P}-no-rawspeed.patch
+ "${FILESDIR}"/${P}-cflags.patch
+ "${FILESDIR}"/${P}-opencl-kernels.patch
+)
+
+pkg_setup() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ base_src_prepare
+ sed -i -e "s:\(/share/doc/\)darktable:\1${PF}:" \
+ -e "s:LICENSE::" doc/CMakeLists.txt || die
+}
+
+src_configure() {
+ local myconf
+ if use gnome ; then
+ myconf="-DDONT_INSTALL_GCONF_SCHEMAS=OFF"
+ else
+ myconf="-DDONT_INSTALL_GCONF_SCHEMAS=ON"
+ fi
+
+ if use opencl && use video_cards_nvidia ; then
+ myconf+=" -DUSE_OPENCL=ON"
+ else
+ myconf+=" -DUSE_OPENCL=OFF"
+ fi
+
+ use debug && CMAKE_BUILD_TYPE=Debug
+
+ mycmakeargs=(
+ $(cmake-utils_use_use flickr FLICKR)
+ $(cmake-utils_use_use gnome GCONF_BACKEND)
+ $(cmake-utils_use_use gnome GNOME_KEYRING)
+ $(cmake-utils_use_use gphoto2 CAMERA_SUPPORT)
+ $(cmake-utils_use_use kde KWALLET)
+ $(cmake-utils_use_use nls NLS)
+ $(cmake-utils_use_use openmp OPENMP)
+ $(cmake-utils_use !rawspeed DONT_USE_RAWSPEED)
+ $(cmake-utils_use_build slideshow SLIDESHOW)
+ ${myconf}
+ -DINSTALL_IOP_EXPERIMENTAL=ON
+ -DINSTALL_IOP_LEGACY=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1"
+ cmake-utils_src_install
+ unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
+}
diff --git a/media-gfx/darktable/files/darktable-0.9.3-cflags.patch b/media-gfx/darktable/files/darktable-0.9.3-cflags.patch
new file mode 100644
index 000000000000..a949cc66b919
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-0.9.3-cflags.patch
@@ -0,0 +1,43 @@
+--- darktable-0.9.3.orig/src/CMakeLists.txt
++++ darktable-0.9.3/src/CMakeLists.txt
+@@ -231,39 +231,11 @@
+ # c++ code doesn't like -Werror (libraw)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-strict-aliasing")
+
+-if(NOT APPLE)
+- # apple build fails on deprecated warnings..
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+-endif(NOT APPLE)
+-
+ if(NOT WIN32)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+ endif(NOT WIN32)
+
+-if(NOT BINARY_PACKAGE_BUILD)
+- MESSAGE("-- Checking for -march=native support")
+- CHECK_C_COMPILER_FLAG("-march=native" MARCHNATIVE)
+- if (MARCHNATIVE)
+- set(MARCH "-march=native")
+- else()
+- MESSAGE("-- Checking for -mtune=native support")
+- CHECK_C_COMPILER_FLAG("-mtune=native" MTUNENATIVE)
+- if (MTUNENATIVE)
+- set(MARCH "-mtune=native")
+- else()
+- set(MARCH "-mtune=generic")
+- endif()
+- endif()
+-else()
+- set(MARCH "-mtune=generic")
+-endif()
+-
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse ${MARCH} -g")
+-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -ffast-math -fexpensive-optimizations")
+-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g -D_DEBUG")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse ${MARCH} -g")
+-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -fexpensive-optimizations")
+-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -D_DEBUG")
++set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
+
+
+ #
diff --git a/media-gfx/darktable/files/darktable-0.9.3-no-rawspeed.patch b/media-gfx/darktable/files/darktable-0.9.3-no-rawspeed.patch
new file mode 100644
index 000000000000..774762ea654e
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-0.9.3-no-rawspeed.patch
@@ -0,0 +1,48 @@
+--- darktable-0.9.3.orig/src/CMakeLists.txt
++++ darktable-0.9.3/src/CMakeLists.txt
+@@ -290,21 +290,19 @@
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.h ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.c
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../tools/create_metadata.sh ${CMAKE_CURRENT_SOURCE_DIR}/../tools/metadata.txt ${CMAKE_CURRENT_BINARY_DIR}
+ )
+-
+-# this is a dummy library whose sole purpose is to serve as a dependency for subdirs, such as imageio/storage/gallery.
+-# cmake can't depend on custom targets in other directories than the current one.
+-add_library(metadata_dummy ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.c ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.h)
++add_custom_target(metadata_gen DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.c ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.h)
+
+ #
+ # build libdarktable
+ #
+-add_library(lib_darktable STATIC SHARED ${CMAKE_CURRENT_BINARY_DIR}/preferences_gen.h ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.h ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.c ${SOURCES})
++add_library(lib_darktable SHARED ${CMAKE_CURRENT_BINARY_DIR}/preferences_gen.h ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.h ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.c ${SOURCES})
++add_dependencies(lib_darktable metadata_gen)
+ if(APPLE)
+ set_target_properties(lib_darktable PROPERTIES INSTALL_NAME_DIR "@executable_path/../lib/darktable")
+ endif(APPLE)
+ set_target_properties(lib_darktable PROPERTIES OUTPUT_NAME darktable)
+ set_target_properties(lib_darktable PROPERTIES LINKER_LANGUAGE C)
+-
++target_link_libraries(lib_darktable ${LIBS})
+
+ #
+ # the libraw part is a bit of a hack:
+@@ -329,7 +327,7 @@
+ add_dependencies(lib_darktable rawspeed)
+ add_library(rawspeed_static STATIC IMPORTED)
+ set_target_properties(rawspeed_static PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/external/rawspeed/librawspeed.a)
+- target_link_libraries(lib_darktable ${LIBS} rawspeed_static)
++ target_link_libraries(lib_darktable rawspeed_static)
+ # compile rawspeed
+ add_subdirectory(external/rawspeed)
+ endif(NOT DONT_USE_RAWSPEED)
+--- darktable-0.9.3.orig/src/imageio/storage/CMakeLists.txt
++++ darktable-0.9.3/src/imageio/storage/CMakeLists.txt
+@@ -10,7 +10,7 @@
+ foreach(module ${MODULES} ${MODULES_EXPERIMENTAL})
+ add_library(${module} MODULE "${module}.c")
+ endforeach(module)
+-add_dependencies(gallery metadata_dummy)
++add_dependencies(gallery metadata_gen)
+
+ foreach(module ${MODULES})
+ target_link_libraries(${module} ${LIBS})
diff --git a/media-gfx/darktable/files/darktable-0.9.3-opencl-kernels.patch b/media-gfx/darktable/files/darktable-0.9.3-opencl-kernels.patch
new file mode 100644
index 000000000000..ff05acbe2db0
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-0.9.3-opencl-kernels.patch
@@ -0,0 +1,12 @@
+--- darktable-0.9.3/data/kernels/CMakeLists.txt.orig
++++ darktable-0.9.3/data/kernels/CMakeLists.txt
+@@ -3,5 +3,7 @@
+ #
+ # install opencl kernel source files
+ #
+-FILE(GLOB DT_OPENCL_KERNELS "*.cl" "programs.conf")
+-install(FILES ${DT_OPENCL_KERNELS} DESTINATION ${SHARE_INSTALL}/kernels)
++if(USE_OPENCL)
++ FILE(GLOB DT_OPENCL_KERNELS "*.cl" "programs.conf")
++ install(FILES ${DT_OPENCL_KERNELS} DESTINATION ${SHARE_INSTALL}/kernels)
++endif(USE_OPENCL)
diff --git a/media-gfx/darktable/files/darktable-0.9.3-system-libraw.patch b/media-gfx/darktable/files/darktable-0.9.3-system-libraw.patch
new file mode 100644
index 000000000000..189f264f8899
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-0.9.3-system-libraw.patch
@@ -0,0 +1,85 @@
+--- darktable-0.9.3.orig/cmake/modules/FindLibraw.cmake
++++ darktable-0.9.3/cmake/modules/FindLibraw.cmake
+@@ -0,0 +1,29 @@
++# - Try to find libraw
++# Once done, this will define
++#
++# Libraw_FOUND - system has Libraw
++# Libraw_INCLUDE_DIRS - the Libraw include directories
++# Libraw_LIBRARIES - link these to use Libraw
++
++include(LibFindMacros)
++
++# Use pkg-config to get hints about paths
++libfind_pkg_check_modules(Libraw_PKGCONF libraw)
++
++# Include dir
++find_path(Libraw_INCLUDE_DIR
++ NAMES libraw.h
++ PATHS ${Libraw_PKGCONF_INCLUDE_DIRS}
++)
++
++# Finally the library itself
++find_library(Libraw_LIBRARY
++ NAMES raw_r
++ PATHS ${Libraw_PKGCONF_LIBRARY_DIRS}
++)
++
++# Set the include dir variables and the libraries and let libfind_process do the rest.
++# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
++set(Libraw_PROCESS_INCLUDES Libraw_INCLUDE_DIR Libraw_INCLUDE_DIRS)
++set(Libraw_PROCESS_LIBS Libraw_LIBRARY Libraw_LIBRARIES)
++libfind_process(Libraw)
+--- darktable-0.9.3.orig/src/CMakeLists.txt
++++ darktable-0.9.3/src/CMakeLists.txt
+@@ -70,7 +70,6 @@
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external)
+-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/LibRaw)
+
+ # initial compiler flags
+ add_definitions("-DHAVE_CONFIG_H")
+@@ -122,7 +121,7 @@
+ endif(USE_CAMERA_SUPPORT)
+
+ # Find all the libs that don't require extra parameters
+-foreach(lib ${OUR_LIBS} LensFun GIO GThread GModule Cairo PangoCairo PThread Rsvg2 GDK-PixBuf LibXml2 INotify Sqlite3 Exiv2 CURL PNG JPEG TIFF OpenEXR LCMS2)
++foreach(lib ${OUR_LIBS} LensFun Libraw GIO GThread GModule Cairo PangoCairo PThread Rsvg2 GDK-PixBuf LibXml2 INotify Sqlite3 Exiv2 CURL PNG JPEG TIFF OpenEXR LCMS2)
+ find_package(${lib} REQUIRED)
+ include_directories(${${lib}_INCLUDE_DIRS})
+ list(APPEND LIBS ${${lib}_LIBRARIES})
+@@ -306,23 +305,6 @@
+ set_target_properties(lib_darktable PROPERTIES LINKER_LANGUAGE C)
+
+
+-#
+-# the libraw part is a bit of a hack:
+-# the static linking didn't work since it was pulling -lstdc++ and -lm into linker flags.
+-# so we do a custom dependency and pretend an imported liblibraw_r.a so no other -l are
+-# appended.
+-#
+-add_dependencies(lib_darktable libraw_r)
+-add_library(libraw_static STATIC IMPORTED)
+-set_target_properties(libraw_static PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/external/LibRaw/liblibraw_r.a)
+-if(APPLE)
+- set(LIBRAW_STATIC_LIBS libraw_static stdc++)
+-else(APPLE)
+- set(LIBRAW_STATIC_LIBS libraw_static)
+-endif(APPLE)
+-
+-target_link_libraries(lib_darktable ${LIBS} ${LIBRAW_STATIC_LIBS})
+-
+ # same for librawspeed (can switch it off with -DDONT_USE_RAWSPEED, for macs):
+ if(NOT DONT_USE_RAWSPEED)
+ add_definitions("-DHAVE_RAWSPEED")
+@@ -337,9 +319,6 @@
+ install(TARGETS lib_darktable DESTINATION ${LIB_INSTALL}/darktable)
+ list(APPEND LIBS lib_darktable)
+
+-# Compile libraw modules
+-add_subdirectory(external/LibRaw)
+-
+ # Compile views modules
+ add_subdirectory(views)
+
diff --git a/media-gfx/darktable/metadata.xml b/media-gfx/darktable/metadata.xml
index 2275ca3ad8f7..46956183e85a 100644
--- a/media-gfx/darktable/metadata.xml
+++ b/media-gfx/darktable/metadata.xml
@@ -8,6 +8,7 @@
</maintainer>
<use>
<flag name="flickr">Add support for uploading photos to flickr</flag>
+ <flag name="opencl">Enable opencl support</flag>
<flag name="rawspeed">Enable the rawspeed backend</flag>
<flag name="slideshow">Build the opengl slideshow viewer</flag>
</use>