diff options
author | Daniel Novomesky <dnovomesky@gmail.com> | 2022-05-11 18:02:57 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-05-14 01:02:23 +0000 |
commit | f4d5c2477709118c9d59c90ccc49d540a7dd69cd (patch) | |
tree | 4048888d0ce826c88ca7c1ca04a78a3bbb9f6871 /media-libs | |
parent | app-text/docbook-sgml-utils: Adding dependencies (diff) | |
download | gentoo-f4d5c2477709118c9d59c90ccc49d540a7dd69cd.tar.gz gentoo-f4d5c2477709118c9d59c90ccc49d540a7dd69cd.tar.bz2 gentoo-f4d5c2477709118c9d59c90ccc49d540a7dd69cd.zip |
media-libs/libjxl: version bump to 20220511 snapshot
- Drop old 0.7.0_pre20220311
- Depend on media-libs/libjpeg-turbo instead virtual/jpeg
- -DCMAKE_SKIP_RPATH=ON is no longer needed
Closes: https://bugs.gentoo.org/843629
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Daniel Novomesky <dnovomesky@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/25447
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/libjxl/Manifest | 2 | ||||
-rw-r--r-- | media-libs/libjxl/files/libjxl-0.7.0-atomic.patch | 136 | ||||
-rw-r--r-- | media-libs/libjxl/libjxl-0.7.0_pre20220511.ebuild (renamed from media-libs/libjxl/libjxl-0.7.0_pre20220311.ebuild) | 31 | ||||
-rw-r--r-- | media-libs/libjxl/libjxl-9999.ebuild | 3 |
4 files changed, 10 insertions, 162 deletions
diff --git a/media-libs/libjxl/Manifest b/media-libs/libjxl/Manifest index 2614d99687a0..a6ca3a295453 100644 --- a/media-libs/libjxl/Manifest +++ b/media-libs/libjxl/Manifest @@ -1,2 +1,2 @@ -DIST libjxl-0.7.0_pre20220311.tar.gz 17322724 BLAKE2B a3cf970ea3db67e0890e94a5c74ea66610d4fed608fa3d079e6934a1d5f2bdc3ef4264c1df85e4b4efcd22c060087c712009f6c4a6b69a41f6e96ff3674c6de5 SHA512 f3e46ddea462b31de6df3c615c3cd628adc58c7ff41588e2ec4cc8929590c9272603a66ed4620b9ba550d85b3d1a6da3f51b1c4f8650ef8901347fea8af5d474 DIST libjxl-0.7.0_pre20220329.tar.gz 21282311 BLAKE2B 8ced9811adba47e5ccac4d55cb7133a863bedceebeb51e649fa79ecb17b785e747532f1f36fd39e3627d0a29406f5f403dee8fa42a9958c713c1296c2f83260a SHA512 deb17dd2eb3e2c39d624d97c6959940aee5beafcb009f6cb2ac14dd83c73d2601df8c81f6cec5d8032d9e66d1fdabfe620dcbf9bfa5e90eb9978265896816242 +DIST libjxl-0.7.0_pre20220511.tar.gz 1488860 BLAKE2B 63cc0d8161eb83efbae9c4ef238ec7300a8354ee7e030fafb96efca9c50216edfaf45bf276403df41a1bf4add533cb7031074c62faafc2f8d2e499290525f332 SHA512 605299cd4294c524b703bd163c083cb04c1f247aab5a6756d2e68482dab98c8d9585f248c03290e67c6cadf8692ead0c00abce7162d8dd7bf26b2cd4bfd1f736 diff --git a/media-libs/libjxl/files/libjxl-0.7.0-atomic.patch b/media-libs/libjxl/files/libjxl-0.7.0-atomic.patch deleted file mode 100644 index 44d76fcfb10f..000000000000 --- a/media-libs/libjxl/files/libjxl-0.7.0-atomic.patch +++ /dev/null @@ -1,136 +0,0 @@ -include following patches : - -fde214c5f4dc5ffd0360401a68df33182edf9226 Refactor c11/atomic patch for riscv64 -326711f86719e6ce7b0422a7970ce8f8b1598f25 Make sure to list Threads::Threads in JPEGXL_DEC_INTERNAL_LIBS -b12bb7a5f37d6bcaf134cfab7828ae08c4a0e60d Remove duplicate reference to hwy library -87fe7c16e1fb2e21b6a1dca26782950ae1559d99 libjxl implementation rely on c11 atomics - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fc1bbac..cce9748 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -191,6 +191,15 @@ endif() # JPEGXL_STATIC - set(THREADS_PREFER_PTHREAD_FLAG YES) - find_package(Threads REQUIRED) - -+# These settings are important to drive check_cxx_source_compiles -+# See CMP0067 (min cmake version is 3.10 anyway) -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_EXTENSIONS OFF) -+set(CMAKE_CXX_STANDARD_REQUIRED YES) -+ -+# Atomics -+find_package(Atomics REQUIRED) -+ - if(JPEGXL_STATIC) - if (MINGW) - # In MINGW libstdc++ uses pthreads directly. When building statically a -@@ -298,10 +307,6 @@ endif () # !MSVC - - include(GNUInstallDirs) - --set(CMAKE_CXX_STANDARD 11) --set(CMAKE_CXX_EXTENSIONS OFF) --set(CMAKE_CXX_STANDARD_REQUIRED YES) -- - add_subdirectory(third_party) - - # Copy the JXL license file to the output build directory. -diff --git a/cmake/FindAtomics.cmake b/cmake/FindAtomics.cmake -new file mode 100644 -index 0000000..9a6cdc3 ---- /dev/null -+++ b/cmake/FindAtomics.cmake -@@ -0,0 +1,53 @@ -+# Original issue: -+# * https://gitlab.kitware.com/cmake/cmake/-/issues/23021#note_1098733 -+# -+# For reference: -+# * https://gcc.gnu.org/wiki/Atomic/GCCMM -+# -+# riscv64 specific: -+# * https://lists.debian.org/debian-riscv/2022/01/msg00009.html -+# -+# ATOMICS_FOUND - system has c++ atomics -+# ATOMICS_LIBRARIES - libraries needed to use c++ atomics -+ -+include(CheckCXXSourceCompiles) -+ -+# RISC-V only has 32-bit and 64-bit atomic instructions. GCC is supposed -+# to convert smaller atomics to those larger ones via masking and -+# shifting like LLVM, but it’s a known bug that it does not. This means -+# anything that wants to use atomics on 1-byte or 2-byte types needs -+# -latomic, but not 4-byte or 8-byte (though it does no harm). -+set(atomic_code -+ " -+ #include <atomic> -+ #include <cstdint> -+ std::atomic<uint8_t> n8 (0); // riscv64 -+ std::atomic<uint64_t> n64 (0); // armel, mipsel, powerpc -+ int main() { -+ ++n8; -+ ++n64; -+ return 0; -+ }") -+ -+check_cxx_source_compiles("${atomic_code}" ATOMICS_LOCK_FREE_INSTRUCTIONS) -+ -+if(ATOMICS_LOCK_FREE_INSTRUCTIONS) -+ set(ATOMICS_FOUND TRUE) -+ set(ATOMICS_LIBRARIES) -+else() -+ set(CMAKE_REQUIRED_LIBRARIES "-latomic") -+ check_cxx_source_compiles("${atomic_code}" ATOMICS_IN_LIBRARY) -+ set(CMAKE_REQUIRED_LIBRARIES) -+ if(ATOMICS_IN_LIBRARY) -+ set(ATOMICS_LIBRARY atomic) -+ include(FindPackageHandleStandardArgs) -+ find_package_handle_standard_args(Atomics DEFAULT_MSG ATOMICS_LIBRARY) -+ set(ATOMICS_LIBRARIES ${ATOMICS_LIBRARY}) -+ unset(ATOMICS_LIBRARY) -+ else() -+ if(Atomics_FIND_REQUIRED) -+ message(FATAL_ERROR "Neither lock free instructions nor -latomic found.") -+ endif() -+ endif() -+endif() -+unset(atomic_code) -diff --git a/lib/jxl.cmake b/lib/jxl.cmake -index 97dfd73..8f69894 100644 ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -346,6 +346,8 @@ set(JPEGXL_DEC_INTERNAL_LIBS - brotlidec-static - brotlicommon-static - hwy -+ Threads::Threads -+ ${ATOMICS_LIBRARIES} - ) - - if(JPEGXL_ENABLE_PROFILER) -@@ -355,7 +357,6 @@ endif() - set(JPEGXL_INTERNAL_LIBS - ${JPEGXL_DEC_INTERNAL_LIBS} - brotlienc-static -- Threads::Threads - ) - - # strips the -static suffix from all the elements in LIST -@@ -467,7 +468,7 @@ add_library(jxl_dec-static STATIC - $<TARGET_OBJECTS:jxl_dec-obj> - ) - target_link_libraries(jxl_dec-static -- PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_DEC_INTERNAL_LIBS} hwy) -+ PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_DEC_INTERNAL_LIBS}) - target_include_directories(jxl_dec-static PUBLIC - "${PROJECT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -488,7 +489,7 @@ endif() - # to do, remove $<TARGET_OBJECTS:jxl_dec-obj> here and depend on jxl_dec-static - add_library(jxl-static STATIC ${JPEGXL_INTERNAL_OBJECTS}) - target_link_libraries(jxl-static -- PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_INTERNAL_LIBS} hwy) -+ PUBLIC ${JPEGXL_COVERAGE_FLAGS} ${JPEGXL_INTERNAL_LIBS}) - target_include_directories(jxl-static PUBLIC - "${PROJECT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/include" diff --git a/media-libs/libjxl/libjxl-0.7.0_pre20220311.ebuild b/media-libs/libjxl/libjxl-0.7.0_pre20220511.ebuild index 9c909deddbe6..5ab1265c2bf0 100644 --- a/media-libs/libjxl/libjxl-0.7.0_pre20220311.ebuild +++ b/media-libs/libjxl/libjxl-0.7.0_pre20220511.ebuild @@ -3,40 +3,35 @@ EAPI=8 -CMAKE_ECLASS=cmake -inherit cmake-multilib xdg +inherit cmake-multilib DESCRIPTION="JPEG XL image format reference implementation" HOMEPAGE="https://github.com/libjxl/libjxl" -SRC_URI="https://api.github.com/repos/libjxl/libjxl/tarball/3f8e77fcfabe8ca8ddee6be4e662de525667c570 -> ${P}.tar.gz" +SRC_URI="https://api.github.com/repos/libjxl/libjxl/tarball/105bf1a20be35c2d0d7dd302c008f3669c2f998c -> ${P}.tar.gz" KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" LICENSE="BSD" SLOT="0" -IUSE="examples openexr" +IUSE="openexr" DEPEND="app-arch/brotli:=[${MULTILIB_USEDEP}] dev-cpp/gflags:=[${MULTILIB_USEDEP}] >=dev-cpp/highway-0.16.0[${MULTILIB_USEDEP}] media-libs/giflib:=[${MULTILIB_USEDEP}] - media-libs/lcms:=[${MULTILIB_USEDEP}] + >=media-libs/lcms-2.13:=[${MULTILIB_USEDEP}] media-libs/libpng:=[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] - virtual/jpeg[${MULTILIB_USEDEP}] - x11-misc/shared-mime-info + media-libs/libjpeg-turbo[${MULTILIB_USEDEP}] + >=x11-misc/shared-mime-info-2.2 openexr? ( media-libs/openexr:= ) " - RDEPEND="${DEPEND}" -PATCHES=( "${FILESDIR}/${PN}-0.7.0-atomic.patch" ) - -S="${WORKDIR}/libjxl-libjxl-3f8e77f" +S="${WORKDIR}/libjxl-libjxl-105bf1a" multilib_src_configure() { local mycmakeargs=( - -DCMAKE_SKIP_RPATH=ON -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_COVERAGE=OFF @@ -54,18 +49,17 @@ multilib_src_configure() { -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_TCMALLOC=OFF + -DJPEGXL_ENABLE_EXAMPLES=OFF ) if multilib_is_native_abi; then mycmakeargs+=( -DJPEGXL_ENABLE_TOOLS=ON - -DJPEGXL_ENABLE_EXAMPLES=$(usex examples) -DJPEGXL_ENABLE_OPENEXR=$(usex openexr) ) else mycmakeargs+=( -DJPEGXL_ENABLE_TOOLS=OFF - -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_OPENEXR=OFF ) fi @@ -76,14 +70,5 @@ multilib_src_configure() { multilib_src_install() { cmake_src_install - if multilib_is_native_abi; then - if use examples; then - dobin "${BUILD_DIR}/jxlinfo" - fi - - insinto /usr/share/mime/packages - doins -r "${S}"/plugins/mime/image-jxl.xml - fi - find "${D}" -name '*.a' -delete || die } diff --git a/media-libs/libjxl/libjxl-9999.ebuild b/media-libs/libjxl/libjxl-9999.ebuild index 87e4061707c8..88ff53d84586 100644 --- a/media-libs/libjxl/libjxl-9999.ebuild +++ b/media-libs/libjxl/libjxl-9999.ebuild @@ -21,7 +21,7 @@ DEPEND="app-arch/brotli:=[${MULTILIB_USEDEP}] media-libs/giflib:=[${MULTILIB_USEDEP}] media-libs/libpng:=[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] - virtual/jpeg[${MULTILIB_USEDEP}] + media-libs/libjpeg-turbo[${MULTILIB_USEDEP}] >=x11-misc/shared-mime-info-2.2 gdk-pixbuf? ( dev-libs/glib:2 @@ -34,7 +34,6 @@ RDEPEND="${DEPEND}" multilib_src_configure() { local mycmakeargs=( - -DCMAKE_SKIP_RPATH=ON -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_COVERAGE=OFF |