summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2021-11-22 09:46:03 -0500
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2021-11-22 09:46:03 -0500
commit1f335453f7800215966cea737c7effeabeeccc9e (patch)
treee7a560495fb59893ba0050416c1d3c88966fc863
parentd8d406e830695f019680e7af8af4cb4dc019d74f (diff)
downloadgentoo-overlay-1f335453f7800215966cea737c7effeabeeccc9e.tar.xz
gentoo-overlay-1f335453f7800215966cea737c7effeabeeccc9e.zip
media-libs/libjxl: re-add plugins support
-rw-r--r--media-libs/libjxl/libjxl-9999.ebuild22
-rw-r--r--media-libs/libjxl/metadata.xml1
2 files changed, 16 insertions, 7 deletions
diff --git a/media-libs/libjxl/libjxl-9999.ebuild b/media-libs/libjxl/libjxl-9999.ebuild
index 4b7b013..912a97c 100644
--- a/media-libs/libjxl/libjxl-9999.ebuild
+++ b/media-libs/libjxl/libjxl-9999.ebuild
@@ -4,7 +4,7 @@
EAPI=7
CMAKE_ECLASS=cmake
-inherit cmake-multilib java-pkg-opt-2
+inherit cmake-multilib java-pkg-opt-2 xdg-utils
DESCRIPTION="JPEG XL image format reference implementation"
HOMEPAGE="https://github.com/libjxl/libjxl"
@@ -12,12 +12,14 @@ HOMEPAGE="https://github.com/libjxl/libjxl"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/libjxl/libjxl.git"
- EGIT_SUBMODULES=(third_party/lodepng)
+ EGIT_SUBMODULES=(third_party/lodepng third_party/skcms)
else
LODEPNG_COMMIT="8c6a9e30576f07bf470ad6f09458a2dcd7a6a84a"
+ SKCMS_COMMIT="64374756e03700d649f897dbd98c95e78c30c7da"
SRC_URI="
https://github.com/libjxl/libjxl/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/lvandeve/lodepng/archive/${LODEPNG_COMMIT}.tar.gz -> lodepng-${LODEPNG_COMMIT}.tar.gz
+ https://skia.googlesource.com/skcms/+archive/${SKCMS_COMMIT}.tar.gz
"
fi
@@ -26,7 +28,7 @@ SLOT="0/7"
if [[ ${PV} != 9999 ]]; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
-IUSE="apng doc gif java +jpeg +man openexr qt5 static-libs test"
+IUSE="apng doc gdk-pixbuf gif gimp java +jpeg +man openexr qt5 static-libs test"
RDEPEND="app-arch/brotli[${MULTILIB_USEDEP}]
dev-cpp/highway[${MULTILIB_USEDEP}]
@@ -35,7 +37,9 @@ RDEPEND="app-arch/brotli[${MULTILIB_USEDEP}]
media-libs/libpng[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
)
+ gdk-pixbuf? ( x11-libs/gdk-pixbuf )
gif? ( media-libs/giflib[${MULTILIB_USEDEP}] )
+ gimp? ( media-gfx/gimp )
java? ( >=virtual/jre-1.8:* )
jpeg? ( virtual/jpeg[${MULTILIB_USEDEP}] )
openexr? ( media-libs/openexr:=[${MULTILIB_USEDEP}] )
@@ -59,6 +63,8 @@ src_prepare() {
rmdir third_party/lodepng
ln -sv ../../lodepng-${LODEPNG_COMMIT} third_party/lodepng || die
fi
+ use gdk-pixbuf || sed -i -e '/(gdk-pixbuf)/s/^/#/' plugins/CMakeLists.txt || die
+ use gimp || sed -i -e '/(gimp)/s/^/#/' plugins/CMakeLists.txt || die
cmake_src_prepare
java-pkg-opt-2_src_prepare
}
@@ -73,16 +79,14 @@ multilib_src_configure() {
-DJPEGXL_ENABLE_JNI=$(multilib_native_usex java ON OFF)
-DJPEGXL_ENABLE_MANPAGES=$(multilib_native_usex man ON OFF)
-DJPEGXL_ENABLE_OPENEXR=$(usex openexr ON OFF)
- -DJPEGXL_ENABLE_PLUGINS=OFF
+ -DJPEGXL_ENABLE_PLUGINS=ON # USE=gdk-pixbuf, USE=gimp handled in src_prepare
-DJPEGXL_ENABLE_SJPEG=OFF
- -DJPEGXL_ENABLE_SKCMS=OFF
+ -DJPEGXL_ENABLE_SKCMS=ON
-DJPEGXL_ENABLE_TCMALLOC=OFF
-DJPEGXL_ENABLE_VIEWERS=$(multilib_native_usex qt5 ON OFF)
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
-DJPEGXL_FORCE_SYSTEM_GTEST=ON
-DJPEGXL_FORCE_SYSTEM_HWY=ON
- -DJPEGXL_FORCE_SYSTEM_LCMS=ON
- -DJPEGXL_WARNINGS_AS_ERRORS=OFF
$(cmake_use_find_package apng PNG)
$(cmake_use_find_package apng ZLIB)
@@ -103,3 +107,7 @@ multilib_src_install() {
java-pkg_doso tools/libjxl_jni.so
fi
}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+}
diff --git a/media-libs/libjxl/metadata.xml b/media-libs/libjxl/metadata.xml
index a1711b0..7ea36ea 100644
--- a/media-libs/libjxl/metadata.xml
+++ b/media-libs/libjxl/metadata.xml
@@ -8,6 +8,7 @@
<use>
<flag name="apng">APNG support</flag>
<flag name="doc">Doxygen API documentation</flag>
+ <flag name="gdk-pixbuf">gdk-pixbuf plugin</flag>
<flag name="jpeg">Conversion from/to JPEG, including "reconstructed JPEG" files. If disabled, some JPEG XL files will not be decodable!</flag>
<flag name="qt5">Viewer programs</flag>
</use>