From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- media-libs/openicc/Manifest | 4 + .../openicc/files/openicc-0.1.0-buildsystem.patch | 228 +++++++++++++++++++++ media-libs/openicc/metadata.xml | 11 + media-libs/openicc/openicc-0.1.0.ebuild | 45 ++++ 4 files changed, 288 insertions(+) create mode 100644 media-libs/openicc/Manifest create mode 100644 media-libs/openicc/files/openicc-0.1.0-buildsystem.patch create mode 100644 media-libs/openicc/metadata.xml create mode 100644 media-libs/openicc/openicc-0.1.0.ebuild (limited to 'media-libs/openicc') diff --git a/media-libs/openicc/Manifest b/media-libs/openicc/Manifest new file mode 100644 index 000000000000..2a67e7b18cd5 --- /dev/null +++ b/media-libs/openicc/Manifest @@ -0,0 +1,4 @@ +AUX openicc-0.1.0-buildsystem.patch 8257 SHA256 fedf5c5d9dcb59b1799acbedbf9b1f1d6fe669e27ee39c1d43a53466e23c37fc SHA512 880b47966eb8350b245dd7f9124d715d2915b40d962bcf550c52defa832132e9d79c269bd31b58844cfe2b582d528d76bc7eca84a92acd75c5d2165117d4fefc WHIRLPOOL 150ef0a19149c031001e5114f4439a6f517c06a738f69ee48484b4150d709cafc875f07240197a97df87211c5533c7ac07d4c39b03758f6d151babaadb3454e9 +DIST openicc-0.1.0.tar.gz 193974 SHA256 461e567bbb9913b0731914be5efe2992158e169b69783956513f35a0f931ec51 SHA512 81df4545694e920bea0b24535c1c8d06327f87dee465883c4e3209d7348ab2220f94b9e9785d9da68c5e023e9a59512d5e15b4ad8f82e256b63b7c28459fd029 WHIRLPOOL f2774afb9d51cb6d5ecbab816f2e01717c0f9eb69cc6de97604c51264cf6c3f3ac8d036b7da1591b7244fde3087a543ee6f137a1fba10940175d85f17cf05d11 +EBUILD openicc-0.1.0.ebuild 1059 SHA256 16d86836a75c1012604f2e746c9efac5e62867fd075d4e252f1d8e97a91dd9ea SHA512 24a1e31b636d8a1da754ee3cb7c15c3d9842f5f3411aef862362ac3ce9339083ef4e71a237a745945c5ed8756f27e7d4e80bc0b0d9e4056ed2d9d1c400370538 WHIRLPOOL 9fa0e6e27cc45b2c55b830e145af138696a89dbb4664cd34f325bc1fb29db3c42997bdb48bd880a813242544707f1fbf3fca10917b899be135a3d30d21a51d45 +MISC metadata.xml 344 SHA256 914a599b35584b4beafdf85d9629855fba81d42a9532e0d022c5f41185fb3ce2 SHA512 71a573f416421c69e88ee66408381a1e8ff7a0b51747385ba498784f69db0086b13b5d8dc5cddd6a3547b611abcbec419ad50085422d2c6c3df99f4c6e1c08aa WHIRLPOOL da6fd1269172dd6065774bacf3287d24593578a5339d9c98e28db5610be6d49815aef457bcef7a0179f1f9f2e58cb41dacfcb2defc680116061662ed40aadc56 diff --git a/media-libs/openicc/files/openicc-0.1.0-buildsystem.patch b/media-libs/openicc/files/openicc-0.1.0-buildsystem.patch new file mode 100644 index 000000000000..d5a3467a71bd --- /dev/null +++ b/media-libs/openicc/files/openicc-0.1.0-buildsystem.patch @@ -0,0 +1,228 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9c3879e..a78b993 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-CMAKE_MINIMUM_REQUIRED (VERSION 2.6.2) ++CMAKE_MINIMUM_REQUIRED (VERSION 2.8.5) + + PROJECT (OpenICC) + +@@ -35,6 +35,16 @@ SET( REVERSE_DOMAIN org.openicc ) + + SET( ${PROJECT_NAME}_VERSION_MAJORMINOR "${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}" ) + ++include(GNUInstallDirs) ++ ++option(ENABLE_TESTS "Build tests (requires static libs)" ON) ++option(ENABLE_TOOLS "Build tools (currently openicc-device)" ON) ++option(ENABLE_STATIC_LIBS "Build static libs" ON) ++ ++IF( ENABLE_TESTS ) ++ SET(ENABLE_STATIC_LIBS ON) ++ENDIF() ++ + IF( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + SET(PLATFORM "OSX") + ELSEIF( ${CMAKE_SYSTEM_NAME} MATCHES "Linux") +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 950d3dc..0a89aea 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -16,13 +16,13 @@ SET (TARGET_CMAKE_FOLDER + + SET (TARGET_PLUGIN_FOLDER "openicc" + CACHE STRING +- "Optional folder below system library folder where to install openicc plugins. LIB_SUFFIX is honored." ++ "Optional folder below system library folder where to install openicc plugins." + ) + + SET (TARGET_PKGCONFIG_FOLDER + "pkgconfig" + CACHE STRING +- "The folder below system library folder where to install pkgconfig files. LIB_SUFFIX is honored." ++ "The folder below system library folder where to install pkgconfig files." + ) + + SET (TARGET_DOCUMENTATION_FOLDER +@@ -36,10 +36,6 @@ SET (TARGET_DOCUMENTATION_FOLDER + # Misc. + # + +-SET (LIB_SUFFIX "" +- CACHE STRING +- "Optional suffix to use on lib folders (e.g. 64 for lib64)" +- ) + #cmake settings for use by find_package + CONFIGURE_FILE ( + "${CMAKE_CURRENT_SOURCE_DIR}/OpenIccConfig.cmake.in" +@@ -49,6 +45,6 @@ CONFIGURE_FILE ( + + INSTALL ( FILES + "${CMAKE_CURRENT_BINARY_DIR}/OpenIccConfig.cmake" +- DESTINATION lib${LIB_SUFFIX}/cmake/openicc COMPONENT dev ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/openicc COMPONENT dev + ) + +diff --git a/cmake/OpenIccConfig.cmake.in b/cmake/OpenIccConfig.cmake.in +index 46dc1ba..373190f 100644 +--- a/cmake/OpenIccConfig.cmake.in ++++ b/cmake/OpenIccConfig.cmake.in +@@ -16,7 +16,7 @@ + # Set path to the header file. + FIND_PATH(OPENICC_INCLUDE_DIR + NAMES openicc_version.h +- PATHS @CMAKE_INSTALL_PREFIX@/include/@TARGET_INCLUDE_FOLDER@ ++ PATHS @CMAKE_INSTALL_FULL_INCLUDEDIR@/@TARGET_INCLUDE_FOLDER@ + NO_DEFAULT_PATH + ) + MARK_AS_ADVANCED(OPENICC_INCLUDE_DIR) +@@ -25,7 +25,7 @@ MARK_AS_ADVANCED(OPENICC_INCLUDE_DIR) + # Set path to the library. + FIND_LIBRARY(OPENICC_LIBRARY + NAMES OpenICC openicc-static +- PATHS @CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ ++ PATHS @CMAKE_INSTALL_FULL_LIBDIR@ + NO_DEFAULT_PATH + ) + MARK_AS_ADVANCED(OPENICC_LIBRARY) +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index a60698a..57cf57f 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -19,5 +19,5 @@ IF( DOXYGEN_FOUND ) + ADD_CUSTOM_TARGET( docu ALL + DEPENDS html ) + +- INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/${PACKAGE_NAME} ) ++ INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR} ) + ENDIF() +diff --git a/extras/CMakeLists.txt b/extras/CMakeLists.txt +index ee939a5..8289b32 100644 +--- a/extras/CMakeLists.txt ++++ b/extras/CMakeLists.txt +@@ -13,6 +13,6 @@ CONFIGURE_FILE( + + INSTALL( FILES + "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}.pc" +- DESTINATION lib${LIB_SUFFIX}/${TARGET_PKGCONFIG_FOLDER} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${TARGET_PKGCONFIG_FOLDER} + ) + +diff --git a/extras/openicc.pc.in b/extras/openicc.pc.in +index 8680344..826a3d0 100644 +--- a/extras/openicc.pc.in ++++ b/extras/openicc.pc.in +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ +-exec_prefix=${prefix}/bin +-libdir=${prefix}/lib@LIB_SUFFIX@ +-includedir=${prefix}/include/@TARGET_INCLUDE_FOLDER@ ++exec_prefix=${prefix}/@CMAKE_INSTALL_BINDIR@ ++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@TARGET_INCLUDE_FOLDER@ + + Name: @PACKAGE_NAME@ + Description: @PACKAGE_DESCRIPTION@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 09c6c05..d61f533 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -94,7 +94,7 @@ FIND_PACKAGE( GetText ) + MESSAGE( "GetText: ${GETTEXT_FOUND}" ) + IF( GETTEXT_FOUND ) + SET( USE_GETTEXT TRUE ) +- SET( OI_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale" ) ++ SET( OI_LOCALEDIR "${CMAKE_INSTALL_FULL_LOCALEDIR}" ) + ENDIF() + + # debug +@@ -106,9 +106,13 @@ ADD_SUBDIRECTORY( include ) + + ADD_SUBDIRECTORY( libopenicc ) + +-ADD_SUBDIRECTORY( tests ) ++IF( ENABLE_TESTS ) ++ ADD_SUBDIRECTORY( tests ) ++ENDIF() + +-ADD_SUBDIRECTORY( tools ) ++IF( ENABLE_TOOLS ) ++ ADD_SUBDIRECTORY( tools ) ++ENDIF() + + ADD_SUBDIRECTORY( examples ) + +diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt +index 082eaf8..c37d987 100644 +--- a/src/include/CMakeLists.txt ++++ b/src/include/CMakeLists.txt +@@ -16,4 +16,4 @@ SET( CHEADERS_OBJECT_CONFIG_PUBLIC + INSTALL( FILES + ${CHEADERS_OBJECT_CONFIG_PUBLIC} + "${CMAKE_BINARY_DIR}/src/include/openicc_version.h" +- DESTINATION include/${PROJECT_DOWN_NAME}) ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_DOWN_NAME}) +diff --git a/src/include/openicc_version.h.in b/src/include/openicc_version.h.in +index 627bd3b..b0b9927 100644 +--- a/src/include/openicc_version.h.in ++++ b/src/include/openicc_version.h.in +@@ -8,10 +8,10 @@ + #define OPENICC_VERSION (OPENICC_VERSION_A * 10000 + OPENICC_VERSION_B * 100 + OPENICC_VERSION_C) /**< version variable */ + + #define OPENICC_PREFIX "@CMAKE_INSTALL_PREFIX@" /**< install variable */ +-#define OPENICC_BINDIR "@CMAKE_INSTALL_PREFIX@/bin" /**< install variable */ +-#define OPENICC_DATADIR "@CMAKE_INSTALL_PREFIX@/share" /**< install variable */ +-#define OPENICC_LIBDIR "@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@" /**< install variable */ +-#define OPENICC_DATADIR "@CMAKE_INSTALL_PREFIX@/share" /**< install variable */ ++#define OPENICC_BINDIR "@CMAKE_INSTALL_FULL_BINDIR@" /**< install variable */ ++#define OPENICC_DATADIR "@CMAKE_INSTALL_FULL_DATAROOTDIR@" /**< install variable */ ++#define OPENICC_LIBDIR "@CMAKE_INSTALL_FULL_LIBDIR@/" /**< install variable */ ++#define OPENICC_DATADIR "@CMAKE_INSTALL_FULL_DATAROOTDIR@" /**< install variable */ + #define OPENICC_SYSCOLORDIR OPENICC_DATADIR "/color" /**< install variable */ + #define OPENICC_LOCALEDIR "@OI_LOCALEDIR@" + #define OPENICC_CMMSUBPATH "@OI_CMMSUBPATH@" /**< install variable */ +diff --git a/src/libopenicc/CMakeLists.txt b/src/libopenicc/CMakeLists.txt +index 1db9b0e..b4e7994 100644 +--- a/src/libopenicc/CMakeLists.txt ++++ b/src/libopenicc/CMakeLists.txt +@@ -36,14 +36,20 @@ ADD_LIBRARY( OpenICC SHARED ${SOURCES} ) + TARGET_LINK_LIBRARIES ( + OpenICC + ${EXTRA_LIBS} ${EXTRA_LIBS_CS} ) +-ADD_LIBRARY( openicc-static STATIC ${SOURCES} ) +-TARGET_LINK_LIBRARIES ( +- openicc-static +- ${EXTRA_LIBS} ${EXTRA_LIBS_CS} ) + +-INSTALL( TARGETS OpenICC openicc-static +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX} ) ++INSTALL( TARGETS OpenICC ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) + ++IF(ENABLE_STATIC_LIBS) ++ ADD_LIBRARY( openicc-static STATIC ${SOURCES} ) ++ TARGET_LINK_LIBRARIES ( ++ openicc-static ++ ${EXTRA_LIBS} ${EXTRA_LIBS_CS} ) + ++ INSTALL( TARGETS openicc-static ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) ++ENDIF() +diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt +index 8792328..4bb1602 100644 +--- a/src/tools/CMakeLists.txt ++++ b/src/tools/CMakeLists.txt +@@ -1,5 +1,5 @@ + # Device listing + ADD_EXECUTABLE( openicc-device "${CMAKE_CURRENT_SOURCE_DIR}/openicc_device.c" ) + TARGET_LINK_LIBRARIES( openicc-device OpenICC ${EXTRA_LIBS} ) +-INSTALL (TARGETS openicc-device DESTINATION bin) ++INSTALL (TARGETS openicc-device DESTINATION ${CMAKE_INSTALL_BINDIR}) + diff --git a/media-libs/openicc/metadata.xml b/media-libs/openicc/metadata.xml new file mode 100644 index 000000000000..94db08dfa706 --- /dev/null +++ b/media-libs/openicc/metadata.xml @@ -0,0 +1,11 @@ + + + + + asturm@gentoo.org + Andreas Sturmlechner + + + OpenICC/config + + diff --git a/media-libs/openicc/openicc-0.1.0.ebuild b/media-libs/openicc/openicc-0.1.0.ebuild new file mode 100644 index 000000000000..c924a25f5f1f --- /dev/null +++ b/media-libs/openicc/openicc-0.1.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-multilib + +DESCRIPTION="Config database to store, share and manipulate colour management informations" +HOMEPAGE="https://github.com/OpenICC/config" +SRC_URI="https://github.com/OpenICC/config/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc static-libs test" + +RDEPEND=" + dev-libs/yajl[${MULTILIB_USEDEP}] +" +DEPEND="${RDEPEND} + sys-devel/gettext + doc? ( app-doc/doxygen ) +" + +REQUIRED_USE="test? ( static-libs )" + +PATCHES=( "${FILESDIR}/${P}"-buildsystem.patch ) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openicc/openicc_version.h +) + +S="${WORKDIR}/config-${PV}" + +multilib_src_configure() { + local mycmakeargs=( + -DENABLE_STATIC_LIBS=$(usex static-libs) + -DENABLE_TESTS=$(usex test) + $(multilib_is_native_abi || echo -DENABLE_TOOLS=OFF ) + -DCMAKE_INSTALL_DOCDIR=share/doc/${PF} + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=$(multilib_native_usex doc OFF ON) + ) + + cmake-utils_src_configure +} -- cgit v1.2.3