blob: e43db88b1f4ac05060bc177385f2eba76c77e300 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Copyright 2021-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CMAKE_ECLASS=cmake
inherit cmake-multilib xdg
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"
KEYWORDS="~amd64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
LICENSE="BSD"
SLOT="0"
IUSE="examples 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/libpng:=[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
virtual/jpeg[${MULTILIB_USEDEP}]
x11-misc/shared-mime-info
openexr? ( media-libs/openexr:= )
"
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}/${PN}-0.7.0-atomic.patch" )
S="${WORKDIR}/libjxl-libjxl-3f8e77f"
multilib_src_configure() {
local mycmakeargs=(
-DCMAKE_SKIP_RPATH=ON
-DBUILD_TESTING=OFF
-DJPEGXL_ENABLE_BENCHMARK=OFF
-DJPEGXL_ENABLE_COVERAGE=OFF
-DJPEGXL_ENABLE_FUZZERS=OFF
-DJPEGXL_ENABLE_SJPEG=OFF
-DJPEGXL_WARNINGS_AS_ERRORS=OFF
-DJPEGXL_ENABLE_SKCMS=OFF
-DJPEGXL_ENABLE_VIEWERS=OFF
-DJPEGXL_ENABLE_PLUGINS=OFF
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON
-DJPEGXL_FORCE_SYSTEM_HWY=ON
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON
-DJPEGXL_ENABLE_DOXYGEN=OFF
-DJPEGXL_ENABLE_MANPAGES=OFF
-DJPEGXL_ENABLE_JNI=OFF
-DJPEGXL_ENABLE_TCMALLOC=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
cmake_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
}
|