aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Huettel (dilfridge) <dilfridge@gentoo.org>2013-07-04 23:55:11 +0200
committerAndreas K. Huettel (dilfridge) <dilfridge@gentoo.org>2013-07-04 23:55:11 +0200
commit4e0b30364850094b2f655a0df49d02e76db08d34 (patch)
tree5785d957f04cdd690b81433188c2d8c43b1c6012 /kde-base
parent[net-libs/telepathy-logger-qt] Sync with tree. (diff)
downloadkde-4e0b30364850094b2f655a0df49d02e76db08d34.tar.gz
kde-4e0b30364850094b2f655a0df49d02e76db08d34.tar.bz2
kde-4e0b30364850094b2f655a0df49d02e76db08d34.zip
[kde-base/libkdcraw] Unbundle libraw, patch by Pino Toscano
Package-Manager: portage-2.2.0_alpha186
Diffstat (limited to 'kde-base')
-rw-r--r--kde-base/libkdcraw/files/libkdcraw-4.10.5-extlibraw.patch163
-rw-r--r--kde-base/libkdcraw/files/libkdcraw-4.10.90-extlibraw.patch168
-rw-r--r--kde-base/libkdcraw/libkdcraw-4.10.49.9999.ebuild7
-rw-r--r--kde-base/libkdcraw/libkdcraw-4.10.90-r1.ebuild28
-rw-r--r--kde-base/libkdcraw/libkdcraw-9999.ebuild7
5 files changed, 365 insertions, 8 deletions
diff --git a/kde-base/libkdcraw/files/libkdcraw-4.10.5-extlibraw.patch b/kde-base/libkdcraw/files/libkdcraw-4.10.5-extlibraw.patch
new file mode 100644
index 0000000000..e5eba854d2
--- /dev/null
+++ b/kde-base/libkdcraw/files/libkdcraw-4.10.5-extlibraw.patch
@@ -0,0 +1,163 @@
+Patch by Pino Toscano
+Source: https://git.reviewboard.kde.org/r/110962/diff/
+
+
+diff -ruN libkdcraw-4.10.5.orig/CMakeLists.txt libkdcraw-4.10.5/CMakeLists.txt
+--- libkdcraw-4.10.5.orig/CMakeLists.txt 2013-06-28 19:36:41.000000000 +0200
++++ libkdcraw-4.10.5/CMakeLists.txt 2013-07-04 23:25:14.000000000 +0200
+@@ -29,15 +29,14 @@
+ MESSAGE(STATUS "----------------------------------------------------------------------------------")
+ MESSAGE(STATUS "Starting CMake configuration for: libkdcraw")
+
+-OPTION(ENABLE_LCMS2 "Link libraw to LCMS2 else LCMS1 (default=OFF)" OFF)
+-OPTION(ENABLE_RAWSPEED "Compile libraw with RawSpeed codec (default=OFF)" OFF)
+-
+ FIND_PACKAGE(KDE4 REQUIRED)
+ INCLUDE(KDE4Defaults)
+ INCLUDE(MacroLibrary)
+ INCLUDE(MacroOptionalAddSubdirectory)
+ INCLUDE(FindPackageHandleStandardArgs)
+
++FIND_PACKAGE(LibRaw 0.15 REQUIRED)
++
+ ADD_DEFINITIONS (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
+ INCLUDE_DIRECTORIES (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
+
+@@ -106,7 +105,6 @@
+
+ # ==================================================================================================
+
+-ADD_SUBDIRECTORY(libraw)
+ ADD_SUBDIRECTORY(libkdcraw)
+ ADD_SUBDIRECTORY(test)
+ ADD_SUBDIRECTORY(icons)
+diff -ruN libkdcraw-4.10.5.orig/cmake/modules/FindLibRaw.cmake libkdcraw-4.10.5/cmake/modules/FindLibRaw.cmake
+--- libkdcraw-4.10.5.orig/cmake/modules/FindLibRaw.cmake 1970-01-01 01:00:00.000000000 +0100
++++ libkdcraw-4.10.5/cmake/modules/FindLibRaw.cmake 2013-07-04 23:25:14.000000000 +0200
+@@ -0,0 +1,63 @@
++# - Find LibRaw
++# Find the LibRaw library
++# This module defines
++# LibRaw_INCLUDE_DIR, where to find libraw.h
++# LibRaw_LIBRARIES, the libraries needed to use LibRaw
++# LibRaw_VERSION_STRING, the version string of LibRaw
++# LibRaw_DEFINITIONS, the definitions needed to use LibRaw
++
++
++# Copyright (c) 2013, Pino Toscano <pino@kde.org>
++#
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
++
++
++find_package(PkgConfig)
++if(PKG_CONFIG_FOUND)
++ pkg_check_modules(PC_LIBRAW libraw)
++ set(LibRaw_DEFINITIONS ${PC_LIBRAW_CFLAGS_OTHER})
++endif()
++
++find_path(LibRaw_INCLUDE_DIR libraw.h
++ HINTS
++ ${PC_LIBRAW_INCLUDEDIR}
++ ${PC_LibRaw_INCLUDE_DIRS}
++ PATH_SUFFIXES libraw
++)
++
++find_library(LibRaw_LIBRARIES NAMES raw
++ HINTS
++ ${PC_LIBRAW_LIBDIR}
++ ${PC_LIBRAW_LIBRARY_DIRS}
++)
++
++if(LibRaw_INCLUDE_DIR)
++ file(READ ${LibRaw_INCLUDE_DIR}/libraw_version.h _libraw_version_content)
++ string(REGEX MATCH "#define LIBRAW_MAJOR_VERSION[ ]*([0-9]*)\n" _version_major_match ${_libraw_version_content})
++ set(_libraw_version_major "${CMAKE_MATCH_1}")
++ string(REGEX MATCH "#define LIBRAW_MINOR_VERSION[ ]*([0-9]*)\n" _version_minor_match ${_libraw_version_content})
++ set(_libraw_version_minor "${CMAKE_MATCH_1}")
++ string(REGEX MATCH "#define LIBRAW_PATCH_VERSION[ ]*([0-9]*)\n" _version_patch_match ${_libraw_version_content})
++ set(_libraw_version_patch "${CMAKE_MATCH_1}")
++ if(_version_major_match AND _version_minor_match AND _version_patch_match)
++ set(LibRaw_VERSION_STRING "${_libraw_version_major}.${_libraw_version_minor}.${_libraw_version_patch}")
++ else()
++ if(NOT LibRaw_FIND_QUIETLY)
++ message(STATUS "Failed to get version information from ${LibRaw_INCLUDE_DIR}/libraw_version.h")
++ endif()
++ endif()
++endif()
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(LibRaw
++ REQUIRED_VARS LibRaw_LIBRARIES LibRaw_INCLUDE_DIR
++ VERSION_VAR LibRaw_VERSION_STRING
++)
++
++mark_as_advanced(LibRaw_INCLUDE_DIR
++ LibRaw_LIBRARIES
++ LibRaw_VERSION_STRING
++ LibRaw_DEFINITIONS
++)
++
+diff -ruN libkdcraw-4.10.5.orig/libkdcraw/CMakeLists.txt libkdcraw-4.10.5/libkdcraw/CMakeLists.txt
+--- libkdcraw-4.10.5.orig/libkdcraw/CMakeLists.txt 2013-06-28 19:36:41.000000000 +0200
++++ libkdcraw-4.10.5/libkdcraw/CMakeLists.txt 2013-07-04 23:29:38.000000000 +0200
+@@ -22,7 +22,27 @@
+ #
+ # ============================================================
+
+-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libraw)
++# In some versions LibRaw is not linked against OpenMP stuff,
++# so manually link libkdcraw against it for now.
++
++IF(NOT APPLE)
++ # OpenMP library detection (requires CMake >= 2.6.3)
++ # NOTE: OpenMP under MacOSX do not support multithreading.
++
++ MACRO_OPTIONAL_FIND_PACKAGE(OpenMP)
++
++ IF(OPENMP_FOUND)
++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
++ IF("${OpenMP_CXX_FLAGS}" STREQUAL "-fopenmp")
++ SET(OPENMP_LDFLAGS "-lgomp")
++ ENDIF("${OpenMP_CXX_FLAGS}" STREQUAL "-fopenmp")
++ IF("${OpenMP_CXX_FLAGS}" STREQUAL "-xopenmp")
++ SET(OPENMP_LDFLAGS "-xopenmp")
++ ENDIF("${OpenMP_CXX_FLAGS}" STREQUAL "-xopenmp")
++ ENDIF(OPENMP_FOUND)
++ENDIF(NOT APPLE)
++
++INCLUDE_DIRECTORIES(${LibRaw_INCLUDE_DIR})
+
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+
+@@ -42,15 +62,15 @@
+ KDE4_ADD_LIBRARY(kdcraw SHARED ${kdcraw_LIB_SRCS})
+
+ TARGET_LINK_LIBRARIES(kdcraw
+- libraw
++ ${LibRaw_LIBRARIES}
+ ${KDE4_KDEUI_LIBS}
+ ${KDE4_KIO_LIBS}
+ ${KDE4_SOLID_LIBS}
+ ${KDE4_THREADWEAVER_LIBRARIES}
++ ${OPENMP_LDFLAGS}
+ )
+
+-SET_TARGET_PROPERTIES(kdcraw PROPERTIES VERSION ${DCRAW_LIB_SO_VERSION_STRING} SOVERSION ${DCRAW_LIB_SO_CUR_VERSION}
+- DEFINE_SYMBOL LIBRAW_BUILDLIB)
++SET_TARGET_PROPERTIES(kdcraw PROPERTIES VERSION ${DCRAW_LIB_SO_VERSION_STRING} SOVERSION ${DCRAW_LIB_SO_CUR_VERSION})
+
+ INSTALL(TARGETS kdcraw ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+diff -ruN libkdcraw-4.10.5.orig/libkdcraw/libkdcraw_export.h libkdcraw-4.10.5/libkdcraw/libkdcraw_export.h
+--- libkdcraw-4.10.5.orig/libkdcraw/libkdcraw_export.h 2013-06-28 19:36:41.000000000 +0200
++++ libkdcraw-4.10.5/libkdcraw/libkdcraw_export.h 2013-07-04 23:25:14.000000000 +0200
+@@ -31,7 +31,7 @@
+ #include <kdemacros.h>
+
+ #ifndef LIBKDCRAW_EXPORT
+-# if defined(LIBRAW_BUILDLIB)
++# if defined(MAKE_KDCRAW_LIB)
+ /* We are building this library */
+ # define LIBKDCRAW_EXPORT KDE_EXPORT
+ # else
diff --git a/kde-base/libkdcraw/files/libkdcraw-4.10.90-extlibraw.patch b/kde-base/libkdcraw/files/libkdcraw-4.10.90-extlibraw.patch
new file mode 100644
index 0000000000..6aba2a795d
--- /dev/null
+++ b/kde-base/libkdcraw/files/libkdcraw-4.10.90-extlibraw.patch
@@ -0,0 +1,168 @@
+Patch by Pino Toscano
+Source: https://git.reviewboard.kde.org/r/110962/diff/
+
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f2f269609feb10947ec3bac10125b379c6c821dd..2a6df015347b9ba1e9b7d17bf3f74ed5803c0f28 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,15 +29,14 @@ SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_P
+ MESSAGE(STATUS "----------------------------------------------------------------------------------")
+ MESSAGE(STATUS "Starting CMake configuration for: libkdcraw")
+
+-OPTION(ENABLE_LCMS2 "Link libraw to LCMS2 else LCMS1 (default=OFF)" OFF)
+-OPTION(ENABLE_RAWSPEED "Compile libraw with RawSpeed codec (default=OFF)" OFF)
+-
+ FIND_PACKAGE(KDE4 REQUIRED)
+ INCLUDE(KDE4Defaults)
+ INCLUDE(MacroLibrary)
+ INCLUDE(MacroOptionalAddSubdirectory)
+ INCLUDE(FindPackageHandleStandardArgs)
+
++FIND_PACKAGE(LibRaw 0.15 REQUIRED)
++
+ ADD_DEFINITIONS (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
+ INCLUDE_DIRECTORIES (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
+
+@@ -108,7 +107,6 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+
+ # ==================================================================================================
+
+-ADD_SUBDIRECTORY(libraw)
+ ADD_SUBDIRECTORY(libkdcraw)
+ ADD_SUBDIRECTORY(test)
+ ADD_SUBDIRECTORY(icons)
+diff --git a/cmake/modules/FindLibRaw.cmake b/cmake/modules/FindLibRaw.cmake
+new file mode 100644
+index 0000000000000000000000000000000000000000..0a062636f443061d2c637373a19c39b2ced6d999
+--- /dev/null
++++ b/cmake/modules/FindLibRaw.cmake
+@@ -0,0 +1,63 @@
++# - Find LibRaw
++# Find the LibRaw library
++# This module defines
++# LibRaw_INCLUDE_DIR, where to find libraw.h
++# LibRaw_LIBRARIES, the libraries needed to use LibRaw
++# LibRaw_VERSION_STRING, the version string of LibRaw
++# LibRaw_DEFINITIONS, the definitions needed to use LibRaw
++
++
++# Copyright (c) 2013, Pino Toscano <pino@kde.org>
++#
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
++
++
++find_package(PkgConfig)
++if(PKG_CONFIG_FOUND)
++ pkg_check_modules(PC_LIBRAW libraw)
++ set(LibRaw_DEFINITIONS ${PC_LIBRAW_CFLAGS_OTHER})
++endif()
++
++find_path(LibRaw_INCLUDE_DIR libraw.h
++ HINTS
++ ${PC_LIBRAW_INCLUDEDIR}
++ ${PC_LibRaw_INCLUDE_DIRS}
++ PATH_SUFFIXES libraw
++)
++
++find_library(LibRaw_LIBRARIES NAMES raw
++ HINTS
++ ${PC_LIBRAW_LIBDIR}
++ ${PC_LIBRAW_LIBRARY_DIRS}
++)
++
++if(LibRaw_INCLUDE_DIR)
++ file(READ ${LibRaw_INCLUDE_DIR}/libraw_version.h _libraw_version_content)
++ string(REGEX MATCH "#define LIBRAW_MAJOR_VERSION[ ]*([0-9]*)\n" _version_major_match ${_libraw_version_content})
++ set(_libraw_version_major "${CMAKE_MATCH_1}")
++ string(REGEX MATCH "#define LIBRAW_MINOR_VERSION[ ]*([0-9]*)\n" _version_minor_match ${_libraw_version_content})
++ set(_libraw_version_minor "${CMAKE_MATCH_1}")
++ string(REGEX MATCH "#define LIBRAW_PATCH_VERSION[ ]*([0-9]*)\n" _version_patch_match ${_libraw_version_content})
++ set(_libraw_version_patch "${CMAKE_MATCH_1}")
++ if(_version_major_match AND _version_minor_match AND _version_patch_match)
++ set(LibRaw_VERSION_STRING "${_libraw_version_major}.${_libraw_version_minor}.${_libraw_version_patch}")
++ else()
++ if(NOT LibRaw_FIND_QUIETLY)
++ message(STATUS "Failed to get version information from ${LibRaw_INCLUDE_DIR}/libraw_version.h")
++ endif()
++ endif()
++endif()
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(LibRaw
++ REQUIRED_VARS LibRaw_LIBRARIES LibRaw_INCLUDE_DIR
++ VERSION_VAR LibRaw_VERSION_STRING
++)
++
++mark_as_advanced(LibRaw_INCLUDE_DIR
++ LibRaw_LIBRARIES
++ LibRaw_VERSION_STRING
++ LibRaw_DEFINITIONS
++)
++
+diff --git a/libkdcraw/CMakeLists.txt b/libkdcraw/CMakeLists.txt
+index cce5d6dba690fb5182638ccd1f10488bbd6ec2ce..e27219c3eed56abff13a8a2344dd01973ad38000 100644
+--- a/libkdcraw/CMakeLists.txt
++++ b/libkdcraw/CMakeLists.txt
+@@ -22,7 +22,27 @@
+ #
+ # ============================================================
+
+-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libraw/libraw)
++# In some versions LibRaw is not linked against OpenMP stuff,
++# so manually link libkdcraw against it for now.
++
++IF(NOT APPLE)
++ # OpenMP library detection (requires CMake >= 2.6.3)
++ # NOTE: OpenMP under MacOSX do not support multithreading.
++
++ MACRO_OPTIONAL_FIND_PACKAGE(OpenMP)
++
++ IF(OPENMP_FOUND)
++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
++ IF("${OpenMP_CXX_FLAGS}" STREQUAL "-fopenmp")
++ SET(OPENMP_LDFLAGS "-lgomp")
++ ENDIF("${OpenMP_CXX_FLAGS}" STREQUAL "-fopenmp")
++ IF("${OpenMP_CXX_FLAGS}" STREQUAL "-xopenmp")
++ SET(OPENMP_LDFLAGS "-xopenmp")
++ ENDIF("${OpenMP_CXX_FLAGS}" STREQUAL "-xopenmp")
++ ENDIF(OPENMP_FOUND)
++ENDIF(NOT APPLE)
++
++INCLUDE_DIRECTORIES(${LibRaw_INCLUDE_DIR})
+
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+
+@@ -42,15 +62,15 @@ SET(kdcraw_LIB_SRCS kdcraw.cpp
+ KDE4_ADD_LIBRARY(kdcraw SHARED ${kdcraw_LIB_SRCS})
+
+ TARGET_LINK_LIBRARIES(kdcraw
+- libraw
++ ${LibRaw_LIBRARIES}
+ ${KDE4_KDEUI_LIBS}
+ ${KDE4_KIO_LIBS}
+ ${KDE4_SOLID_LIBS}
+ ${KDE4_THREADWEAVER_LIBRARIES}
++ ${OPENMP_LDFLAGS}
+ )
+
+-SET_TARGET_PROPERTIES(kdcraw PROPERTIES VERSION ${DCRAW_LIB_SO_VERSION_STRING} SOVERSION ${DCRAW_LIB_SO_CUR_VERSION}
+- DEFINE_SYMBOL LIBRAW_BUILDLIB)
++SET_TARGET_PROPERTIES(kdcraw PROPERTIES VERSION ${DCRAW_LIB_SO_VERSION_STRING} SOVERSION ${DCRAW_LIB_SO_CUR_VERSION})
+
+ INSTALL(TARGETS kdcraw ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+diff --git a/libkdcraw/libkdcraw_export.h b/libkdcraw/libkdcraw_export.h
+index 1a222a03502a0e068bdba4f03b7ff4961c4a8f2b..c380aa49b724c1a9c5c5dd9956cafb94e47a9562 100644
+--- a/libkdcraw/libkdcraw_export.h
++++ b/libkdcraw/libkdcraw_export.h
+@@ -31,7 +31,7 @@
+ #include <kdemacros.h>
+
+ #ifndef LIBKDCRAW_EXPORT
+-# if defined(LIBRAW_BUILDLIB)
++# if defined(MAKE_KDCRAW_LIB)
+ /* We are building this library */
+ # define LIBKDCRAW_EXPORT KDE_EXPORT
+ # else
diff --git a/kde-base/libkdcraw/libkdcraw-4.10.49.9999.ebuild b/kde-base/libkdcraw/libkdcraw-4.10.49.9999.ebuild
index 756e847cd1..2af8988feb 100644
--- a/kde-base/libkdcraw/libkdcraw-4.10.49.9999.ebuild
+++ b/kde-base/libkdcraw/libkdcraw-4.10.49.9999.ebuild
@@ -11,18 +11,17 @@ KEYWORDS=""
IUSE="debug jasper lcms"
DEPEND="
- media-libs/lcms:0
+ >=media-libs/libraw-0.15:=
virtual/jpeg
jasper? ( media-libs/jasper )
- lcms? ( media-libs/lcms:2 )
"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${PN}-4.10.5-extlibraw.patch" )
+
src_configure() {
local mycmakeargs=(
- -DCMAKE_DISABLE_FIND_PACKAGE_LCMS=ON
$(cmake-utils_use_find_package jasper)
- $(cmake-utils_use_find_package lcms LCMS2)
)
kde4-base_src_configure
diff --git a/kde-base/libkdcraw/libkdcraw-4.10.90-r1.ebuild b/kde-base/libkdcraw/libkdcraw-4.10.90-r1.ebuild
new file mode 100644
index 0000000000..c2fc8860e9
--- /dev/null
+++ b/kde-base/libkdcraw/libkdcraw-4.10.90-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit kde4-base
+
+DESCRIPTION="KDE digital camera raw image library wrapper"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug jasper lcms"
+
+DEPEND="
+ >=media-libs/libraw-0.15:=
+ virtual/jpeg
+ jasper? ( media-libs/jasper )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-4.10.90-extlibraw.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package jasper)
+ )
+
+ kde4-base_src_configure
+}
diff --git a/kde-base/libkdcraw/libkdcraw-9999.ebuild b/kde-base/libkdcraw/libkdcraw-9999.ebuild
index 756e847cd1..8a89c6a327 100644
--- a/kde-base/libkdcraw/libkdcraw-9999.ebuild
+++ b/kde-base/libkdcraw/libkdcraw-9999.ebuild
@@ -11,18 +11,17 @@ KEYWORDS=""
IUSE="debug jasper lcms"
DEPEND="
- media-libs/lcms:0
+ >=media-libs/libraw-0.15:=
virtual/jpeg
jasper? ( media-libs/jasper )
- lcms? ( media-libs/lcms:2 )
"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${PN}-4.10.90-extlibraw.patch" )
+
src_configure() {
local mycmakeargs=(
- -DCMAKE_DISABLE_FIND_PACKAGE_LCMS=ON
$(cmake-utils_use_find_package jasper)
- $(cmake-utils_use_find_package lcms LCMS2)
)
kde4-base_src_configure