blob: 4dcb98c3d29a949ba2b3a5b5de835316819d8886 (
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
pkgbase=libjpeg-xl-git
pkgname=('libjpeg-xl-git' 'libjpeg-xl-doc-git')
pkgver=0.3.7.r3.gab7c5e9
pkgrel=1
pkgdesc='JPEG XL image format reference implementation (git version)'
arch=('x86_64')
url='https://jpeg.org/jpegxl/'
license=('Apache')
makedepends=('git' 'cmake' 'clang' 'brotli' 'gdk-pixbuf2' 'giflib' 'gimp'
'libjpeg-turbo' 'libpng' 'openexr' 'zlib' 'libgl' 'freeglut'
'gtest' 'gmock' 'python' 'asciidoc' 'doxygen' 'graphviz'
'highway')
source=('git+https://gitlab.com/wg1/jpeg-xl.git'
'git+https://github.com/google/brotli.git'
'git+https://github.com/lvandeve/lodepng.git'
'git+https://github.com/mm2/Little-CMS.git'
'git+https://github.com/google/googletest.git'
'git+https://github.com/webmproject/sjpeg.git'
'git+https://skia.googlesource.com/skcms.git'
'git+https://github.com/veluca93/IQA-optimization.git'
'git+https://github.com/Netflix/vmaf.git'
'git+https://github.com/thorfdbg/difftest_ng.git'
'git+https://github.com/google/highway.git')
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')
prepare() {
git -C jpeg-xl submodule init
git -C jpeg-xl config --local submodule.third_party/brotli.url "${srcdir}/brotli"
git -C jpeg-xl config --local submodule.third_party/lodepng.url "${srcdir}/lodepng"
git -C jpeg-xl config --local submodule.third_party/lcms.url "${srcdir}/Little-CMS"
git -C jpeg-xl config --local submodule.third_party/googletest.url "${srcdir}/googletest"
git -C jpeg-xl config --local submodule.third_party/sjpeg.url "${srcdir}/sjpeg"
git -C jpeg-xl config --local submodule.third_party/skcms.url "${srcdir}/skcms"
git -C jpeg-xl config --local submodule.third_party/IQA-optimization.url "${srcdir}/IQA-optimization"
git -C jpeg-xl config --local submodule.third_party/vmaf.url "${srcdir}/vmaf"
git -C jpeg-xl config --local submodule.third_party/difftest_ng.url "${srcdir}/difftest_ng"
git -C jpeg-xl config --local submodule.third_party/highway.url "${srcdir}/highway"
git -C jpeg-xl submodule update
}
pkgver() {
git -C jpeg-xl describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}
build() {
export CC='clang'
export CXX='clang++'
cmake -B build -S jpeg-xl \
-DCMAKE_BUILD_TYPE:STRING='None' \
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
-DJPEGXL_ENABLE_BENCHMARK:BOOL='false' \
-DJPEGXL_ENABLE_FUZZERS:BOOL='false' \
-DJPEGXL_ENABLE_PLUGINS:BOOL='true' \
-DJPEGXL_ENABLE_VIEWERS:BOOL='false' \
-DJPEGXL_ENABLE_GIMP_SAVING:BOOL='ON' \
-DJPEGXL_FORCE_SYSTEM_BROTLI:BOOL='true' \
-DJPEGXL_FORCE_SYSTEM_GTEST:BOOL='true' \
-DJPEGXL_FORCE_SYSTEM_HWY:BOOL='true' \
-DJPEGXL_WARNINGS_AS_ERRORS:BOOL='false' \
-Wno-dev
make -C build all doc
}
check() {
make -C build test
}
package_libjpeg-xl-git() {
depends=('brotli')
optdepends=('gdk-pixbuf2: for gdk-pixbuf loader'
'giflib: for CLI tools'
'gimp: for gimp plugin'
'libjpeg-turbo: for CLI tools'
'libpng: for CLI tools'
'openexr: for CLI tools')
provides=('libjpeg-xl' 'libjxl' 'libjxl-git' 'libjxl.so')
conflicts=('libjpeg-xl')
make -C build DESTDIR="$pkgdir" install
install -D -m644 jpeg-xl/plugins/mime/image-jxl.xml -t "${pkgdir}/usr/share/mime/packages"
}
package_libjpeg-xl-doc-git() {
pkgdesc="$(sed 's/\((git\)/(documentation) \1/' <<< "$pkgdesc")"
arch=('any')
provides=('libjpeg-xl-doc' 'libjxl-doc' 'libjxl-doc-git')
conflicts=('libjpeg-xl-doc')
mkdir -p "${pkgdir}/usr/share/doc"
cp -dr --no-preserve='ownership' build/html "${pkgdir}/usr/share/doc/libjpeg-xl"
}
|