mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
media-libs/openjpeg: drop 2.5.0-r5, 2.5.0-r6, 2.5.2, 2.5.3
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/gentoo/pull/44390 Closes: https://github.com/gentoo/gentoo/pull/44390 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
committed by
Andreas Sturmlechner
parent
09f0c15d57
commit
aa9134778e
@@ -1,7 +1,3 @@
|
||||
DIST openjpeg-2.5.0.tar.gz 1867111 BLAKE2B 472d9998a7407574d3bc059d1c0b662a8a553cfe5cb7806a022cb35e14564417a8e06e9970f06d8e65ef149019bab747caefa8e29bc793d07ad86e076909d306 SHA512 08975a2dd79f1e29fd1824249a5fbe66026640ed787b3a3aa8807c2c69f994240ff33e2132f8bf15bbc2202bef7001f98e42d487231d4eebc8e503538658049a
|
||||
DIST openjpeg-2.5.2.tar.gz 1871948 BLAKE2B 4c23eecd603c620d3555fa02055104d292cdf4bbb88ab3d8d8a8f62e3c21b52d3c6d9211d8dd6f11d76fb1ca6f2333a7305ae07b5883a62eb7fc28ec9dfafc0f SHA512 24c058b3e0710e689ba7fd6bce8a88353ce64e825b2e5bbf6b00ca3f2a2ec1e9c70a72e0252a5c89d10c537cf84d55af54bf2f16c58ca01db98c2018cf132e1a
|
||||
DIST openjpeg-2.5.3.tar.gz 2155188 BLAKE2B 170a425a9180b734ded086ee6c5292f246324260f948598d081c2c27e90328e2f48ad86990a918cf358e0affc5b87e6f973412fea239cafb8f78a71a97c54be3 SHA512 22378f5c38c1eb8ade853716897201d8a253024638bdf94fd9851d6a456601071e705c797c5ffeeb6924be14d7356f9a67f15c2b99e96f7d27fc375a9d94505a
|
||||
DIST openjpeg-2.5.4.tar.gz 2157028 BLAKE2B 8bcb821c4a5b437ffc53fbe4017da4bc9579d7c349bf558fea4db7856e267030760845e529b6692053779fee170074fb18f3e75051914eb30cfc6d46d284fce6 SHA512 702a10e20caaf8209684ded7c9fcf32f5ba6a972cf2d9fcf2611cdc6a446d2c3bb60324205758e6b6f92278c8cf4ef0fbae511e6ffb45ed6e8df514db0c6ab25
|
||||
DIST openjpeg-data_20210926.tar.gz 498600110 BLAKE2B 34a1c39379d9f8f4caad6c8263a4bc59e62a6a3b8db744eaeaa7047e58813636341b3fb7ee6a121b7dfcd4bc085f9884c3aef86605633ff0d84a1b77cf003624 SHA512 4444225ddb9c548d7753561188cd2d595ae13d7a45471240fac69c3de786a97fb899cd5bbc67cf1b54bfccff0dcd215ec6e83d1bd66982a44c802d163e365dae
|
||||
DIST openjpeg-data_20230923.tar.gz 498600318 BLAKE2B cf595b9f8690ad0b9616f080c3bfdaf553802912cd41015f86766085c0bd021cead294372bd9925c2a569fabbd9a0f1684bcf6eb1b5ecdc14d64231a76401a3b SHA512 3e1e3bb489eac6047671395fbf92bbfb2ad7c7c0206c1a233c215ba3d5b5263a6ce65d523f98fdaa4949e28eaa179716264f89eebf73b44c71373a9c86313cc1
|
||||
DIST openjpeg-data_20241113.tar.gz 498662590 BLAKE2B 140c2fb2985a59413b1fb8ec52d2dd1e08f1795368b71565a801d425dc1c933b396f674a3c1aca194d4f7cac6574d181acb383fd72dc2083864ca6eee240c2d4 SHA512 5fa7eaa12eae88c0e3d0624f19a6c0aef4890d601d1e5d8aaf52db3e4d7387ae17ab9017cc4ed641283c616d9b440aaec6ca300cab11b4c245cb838f69d93237
|
||||
|
||||
@@ -1,500 +0,0 @@
|
||||
From c7bccf0515892617af984328e96cff5b4a6cd6d3 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
|
||||
Date: Sun, 7 Aug 2022 16:42:01 +0200
|
||||
Subject: [PATCH] CMake: switch to GNUInstallDirs (#1424)
|
||||
|
||||
* Add GNUInstallDirs for standard installation directories
|
||||
|
||||
Distributions are given standard variables for already existing hooks.
|
||||
Multiarch libdirs is taken care of automagically.
|
||||
Raises minimum cmake version by a little.
|
||||
|
||||
* Handle CMAKE_INSTALL_xxx being absolute paths for .pc file generation
|
||||
|
||||
In some cases the CMAKE_INSTAL_{BIN,MAN,DOC,LIB,INCLUDE}DIR variables
|
||||
may turn out to be absolute paths in which case prepending ${prefix} in
|
||||
the pkg-config .pc files will result in incorrect values.
|
||||
|
||||
For .pc file generation, figure out if these variables are absolute and
|
||||
omit the prefix in the configured file when so.
|
||||
|
||||
See: https://github.com/OSGeo/PROJ/commit/ab25e4b7ed9544e668282dcd293cfaaa2e56dbdf
|
||||
---
|
||||
CMakeLists.txt | 77 ++++++++----------------
|
||||
cmake/OpenJPEGConfig.cmake.in | 8 +--
|
||||
doc/CMakeLists.txt | 2 +-
|
||||
src/bin/jp2/CMakeLists.txt | 4 +-
|
||||
src/bin/jpip/CMakeLists.txt | 10 +--
|
||||
src/lib/openjp2/CMakeLists.txt | 12 ++--
|
||||
src/lib/openjp2/libopenjp2.pc.cmake.in | 10 +--
|
||||
src/lib/openjpip/CMakeLists.txt | 8 +--
|
||||
src/lib/openjpip/libopenjpip.pc.cmake.in | 10 +--
|
||||
wrapping/java/openjp2/CMakeLists.txt | 2 +-
|
||||
10 files changed, 56 insertions(+), 87 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8f89df72..fcf4709d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -7,7 +7,7 @@
|
||||
# For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
|
||||
# e.g.:
|
||||
# set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
|
||||
-cmake_minimum_required(VERSION 2.8.2)
|
||||
+cmake_minimum_required(VERSION 2.8.5)
|
||||
|
||||
if(COMMAND CMAKE_POLICY)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
@@ -105,55 +105,24 @@ endif()
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Install directories
|
||||
+string(TOLOWER ${PROJECT_NAME} PROJECT_NAME)
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
# Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
|
||||
option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
|
||||
|
||||
-string(TOLOWER ${PROJECT_NAME} projectname)
|
||||
-set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_BIN_DIR)
|
||||
- set(OPENJPEG_INSTALL_BIN_DIR "bin")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_LIB_DIR)
|
||||
- set(OPENJPEG_INSTALL_LIB_DIR "lib")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_SHARE_DIR)
|
||||
- set(OPENJPEG_INSTALL_SHARE_DIR "share")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_DATA_DIR)
|
||||
- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
|
||||
- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
-endif()
|
||||
-
|
||||
-if(BUILD_DOC)
|
||||
-if(NOT OPENJPEG_INSTALL_MAN_DIR)
|
||||
- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_DOC_DIR)
|
||||
- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
-endif()
|
||||
-endif()
|
||||
+set(OPENJPEG_INSTALL_SUBDIR "${PROJECT_NAME}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
|
||||
|
||||
if(NOT OPENJPEG_INSTALL_JNI_DIR)
|
||||
if(WIN32)
|
||||
- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
|
||||
+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
|
||||
else()
|
||||
- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
|
||||
+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
|
||||
- # We could install *.cmake files in share/ however those files contains
|
||||
- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
|
||||
- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
|
||||
- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
+ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
@@ -161,7 +130,7 @@ if (APPLE)
|
||||
# For cmake >= 3.0, we turn on CMP0042 and
|
||||
# https://cmake.org/cmake/help/v3.0/policy/CMP0042.html mentions
|
||||
# "Projects wanting @rpath in a target’s install name may remove any setting of the INSTALL_NAME_DIR and CMAKE_INSTALL_NAME_DIR variables"
|
||||
- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
|
||||
+ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
endif()
|
||||
option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
|
||||
endif()
|
||||
@@ -346,14 +315,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
-# install CHANGES and LICENSE
|
||||
-if(BUILD_DOC)
|
||||
-if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
|
||||
- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
|
||||
-endif()
|
||||
-
|
||||
-install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
|
||||
-endif()
|
||||
|
||||
include (cmake/OpenJPEGCPack.cmake)
|
||||
|
||||
@@ -366,18 +327,30 @@ else()
|
||||
option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
|
||||
endif()
|
||||
if(BUILD_PKGCONFIG_FILES)
|
||||
- # install in lib and not share (see multi-arch note above)
|
||||
+ macro(set_variable_from_rel_or_absolute_path var root rel_or_abs_path)
|
||||
+ if(IS_ABSOLUTE "${rel_or_abs_path}")
|
||||
+ set(${var} "${rel_or_abs_path}")
|
||||
+ else()
|
||||
+ set(${var} "${root}/${rel_or_abs_path}")
|
||||
+ endif()
|
||||
+ endmacro()
|
||||
+ set_variable_from_rel_or_absolute_path("bindir" "\\\${prefix}" "${CMAKE_INSTALL_BINDIR}")
|
||||
+ set_variable_from_rel_or_absolute_path("mandir" "\\\${prefix}" "${CMAKE_INSTALL_MANDIR}")
|
||||
+ set_variable_from_rel_or_absolute_path("docdir" "\\\${prefix}" "${CMAKE_INSTALL_DOCDIR}")
|
||||
+ set_variable_from_rel_or_absolute_path("libdir" "\\\${prefix}" "${CMAKE_INSTALL_LIBDIR}")
|
||||
+ set_variable_from_rel_or_absolute_path("includedir" "\\\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
+
|
||||
+ # install in lib and not share (CMAKE_INSTALL_LIBDIR takes care of it for multi-arch)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
|
||||
- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
|
||||
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
|
||||
#
|
||||
if(BUILD_JPIP)
|
||||
- # install in lib and not share (see multi-arch note above)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
|
||||
- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
|
||||
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
|
||||
index 6e88036c..fccd0cc6 100644
|
||||
--- a/cmake/OpenJPEGConfig.cmake.in
|
||||
+++ b/cmake/OpenJPEGConfig.cmake.in
|
||||
@@ -27,12 +27,8 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
|
||||
# This is an install tree
|
||||
include(${SELF_DIR}/OpenJPEGTargets.cmake)
|
||||
|
||||
- # We find a relative path from the PKG directory to header files.
|
||||
- set(PKG_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
|
||||
- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
|
||||
- file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
|
||||
-
|
||||
- get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" REALPATH)
|
||||
+ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
|
||||
+ get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
|
||||
|
||||
else()
|
||||
if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)
|
||||
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
|
||||
index e4f9b37c..ed5cb44c 100644
|
||||
--- a/doc/CMakeLists.txt
|
||||
+++ b/doc/CMakeLists.txt
|
||||
@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
|
||||
|
||||
# install HTML documentation (install png files too):
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
|
||||
- DESTINATION ${OPENJPEG_INSTALL_DOC_DIR}
|
||||
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
else()
|
||||
diff --git a/src/bin/jp2/CMakeLists.txt b/src/bin/jp2/CMakeLists.txt
|
||||
index 4d4bd952..29b4dd20 100644
|
||||
--- a/src/bin/jp2/CMakeLists.txt
|
||||
+++ b/src/bin/jp2/CMakeLists.txt
|
||||
@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
|
||||
# Install exe
|
||||
install(TARGETS ${exe}
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
)
|
||||
if(OPJ_USE_DSYMUTIL)
|
||||
add_custom_command(TARGET ${exe} POST_BUILD
|
||||
@@ -83,6 +83,6 @@ install(
|
||||
FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
|
||||
${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
|
||||
${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
|
||||
- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
|
||||
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
#
|
||||
endif()
|
||||
diff --git a/src/bin/jpip/CMakeLists.txt b/src/bin/jpip/CMakeLists.txt
|
||||
index c16e4271..a501cfa5 100644
|
||||
--- a/src/bin/jpip/CMakeLists.txt
|
||||
+++ b/src/bin/jpip/CMakeLists.txt
|
||||
@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
|
||||
# Install exe
|
||||
install(TARGETS opj_jpip_addxml
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
)
|
||||
|
||||
if(BUILD_JPIP_SERVER)
|
||||
@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
|
||||
# Install exe
|
||||
install(TARGETS opj_server
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
|
||||
target_link_libraries(${exe} openjpip)
|
||||
install(TARGETS ${exe}
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
)
|
||||
endforeach()
|
||||
|
||||
@@ -123,7 +123,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
|
||||
)
|
||||
|
||||
install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
|
||||
- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
|
||||
)
|
||||
else()
|
||||
# opj_viewer (simple, no xerces)
|
||||
@@ -153,7 +153,7 @@ if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
|
||||
)
|
||||
|
||||
install(FILES ${LIBRARY_OUTPUT_PATH}/opj_jpip_viewer.jar
|
||||
- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
|
||||
index ea4131a3..e65cb9d1 100644
|
||||
--- a/src/lib/openjp2/CMakeLists.txt
|
||||
+++ b/src/lib/openjp2/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
|
||||
|
||||
#
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
|
||||
- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
|
||||
|
||||
include_directories(
|
||||
${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
|
||||
@@ -117,21 +117,21 @@ endif()
|
||||
# Install library
|
||||
install(TARGETS ${INSTALL_LIBS}
|
||||
EXPORT OpenJPEGTargets
|
||||
- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
)
|
||||
|
||||
# Install includes files
|
||||
install(FILES openjpeg.h opj_stdint.h
|
||||
- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
|
||||
)
|
||||
|
||||
if(BUILD_DOC)
|
||||
# install man page of the library
|
||||
install(
|
||||
FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
|
||||
- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
|
||||
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
endif()
|
||||
|
||||
if(BUILD_LUTS_GENERATOR)
|
||||
diff --git a/src/lib/openjp2/libopenjp2.pc.cmake.in b/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
index 00fdacd1..2ade312b 100644
|
||||
--- a/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
+++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
@@ -1,9 +1,9 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
|
||||
-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
|
||||
-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
|
||||
-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
|
||||
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
+bindir=@bindir@
|
||||
+mandir=@mandir@
|
||||
+docdir=@docdir@
|
||||
+libdir=@libdir@
|
||||
+includedir=@includedir@
|
||||
|
||||
Name: openjp2
|
||||
Description: JPEG2000 library (Part 1 and 2)
|
||||
diff --git a/src/lib/openjpip/CMakeLists.txt b/src/lib/openjpip/CMakeLists.txt
|
||||
index b3cb8ce8..aace36d4 100644
|
||||
--- a/src/lib/openjpip/CMakeLists.txt
|
||||
+++ b/src/lib/openjpip/CMakeLists.txt
|
||||
@@ -74,9 +74,9 @@ endif()
|
||||
# Install library
|
||||
install(TARGETS openjpip
|
||||
EXPORT OpenJPEGTargets
|
||||
- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
)
|
||||
|
||||
if(BUILD_JPIP_SERVER)
|
||||
@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
|
||||
PROPERTIES COMPILE_FLAGS "-DSERVER")
|
||||
install(TARGETS openjpip_server
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
)
|
||||
endif()
|
||||
diff --git a/src/lib/openjpip/libopenjpip.pc.cmake.in b/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
index 183b68ff..fc97ef04 100644
|
||||
--- a/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
+++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
@@ -1,9 +1,9 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
|
||||
-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
|
||||
-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
|
||||
-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
|
||||
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
+bindir=@bindir@
|
||||
+mandir=@mandir@
|
||||
+docdir=@docdir@
|
||||
+libdir=@libdir@
|
||||
+includedir=@includedir@
|
||||
|
||||
Name: openjpip
|
||||
Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
|
||||
diff --git a/wrapping/java/openjp2/CMakeLists.txt b/wrapping/java/openjp2/CMakeLists.txt
|
||||
index 6a9ebc20..b178d2cf 100644
|
||||
--- a/wrapping/java/openjp2/CMakeLists.txt
|
||||
+++ b/wrapping/java/openjp2/CMakeLists.txt
|
||||
@@ -66,5 +66,5 @@ add_custom_target(OpenJPEGJavaJar ALL
|
||||
)
|
||||
|
||||
install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
|
||||
- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
|
||||
)
|
||||
--
|
||||
2.41.0
|
||||
|
||||
From c6ceb84c221b5094f1e8a4c0c247dee3fb5074e8 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Richardson <arichardson@FreeBSD.org>
|
||||
Date: Thu, 11 Aug 2022 12:09:04 +0000
|
||||
Subject: [PATCH] Make OpenJPEGConfig.cmake relocatable with CMake > 3.0
|
||||
|
||||
Using CMakePackageConfigHelpers, we can generate a relocatable
|
||||
OpenJPEGConfig.config, using the PATH_VARS feature to make
|
||||
CMAKE_INSTALL_LIBDIR relative to the installed location.
|
||||
This change is needed for me when cross-compiling since
|
||||
CMAKE_INSTALL_FULL_LIBDIR is a path inside the sysroot rather than
|
||||
an absolute path to the actual includes. Without this change poppler
|
||||
ends up passing a -I flag that does not exist.
|
||||
|
||||
This includes fallback code for CMake 2.8, which adds a bit of complexity,
|
||||
since I'm not sure if raising the minimum to 3.0 (now over 8 years old)
|
||||
is acceptable.
|
||||
---
|
||||
CMakeLists.txt | 21 ++++++++++++++++-----
|
||||
cmake/OpenJPEGConfig.cmake.in | 3 ++-
|
||||
2 files changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fcf4709d..292b2132 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -304,12 +304,23 @@ if(BUILD_TESTING)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
-# install all targets referenced as OPENJPEGTargets
|
||||
+# install all targets referenced as OPENJPEGTargets (relocatable with CMake 3.0+)
|
||||
install(EXPORT OpenJPEGTargets DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR})
|
||||
-configure_file( ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake/OpenJPEGConfig.cmake.in
|
||||
- ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/OpenJPEGConfig.cmake
|
||||
- @ONLY
|
||||
-)
|
||||
+if (${CMAKE_VERSION} VERSION_LESS 3.0)
|
||||
+ set(PACKAGE_INIT)
|
||||
+ set(PACKAGE_CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_FULL_INCLUDEDIR})
|
||||
+ configure_file( ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake/OpenJPEGConfig.cmake.in
|
||||
+ ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/OpenJPEGConfig.cmake
|
||||
+ @ONLY
|
||||
+ )
|
||||
+else()
|
||||
+ include(CMakePackageConfigHelpers)
|
||||
+ configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/OpenJPEGConfig.cmake.in
|
||||
+ ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
|
||||
+ INSTALL_DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
|
||||
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
|
||||
+endif()
|
||||
+
|
||||
install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
|
||||
DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
|
||||
)
|
||||
diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
|
||||
index fccd0cc6..bb7b79c1 100644
|
||||
--- a/cmake/OpenJPEGConfig.cmake.in
|
||||
+++ b/cmake/OpenJPEGConfig.cmake.in
|
||||
@@ -5,6 +5,7 @@
|
||||
# This file is configured by OPENJPEG and used by the UseOPENJPEG.cmake
|
||||
# module to load OPENJPEG's settings for an external project.
|
||||
@OPENJPEG_CONFIG_INSTALL_ONLY@
|
||||
+@PACKAGE_INIT@
|
||||
# The OPENJPEG version number.
|
||||
set(OPENJPEG_MAJOR_VERSION "@OPENJPEG_VERSION_MAJOR@")
|
||||
set(OPENJPEG_MINOR_VERSION "@OPENJPEG_VERSION_MINOR@")
|
||||
@@ -27,7 +28,7 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
|
||||
# This is an install tree
|
||||
include(${SELF_DIR}/OpenJPEGTargets.cmake)
|
||||
|
||||
- set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
|
||||
+ set(INC_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
|
||||
get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
|
||||
|
||||
else()
|
||||
--
|
||||
2.41.0
|
||||
|
||||
From ee58d77047867dd422593163e660e66a109ba1c0 Mon Sep 17 00:00:00 2001
|
||||
From: autoantwort <41973254+autoantwort@users.noreply.github.com>
|
||||
Date: Tue, 7 Feb 2023 01:08:38 +0100
|
||||
Subject: [PATCH] CMake: add missing GNUInstallDirs related substitutions
|
||||
(fixes #1424) (#1456)
|
||||
|
||||
---
|
||||
src/lib/openjp2/CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
|
||||
index e65cb9d1..f92044e8 100644
|
||||
--- a/src/lib/openjp2/CMakeLists.txt
|
||||
+++ b/src/lib/openjp2/CMakeLists.txt
|
||||
@@ -98,14 +98,14 @@ else()
|
||||
add_library(openjp2_static STATIC ${OPENJPEG_SRCS})
|
||||
set_target_properties(openjp2_static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME})
|
||||
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME} openjp2_static)
|
||||
- target_include_directories(openjp2_static PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
|
||||
+ target_include_directories(openjp2_static PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}>)
|
||||
else()
|
||||
add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
|
||||
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-target_include_directories(${OPENJPEG_LIBRARY_NAME} PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
|
||||
+target_include_directories(${OPENJPEG_LIBRARY_NAME} PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR}>)
|
||||
if(UNIX)
|
||||
target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
|
||||
endif()
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -1,302 +0,0 @@
|
||||
https://github.com/uclouvain/openjpeg/pull/1165
|
||||
|
||||
From fecc8e9e23f78de94c41bc641b3e5b9e9a84560b Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
Date: Thu, 11 Apr 2019 13:10:57 +0200
|
||||
Subject: [PATCH] Use GNUInstallDirs for standard installation directories
|
||||
|
||||
Raises minimum cmake version by a little.
|
||||
(Later rebased by sam@gentoo.org for 2.4.0)
|
||||
(Again rebased by t@laumann.xyz for 2.5.0)
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -7,7 +7,7 @@
|
||||
# For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
|
||||
# e.g.:
|
||||
# set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
|
||||
-cmake_minimum_required(VERSION 2.8.2)
|
||||
+cmake_minimum_required(VERSION 2.8.5)
|
||||
|
||||
if(COMMAND CMAKE_POLICY)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
@@ -106,54 +106,23 @@ endif()
|
||||
# --------------------------------------------------------------------------
|
||||
# Install directories
|
||||
# Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
|
||||
|
||||
string(TOLOWER ${PROJECT_NAME} projectname)
|
||||
set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
|
||||
|
||||
-if(NOT OPENJPEG_INSTALL_BIN_DIR)
|
||||
- set(OPENJPEG_INSTALL_BIN_DIR "bin")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_LIB_DIR)
|
||||
- set(OPENJPEG_INSTALL_LIB_DIR "lib")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_SHARE_DIR)
|
||||
- set(OPENJPEG_INSTALL_SHARE_DIR "share")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_DATA_DIR)
|
||||
- set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
|
||||
- set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
-endif()
|
||||
-
|
||||
-if(BUILD_DOC)
|
||||
-if(NOT OPENJPEG_INSTALL_MAN_DIR)
|
||||
- set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT OPENJPEG_INSTALL_DOC_DIR)
|
||||
- set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
-endif()
|
||||
-endif()
|
||||
-
|
||||
if(NOT OPENJPEG_INSTALL_JNI_DIR)
|
||||
if(WIN32)
|
||||
- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
|
||||
+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_BINDIR})
|
||||
else()
|
||||
- set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
|
||||
+ set(OPENJPEG_INSTALL_JNI_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
|
||||
- # We could install *.cmake files in share/ however those files contains
|
||||
- # hardcoded path to libraries on a multi-arch system (fedora/debian) those
|
||||
- # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
|
||||
- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
+ set(OPENJPEG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
@@ -161,7 +130,7 @@ if (APPLE)
|
||||
# For cmake >= 3.0, we turn on CMP0042 and
|
||||
# https://cmake.org/cmake/help/v3.0/policy/CMP0042.html mentions
|
||||
# "Projects wanting @rpath in a target’s install name may remove any setting of the INSTALL_NAME_DIR and CMAKE_INSTALL_NAME_DIR variables"
|
||||
- list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
|
||||
+ list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
endif()
|
||||
option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
|
||||
endif()
|
||||
@@ -346,14 +315,6 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
-# install CHANGES and LICENSE
|
||||
-if(BUILD_DOC)
|
||||
-if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
|
||||
- install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
|
||||
-endif()
|
||||
-
|
||||
-install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
|
||||
-endif()
|
||||
|
||||
include (cmake/OpenJPEGCPack.cmake)
|
||||
|
||||
@@ -370,14 +331,14 @@ if(BUILD_PKGCONFIG_FILES)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
|
||||
- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
|
||||
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
|
||||
#
|
||||
if(BUILD_JPIP)
|
||||
# install in lib and not share (see multi-arch note above)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc @ONLY)
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpip.pc DESTINATION
|
||||
- ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
|
||||
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
--- a/cmake/OpenJPEGConfig.cmake.in
|
||||
+++ b/cmake/OpenJPEGConfig.cmake.in
|
||||
@@ -27,12 +27,8 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
|
||||
# This is an install tree
|
||||
include(${SELF_DIR}/OpenJPEGTargets.cmake)
|
||||
|
||||
- # We find a relative path from the PKG directory to header files.
|
||||
- set(PKG_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
|
||||
- set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
|
||||
- file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
|
||||
-
|
||||
- get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" REALPATH)
|
||||
+ set(INC_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@")
|
||||
+ get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
|
||||
|
||||
else()
|
||||
if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)
|
||||
--- a/doc/CMakeLists.txt
|
||||
+++ b/doc/CMakeLists.txt
|
||||
@@ -44,7 +44,7 @@ if(DOXYGEN_FOUND)
|
||||
|
||||
# install HTML documentation (install png files too):
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html
|
||||
- DESTINATION ${OPENJPEG_INSTALL_DOC_DIR}
|
||||
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
else()
|
||||
--- a/src/bin/jp2/CMakeLists.txt
|
||||
+++ b/src/bin/jp2/CMakeLists.txt
|
||||
@@ -67,7 +67,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
|
||||
# Install exe
|
||||
install(TARGETS ${exe}
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
)
|
||||
if(OPJ_USE_DSYMUTIL)
|
||||
add_custom_command(TARGET ${exe} POST_BUILD
|
||||
@@ -83,6 +83,6 @@ install(
|
||||
FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_compress.1
|
||||
${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_decompress.1
|
||||
${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
|
||||
- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
|
||||
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
#
|
||||
endif()
|
||||
--- a/src/bin/jpip/CMakeLists.txt
|
||||
+++ b/src/bin/jpip/CMakeLists.txt
|
||||
@@ -13,7 +13,7 @@ add_executable(opj_jpip_addxml opj_jpip_addxml.c)
|
||||
# Install exe
|
||||
install(TARGETS opj_jpip_addxml
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
)
|
||||
|
||||
if(BUILD_JPIP_SERVER)
|
||||
@@ -38,7 +38,7 @@ if(BUILD_JPIP_SERVER)
|
||||
# Install exe
|
||||
install(TARGETS opj_server
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -52,7 +52,7 @@ add_executable(${exe} ${exe}.c)
|
||||
target_link_libraries(${exe} openjpip)
|
||||
install(TARGETS ${exe}
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
)
|
||||
endforeach()
|
||||
|
||||
--- a/src/lib/openjp2/CMakeLists.txt
|
||||
+++ b/src/lib/openjp2/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ include_regular_expression("^.*$")
|
||||
|
||||
#
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
|
||||
- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers)
|
||||
|
||||
include_directories(
|
||||
${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
|
||||
@@ -117,21 +117,21 @@ endif()
|
||||
# Install library
|
||||
install(TARGETS ${INSTALL_LIBS}
|
||||
EXPORT OpenJPEGTargets
|
||||
- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
)
|
||||
|
||||
# Install includes files
|
||||
install(FILES openjpeg.h opj_stdint.h
|
||||
- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
|
||||
)
|
||||
|
||||
if(BUILD_DOC)
|
||||
# install man page of the library
|
||||
install(
|
||||
FILES ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
|
||||
- DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
|
||||
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
endif()
|
||||
|
||||
if(BUILD_LUTS_GENERATOR)
|
||||
--- a/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
+++ b/src/lib/openjp2/libopenjp2.pc.cmake.in
|
||||
@@ -1,9 +1,9 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
|
||||
-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
|
||||
-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
|
||||
-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
|
||||
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
|
||||
+mandir=@CMAKE_INSTALL_MANDIR@
|
||||
+docdir=@CMAKE_INSTALL_DOCDIR@
|
||||
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
|
||||
|
||||
Name: openjp2
|
||||
Description: JPEG2000 library (Part 1 and 2)
|
||||
--- a/src/lib/openjpip/CMakeLists.txt
|
||||
+++ b/src/lib/openjpip/CMakeLists.txt
|
||||
@@ -74,9 +74,9 @@ endif()
|
||||
# Install library
|
||||
install(TARGETS openjpip
|
||||
EXPORT OpenJPEGTargets
|
||||
- RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
- LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
- ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Applications
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
)
|
||||
|
||||
if(BUILD_JPIP_SERVER)
|
||||
@@ -86,6 +86,6 @@ if(BUILD_JPIP_SERVER)
|
||||
PROPERTIES COMPILE_FLAGS "-DSERVER")
|
||||
install(TARGETS openjpip_server
|
||||
EXPORT OpenJPEGTargets
|
||||
- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||
)
|
||||
endif()
|
||||
--- a/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
+++ b/src/lib/openjpip/libopenjpip.pc.cmake.in
|
||||
@@ -1,9 +1,9 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
-bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
|
||||
-mandir=${prefix}/@OPENJPEG_INSTALL_MAN_DIR@
|
||||
-docdir=${prefix}/@OPENJPEG_INSTALL_DOC_DIR@
|
||||
-libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
|
||||
-includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
|
||||
+bindir=${prefix}/@CMAKE_INSTALL_BINDIR@
|
||||
+mandir=@CMAKE_INSTALL_MANDIR@
|
||||
+docdir=@CMAKE_INSTALL_DOCDIR@
|
||||
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@OPENJPEG_INSTALL_SUBDIR@
|
||||
|
||||
Name: openjpip
|
||||
Description: JPEG2000 Interactivity tools, APIs and protocols (Part 9)
|
||||
--- a/wrapping/java/openjp2/CMakeLists.txt
|
||||
+++ b/wrapping/java/openjp2/CMakeLists.txt
|
||||
@@ -66,5 +66,5 @@ add_custom_target(OpenJPEGJavaJar ALL
|
||||
)
|
||||
|
||||
install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
|
||||
- DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
|
||||
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} COMPONENT JavaModule
|
||||
)
|
||||
@@ -1,103 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib flag-o-matic
|
||||
|
||||
# Make sure that test data are not newer than release;
|
||||
# otherwise we will see "Found-But-No-Test" test failures!
|
||||
#
|
||||
# To update: Go to https://github.com/uclouvain/openjpeg-data and grab the hash
|
||||
# of the latest possible commit whose commit date is older than the release
|
||||
# date.
|
||||
MY_TESTDATA_COMMIT="1f3d093030f9a0b43353ec6b48500f65786ff57a"
|
||||
|
||||
DESCRIPTION="Open-source JPEG 2000 library"
|
||||
HOMEPAGE="https://www.openjpeg.org"
|
||||
SRC_URI="https://github.com/uclouvain/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
test? ( https://github.com/uclouvain/openjpeg-data/archive/${MY_TESTDATA_COMMIT}.tar.gz -> ${PN}-data_20210926.tar.gz )"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="2/7" # based on SONAME
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="doc test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/lcms:2
|
||||
media-libs/libpng:0=
|
||||
media-libs/tiff:=
|
||||
virtual/zlib:=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="doc? ( app-text/doxygen )"
|
||||
|
||||
DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.5.0-gnuinstalldirs.patch" # bug #667150
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use test; then
|
||||
mv "${WORKDIR}"/openjpeg-data-${MY_TESTDATA_COMMIT} "${WORKDIR}"/data ||
|
||||
die "Failed to rename test data"
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
append-lfs-flags
|
||||
|
||||
local mycmakeargs=(
|
||||
-DBUILD_PKGCONFIG_FILES=ON # always build pkgconfig files, bug #539834
|
||||
-DBUILD_TESTING="$(multilib_native_usex test)"
|
||||
-DBUILD_DOC=$(multilib_native_usex doc ON OFF)
|
||||
-DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
|
||||
-DBUILD_STATIC_LIBS=OFF
|
||||
)
|
||||
|
||||
# Cheat a little bit and force disabling fixed point magic
|
||||
# The test suite is extremely fragile to small changes
|
||||
# bug #715130, bug #715422
|
||||
# https://github.com/uclouvain/openjpeg/issues/1017
|
||||
if multilib_is_native_abi && use test ; then
|
||||
append-cflags "-ffp-contract=off"
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
if ! multilib_is_native_abi ; then
|
||||
elog "Cannot run tests for non-multilib abi."
|
||||
return 0
|
||||
fi
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
[[ -e CTestTestfile.cmake ]] || die "Test suite not available! Check source!"
|
||||
|
||||
elog "Note: Upstream maintains a list of known test failures."
|
||||
elog "We collect all the known failures and skip them."
|
||||
elog
|
||||
|
||||
local toskip=( "${S}"/tools/travis-ci/knownfailures-all.txt )
|
||||
if use amd64 ; then
|
||||
toskip+=( "${S}"/tools/travis-ci/knownfailures-*x86_64*.txt )
|
||||
elif use x86 || use arm || use arm64; then
|
||||
toskip+=( "${S}"/tools/travis-ci/knownfailures-*i386*.txt )
|
||||
fi
|
||||
|
||||
local exp=$(sort "${toskip[@]}" | uniq | tr '\n' '|'; assert)
|
||||
popd > /dev/null || die
|
||||
|
||||
local myctestargs=()
|
||||
if [[ -n ${TEST_VERBOSE} ]]; then
|
||||
myctestargs+=( --extra-verbose --output-on-failure )
|
||||
fi
|
||||
myctestargs+=( -E "(${exp::-1})" )
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib flag-o-matic
|
||||
|
||||
# Make sure that test data are not newer than release;
|
||||
# otherwise we will see "Found-But-No-Test" test failures!
|
||||
#
|
||||
# To update: Go to https://github.com/uclouvain/openjpeg-data and grab the hash
|
||||
# of the latest possible commit whose commit date is older than the release
|
||||
# date.
|
||||
MY_TESTDATA_COMMIT="1f3d093030f9a0b43353ec6b48500f65786ff57a"
|
||||
|
||||
DESCRIPTION="Open-source JPEG 2000 library"
|
||||
HOMEPAGE="https://www.openjpeg.org"
|
||||
SRC_URI="https://github.com/uclouvain/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
test? ( https://github.com/uclouvain/openjpeg-data/archive/${MY_TESTDATA_COMMIT}.tar.gz -> ${PN}-data_20210926.tar.gz )"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="2/7" # based on SONAME
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="doc test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/lcms:2
|
||||
media-libs/libpng:0=
|
||||
media-libs/tiff:=
|
||||
virtual/zlib:=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="doc? ( app-text/doxygen )"
|
||||
|
||||
DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2.5.0-gnuinstalldirs-r2.patch" # bug #667150
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use test; then
|
||||
mv "${WORKDIR}"/openjpeg-data-${MY_TESTDATA_COMMIT} "${WORKDIR}"/data ||
|
||||
die "Failed to rename test data"
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
append-lfs-flags
|
||||
|
||||
local mycmakeargs=(
|
||||
-DBUILD_PKGCONFIG_FILES=ON # always build pkgconfig files, bug #539834
|
||||
-DBUILD_TESTING="$(multilib_native_usex test)"
|
||||
-DBUILD_DOC=$(multilib_native_usex doc ON OFF)
|
||||
-DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
|
||||
-DBUILD_STATIC_LIBS=OFF
|
||||
)
|
||||
|
||||
# Cheat a little bit and force disabling fixed point magic
|
||||
# The test suite is extremely fragile to small changes
|
||||
# bug #715130, bug #715422
|
||||
# https://github.com/uclouvain/openjpeg/issues/1017
|
||||
if multilib_is_native_abi && use test ; then
|
||||
append-cflags "-ffp-contract=off"
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
if ! multilib_is_native_abi ; then
|
||||
elog "Cannot run tests for non-multilib abi."
|
||||
return 0
|
||||
fi
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
[[ -e CTestTestfile.cmake ]] || die "Test suite not available! Check source!"
|
||||
|
||||
elog "Note: Upstream maintains a list of known test failures."
|
||||
elog "We collect all the known failures and skip them."
|
||||
elog
|
||||
|
||||
local toskip=( "${S}"/tools/travis-ci/knownfailures-all.txt )
|
||||
if use amd64 ; then
|
||||
toskip+=( "${S}"/tools/travis-ci/knownfailures-*x86_64*.txt )
|
||||
elif use x86 || use arm || use arm64; then
|
||||
toskip+=( "${S}"/tools/travis-ci/knownfailures-*i386*.txt )
|
||||
fi
|
||||
|
||||
local exp=$(sort "${toskip[@]}" | uniq | tr '\n' '|'; assert)
|
||||
popd > /dev/null || die
|
||||
|
||||
local myctestargs=()
|
||||
if [[ -n ${TEST_VERBOSE} ]]; then
|
||||
myctestargs+=( --extra-verbose --output-on-failure )
|
||||
fi
|
||||
myctestargs+=( -E "(${exp::-1})" )
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib flag-o-matic
|
||||
|
||||
# Make sure that test data are not newer than release;
|
||||
# otherwise we will see "Found-But-No-Test" test failures!
|
||||
#
|
||||
# To update: Go to https://github.com/uclouvain/openjpeg-data and grab the hash
|
||||
# of the latest possible commit whose commit date is older than the release
|
||||
# date.
|
||||
MY_TESTDATA_COMMIT="f9991d5fa9a4a08fc9c29bae6405d6c67cf2b8eb"
|
||||
|
||||
DESCRIPTION="Open-source JPEG 2000 library"
|
||||
HOMEPAGE="https://www.openjpeg.org"
|
||||
SRC_URI="https://github.com/uclouvain/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
test? ( https://github.com/uclouvain/openjpeg-data/archive/${MY_TESTDATA_COMMIT}.tar.gz -> ${PN}-data_20230923.tar.gz )"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="2/7" # based on SONAME
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="doc test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/lcms:2
|
||||
media-libs/libpng:0=
|
||||
media-libs/tiff:=
|
||||
virtual/zlib:=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="doc? ( app-text/doxygen )"
|
||||
|
||||
DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
|
||||
|
||||
src_prepare() {
|
||||
if use test; then
|
||||
mv "${WORKDIR}"/openjpeg-data-${MY_TESTDATA_COMMIT} "${WORKDIR}"/data ||
|
||||
die "Failed to rename test data"
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
append-lfs-flags
|
||||
|
||||
local mycmakeargs=(
|
||||
-DBUILD_TESTING="$(multilib_native_usex test)"
|
||||
-DBUILD_DOC=$(multilib_native_usex doc ON OFF)
|
||||
-DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
|
||||
-DBUILD_STATIC_LIBS=OFF
|
||||
)
|
||||
|
||||
# Cheat a little bit and force disabling fixed point magic
|
||||
# The test suite is extremely fragile to small changes
|
||||
# bug #715130, bug #715422
|
||||
# https://github.com/uclouvain/openjpeg/issues/1017
|
||||
if multilib_is_native_abi && use test ; then
|
||||
append-cflags "-ffp-contract=off"
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
if ! multilib_is_native_abi ; then
|
||||
elog "Cannot run tests for non-multilib abi."
|
||||
return 0
|
||||
fi
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
[[ -e CTestTestfile.cmake ]] || die "Test suite not available! Check source!"
|
||||
|
||||
elog "Note: Upstream maintains a list of known test failures."
|
||||
elog "We collect all the known failures and skip them."
|
||||
elog
|
||||
|
||||
local toskip=( "${S}"/tools/travis-ci/knownfailures-all.txt )
|
||||
if use amd64 ; then
|
||||
toskip+=( "${S}"/tools/travis-ci/knownfailures-*x86_64*.txt )
|
||||
elif use x86 || use arm || use arm64; then
|
||||
toskip+=( "${S}"/tools/travis-ci/knownfailures-*i386*.txt )
|
||||
fi
|
||||
|
||||
local exp=$(sort "${toskip[@]}" | uniq | tr '\n' '|'; assert)
|
||||
popd > /dev/null || die
|
||||
|
||||
local myctestargs=()
|
||||
if [[ -n ${TEST_VERBOSE} ]]; then
|
||||
myctestargs+=( --extra-verbose --output-on-failure )
|
||||
fi
|
||||
myctestargs+=( -E "(${exp::-1})" )
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib flag-o-matic
|
||||
|
||||
# Make sure that test data are not newer than release;
|
||||
# otherwise we will see "Found-But-No-Test" test failures!
|
||||
#
|
||||
# To update: Go to https://github.com/uclouvain/openjpeg-data and grab the hash
|
||||
# of the latest possible commit whose commit date is older than the release
|
||||
# date.
|
||||
MY_TESTDATA_COMMIT="39524bd3a601d90ed8e0177559400d23945f96a9"
|
||||
|
||||
DESCRIPTION="Open-source JPEG 2000 library"
|
||||
HOMEPAGE="https://www.openjpeg.org"
|
||||
SRC_URI="https://github.com/uclouvain/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
test? ( https://github.com/uclouvain/openjpeg-data/archive/${MY_TESTDATA_COMMIT}.tar.gz -> ${PN}-data_20241113.tar.gz )"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="2/7" # based on SONAME
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="doc test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
media-libs/lcms:2
|
||||
media-libs/libpng:0=
|
||||
media-libs/tiff:=
|
||||
virtual/zlib:=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="doc? ( app-text/doxygen )"
|
||||
|
||||
DOCS=( AUTHORS.md CHANGELOG.md NEWS.md README.md THANKS.md )
|
||||
|
||||
src_prepare() {
|
||||
if use test; then
|
||||
mv "${WORKDIR}"/openjpeg-data-${MY_TESTDATA_COMMIT} "${WORKDIR}"/data ||
|
||||
die "Failed to rename test data"
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
append-lfs-flags
|
||||
|
||||
local mycmakeargs=(
|
||||
-DBUILD_TESTING="$(multilib_native_usex test)"
|
||||
-DBUILD_DOC=$(multilib_native_usex doc ON OFF)
|
||||
-DBUILD_CODEC=$(multilib_is_native_abi && echo ON || echo OFF)
|
||||
-DBUILD_STATIC_LIBS=OFF
|
||||
)
|
||||
|
||||
# Cheat a little bit and force disabling fixed point magic
|
||||
# The test suite is extremely fragile to small changes
|
||||
# bug #715130, bug #715422
|
||||
# https://github.com/uclouvain/openjpeg/issues/1017
|
||||
if multilib_is_native_abi && use test ; then
|
||||
append-cflags "-ffp-contract=off"
|
||||
fi
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
if ! multilib_is_native_abi ; then
|
||||
elog "Cannot run tests for non-multilib abi."
|
||||
return 0
|
||||
fi
|
||||
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
[[ -e CTestTestfile.cmake ]] || die "Test suite not available! Check source!"
|
||||
|
||||
elog "Note: Upstream maintains a list of known test failures."
|
||||
elog "We collect all the known failures and skip them."
|
||||
elog
|
||||
|
||||
local toskip=( "${S}"/tools/travis-ci/knownfailures-all.txt )
|
||||
if use amd64 ; then
|
||||
toskip+=( "${S}"/tools/travis-ci/knownfailures-*x86_64*.txt )
|
||||
elif use x86 || use arm || use arm64; then
|
||||
toskip+=( "${S}"/tools/travis-ci/knownfailures-*i386*.txt )
|
||||
fi
|
||||
|
||||
local exp=$(sort "${toskip[@]}" | uniq | tr '\n' '|'; assert)
|
||||
popd > /dev/null || die
|
||||
|
||||
local myctestargs=()
|
||||
if [[ -n ${TEST_VERBOSE} ]]; then
|
||||
myctestargs+=( --extra-verbose --output-on-failure )
|
||||
fi
|
||||
myctestargs+=( -E "(${exp::-1})" )
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
Reference in New Issue
Block a user