summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-libs/libjxl/libjxl-0.6.ebuild48
-rw-r--r--media-libs/libjxl/libjxl-9999.ebuild48
2 files changed, 58 insertions, 38 deletions
diff --git a/media-libs/libjxl/libjxl-0.6.ebuild b/media-libs/libjxl/libjxl-0.6.ebuild
index 3a32b3c..5513b91 100644
--- a/media-libs/libjxl/libjxl-0.6.ebuild
+++ b/media-libs/libjxl/libjxl-0.6.ebuild
@@ -1,9 +1,9 @@
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
-inherit xdg cmake
+inherit cmake-multilib
DESCRIPTION="JPEG XL image format reference implementation"
HOMEPAGE="https://github.com/libjxl/libjxl"
@@ -27,29 +27,30 @@ if [[ ${PV} != 9999 ]]; then
fi
IUSE="apng doc gif java jpeg +man openexr static-libs test viewers"
-RDEPEND="app-arch/brotli
- dev-cpp/highway
- media-libs/lcms
+RDEPEND="app-arch/brotli[${MULTILIB_USEDEP}]
+ dev-cpp/highway[${MULTILIB_USEDEP}]
+ media-libs/lcms[${MULTILIB_USEDEP}]
apng? (
- media-libs/libpng
- sys-libs/zlib
+ media-libs/libpng[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
)
- gif? ( media-libs/giflib )
- java? ( virtual/jdk )
- jpeg? ( virtual/jpeg )
- man? ( app-text/asciidoc )
- openexr? ( media-libs/openexr:= )
+ gif? ( media-libs/giflib[${MULTILIB_USEDEP}] )
+ java? ( virtual/jre:* )
+ jpeg? ( virtual/jpeg[${MULTILIB_USEDEP}] )
+ openexr? ( media-libs/openexr:=[${MULTILIB_USEDEP}] )
viewers? (
- kde-frameworks/extra-cmake-modules
dev-qt/qtwidgets
dev-qt/qtx11extras
)
"
BDEPEND="
doc? ( app-doc/doxygen )
+ man? ( app-text/asciidoc )
+ viewers? ( kde-frameworks/extra-cmake-modules )
"
DEPEND="${RDEPEND}
- test? ( dev-cpp/gtest )
+ test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )
+ java? ( virtual/jdk:* )
"
PATCHES=("${FILESDIR}/system-lcms.patch")
@@ -62,7 +63,7 @@ src_prepare() {
cmake_src_prepare
}
-src_configure() {
+multilib_src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=$(usex test ON OFF)
-DJPEGXL_ENABLE_BENCHMARK=OFF
@@ -70,12 +71,12 @@ src_configure() {
-DJPEGXL_ENABLE_EXAMPLES=OFF
-DJPEGXL_ENABLE_FUZZERS=OFF
-DJPEGXL_ENABLE_JNI=$(usex java ON OFF)
- -DJPEGXL_ENABLE_MANPAGES=$(usex man ON OFF)
+ -DJPEGXL_ENABLE_MANPAGES=$(multilib_native_usex man ON OFF)
-DJPEGXL_ENABLE_OPENEXR=$(usex openexr ON OFF)
-DJPEGXL_ENABLE_PLUGINS=OFF
-DJPEGXL_ENABLE_SJPEG=OFF
-DJPEGXL_ENABLE_SKCMS=OFF
- -DJPEGXL_ENABLE_VIEWERS=$(usex viewers ON OFF)
+ -DJPEGXL_ENABLE_VIEWERS=$(multilib_native_usex viewers ON OFF)
-DJPEGXL_FORCE_SYSTEM_GTEST=ON
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
-DJPEGXL_FORCE_SYSTEM_HWY=ON
@@ -84,7 +85,7 @@ src_configure() {
$(cmake_use_find_package apng PNG)
$(cmake_use_find_package apng ZLIB)
- $(cmake_use_find_package doc Doxygen)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=$(! multilib_is_native_abi || use doc || echo ON)
$(cmake_use_find_package gif GIF)
$(cmake_use_find_package jpeg JPEG)
)
@@ -92,7 +93,16 @@ src_configure() {
cmake_src_configure
}
-src_install() {
+multilib_src_test() {
+ # DecodeTest.PixelTestWithICCProfileLossy: https://github.com/libjxl/libjxl/issues/500
+ # RobustStatisticsTest: https://github.com/libjxl/libjxl/issues/698
+ local myctestargs=(
+ -E '^DecodeTest\.PixelTestWithICCProfileLossy$|^RobustStatisticsTest\.'
+ )
+ cmake_src_test
+}
+
+multilib_src_install() {
cmake_src_install
if ! use static-libs; then
rm "${ED}"/usr/$(get_libdir)/libjxl{,_dec}.a || die
diff --git a/media-libs/libjxl/libjxl-9999.ebuild b/media-libs/libjxl/libjxl-9999.ebuild
index 3a32b3c..5513b91 100644
--- a/media-libs/libjxl/libjxl-9999.ebuild
+++ b/media-libs/libjxl/libjxl-9999.ebuild
@@ -1,9 +1,9 @@
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
-inherit xdg cmake
+inherit cmake-multilib
DESCRIPTION="JPEG XL image format reference implementation"
HOMEPAGE="https://github.com/libjxl/libjxl"
@@ -27,29 +27,30 @@ if [[ ${PV} != 9999 ]]; then
fi
IUSE="apng doc gif java jpeg +man openexr static-libs test viewers"
-RDEPEND="app-arch/brotli
- dev-cpp/highway
- media-libs/lcms
+RDEPEND="app-arch/brotli[${MULTILIB_USEDEP}]
+ dev-cpp/highway[${MULTILIB_USEDEP}]
+ media-libs/lcms[${MULTILIB_USEDEP}]
apng? (
- media-libs/libpng
- sys-libs/zlib
+ media-libs/libpng[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
)
- gif? ( media-libs/giflib )
- java? ( virtual/jdk )
- jpeg? ( virtual/jpeg )
- man? ( app-text/asciidoc )
- openexr? ( media-libs/openexr:= )
+ gif? ( media-libs/giflib[${MULTILIB_USEDEP}] )
+ java? ( virtual/jre:* )
+ jpeg? ( virtual/jpeg[${MULTILIB_USEDEP}] )
+ openexr? ( media-libs/openexr:=[${MULTILIB_USEDEP}] )
viewers? (
- kde-frameworks/extra-cmake-modules
dev-qt/qtwidgets
dev-qt/qtx11extras
)
"
BDEPEND="
doc? ( app-doc/doxygen )
+ man? ( app-text/asciidoc )
+ viewers? ( kde-frameworks/extra-cmake-modules )
"
DEPEND="${RDEPEND}
- test? ( dev-cpp/gtest )
+ test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )
+ java? ( virtual/jdk:* )
"
PATCHES=("${FILESDIR}/system-lcms.patch")
@@ -62,7 +63,7 @@ src_prepare() {
cmake_src_prepare
}
-src_configure() {
+multilib_src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=$(usex test ON OFF)
-DJPEGXL_ENABLE_BENCHMARK=OFF
@@ -70,12 +71,12 @@ src_configure() {
-DJPEGXL_ENABLE_EXAMPLES=OFF
-DJPEGXL_ENABLE_FUZZERS=OFF
-DJPEGXL_ENABLE_JNI=$(usex java ON OFF)
- -DJPEGXL_ENABLE_MANPAGES=$(usex man ON OFF)
+ -DJPEGXL_ENABLE_MANPAGES=$(multilib_native_usex man ON OFF)
-DJPEGXL_ENABLE_OPENEXR=$(usex openexr ON OFF)
-DJPEGXL_ENABLE_PLUGINS=OFF
-DJPEGXL_ENABLE_SJPEG=OFF
-DJPEGXL_ENABLE_SKCMS=OFF
- -DJPEGXL_ENABLE_VIEWERS=$(usex viewers ON OFF)
+ -DJPEGXL_ENABLE_VIEWERS=$(multilib_native_usex viewers ON OFF)
-DJPEGXL_FORCE_SYSTEM_GTEST=ON
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
-DJPEGXL_FORCE_SYSTEM_HWY=ON
@@ -84,7 +85,7 @@ src_configure() {
$(cmake_use_find_package apng PNG)
$(cmake_use_find_package apng ZLIB)
- $(cmake_use_find_package doc Doxygen)
+ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=$(! multilib_is_native_abi || use doc || echo ON)
$(cmake_use_find_package gif GIF)
$(cmake_use_find_package jpeg JPEG)
)
@@ -92,7 +93,16 @@ src_configure() {
cmake_src_configure
}
-src_install() {
+multilib_src_test() {
+ # DecodeTest.PixelTestWithICCProfileLossy: https://github.com/libjxl/libjxl/issues/500
+ # RobustStatisticsTest: https://github.com/libjxl/libjxl/issues/698
+ local myctestargs=(
+ -E '^DecodeTest\.PixelTestWithICCProfileLossy$|^RobustStatisticsTest\.'
+ )
+ cmake_src_test
+}
+
+multilib_src_install() {
cmake_src_install
if ! use static-libs; then
rm "${ED}"/usr/$(get_libdir)/libjxl{,_dec}.a || die