[23291] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | package=ImageMagick
|
---|
[30675] | 4 | version=-6.9.5-4
|
---|
[23291] | 5 |
|
---|
| 6 | progname=$0
|
---|
| 7 |
|
---|
| 8 | source ../cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK ../.. $*
|
---|
| 9 |
|
---|
| 10 | prefix=$GEXTIMAGEMAGICK_INSTALLED
|
---|
| 11 |
|
---|
| 12 | export CFLAGS="$CFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
|
---|
| 13 | export CPPFLAGS="$CPPFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
|
---|
| 14 | export CXXFLAGS="$CXXFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
|
---|
[31145] | 15 | # We need to add libz to LDFLAGS to get the configure test for libtiff to succeed
|
---|
| 16 | # (only found to be necessary on an uncooperative mac)
|
---|
| 17 | export LDFLAGS="$LDFLAGS -L$GEXTIMAGEMAGICK_INSTALLED/lib -lz"
|
---|
[23775] | 18 | export LD_LIBRARY_PATH="$GEXTIMAGEMAGICK_INSTALLED/lib"
|
---|
[23291] | 19 |
|
---|
[27284] | 20 | # If on darwin, check if clang exists. If so, use that as CC, in place of gcc
|
---|
| 21 | # use command -v instead of which to check if a program exists.
|
---|
| 22 | # http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
|
---|
| 23 | if [ "x$GSDLOS" = "xdarwin" ] ; then
|
---|
| 24 | if command -v clang > /dev/null 2>&1; then
|
---|
[28270] | 25 | echo "Found clang compiler. Switching CC to clang"
|
---|
[27284] | 26 | CROSSCONFIGURE_VARS="CC=clang"
|
---|
| 27 | fi
|
---|
| 28 | fi
|
---|
[26869] | 29 |
|
---|
[28270] | 30 | # it's going to generate the ghostscript binary not ghostscript library
|
---|
| 31 | # so --without-gslib
|
---|
[23291] | 32 | opt_run_untar $force_untar $auto_untar $package $version
|
---|
[30675] | 33 | opt_run_configure $force_config $auto_config $package $version $prefix --without-gslib --disable-shared
|
---|
[23291] | 34 |
|
---|
| 35 | opt_run_make $compile $package $version
|
---|
| 36 | opt_run_make $install $package $version "install"
|
---|
| 37 | opt_run_make $clean $package $version "clean"
|
---|
| 38 | opt_run_make $distclean $package $version "distclean"
|
---|
| 39 |
|
---|
| 40 | opt_run_tarclean $tarclean $package $version |
---|