3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit cmake-multilib flag-o-matic
|
|
6 |
inherit cmake-multilib flag-o-matic git-r3
|
7 |
7 |
|
8 |
|
# This changes frequently. Please check the testdata submodule when bumping.
|
9 |
|
TESTDATA_COMMIT="d6168ffb9e1cc24007e64b65dd84d822ad1fc759"
|
10 |
8 |
DESCRIPTION="JPEG XL image format reference implementation"
|
11 |
9 |
HOMEPAGE="https://github.com/libjxl/libjxl"
|
12 |
|
SRC_URI="https://github.com/libjxl/libjxl/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
13 |
|
test? ( https://github.com/libjxl/testdata/archive/${TESTDATA_COMMIT}.tar.gz
|
14 |
|
-> ${PN}-testdata-${TESTDATA_COMMIT}.tar.gz )"
|
|
10 |
|
|
11 |
EGIT_REPO_URI="https://github.com/libjxl/libjxl.git"
|
|
12 |
EGIT_SUBMODULES=(third_party/libjpeg-turbo
|
|
13 |
third_party/skcms
|
|
14 |
third_party/testdata
|
|
15 |
)
|
15 |
16 |
|
16 |
17 |
LICENSE="BSD"
|
17 |
18 |
SLOT="0"
|
18 |
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
19 |
|
IUSE="openexr test"
|
|
19 |
IUSE="gdk-pixbuf openexr test"
|
20 |
20 |
RESTRICT="!test? ( test )"
|
21 |
21 |
|
22 |
22 |
DEPEND="app-arch/brotli:=[${MULTILIB_USEDEP}]
|
23 |
|
>=dev-cpp/highway-1.0.0[${MULTILIB_USEDEP}]
|
|
23 |
>=dev-cpp/highway-1.0.5[${MULTILIB_USEDEP}]
|
24 |
24 |
media-libs/giflib:=[${MULTILIB_USEDEP}]
|
25 |
25 |
>=media-libs/lcms-2.13:2[${MULTILIB_USEDEP}]
|
26 |
26 |
media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
|
27 |
27 |
media-libs/libpng:=[${MULTILIB_USEDEP}]
|
28 |
28 |
>=x11-misc/shared-mime-info-2.2
|
|
29 |
gdk-pixbuf? (
|
|
30 |
dev-libs/glib:2
|
|
31 |
x11-libs/gdk-pixbuf:2
|
|
32 |
)
|
29 |
33 |
openexr? ( media-libs/openexr:= )
|
30 |
34 |
test? ( dev-cpp/gtest )
|
31 |
35 |
"
|
32 |
36 |
RDEPEND="${DEPEND}"
|
33 |
|
PATCHES=(
|
34 |
|
"${FILESDIR}/${PN}-0.8.2-backport-pr2596.patch"
|
35 |
|
"${FILESDIR}/${PN}-0.8.2-backport-pr2617.patch"
|
36 |
|
)
|
37 |
37 |
|
38 |
38 |
multilib_src_configure() {
|
39 |
39 |
filter-lto
|
... | ... | |
45 |
45 |
-DJPEGXL_ENABLE_SJPEG=OFF
|
46 |
46 |
-DJPEGXL_WARNINGS_AS_ERRORS=OFF
|
47 |
47 |
|
48 |
|
-DJPEGXL_ENABLE_SKCMS=OFF
|
|
48 |
-DJPEGXL_ENABLE_SKCMS=ON
|
49 |
49 |
-DJPEGXL_ENABLE_VIEWERS=OFF
|
50 |
|
-DJPEGXL_ENABLE_PLUGINS=OFF
|
51 |
50 |
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
|
52 |
51 |
-DJPEGXL_FORCE_SYSTEM_GTEST=ON
|
53 |
52 |
-DJPEGXL_FORCE_SYSTEM_HWY=ON
|
... | ... | |
64 |
63 |
mycmakeargs+=(
|
65 |
64 |
-DJPEGXL_ENABLE_TOOLS=ON
|
66 |
65 |
-DJPEGXL_ENABLE_OPENEXR=$(usex openexr)
|
|
66 |
-DJPEGXL_ENABLE_PLUGINS=ON
|
|
67 |
-DJPEGXL_ENABLE_PLUGIN_GDKPIXBUF=$(usex gdk-pixbuf)
|
|
68 |
-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF
|
|
69 |
-DJPEGXL_ENABLE_PLUGIN_MIME=OFF
|
67 |
70 |
-DBUILD_TESTING=$(usex test ON OFF)
|
68 |
71 |
)
|
69 |
|
use test &&
|
70 |
|
mycmakeargs+=( -DJPEGXL_TEST_DATA_PATH="${WORKDIR}/testdata-${TESTDATA_COMMIT}" )
|
71 |
72 |
else
|
72 |
73 |
mycmakeargs+=(
|
73 |
74 |
-DJPEGXL_ENABLE_TOOLS=OFF
|
74 |
75 |
-DJPEGXL_ENABLE_OPENEXR=OFF
|
|
76 |
-DJPEGXL_ENABLE_PLUGINS=OFF
|
75 |
77 |
-DBUILD_TESTING=OFF
|
76 |
78 |
)
|
77 |
79 |
fi
|