diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2021-10-05 21:25:15 -0400 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2021-10-05 21:25:15 -0400 |
commit | cd04e0857d83a752fca4de3da1b0202c4ae487b9 (patch) | |
tree | 17912870c51de518d8b2fd216983faaeca30b3a1 /media-libs/libjxl/files | |
parent | c588b99ea34d3b5f6e9932f7fc6fecf0b58f8b44 (diff) | |
download | gentoo-overlay-cd04e0857d83a752fca4de3da1b0202c4ae487b9.tar.xz gentoo-overlay-cd04e0857d83a752fca4de3da1b0202c4ae487b9.zip |
media-libs/libjxl: add 0.6, various fixes
Diffstat (limited to 'media-libs/libjxl/files')
-rw-r--r-- | media-libs/libjxl/files/system-lcms.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/media-libs/libjxl/files/system-lcms.patch b/media-libs/libjxl/files/system-lcms.patch new file mode 100644 index 0000000..537e02c --- /dev/null +++ b/media-libs/libjxl/files/system-lcms.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 280d4af..c9186df 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -127,6 +127,8 @@ set(JPEGXL_FORCE_SYSTEM_BROTLI false CACHE BOOL + "Force using system installed brotli instead of third_party/brotli source.") + set(JPEGXL_FORCE_SYSTEM_HWY false CACHE BOOL + "Force using system installed highway (libhwy-dev) instead of third_party/highway source.") ++set(JPEGXL_FORCE_SYSTEM_LCMS false CACHE BOOL ++ "Force using system installed lcms instead of third_party/lcms source.") + + # Check minimum compiler versions. Older compilers are not supported and fail + # with hard to understand errors. +diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +index b5e1899..887d31d 100644 +--- a/third_party/CMakeLists.txt ++++ b/third_party/CMakeLists.txt +@@ -201,13 +201,23 @@ if (JPEGXL_ENABLE_SKCMS OR JPEGXL_ENABLE_PLUGINS) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/skcms/LICENSE" + ${PROJECT_BINARY_DIR}/LICENSE.skcms COPYONLY) + endif () +-if (JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS) +- if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lcms/.git" ) +- message(SEND_ERROR "Please run git submodule update --init") ++if ((JPEGXL_ENABLE_VIEWERS OR NOT JPEGXL_ENABLE_SKCMS)) ++ if(JPEGXL_FORCE_SYSTEM_LCMS) ++ pkg_check_modules(LCMS REQUIRED IMPORTED_TARGET lcms2) ++ add_library(lcms2 INTERFACE IMPORTED GLOBAL) ++ target_link_libraries(lcms2 INTERFACE PkgConfig::LCMS) ++ else() ++ if(JPEGXL_DEP_LICENSE_DIR) ++ configure_file("${JPEGXL_DEP_LICENSE_DIR}/libhwy-dev/copyright" ++ ${PROJECT_BINARY_DIR}/LICENSE.highway COPYONLY) ++ endif() # JPEGXL_DEP_LICENSE_DIR ++ if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lcms/.git" ) ++ message(SEND_ERROR "Please run git submodule update --init") ++ endif() ++ include(lcms2.cmake) ++ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lcms/COPYING" ++ ${PROJECT_BINARY_DIR}/LICENSE.lcms COPYONLY) + endif() +- include(lcms2.cmake) +- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/lcms/COPYING" +- ${PROJECT_BINARY_DIR}/LICENSE.lcms COPYONLY) + endif() + + # sjpeg |