diff options
author | Tim Harder <radhermit@gentoo.org> | 2013-10-20 11:06:50 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2013-10-20 11:06:50 +0000 |
commit | c2a685dfa3a9ecd8b6ce271d3112bcd90bcaf8ba (patch) | |
tree | e874df81549d7cf2260f0ad1f356e4af6e96d7bd /media-libs | |
parent | Remove unnecessary (?) ImageMagick dep. (diff) | |
download | gentoo-2-c2a685dfa3a9ecd8b6ce271d3112bcd90bcaf8ba.tar.gz gentoo-2-c2a685dfa3a9ecd8b6ce271d3112bcd90bcaf8ba.tar.bz2 gentoo-2-c2a685dfa3a9ecd8b6ce271d3112bcd90bcaf8ba.zip |
Switch to cmake build system (fixes bug #488598) and add multilib support (bug #474652).
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
Diffstat (limited to 'media-libs')
7 files changed, 239 insertions, 1 deletions
diff --git a/media-libs/libraw/ChangeLog b/media-libs/libraw/ChangeLog index a7376d2e9663..8730b4c6fcbe 100644 --- a/media-libs/libraw/ChangeLog +++ b/media-libs/libraw/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for media-libs/libraw # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libraw/ChangeLog,v 1.67 2013/10/18 02:57:19 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libraw/ChangeLog,v 1.68 2013/10/20 11:06:50 radhermit Exp $ + +*libraw-0.16.0_alpha2-r1 (20 Oct 2013) + + 20 Oct 2013; Tim Harder <radhermit@gentoo.org> + +libraw-0.16.0_alpha2-r1.ebuild, + +files/libraw-0.16.0_alpha2-automagic-jasper.patch, + +files/libraw-0.16.0_alpha2-custom-demosaic-paths.patch, + +files/libraw-0.16.0_alpha2-docs.patch, + +files/libraw-0.16.0_alpha2-lcms2-first.patch, + +files/libraw-0.16.0_alpha2-libdir.patch: + Switch to cmake build system (fixes bug #488598) and add multilib support + (bug #474652). *libraw-0.16.0_alpha2 (18 Oct 2013) diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-automagic-jasper.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-automagic-jasper.patch new file mode 100644 index 000000000000..9f158f4ec5bb --- /dev/null +++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-automagic-jasper.patch @@ -0,0 +1,32 @@ +--- LibRaw-0.16.0-Alpha2/CMakeLists.txt ++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt +@@ -65,6 +65,7 @@ + # Project Options + + OPTION(ENABLE_OPENMP "Build library with OpenMP support (default=ON)" ON) ++OPTION(ENABLE_JASPER "Build library with RedCine codec support (default=ON)" ON) + OPTION(ENABLE_LCMS "Build library with LCMS support (default=ON)" ON) + OPTION(ENABLE_EXAMPLES "Build library with sample command-line programs (default=ON)" ON) + OPTION(ENABLE_RAWSPEED "Build library with extra RawSpeed codec support (default=OFF)" OFF) +@@ -207,12 +208,16 @@ + + # Jasper library check + +-FIND_PACKAGE(Jasper) ++SET(JASPER_FOUND false) + +-# Flag to use libjasper with LibRaw RedCine codec +-IF(JASPER_FOUND) +- ADD_DEFINITIONS(-DUSE_JASPER) +- INCLUDE_DIRECTORIES(${JASPER_INCLUDE_DIR}) ++IF(ENABLE_JASPER) ++ FIND_PACKAGE(Jasper) ++ ++ # Flag to use libjasper with LibRaw RedCine codec ++ IF(JASPER_FOUND) ++ ADD_DEFINITIONS(-DUSE_JASPER) ++ INCLUDE_DIRECTORIES(${JASPER_INCLUDE_DIR}) ++ ENDIF() + ENDIF() + + # For registration to libraw_config.h diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-custom-demosaic-paths.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-custom-demosaic-paths.patch new file mode 100644 index 000000000000..85a1df495947 --- /dev/null +++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-custom-demosaic-paths.patch @@ -0,0 +1,23 @@ +Use externally defined paths for demosaic packs and rawspeed before falling back to defaults. + +--- LibRaw-0.16.0-Alpha2/CMakeLists.txt ++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt +@@ -81,9 +81,15 @@ + SET(RAWSPEED_RPATH "RawSpeed" CACHE STRING + "Relavive path to extra RawSpeed codec (default=RawSpeed)") + +-SET(DEMOSAIC_PACK_GPL2_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL2_RPATH}") +-SET(DEMOSAIC_PACK_GPL3_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL3_RPATH}") +-SET(RAWSPEED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${RAWSPEED_RPATH}") ++IF(NOT DEMOSAIC_PACK_GPL2_PATH) ++ SET(DEMOSAIC_PACK_GPL2_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL2_RPATH}") ++ENDIF() ++IF(NOT DEMOSAIC_PACK_GPL3_PATH) ++ SET(DEMOSAIC_PACK_GPL3_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${DEMOSAIC_PACK_GPL3_RPATH}") ++ENDIF() ++IF(NOT RAWSPEED_PATH) ++ SET(RAWSPEED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${RAWSPEED_RPATH}") ++ENDIF() + + # ================================================================================================== + # General definitions rules diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-docs.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-docs.patch new file mode 100644 index 000000000000..442bfdc5471e --- /dev/null +++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-docs.patch @@ -0,0 +1,21 @@ +--- LibRaw-0.16.0-Alpha2/CMakeLists.txt ++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt +@@ -579,18 +579,6 @@ + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/FindLibRaw.cmake + DESTINATION ${CMAKE_ROOT}/Modules) + +-# Install doc data files. +-IF(NOT WIN32) +- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT +- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.CDDL +- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.LGPL +- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.LibRaw.pdf +- ${CMAKE_CURRENT_SOURCE_DIR}/Changelog.txt +- DESTINATION share/libraw +- COMPONENT main +- ) +-ENDIF() +- + # Uninstall rules + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/Uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY) + ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-lcms2-first.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-lcms2-first.patch new file mode 100644 index 000000000000..8b96df08257a --- /dev/null +++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-lcms2-first.patch @@ -0,0 +1,52 @@ +Check for lcms2 before falling back to lcms1. + +--- LibRaw-0.16.0-Alpha2/CMakeLists.txt ++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt +@@ -119,27 +119,27 @@ + SET(LCMS_SUPPORT_CAN_BE_COMPILED false) + + IF (ENABLE_LCMS) +- MESSAGE(STATUS "Check for LCMS1 availability...") +- FIND_PACKAGE(LCMS) +- IF (LCMS_FOUND) +- MESSAGE(STATUS "Found LCMS1: ${LCMS_LIBRARIES} ${LCMS_INCLUDE_DIR}") +- INCLUDE_DIRECTORIES(${LCMS_INCLUDE_DIR}) +- MACRO_LOG_FEATURE(LCMS_FOUND "LCMS1" "A small-footprint color management engine" "http://www.littlecms.com" TRUE "" "Needed by libkdcraw") +- # Flag to compile Little CMS version 1 with LibRaw +- ADD_DEFINITIONS(-DUSE_LCMS) +- # For compatibility +- SET(LCMS2_LIBRARIES ${LCMS_LIBRARIES}) +- SET(LCMS_SUPPORT_CAN_BE_COMPILED true) ++ MESSAGE(STATUS "Check for LCMS2 availability...") ++ FIND_PACKAGE(LCMS2) ++ IF (LCMS2_FOUND AND (LCMS2_VERSION VERSION_EQUAL 2.1 OR LCMS2_VERSION VERSION_GREATER 2.1)) ++ MESSAGE(STATUS "Found LCMS2: ${LCMS2_LIBRARIES} ${LCMS2_INCLUDE_DIR}") ++ INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR}) ++ MACRO_LOG_FEATURE(LCMS2_FOUND "LCMS2" "A small-footprint color management engine" "http://www.littlecms.com" FALSE "" "Needed by libkdcraw") ++ # Flag to compile Little CMS version 2 with LibRaw ++ ADD_DEFINITIONS(-DUSE_LCMS2) ++ SET(LCMS_SUPPORT_CAN_BE_COMPILED true) + ELSE () +- MESSAGE(STATUS "Check for LCMS2 availability instead LCMS1...") +- FIND_PACKAGE(LCMS2) +- IF (LCMS2_FOUND AND (LCMS2_VERSION VERSION_EQUAL 2.1 OR LCMS2_VERSION VERSION_GREATER 2.1)) +- MESSAGE(STATUS "Found LCMS2 instead LCMS1: ${LCMS2_LIBRARIES} ${LCMS2_INCLUDE_DIR}") +- INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR}) +- MACRO_LOG_FEATURE(LCMS2_FOUND "LCMS2" "A small-footprint color management engine" "http://www.littlecms.com" FALSE "" "Needed by libkdcraw") +- # Flag to compile Little CMS version 2 with LibRaw +- ADD_DEFINITIONS(-DUSE_LCMS2) +- SET(LCMS_SUPPORT_CAN_BE_COMPILED true) ++ MESSAGE(STATUS "Check for LCMS1 availability...") ++ FIND_PACKAGE(LCMS) ++ IF (LCMS_FOUND) ++ MESSAGE(STATUS "Found LCMS1: ${LCMS_LIBRARIES} ${LCMS_INCLUDE_DIR}") ++ INCLUDE_DIRECTORIES(${LCMS_INCLUDE_DIR}) ++ MACRO_LOG_FEATURE(LCMS_FOUND "LCMS1" "A small-footprint color management engine" "http://www.littlecms.com" TRUE "" "Needed by libkdcraw") ++ # Flag to compile Little CMS version 1 with LibRaw ++ ADD_DEFINITIONS(-DUSE_LCMS) ++ # For compatibility ++ SET(LCMS2_LIBRARIES ${LCMS_LIBRARIES}) ++ SET(LCMS_SUPPORT_CAN_BE_COMPILED true) + ENDIF () + ENDIF () + ENDIF() diff --git a/media-libs/libraw/files/libraw-0.16.0_alpha2-libdir.patch b/media-libs/libraw/files/libraw-0.16.0_alpha2-libdir.patch new file mode 100644 index 000000000000..ae21f625c44b --- /dev/null +++ b/media-libs/libraw/files/libraw-0.16.0_alpha2-libdir.patch @@ -0,0 +1,32 @@ +--- LibRaw-0.16.0-Alpha2/CMakeLists.txt ++++ LibRaw-0.16.0-Alpha2/CMakeLists.txt +@@ -565,14 +565,14 @@ + # Install Shared binary files. + INSTALL(TARGETS raw + RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + + INSTALL(TARGETS raw_r + RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + + # Install find cmake script to the system for client applications. +@@ -626,8 +626,8 @@ + + INSTALL(TARGETS ${_target} + RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + ENDMACRO(LIBRAW_BUILD_SAMPLES) + diff --git a/media-libs/libraw/libraw-0.16.0_alpha2-r1.ebuild b/media-libs/libraw/libraw-0.16.0_alpha2-r1.ebuild new file mode 100644 index 000000000000..fdf0ffc28f36 --- /dev/null +++ b/media-libs/libraw/libraw-0.16.0_alpha2-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libraw/libraw-0.16.0_alpha2-r1.ebuild,v 1.1 2013/10/20 11:06:50 radhermit Exp $ + +EAPI=5 + +inherit cmake-multilib toolchain-funcs + +MY_PN=LibRaw +MY_PV=${PV/_a/-A} +MY_P=${MY_PN}-${MY_PV} + +DESCRIPTION="LibRaw is a library for reading RAW files obtained from digital photo cameras" +HOMEPAGE="http://www.libraw.org/" +SRC_URI="http://www.libraw.org/data/${MY_P}.tar.gz + demosaic? ( + http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-${MY_PV}.tar.gz + http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-${MY_PV}.tar.gz + )" + +# Libraw also has it's own license, which is a pdf file and +# can be obtained from here: +# http://www.libraw.org/data/LICENSE.LibRaw.pdf +LICENSE="LGPL-2.1 CDDL GPL-2 GPL-3" +SLOT="0/10" # subslot = libraw soname version +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="demosaic examples jpeg jpeg2k +lcms openmp" + +RDEPEND="jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/jasper[${MULTILIB_USEDEP}] ) + lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${MY_P} + +DOCS=( Changelog.txt README ) + +PATCHES=( + "${FILESDIR}"/${P}-docs.patch + "${FILESDIR}"/${P}-automagic-jasper.patch + "${FILESDIR}"/${P}-libdir.patch + "${FILESDIR}"/${P}-lcms2-first.patch + "${FILESDIR}"/${P}-custom-demosaic-paths.patch +) + +pkg_pretend() { + if use openmp ; then + tc-has-openmp || die "Please switch to an openmp compatible compiler" + fi +} + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_enable openmp OPENMP) + $(cmake-utils_use_enable jpeg JPEG) + $(cmake-utils_use_enable jpeg2k JASPER) + $(cmake-utils_use_enable lcms LCMS) + $(cmake-utils_use_enable examples EXAMPLES) + $(cmake-utils_use_enable demosaic DEMOSAIC_PACK_GPL2) + $(cmake-utils_use_enable demosaic DEMOSAIC_PACK_GPL3) + -DDEMOSAIC_PACK_GPL2_PATH="${WORKDIR}/${MY_PN}-demosaic-pack-GPL2-${MY_PV}" + -DDEMOSAIC_PACK_GPL3_PATH="${WORKDIR}/${MY_PN}-demosaic-pack-GPL3-${MY_PV}" + ) + cmake-multilib_src_configure +} |