From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 87A34158090 for ; Sat, 14 May 2022 01:02:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9DF1E0878; Sat, 14 May 2022 01:02:50 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AD058E0878 for ; Sat, 14 May 2022 01:02:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 954B3341716 for ; Sat, 14 May 2022 01:02:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 915AF448 for ; Sat, 14 May 2022 01:02:47 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1652490143.f4d5c2477709118c9d59c90ccc49d540a7dd69cd.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libjxl/files/, media-libs/libjxl/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/libjxl/Manifest media-libs/libjxl/files/libjxl-0.7.0-atomic.patch media-libs/libjxl/libjxl-0.7.0_pre20220311.ebuild media-libs/libjxl/libjxl-0.7.0_pre20220511.ebuild media-libs/libjxl/libjxl-9999.ebuild X-VCS-Directories: media-libs/libjxl/files/ media-libs/libjxl/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f4d5c2477709118c9d59c90ccc49d540a7dd69cd X-VCS-Branch: master Date: Sat, 14 May 2022 01:02:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7df5c624-83cb-4d48-a0db-d6c98f9e837b X-Archives-Hash: 0e9779baa54719ee634d65ce0b649d89 commit: f4d5c2477709118c9d59c90ccc49d540a7dd69cd Author: Daniel Novomesky gmail com> AuthorDate: Wed May 11 16:02:57 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat May 14 01:02:23 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4d5c247 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 gmail.com> Closes: https://github.com/gentoo/gentoo/pull/25447 Signed-off-by: Sam James gentoo.org> media-libs/libjxl/Manifest | 2 +- media-libs/libjxl/files/libjxl-0.7.0-atomic.patch | 136 --------------------- ...0311.ebuild => libjxl-0.7.0_pre20220511.ebuild} | 31 ++--- 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 -+ #include -+ std::atomic n8 (0); // riscv64 -+ std::atomic 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_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 $ 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 similarity index 69% rename from media-libs/libjxl/libjxl-0.7.0_pre20220311.ebuild rename to 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