diff options
Diffstat (limited to 'media-libs/libjxl')
-rw-r--r-- | media-libs/libjxl/Manifest | 9 | ||||
-rw-r--r-- | media-libs/libjxl/files/libjxl-0.7.0-atomic.patch | 136 | ||||
-rw-r--r-- | media-libs/libjxl/libjxl-0.7.0_pre20220329.ebuild | 2 | ||||
-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 |
5 files changed, 14 insertions, 167 deletions
diff --git a/media-libs/libjxl/Manifest b/media-libs/libjxl/Manifest index a70176e92bfe..7e9183939915 100644 --- a/media-libs/libjxl/Manifest +++ b/media-libs/libjxl/Manifest @@ -1,7 +1,6 @@ -AUX libjxl-0.7.0-atomic.patch 4461 BLAKE2B e2c1edf952ba13d2ffb55c1e1122a4ed8ae692155e770e3a64b9ccfe7100395f44f2d0a84bac99a73c99630a8f9891906bdff54514f386f92b6ab2bf6cdb367a SHA512 68d70ed26eec2038c287fc1e0124f7e3ef62277aa7621706aab390616f4a1f5fe23a2675ed996c6c73d117e41e81c4c556efd30887ecbfeada7fd1e4ed7914b6 -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 -EBUILD libjxl-0.7.0_pre20220311.ebuild 2131 BLAKE2B 9292dbc20406ba9544c66d5658b1d782d7b601b29f87b585426adc400fd1dad883003ce730f7db96b75fe8715c48ca7160492155e7088929b050c58367c97b63 SHA512 c625e4a3151f68986c3632b27f2c730084756b293e6a4d50c17d192c445ce925a37ad88da18dbcca4c684f53e504880768ee3def4cceca14dbf870f0aa1f9e7c -EBUILD libjxl-0.7.0_pre20220329.ebuild 1970 BLAKE2B e6f15860545873a4c47a62ba249338ebc50cf8a51ff7e1bf7ab25b8cf71d9224d74e4e33d8754099f7146978ded5416fea71b7eaa785aa1628c248098e523606 SHA512 aac2677f9a25fc42ee474ef130a7c5bacb439c1c609cbb0dd5df8538d0dec451514142c5093de0a2a1f9cb85eaf3515bc1998c1edb9a745f8cf43dfdec570d86 -EBUILD libjxl-9999.ebuild 1838 BLAKE2B 4683772cc20a5fe8d62df7bc0e438495976068f2cd5442a4ed680daed5310db6acac73c778856acf9fb1c411c7754ac243e6dfe09df2710da55b0f8a3979edc5 SHA512 8a181ccc8442a4263f2907c49d7ad32f652dc930e9fb55e966d029f43cb4948fc219071615c9ba6a5d81f397372495a30640af7ee8e7141fc19893dccc715a0e +DIST libjxl-0.7.0_pre20220511.tar.gz 1488860 BLAKE2B 63cc0d8161eb83efbae9c4ef238ec7300a8354ee7e030fafb96efca9c50216edfaf45bf276403df41a1bf4add533cb7031074c62faafc2f8d2e499290525f332 SHA512 605299cd4294c524b703bd163c083cb04c1f247aab5a6756d2e68482dab98c8d9585f248c03290e67c6cadf8692ead0c00abce7162d8dd7bf26b2cd4bfd1f736 +EBUILD libjxl-0.7.0_pre20220329.ebuild 1966 BLAKE2B 471819d39ffda2fde94c3e9567df095a60fde5c6bd7fe8da6c7f37f5a187abf2da900c2def6560049d8728d375aef98708c1ae53725fd45f5e0531a60cf68fa0 SHA512 e5b77fe41bfe6ae7063fcbe2cba6b2cde3147e9ebc266a597df9807af47dc5afb2ff9821fb0235a2e1f423a48c1013e2b29b2a4366c3231cd0c54b4c495ac276 +EBUILD libjxl-0.7.0_pre20220511.ebuild 1821 BLAKE2B 91b88f7519a2940d60d65b2ae57517d8b90ecddc95d3a0b10d3b2400c52beaaf742c5bd7bb199b54ec63f7109ffd84779c44a92e857790d463ca380d62a3a6c6 SHA512 229b948a34919e924944ed70b944e5e332e509e7c8536fff0a5f3bc61c15fee9053cb994484653ed205c9e84e7c8344992cda367fc655c55a45b3e06509950fc +EBUILD libjxl-9999.ebuild 1826 BLAKE2B 1a0f9655b2fe44f61c8bb277dc96b4412855051dd53284815f04a577bb73c5c106b004d69648cb370c7bbb179da82df63f788317624656f76c91a0bc7443e556 SHA512 19af8aef31c90e326162425509b652be0c0f1be81750d090dff2ce1407dcf302cfcae2034ff6bf57d4f1d9b50330d97ff7c87cc1fc14254c20bae70342e69130 MISC metadata.xml 737 BLAKE2B c6d720ad6e51168ebab6cc33b8c3af44149f19a8331f1b834fcf4e33f9b90050fae96bdd03202a83960ec7d01d9427e6eaf0be51d47efa736533b8bb5affaac5 SHA512 6b461b43818da3626a59c7d040c7f3cf470624b6205001445a0ede4ceffa4f1ad6233ea85cf3616dd4bfd7cbbd50ce28e0f509e13ec06b64ba4b724e2a90d602 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_pre20220329.ebuild b/media-libs/libjxl/libjxl-0.7.0_pre20220329.ebuild index 8b0cf58831f0..35d770126395 100644 --- a/media-libs/libjxl/libjxl-0.7.0_pre20220329.ebuild +++ b/media-libs/libjxl/libjxl-0.7.0_pre20220329.ebuild @@ -9,7 +9,7 @@ DESCRIPTION="JPEG XL image format reference implementation" HOMEPAGE="https://github.com/libjxl/libjxl" SRC_URI="https://api.github.com/repos/libjxl/libjxl/tarball/fde214c5f4dc5ffd0360401a68df33182edf9226 -> ${P}.tar.gz" -KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~riscv ~sparc x86" +KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86" LICENSE="BSD" SLOT="0" 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 |