diff options
| author | Mike Wey | 2017-05-25 20:20:06 +0200 |
|---|---|---|
| committer | Mike Wey | 2017-05-25 20:20:06 +0200 |
| commit | 4df3136229de711838646a65b6cf040226eeb7cb (patch) | |
| tree | a2ee596419028cd458325d224439854f8b82063e /build-aux | |
| parent | 87c811161c608f8428ff8e399c60f9672c6cfc7e (diff) | |
Add dub support.
dub will generate the import library of 32bit windows (OMF), the other
windows targets might need some more work.
See: #12
Diffstat (limited to 'build-aux')
| -rwxr-xr-x | build-aux/magickVersion.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/build-aux/magickVersion.sh b/build-aux/magickVersion.sh new file mode 100755 index 0000000..3a43d05 --- /dev/null +++ b/build-aux/magickVersion.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +echo $PACKAGE_DIR + +MAGICK_VERSION=$(pkg-config --modversion MagickCore | tr -d '.') +MAGICK_VERSION_TEXT=$(pkg-config --modversion MagickCore) +MAGICK_QUANTUM_DEPTH="16" +MAGICK_HDRI="false" + +if [ -n "$(pkg-config --variable=libname MagickCore | grep 8)" ]; then + MAGICK_QUANTUM_DEPTH="8" +elif [ -n "$(pkg-config --variable=libname MagickCore | grep 32)" ]; then + MAGICK_QUANTUM_DEPTH="32" +elif [ -n "$(pkg-config --variable=libname MagickCore | grep 64)" ]; then + MAGICK_QUANTUM_DEPTH="64" +fi + +if [ -n "$(pkg-config --variable=libname MagickCore | grep HDRI)" ]; then + MAGICK_HDRI="true" +fi + +sed 's/@MagickLibVersion@/'$MAGICK_VERSION'/g' "$PACKAGE_DIR/dmagick/c/magickVersion.d.in" | \ +sed 's/@MagickLibVersionText@/'$MAGICK_VERSION_TEXT'/g' | \ +sed 's/@QuantumDepth@/'$MAGICK_QUANTUM_DEPTH'/g' | \ +sed 's/@HDRI@/'$MAGICK_HDRI'/g' > "$PACKAGE_DIR/dmagick/c/magickVersion.d" |
