diff options
Diffstat (limited to 'media-gfx/darktable/files/darktable-0.9.2-system-libraw.patch')
-rw-r--r-- | media-gfx/darktable/files/darktable-0.9.2-system-libraw.patch | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/media-gfx/darktable/files/darktable-0.9.2-system-libraw.patch b/media-gfx/darktable/files/darktable-0.9.2-system-libraw.patch new file mode 100644 index 000000000000..89ddc001510a --- /dev/null +++ b/media-gfx/darktable/files/darktable-0.9.2-system-libraw.patch @@ -0,0 +1,90 @@ +--- darktable-0.9.2.orig/cmake/modules/FindLibraw.cmake ++++ darktable-0.9.2/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.2.orig/src/CMakeLists.txt ++++ darktable-0.9.2/src/CMakeLists.txt +@@ -77,7 +77,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") +@@ -129,7 +128,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}) +@@ -311,17 +310,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) +-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") +@@ -336,9 +324,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) + +--- darktable-0.9.2.orig/src/common/imageio.c ++++ darktable-0.9.2/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); |