summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO13
-rw-r--r--010-libjpeg-xl-git-remove-werror.patch6
-rw-r--r--020-libjpeg-xl-git-fix-headers-install-path.patch6
-rw-r--r--040-libjpeg-xl-git-disable-avx2.patch33
-rw-r--r--PKGBUILD32
5 files changed, 64 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4f784e92e9a6..efd8959a25c7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = libjpeg-xl-git
pkgdesc = JPEG XL image format reference implementation (git version)
- pkgver = r1.ff09371
+ pkgver = r3.g0709f3a
pkgrel = 1
url = https://jpeg.org/jpegxl/
arch = x86_64
@@ -13,8 +13,9 @@ pkgbase = libjpeg-xl-git
makedepends = gtest
makedepends = python
makedepends = freeglut
+ makedepends = gperftools
depends = gcc-libs
- depends = shared-mime-info
+ optdepends = gperftools: for CLI tools
optdepends = libwebp: for CLI tools
optdepends = openexr: for CLI tools
provides = libjpeg-xl
@@ -24,13 +25,13 @@ pkgbase = libjpeg-xl-git
source = git+https://github.com/lvandeve/lodepng.git
source = git+https://github.com/mm2/Little-CMS.git
source = git+https://github.com/google/googletest
- source = git+https://github.com/gperftools/gperftools.git
source = git+https://github.com/google/brunsli.git
source = git+https://github.com/webmproject/sjpeg.git
source = git+https://skia.googlesource.com/skcms.git
source = 010-libjpeg-xl-git-remove-werror.patch
source = 020-libjpeg-xl-git-fix-headers-install-path.patch
source = 030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch
+ source = 040-libjpeg-xl-git-disable-avx2.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
@@ -39,10 +40,10 @@ pkgbase = libjpeg-xl-git
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = 1d4a4f324ba33fe80cb6d68cbe65f280086c0d5ac094c4d443f94c66a5fabf6d
- sha256sums = 0cfbbe7f3968648d4413649c8bb6f340749e946913e702ce250fc10c9ed5ba12
+ sha256sums = f75738bb1041e1bf9104ca6156b2269f73e4503508803de183e57110b232bbfd
+ sha256sums = ac5e30fb0a9034a935a463a3eaaec4b369fef6cf6e270cc85cce09e1f26f67c0
sha256sums = 5d7df9a9cfc15183915b522bfa1360e0c9034c24c7630c0da43df35326b53c3c
+ sha256sums = 403600ccf265966d6a03607591daab4f4129c82a0dc467e5f6b02e4762c1e341
pkgname = libjpeg-xl-git
diff --git a/010-libjpeg-xl-git-remove-werror.patch b/010-libjpeg-xl-git-remove-werror.patch
index 62c9b2e92650..3911c4425d52 100644
--- a/010-libjpeg-xl-git-remove-werror.patch
+++ b/010-libjpeg-xl-git-remove-werror.patch
@@ -1,7 +1,7 @@
diff -Naurp a/CMakeLists.txt b/CMakeLists.txt
---- a/CMakeLists.txt 2020-01-31 23:36:37.000000000 +0000
-+++ b/CMakeLists.txt 2020-02-01 00:08:32.046032049 +0000
-@@ -167,10 +167,6 @@ add_compile_options(
+--- a/CMakeLists.txt 2020-02-27 00:53:11.000000000 +0000
++++ b/CMakeLists.txt 2020-02-27 00:53:13.000000000 +0000
+@@ -165,10 +165,6 @@ add_compile_options(
-Wall
)
diff --git a/020-libjpeg-xl-git-fix-headers-install-path.patch b/020-libjpeg-xl-git-fix-headers-install-path.patch
index f35535a9670f..9ab13e95244b 100644
--- a/020-libjpeg-xl-git-fix-headers-install-path.patch
+++ b/020-libjpeg-xl-git-fix-headers-install-path.patch
@@ -1,7 +1,7 @@
diff -Naurp a/jpegxl.cmake b/jpegxl.cmake
---- a/jpegxl.cmake 2020-02-01 02:39:29.000000000 +0000
-+++ b/jpegxl.cmake 2020-02-01 02:54:31.908727438 +0000
-@@ -426,9 +426,9 @@ endif() # APPLE
+--- a/jpegxl.cmake 2020-02-27 00:53:11.000000000 +0000
++++ b/jpegxl.cmake 2020-02-27 00:53:13.000000000 +0000
+@@ -437,9 +437,9 @@ endif() # APPLE
install(TARGETS jpegxl
DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/jpegxl
diff --git a/040-libjpeg-xl-git-disable-avx2.patch b/040-libjpeg-xl-git-disable-avx2.patch
new file mode 100644
index 000000000000..39b6517e3436
--- /dev/null
+++ b/040-libjpeg-xl-git-disable-avx2.patch
@@ -0,0 +1,33 @@
+diff -Naupr a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2020-03-01 20:39:57.000000000 +0000
++++ b/CMakeLists.txt 2020-03-01 23:39:56.619280694 +0000
+@@ -134,16 +134,7 @@ else()
+ endif()
+
+ # CPU flags
+-if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64" AND NOT MSVC)
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+- -mavx2 \
+- -mfma \
+- -Xclang -mprefer-vector-width=128 \
+- -Xclang -target-cpu -Xclang haswell \
+- -Xclang -target-feature -Xclang +avx2")
+-elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|AMD64" AND MSVC)
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2")
+-elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
++if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+ -Xclang -mprefer-vector-width=128 \
+ -Xclang -target-cpu -Xclang cortex-a72")
+diff -Naupr a/third_party/highway/hwy/targets.h b/third_party/highway/hwy/targets.h
+--- a/third_party/highway/hwy/targets.h 2020-03-01 20:30:01.000000000 +0000
++++ b/third_party/highway/hwy/targets.h 2020-03-01 20:32:10.234611054 +0000
+@@ -25,7 +25,7 @@
+ #define HWY_WASM 32
+
+ // Uncomment to avoid using/requiring AVX2 when running on Intel/AMD.
+-// #define HWY_DISABLE_AVX2
++#define HWY_DISABLE_AVX2
+
+ // Uncomment to avoid additional (optional) code generation for AVX-512 when
+ // building for Intel/AMD.
diff --git a/PKGBUILD b/PKGBUILD
index 1fabf22995a6..5e8e733b1087 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,18 @@
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
pkgname=libjpeg-xl-git
-pkgver=r1.ff09371
+pkgver=r3.g0709f3a
pkgrel=1
pkgdesc='JPEG XL image format reference implementation (git version)'
arch=('x86_64')
url='https://jpeg.org/jpegxl/'
license=('Apache')
-depends=('gcc-libs' 'shared-mime-info')
-optdepends=('libwebp: for CLI tools'
+depends=('gcc-libs')
+optdepends=('gperftools: for CLI tools'
+ 'libwebp: for CLI tools'
'openexr: for CLI tools')
-makedepends=('git' 'cmake' 'clang' 'libwebp' 'openexr' 'gtest' 'python' 'freeglut')
+makedepends=('git' 'cmake' 'clang' 'libwebp' 'openexr' 'gtest' 'python' 'freeglut'
+ 'gperftools')
provides=('libjpeg-xl')
conflicts=('libjpeg-xl')
source=('git+https://gitlab.com/wg1/jpeg-xl.git'
@@ -18,13 +20,13 @@ source=('git+https://gitlab.com/wg1/jpeg-xl.git'
'git+https://github.com/lvandeve/lodepng.git'
'git+https://github.com/mm2/Little-CMS.git'
'git+https://github.com/google/googletest'
- 'git+https://github.com/gperftools/gperftools.git'
'git+https://github.com/google/brunsli.git'
'git+https://github.com/webmproject/sjpeg.git'
'git+https://skia.googlesource.com/skcms.git'
'010-libjpeg-xl-git-remove-werror.patch'
'020-libjpeg-xl-git-fix-headers-install-path.patch'
- '030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch')
+ '030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch'
+ '040-libjpeg-xl-git-disable-avx2.patch')
sha256sums=('SKIP'
'SKIP'
'SKIP'
@@ -33,10 +35,10 @@ sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- 'SKIP'
- '1d4a4f324ba33fe80cb6d68cbe65f280086c0d5ac094c4d443f94c66a5fabf6d'
- '0cfbbe7f3968648d4413649c8bb6f340749e946913e702ce250fc10c9ed5ba12'
- '5d7df9a9cfc15183915b522bfa1360e0c9034c24c7630c0da43df35326b53c3c')
+ 'f75738bb1041e1bf9104ca6156b2269f73e4503508803de183e57110b232bbfd'
+ 'ac5e30fb0a9034a935a463a3eaaec4b369fef6cf6e270cc85cce09e1f26f67c0'
+ '5d7df9a9cfc15183915b522bfa1360e0c9034c24c7630c0da43df35326b53c3c'
+ '403600ccf265966d6a03607591daab4f4129c82a0dc467e5f6b02e4762c1e341')
prepare() {
cd jpeg-xl
@@ -45,7 +47,6 @@ prepare() {
git config --local submodule.third_party/lodepng.url "${srcdir}/lodepng"
git config --local submodule.third_party/lcms.url "${srcdir}/Little-CMS"
git config --local submodule.third_party/googletest.url "${srcdir}/googletest"
- git config --local submodule.third_party/gperftools.url "${srcdir}/gperftools"
git config --local submodule.third_party/brunsli.url "${srcdir}/brunsli"
git config --local submodule.third_party/sjpeg.url "${srcdir}/sjpeg"
git config --local submodule.third_party/skcms.url "${srcdir}/skcms"
@@ -53,18 +54,21 @@ prepare() {
patch -Np1 -i "${srcdir}/010-libjpeg-xl-git-remove-werror.patch"
patch -Np1 -i "${srcdir}/020-libjpeg-xl-git-fix-headers-install-path.patch"
patch -Np1 -i "${srcdir}/030-libjpeg-xl-git-fix-gdk-pixbuf-install-path.patch"
+ patch -Np1 -i "${srcdir}/040-libjpeg-xl-git-disable-avx2.patch"
}
pkgver() {
cd jpeg-xl
- printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ printf 'r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
+ export CFLAGS+=" ${CPPFLAGS}"
+ export CXXFLAGS+=" ${CPPFLAGS}"
cmake -B build -S jpeg-xl \
-DCMAKE_BUILD_TYPE:STRING='None' \
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
- -DJPEGXL_ENABLE_BENCHMARK:BOOL='false' \
+ -DJPEGXL_ENABLE_BENCHMARK:BOOL='true' \
-DJPEGXL_ENABLE_FUZZERS:BOOL='false' \
-DJPEGXL_ENABLE_PLUGINS:BOOL='false' \
-DJPEGXL_ENABLE_VIEWERS:BOOL='false' \
@@ -79,5 +83,5 @@ check() {
package() {
make -C build DESTDIR="$pkgdir" install
install -D -m644 jpeg-xl/plugins/mime/image-x-jxl.xml -t "${pkgdir}/usr/share/mime/packages"
- rm "${pkgdir}/usr/bin/"{cbrunsli,butteraugli_main,decode_and_encode,epf_main,ssimulacra_main,xyb_range}
+ rm "${pkgdir}/usr/bin/"{cbrunsli,butteraugli_main,decode_and_encode,epf_main,fuzzer_corpus,ssimulacra_main,xyb_range}
}