summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2011-07-21 08:55:05 +0000
committerTim Harder <radhermit@gentoo.org>2011-07-21 08:55:05 +0000
commite46c202ca1cf60ab5da39bf23a3a1026ad80e05c (patch)
treece9dfb365a1fd9b0c9ecb1b7997fe24a042c036c /media-gfx
parentStable on amd64 wrt bug #375661 (diff)
downloadgentoo-2-e46c202ca1cf60ab5da39bf23a3a1026ad80e05c.tar.gz
gentoo-2-e46c202ca1cf60ab5da39bf23a3a1026ad80e05c.tar.bz2
gentoo-2-e46c202ca1cf60ab5da39bf23a3a1026ad80e05c.zip
Revision bump. Fix automagic deps, respect CFLAGS (fixes bug #375755), use system libraw library, and add the following use flags: debug, flickr, kde, nls, and slideshow. Add the graphics herd to metadata.
(Portage version: 2.2.0_alpha45/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/darktable/ChangeLog11
-rw-r--r--media-gfx/darktable/darktable-0.9-r1.ebuild91
-rw-r--r--media-gfx/darktable/files/darktable-0.9-automagic-deps.patch113
-rw-r--r--media-gfx/darktable/files/darktable-0.9-cflags.patch45
-rw-r--r--media-gfx/darktable/files/darktable-0.9-system-libraw.patch90
-rw-r--r--media-gfx/darktable/metadata.xml4
6 files changed, 352 insertions, 2 deletions
diff --git a/media-gfx/darktable/ChangeLog b/media-gfx/darktable/ChangeLog
index 34ff77681803..863ec1312bb3 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.1 2011/07/19 19:11:57 c1pher Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/darktable/ChangeLog,v 1.2 2011/07/21 08:55:05 radhermit Exp $
+
+*darktable-0.9-r1 (21 Jul 2011)
+
+ 21 Jul 2011; Tim Harder <radhermit@gentoo.org> +darktable-0.9-r1.ebuild,
+ +files/darktable-0.9-automagic-deps.patch, +files/darktable-0.9-cflags.patch,
+ +files/darktable-0.9-system-libraw.patch, metadata.xml:
+ Revision bump. Fix automagic deps, respect CFLAGS (fixes bug #375755), use
+ system libraw library, and add the following use flags: debug, flickr, kde,
+ nls, and slideshow. Add the graphics herd to metadata.
*darktable-9999 (19 Jul 2011)
*darktable-0.9 (19 Jul 2011)
diff --git a/media-gfx/darktable/darktable-0.9-r1.ebuild b/media-gfx/darktable/darktable-0.9-r1.ebuild
new file mode 100644
index 000000000000..04cda9639951
--- /dev/null
+++ b/media-gfx/darktable/darktable-0.9-r1.ebuild
@@ -0,0 +1,91 @@
+# 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-r1.ebuild,v 1.1 2011/07/21 08:55:05 radhermit Exp $
+
+EAPI="4"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://darktable.git.sf.net/gitroot/darktable/darktable"
+ EGIT_BRANCH="master"
+ EGIT_COMMIT="master"
+ SCM="git-2"
+ KEYWORDS=""
+else
+ SRC_URI="mirror://sourceforge/project/darktable/darktable/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+GCONF_DEBUG="no"
+inherit cmake-utils ${SCM}
+
+DESCRIPTION="A virtual lighttable and darkroom for photographers"
+HOMEPAGE="http://darktable.sf.net/"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="debug flickr gconf gnome-keyring gphoto2 kde nls openmp +slideshow"
+
+RDEPEND="
+ dev-db/sqlite:3
+ dev-libs/libxml2:2
+ flickr? ( media-libs/flickcurl )
+ gconf? ( gnome-base/gconf )
+ gnome-base/libglade:2.0
+ gnome-base/librsvg:2
+ gnome-keyring? ( gnome-base/gnome-keyring )
+ 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
+ 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 )
+ openmp? ( >=sys-devel/gcc-4.4[openmp] )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-automagic-deps.patch
+ "${FILESDIR}"/${P}-system-libraw.patch
+ "${FILESDIR}"/${P}-cflags.patch
+)
+
+src_prepare() {
+ base_src_prepare
+ sed -i -e "s:\(/share/doc/\)darktable:\1${PF}:" \
+ -e "s:LICENSE::" doc/CMakeLists.txt || die
+}
+
+src_configure() {
+ use debug && CMAKE_BUILD_TYPE=Debug
+
+ mycmakeargs=(
+ $(cmake-utils_use_use flickr FLICKR)
+ $(cmake-utils_use_use gconf GCONF_BACKEND)
+ $(cmake-utils_use_use gnome-keyring 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_build slideshow SLIDESHOW)
+ -DDONT_INSTALL_GCONF_SCHEMAS=ON
+ -DINSTALL_IOP_EXPERIMENTAL=ON
+ -DINSTALL_IOP_LEGACY=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install(){
+ cmake-utils_src_install
+ newicon data/pixmaps/48x48/darktable.png darktable.png
+}
diff --git a/media-gfx/darktable/files/darktable-0.9-automagic-deps.patch b/media-gfx/darktable/files/darktable-0.9-automagic-deps.patch
new file mode 100644
index 000000000000..28d0c236457a
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-0.9-automagic-deps.patch
@@ -0,0 +1,113 @@
+--- darktable-0.9.orig/CMakeLists.txt
++++ darktable-0.9/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)
+--- darktable-0.9.orig/src/CMakeLists.txt
++++ darktable-0.9/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)
diff --git a/media-gfx/darktable/files/darktable-0.9-cflags.patch b/media-gfx/darktable/files/darktable-0.9-cflags.patch
new file mode 100644
index 000000000000..21c2d9c5f936
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-0.9-cflags.patch
@@ -0,0 +1,45 @@
+--- darktable-0.9/src/CMakeLists.txt.orig
++++ darktable-0.9/src/CMakeLists.txt
+@@ -217,27 +217,27 @@
+ # 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 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)
+- set(MARCH "-march=native")
+-else()
+- set(MARCH "-mtune=generic")
+-endif()
++#if(NOT BINARY_PACKAGE_BUILD)
++# set(MARCH "-march=native")
++#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 "${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} -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} -D_DEBUG")
+
+
+ #
diff --git a/media-gfx/darktable/files/darktable-0.9-system-libraw.patch b/media-gfx/darktable/files/darktable-0.9-system-libraw.patch
new file mode 100644
index 000000000000..1ac8afab03b3
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-0.9-system-libraw.patch
@@ -0,0 +1,90 @@
+--- darktable-0.9.orig/cmake/modules/FindLibraw.cmake
++++ darktable-0.9/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.orig/src/CMakeLists.txt
++++ darktable-0.9/src/CMakeLists.txt
+@@ -65,7 +65,6 @@
+
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/LibRaw)
+
+ # initial compiler flags
+ add_definitions("-DHAVE_CONFIG_H")
+@@ -117,7 +116,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})
+@@ -280,17 +279,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}/LibRaw/liblibraw_r.a)
+-target_link_libraries(lib_darktable ${LIBS} libraw_static)
+-
+ # same for librawspeed (can switch it off with -DDONT_USE_RAWSPEED, for macs):
+ if(NOT DONT_USE_RAWSPEED)
+ add_definitions("-DHAVE_RAWSPEED")
+@@ -305,9 +293,6 @@
+ install(TARGETS lib_darktable DESTINATION ${LIB_INSTALL}/darktable)
+ list(APPEND LIBS lib_darktable)
+
+-# Compile libraw modules
+-add_subdirectory(LibRaw)
+-
+ # Compile views modules
+ add_subdirectory(views)
+
+--- darktable-0.9.orig/src/common/imageio.c
++++ darktable-0.9/src/common/imageio.c
+@@ -547,7 +547,7 @@
+ raw->params.threshold = 0;
+ raw->params.auto_bright_thr = img->raw_auto_bright_threshold;
+
+- raw->params.amaze_ca_refine = 0;
++ // raw->params.amaze_ca_refine = 0;
+ raw->params.fbdd_noiserd = 0;
+
+ ret = libraw_open_file(raw, filename);
diff --git a/media-gfx/darktable/metadata.xml b/media-gfx/darktable/metadata.xml
index 706264388d5d..dc38cace064d 100644
--- a/media-gfx/darktable/metadata.xml
+++ b/media-gfx/darktable/metadata.xml
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>no-herd</herd>
+ <herd>graphics</herd>
<maintainer>
<email>c1pher@gentoo.org</email>
<name>Dane Smith</name>
</maintainer>
<use>
+ <flag name="flickr">Add support for uploading photos to flickr</flag>
<flag name="gconf">Add support for the gconf backend</flag>
+ <flag name="slideshow">Build the opengl slideshow viewer</flag>
</use>
</pkgmetadata>