1 |
commit: b9e2f79ecb5fd0e323c8a03f084fb703d617cc9a |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Oct 28 14:32:29 2021 +0000 |
4 |
Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me> |
5 |
CommitDate: Thu Oct 28 14:32:29 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b9e2f79e |
7 |
|
8 |
media-libs/libjxl: install more stuff |
9 |
|
10 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
11 |
|
12 |
.../{libjxl-0.6-r1.ebuild => libjxl-0.6-r2.ebuild} | 47 ++++++++++++++++++---- |
13 |
media-libs/libjxl/metadata.xml | 1 + |
14 |
2 files changed, 41 insertions(+), 7 deletions(-) |
15 |
|
16 |
diff --git a/media-libs/libjxl/libjxl-0.6-r1.ebuild b/media-libs/libjxl/libjxl-0.6-r2.ebuild |
17 |
similarity index 73% |
18 |
rename from media-libs/libjxl/libjxl-0.6-r1.ebuild |
19 |
rename to media-libs/libjxl/libjxl-0.6-r2.ebuild |
20 |
index d8cf76855..0637e43b0 100644 |
21 |
--- a/media-libs/libjxl/libjxl-0.6-r1.ebuild |
22 |
+++ b/media-libs/libjxl/libjxl-0.6-r2.ebuild |
23 |
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/libjxl/libjxl/archive/refs/tags/v${PV}.tar.gz -> ${P |
24 |
KEYWORDS="~amd64" |
25 |
LICENSE="Apache-2.0" |
26 |
SLOT="0" |
27 |
-IUSE="abi_x86_64 cpu_flags_arm_neon benchmark devtools examples java man +openexr plugins profile +sjpeg +skcms tcmalloc tools viewers" #emscripten |
28 |
+IUSE="abi_x86_64 cpu_flags_arm_neon benchmark devtools examples java man +openexr plugins profile +sjpeg +skcms tcmalloc tools viewers" #emscripten fuzzers |
29 |
|
30 |
CDEPEND=" |
31 |
app-arch/brotli |
32 |
@@ -69,6 +69,8 @@ PATCHES=( "${FILESDIR}/${P}-system-libs.patch" ) |
33 |
REQUIRED_USE="tcmalloc? ( abi_x86_64 )" |
34 |
DOCS=( AUTHORS README.md SECURITY.md PATENTS CONTRIBUTORS CHANGELOG.md ) |
35 |
|
36 |
+CMAKE_IN_SOURCE_BUILD=1 |
37 |
+ |
38 |
src_prepare() { |
39 |
# remove bundled libs cmake |
40 |
rm third_party/*.cmake || die |
41 |
@@ -111,13 +113,44 @@ src_install() { |
42 |
cmake_src_install |
43 |
einstalldocs |
44 |
#TODO: install documentation |
45 |
+ exeinto "/usr/libexec/${PN}" |
46 |
+ if use examples; then |
47 |
+ doexe {en,de}code_oneshot |
48 |
+ dobin jxlinfo |
49 |
+ fi |
50 |
pushd "${BUILD_DIR}/tools" || die |
51 |
- exeinto "/usr/libexe/${PN}" |
52 |
- doexe conformance/djxl_conformance tests/libjxl_test |
53 |
- use devtools && doexe box/box_list |
54 |
- use viewers && doexe comparison_viewer/compare_{codec,image}s flicker_test/flicker_test viewer/viewe |
55 |
- use benchmark && doexe benchmark_xl |
56 |
insinto "/usr/share/${PN}" |
57 |
- use java && doins *.jar |
58 |
+ doins progressive_saliency.conf example_tree.txt |
59 |
+ if use java; then |
60 |
+ dolib.so libjxl_jni.so |
61 |
+ rm libjxl_jni.so || die |
62 |
+ doins *.jar |
63 |
+ fi |
64 |
+ if use benchmark; then |
65 |
+ docinto "/usr/share/doc/${PF}/benchmark/hm" |
66 |
+ dodoc benchmark/hm/README.md |
67 |
+ else |
68 |
+ rm -r benchmark || die |
69 |
+ fi |
70 |
+ # remove non executable or non .m files |
71 |
+ find . -type f \! -name '*.m' \! -executable -delete || die |
72 |
+ # delete empty dirs |
73 |
+ find . -type d -empty -print -delete || die |
74 |
+ mkdir -p "${ED}/usr/libexec/${PN}/tools/" || die |
75 |
+ # install tools |
76 |
+ cp -r . "${ED}/usr/libexec/${PN}/tools/" || die |
77 |
+ |
78 |
+ # keep in /usr/bin only the executables with jxl in the name |
79 |
+ rm -f "${ED}"/usr/libexec/${PN}/tools/*jxl* || die |
80 |
+ rm -f "${ED}"/usr/bin{fuzzer_corpus,*_main,decode_and_encode,*_hlg,tone_map,xyb_range} || die |
81 |
+ |
82 |
find "${D}" -name '*.a' -delete || die |
83 |
} |
84 |
+ |
85 |
+pkg_postinst() { |
86 |
+ xdg_mimeinfo_database_update |
87 |
+} |
88 |
+ |
89 |
+pkg_postrm() { |
90 |
+ xdg_mimeinfo_database_update |
91 |
+} |
92 |
|
93 |
diff --git a/media-libs/libjxl/metadata.xml b/media-libs/libjxl/metadata.xml |
94 |
index ac9483923..5c6f84710 100644 |
95 |
--- a/media-libs/libjxl/metadata.xml |
96 |
+++ b/media-libs/libjxl/metadata.xml |
97 |
@@ -8,6 +8,7 @@ |
98 |
<use> |
99 |
<flag name="benchmark">Build JPEGXL benchmark tools</flag> |
100 |
<flag name="devtools">Build JPEGXL developer tools</flag> |
101 |
+ <!--<flag name="fuzzers">Build the fuzzers</flag>--> |
102 |
<flag name="openexr">Build JPEGXL with support for OpenEXR</flag> |
103 |
<flag name="plugins">Build third-party plugins to support JPEG XL in other applications</flag> |
104 |
<flag name="sjpeg">Build JPEGXL with support for encoding with sjpeg</flag> |