Fix jpeg-turbo; Closes #4562 (#4583)

This commit is contained in:
Max Howell 2023-12-23 09:25:53 +00:00 committed by GitHub
parent 49a965530a
commit 5e07d6a283
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 32 deletions

View file

@ -1,4 +1,4 @@
name: pkgx/brewkit/setup-codesign
name: pkgx/pantry/setup-codesign
description: Codesigns macOS binaries using Apple tools
inputs:

View file

@ -1,6 +1,6 @@
distributable:
url: https://github.com/libjxl/libjxl/archive/v{{version}}.tar.gz
strip-components: 1
url: git+https://github.com/libjxl/libjxl.git
ref: v{{version}}
versions:
github: libjxl/libjxl
@ -12,11 +12,13 @@ dependencies:
google.com/webp: ^1
giflib.sourceforge.io: ^5
openexr.com: ^3
libpng.org: ^1
provides:
- bin/cjpeg_hdr
- bin/cjxl
- bin/cjpegli
- bin/djxl
- bin/djpegli
- bin/jxlinfo
build:
@ -24,32 +26,29 @@ build:
freedesktop.org/pkg-config: ^0.29
cmake.org: ^3
gnu.org/coreutils: '*' # deps.sh needs “realpath”
git-scm.org: ^2
working-directory: build
script: |
GIT_DIR=$PWD ../deps.sh # †
find ../third_party -not -name sjpeg -mindepth 1 -maxdepth 1 -type d | xargs rm -rf # ‡
script:
# the `SJPEG` library is obscure and we have not yet pkgd it.
# the rest we have and provide as deps.
# jpeg-turbo is a dep we provide, but for some reason around v0.9 the
# jpegxl build started requiring their vendored copy
- run: |
./deps.sh
find third_party -not -name sjpeg -and -not -name libjpeg-turbo -mindepth 1 -maxdepth 1 -type d | xargs rm -rf
working-directory: ..
cmake .. $ARGS
make --jobs {{ hw.concurrency }} install
env:
# add any environment variables here
ARGS:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DBUILD_TESTING=OFF
- -DJPEGXL_ENABLE_SKCMS=OFF
- -DJPEGXL_ENABLE_BENCHMARK=OFF
- -DJPEGXL_VERSION={{version}}
- cmake ..
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX={{prefix}}
-DBUILD_TESTING=OFF
-DJPEGXL_ENABLE_SKCMS=OFF
-DJPEGXL_ENABLE_BENCHMARK=OFF
-DJPEGXL_VERSION={{version}}
# † we set GIT_DIR because the script assumes git if it finds git rev-parse
# works, which it does for us because we have a git checkout both locally and
# in CI/CD
- make --jobs {{ hw.concurrency }} install
# ‡ we dont want anything but sjpeg which is a super rare dep only used by
# this package
test:
script: |
test: |
cjxl fixture.jpeg out.jxl
cc fixture1.c -ljxl