| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # nacl-ImageMagick-6.5.4-10.sh | 6 # nacl-ImageMagick-6.5.4-10.sh |
| 7 # | 7 # |
| 8 # usage: nacl-ImageMagick-6.5.4-10.sh | 8 # usage: nacl-ImageMagick-6.5.4-10.sh |
| 9 # | 9 # |
| 10 # this script downloads, patches, and builds ImageMagick for Native Client | 10 # this script downloads, patches, and builds ImageMagick for Native Client |
| 11 # | 11 # |
| 12 | 12 |
| 13 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/Im
ageMagick-6.5.4-10.tar.gz | 13 readonly URL=http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/Im
ageMagick-6.5.4-10.tar.gz |
| 14 #readonly URL=http://downloads.sourceforge.net/project/imagemagick/ImageMagick/6
.5/ImageMagick-6.5.4-10.tar.gz | 14 #readonly URL=http://downloads.sourceforge.net/project/imagemagick/ImageMagick/6
.5/ImageMagick-6.5.4-10.tar.gz |
| 15 readonly PATCH_FILE=nacl-ImageMagick-6.5.4-10.patch | 15 readonly PATCH_FILE=nacl-ImageMagick-6.5.4-10.patch |
| 16 readonly PACKAGE_NAME=ImageMagick-6.5.4-10 | 16 readonly PACKAGE_NAME=ImageMagick-6.5.4-10 |
| 17 | 17 |
| 18 source ../../build_tools/common.sh | 18 source ../../build_tools/common.sh |
| 19 | 19 |
| 20 CustomConfigureStep() { | 20 CustomConfigureStep() { |
| 21 Banner "Configuring ${PACKAGE_NAME}" | 21 Banner "Configuring ${PACKAGE_NAME}" |
| 22 # export the nacl tools | 22 # export the nacl tools |
| 23 export CC=${NACLCC} | 23 export CC=${NACLCC} |
| 24 export CXX=${NACLCXX} | 24 export CXX=${NACLCXX} |
| 25 export AR=${NACLAR} | 25 export AR=${NACLAR} |
| 26 export RANLIB=${NACLRANLIB} | 26 export RANLIB=${NACLRANLIB} |
| 27 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig | 27 export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig |
| 28 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} | 28 export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR} |
| 29 export PATH=${NACL_BIN_PATH}:${PATH}; | 29 export PATH=${NACL_BIN_PATH}:${PATH}; |
| 30 # Drop /opt/X11/bin (may interfere build on osx). | 30 # Drop /opt/X11/bin (may interfere build on osx). |
| 31 export PATH=$(echo $PATH | sed -e 's;/opt/X11/bin;;') | 31 export PATH=$(echo $PATH | sed -e 's;/opt/X11/bin;;') |
| 32 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 32 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
| 33 Remove ${PACKAGE_NAME}-build | 33 Remove ${PACKAGE_NAME}-build |
| 34 MakeDir ${PACKAGE_NAME}-build | 34 MakeDir ${PACKAGE_NAME}-build |
| 35 cd ${PACKAGE_NAME}-build | 35 cd ${PACKAGE_NAME}-build |
| 36 ../configure \ | 36 ../configure \ |
| 37 --host=nacl \ | 37 --host=nacl \ |
| 38 --disable-shared \ | 38 --disable-shared \ |
| 39 --prefix=${NACL_SDK_USR} \ | 39 --prefix=${NACLPORTS_PREFIX} \ |
| 40 --exec-prefix=${NACL_SDK_USR} \ | 40 --exec-prefix=${NACLPORTS_PREFIX} \ |
| 41 --libdir=${NACL_SDK_USR_LIB} \ | 41 --libdir=${NACLPORTS_LIBDIR} \ |
| 42 --oldincludedir=${NACL_SDK_USR_INCLUDE} \ | 42 --oldincludedir=${NACLPORTS_INCLUDE} \ |
| 43 --with-x=no \ | 43 --with-x=no \ |
| 44 --disable-largefile \ | 44 --disable-largefile \ |
| 45 --without-fftw | 45 --without-fftw |
| 46 } | 46 } |
| 47 | 47 |
| 48 | 48 |
| 49 CustomBuildAndInstallStep() { | 49 CustomBuildAndInstallStep() { |
| 50 # assumes pwd has makefile | 50 # assumes pwd has makefile |
| 51 make clean | 51 make clean |
| 52 make CFLAGS='-DSSIZE_MAX="((ssize_t)(~((size_t)0)>>1))"' \ | 52 cflags="${NACLPORTS_CFLAGS} -DSSIZE_MAX=\"((ssize_t)(~((size_t)0)>>1))\"" |
| 53 install-libLTLIBRARIES install-data-am -j${OS_JOBS} | 53 make CFLAGS="${cflags}" install-libLTLIBRARIES install-data-am -j${OS_JOBS} |
| 54 DefaultTouchStep | 54 DefaultTouchStep |
| 55 } | 55 } |
| 56 | 56 |
| 57 | 57 |
| 58 CustomPackageInstall() { | 58 CustomPackageInstall() { |
| 59 DefaultPreInstallStep | 59 DefaultPreInstallStep |
| 60 DefaultDownloadStep | 60 DefaultDownloadStep |
| 61 DefaultExtractStep | 61 DefaultExtractStep |
| 62 DefaultPatchStep | 62 DefaultPatchStep |
| 63 CustomConfigureStep | 63 CustomConfigureStep |
| 64 CustomBuildAndInstallStep | 64 CustomBuildAndInstallStep |
| 65 DefaultCleanUpStep | 65 DefaultCleanUpStep |
| 66 } | 66 } |
| 67 | 67 |
| 68 CustomPackageInstall | 68 CustomPackageInstall |
| 69 exit 0 | 69 exit 0 |
| OLD | NEW |