From 4f1c849b3f35f083b53fdf33d9c88fb162c80aef Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 1 Mar 2023 05:33:57 -0500 Subject: [PATCH] +libtiff Refs https://github.com/teaxyz/pantry.extra/pull/432 --- README.md | 3 + .../simplesystems.org/libtiff/fixture.tiff | Bin 0 -> 260 bytes .../simplesystems.org/libtiff/package.yml | 66 ++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 projects/simplesystems.org/libtiff/fixture.tiff create mode 100644 projects/simplesystems.org/libtiff/package.yml diff --git a/README.md b/README.md index 286f9a62..9537a77a 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,9 @@ $ gh pr create > `gh` can be run without magic via `tea gh`. > `git` can be run without magic via `tea git`. +While in a pantry dev-env you can run commands from any built packages +provided you specified their `provides:` key. + ## Packaging Guide Packaging can be cumbersome. diff --git a/projects/simplesystems.org/libtiff/fixture.tiff b/projects/simplesystems.org/libtiff/fixture.tiff new file mode 100644 index 0000000000000000000000000000000000000000..ddb289a77f82613baef83cc242852fd2e440f47d GIT binary patch literal 260 zcmebEWzb?^VBq@ypMjr|fq@ywW&}b8Mn)ty6O=6g6lX>fXG3ChA+ZG+Sit5mFmNym zA&HA3vBi+s;&Am$j50{#nqW2)$Sg)X238;qVt-+@2ea9L>?1(Tz!3Plm7xJhulRZx nq=3Qa%vqopz%*DK$OnsmJ=72M0t3SWDRVHNt6iHxfq?-4a8(sY literal 0 HcmV?d00001 diff --git a/projects/simplesystems.org/libtiff/package.yml b/projects/simplesystems.org/libtiff/package.yml new file mode 100644 index 00000000..ed078a39 --- /dev/null +++ b/projects/simplesystems.org/libtiff/package.yml @@ -0,0 +1,66 @@ +distributable: + url: https://download.osgeo.org/libtiff/tiff-{{version}}.tar.gz + strip-components: 1 + +versions: + - 4.5.0 + +dependencies: + facebook.com/zstd: ^1 + libjpeg-turbo.org: ^2 + zlib.net: ^1 + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + script: | + ./configure $ARGS + make --jobs {{ hw.concurrency }} install + env: + ARGS: + - --prefix={{prefix}} + - --enable-zstd + - --disable-dependency-tracking + - --disable-lzma + - --disable-webp + - --with-jpeg-include-dir={{deps.libjpeg-turbo.org.prefix}}/include + - --with-jpeg-lib-dir={{deps.libjpeg-turbo.org.prefix}}/lib + - --without-x + +provides: + - bin/fax2ps + - bin/fax2tiff + - bin/pal2rgb + - bin/ppm2tiff + - bin/raw2tiff + - bin/tiff2bw + - bin/tiff2pdf + - bin/tiff2ps + - bin/tiff2rgba + - bin/tiffcmp + - bin/tiffcp + - bin/tiffcrop + - bin/tiffdither + - bin/tiffdump + - bin/tiffinfo + - bin/tiffmedian + - bin/tiffset + - bin/tiffsplit + +test: + dependencies: + tea.xyz/gx/cc: c99 + script: | + mv $FIXTURE test.c + cc test.c -ltiff + ./a.out fixture.tiff + tiffdump fixture.tiff + fixture: | + #include + int main(int argc, char* argv[]) { + TIFF *out = TIFFOpen(argv[1], "w"); + TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) 10); + TIFFClose(out); + return 0; + }