From 4df3136229de711838646a65b6cf040226eeb7cb Mon Sep 17 00:00:00 2001 From: Mike Wey Date: Thu, 25 May 2017 20:20:06 +0200 Subject: Add dub support. dub will generate the import library of 32bit windows (OMF), the other windows targets might need some more work. See: #12 --- build-aux/magickVersion.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 build-aux/magickVersion.sh (limited to 'build-aux') 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" -- cgit v1.2.3