mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
131 lines
3.5 KiB
YAML
131 lines
3.5 KiB
YAML
distributable:
|
|
#FIXME: they use a weird versioning scheme
|
|
url: https://github.com/ImageMagick/ImageMagick/archive/{{version.tag}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: ImageMagick/ImageMagick
|
|
# tags are of the form 7.1.2-44 where the `-44` is significant and not a pre-release indicator
|
|
transform: v => v.replace('-', '.')
|
|
|
|
provides:
|
|
- bin/animate
|
|
- bin/compare
|
|
- bin/composite
|
|
- bin/conjure
|
|
- bin/convert
|
|
- bin/display
|
|
- bin/identify
|
|
- bin/import
|
|
- bin/magick
|
|
- bin/magick-script
|
|
- bin/Magick++-config
|
|
- bin/MagickCore-config
|
|
- bin/MagickWand-config
|
|
- bin/mogrify
|
|
- bin/montage
|
|
- bin/stream
|
|
|
|
dependencies:
|
|
libpng.org: '*'
|
|
ijg.org: '*'
|
|
freetype.org: '*'
|
|
libjpeg-turbo.org: '*'
|
|
liblqr.wikidot.com: '*'
|
|
simplesystems.org/libtiff: '*'
|
|
gnu.org/libtool: '*'
|
|
littlecms.com: '*'
|
|
openexr.com: '*'
|
|
openjpeg.org: '*'
|
|
google.com/webp: '*'
|
|
tukaani.org/xz: '*'
|
|
sourceware.org/bzip2: '*'
|
|
gnome.org/libxml2: '*'
|
|
zlib.net: ^1
|
|
jpeg.org/jpegxl: '*'
|
|
perl.org: '*'
|
|
libzip.org: '*'
|
|
darwin:
|
|
openmp.llvm.org: '*'
|
|
github.com/strukturag/libheif: '*'
|
|
linux/x86-64:
|
|
github.com/strukturag/libheif: '*'
|
|
linux:
|
|
x.org/x11: '*'
|
|
|
|
runtime:
|
|
env:
|
|
MAGICK_HOME: ${{prefix}}
|
|
|
|
build:
|
|
script:
|
|
- sed -i -e 's|${PACKAGE_NAME}-${PACKAGE_BASE_VERSION}|${PACKAGE_NAME}|g' configure
|
|
- find . -type f -name '*-config.in' -exec sed -i'' -e 's|@PKG_CONFIG@|pkg-config|g' {} +
|
|
|
|
- ./configure $ARGS
|
|
- make --jobs {{ hw.concurrency }} install
|
|
|
|
- run: sed -i'' -e 's|^prefix=.*|prefix=${MAGICK_HOME}|g' Magick++-config MagickCore-config MagickWand-config
|
|
working-directory: ${{prefix}}/bin
|
|
|
|
- run: |
|
|
mv ImageMagick-{{version.major}}/* .
|
|
rmdir ImageMagick-{{version.major}}
|
|
ln -s . ImageMagick-{{version.major}}
|
|
working-directory: ${{prefix}}/include
|
|
|
|
env:
|
|
# https://github.com/ImageMagick/ImageMagick/issues/1549
|
|
LDFLAGS:
|
|
- -L{{deps.gnu.org/libtool.prefix}}/lib
|
|
- -L{{deps.liblqr.wikidot.com.prefix}}/lib
|
|
- -L{{deps.sourceware.org/bzip2.prefix}}/lib
|
|
- -L{{deps.ijg.org.prefix}}/lib
|
|
ARGS:
|
|
- --prefix={{ prefix }}
|
|
- --libdir={{prefix}}/lib
|
|
- --enable-osx-universal-binary=no
|
|
- --disable-silent-rules
|
|
- --disable-opencl
|
|
- --enable-static
|
|
- --disable-installed # makes us relocatable
|
|
- --enable-shared # https://github.com/pkgxdev/pantry/issues/4030
|
|
- --with-png=yes
|
|
- --with-tiff=yes
|
|
- --with-jxl=yes
|
|
- --with-perl=yes
|
|
- --with-freetype=yes
|
|
- --with-gvc=no
|
|
- --with-modules
|
|
- --with-openjp2
|
|
- --with-openexr
|
|
- --with-webp=yes
|
|
- --with-heic=yes
|
|
- --with-lqr
|
|
- --without-lzma
|
|
- --without-djvu
|
|
- --without-fftw
|
|
- --without-pango
|
|
- --without-wmf
|
|
- --without-perl
|
|
- --enable-openmp
|
|
- --with-zip=yes
|
|
|
|
linux:
|
|
ARGS:
|
|
- --with-x=yes
|
|
- --x-includes={{deps.x.org/x11.prefix}}/include
|
|
- --x-libraries={{deps.x.org/x11.prefix}}/lib
|
|
darwin:
|
|
ARGS:
|
|
- --without-x
|
|
|
|
test:
|
|
- magick -version | grep {{version.tag}}
|
|
- pkgx curl "https://upload.wikimedia.org/wikipedia/commons/6/6a/PNG_Test.png" -o a.png
|
|
- magick identify a.png | grep "a.png PNG"
|
|
|
|
# verify that we can build the rmagick gem
|
|
#NOTE only darwin because honestly it looks like the rmagick gem build process is broken on Linux
|
|
- run: pkgx +ruby@3.2.2 gem install rmagick
|
|
if: darwin
|