parse image magick versions to semver

This commit is contained in:
Max Howell 2024-01-11 12:30:21 -05:00
parent 3ad1bb655a
commit 544161f6b8

View file

@ -1,12 +1,12 @@
distributable: distributable:
#FIXME: they use a weird versioning scheme #FIXME: they use a weird versioning scheme
url: https://github.com/ImageMagick/ImageMagick/archive/7.1.1-12.tar.gz url: https://github.com/ImageMagick/ImageMagick/archive/{{version.tag}}.tar.gz
strip-components: 1 strip-components: 1
versions: versions:
#FIXME: they use a weird versioning scheme github: ImageMagick/ImageMagick
# github: ImageMagick/ImageMagick # tags are of the form 7.1.2-44 where the `-44` is significant and not a pre-release indicator
- 7.1.1.12 transform: v => v.replace('-', '.')
provides: provides:
- bin/animate - bin/animate
@ -41,7 +41,7 @@ dependencies:
tukaani.org/xz: '*' tukaani.org/xz: '*'
sourceware.org/bzip2: '*' sourceware.org/bzip2: '*'
gnome.org/libxml2: '*' gnome.org/libxml2: '*'
zlib.net: '*' zlib.net: ^1
jpeg.org/jpegxl: '*' jpeg.org/jpegxl: '*'
perl.org: '*' perl.org: '*'
libzip.org: '*' libzip.org: '*'
@ -54,16 +54,17 @@ dependencies:
x.org/x11: '*' x.org/x11: '*'
runtime: runtime:
env:
MAGICK_HOME: "{{prefix}}" MAGICK_HOME: "{{prefix}}"
build: build:
dependencies:
freedesktop.org/pkg-config: '*'
script: script:
- sed -i'' -e 's|${PACKAGE_NAME}-${PACKAGE_BASE_VERSION}|${PACKAGE_NAME}|g' configure - 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' {} + - find . -type f -name '*-config.in' -exec sed -i'' -e 's|@PKG_CONFIG@|pkg-config|g' {} +
- ./configure $ARGS - ./configure $ARGS
- make --jobs {{ hw.concurrency }} install - make --jobs {{ hw.concurrency }} install
- run: sed -i'' -e 's|^prefix=.*|prefix=${MAGICK_HOME}|g' Magick++-config MagickCore-config MagickWand-config - run: sed -i'' -e 's|^prefix=.*|prefix=${MAGICK_HOME}|g' Magick++-config MagickCore-config MagickWand-config
working-directory: ${{prefix}}/bin working-directory: ${{prefix}}/bin
@ -119,12 +120,9 @@ build:
- --without-x - --without-x
test: test:
env:
MAGICK_HOME: "{{prefix}}"
dependencies: dependencies:
curl.se: '*' curl.se: '*'
script: script:
#FIXME: they use a weird versioning scheme - magick -version | grep {{version.tag}}
- magick -version | grep 7.1.1-12
- curl "https://upload.wikimedia.org/wikipedia/commons/6/6a/PNG_Test.png" -o a.png - curl "https://upload.wikimedia.org/wikipedia/commons/6/6a/PNG_Test.png" -o a.png
- magick identify a.png | grep "a.png PNG" - magick identify a.png | grep "a.png PNG"