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