+mozilla.org/mozjpeg (#1279)

* +mozilla.org/mozjpeg

* remove unused

* pic/pie flags

I don't know why these don't make it through from CFLAGS et al.

---------

Co-authored-by: James Reynolds <magnsuviri@me.com>
Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
James Reynolds 2023-04-06 12:07:32 -06:00 committed by GitHub
parent 1dd4e4cdcd
commit 8225b2e987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

View file

@ -0,0 +1,40 @@
distributable:
url: https://github.com/mozilla/mozjpeg/archive/v{{version}}.tar.gz
strip-components: 1
versions:
github: mozilla/mozjpeg
dependencies:
libpng.org: ^1
build:
dependencies:
tea.xyz/gx/make: '*'
tea.xyz/gx/cc: 'c99'
cmake.org: ^3
nasm.us: ^2
libpng.org: ^1
working-directory: build
script: |
cmake .. $ARGS
make install
env:
ARGS:
- -DCMAKE_INSTALL_PREFIX={{ prefix }}
linux/x86-64:
ARGS:
- -DCMAKE_C_FLAGS=-fPIC
- -DCMAKE_CXX_FLAGS=-fPIC
- -DCMAKE_EXE_LINKER_FLAGS=-pie
provides:
- bin/cjpeg
- bin/djpeg
- bin/jpegtran
- bin/rdjpgcom
- bin/tjbench
- bin/wrjpgcom
test:
script: jpegtran -crop 1x1 -transpose -optimize -outfile out.jpg fixture.jpeg