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 source pkg_info | 13 source pkg_info |
14 source ../../build_tools/common.sh | 14 source ../../build_tools/common.sh |
15 | 15 |
16 CustomConfigureStep() { | 16 CustomConfigureStep() { |
17 Banner "Configuring ${PACKAGE_NAME}" | 17 Banner "Configuring ${PACKAGE_NAME}" |
18 # export the nacl tools | 18 # export the nacl tools |
19 export CC=${NACLCC} | 19 export CC=${NACLCC} |
20 export CXX=${NACLCXX} | 20 export CXX=${NACLCXX} |
21 export AR=${NACLAR} | 21 export AR=${NACLAR} |
22 export RANLIB=${NACLRANLIB} | 22 export RANLIB=${NACLRANLIB} |
23 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig | 23 export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig |
24 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} | 24 export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR} |
25 export PATH=${NACL_BIN_PATH}:${PATH}; | 25 export PATH=${NACL_BIN_PATH}:${PATH}; |
26 # Drop /opt/X11/bin (may interfere build on osx). | 26 # Drop /opt/X11/bin (may interfere build on osx). |
27 export PATH=$(echo $PATH | sed -e 's;/opt/X11/bin;;') | 27 export PATH=$(echo $PATH | sed -e 's;/opt/X11/bin;;') |
28 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 28 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
29 Remove ${PACKAGE_NAME}-build | 29 Remove ${PACKAGE_NAME}-build |
30 MakeDir ${PACKAGE_NAME}-build | 30 MakeDir ${PACKAGE_NAME}-build |
31 cd ${PACKAGE_NAME}-build | 31 cd ${PACKAGE_NAME}-build |
32 ../configure \ | 32 ../configure \ |
33 --host=nacl \ | 33 --host=nacl \ |
34 --disable-shared \ | 34 --disable-shared \ |
35 --prefix=${NACL_SDK_USR} \ | 35 --prefix=${NACLPORTS_PREFIX} \ |
36 --exec-prefix=${NACL_SDK_USR} \ | 36 --exec-prefix=${NACLPORTS_PREFIX} \ |
37 --libdir=${NACL_SDK_USR_LIB} \ | 37 --libdir=${NACLPORTS_LIBDIR} \ |
38 --oldincludedir=${NACL_SDK_USR_INCLUDE} \ | 38 --oldincludedir=${NACLPORTS_INCLUDE} \ |
39 --with-x=no \ | 39 --with-x=no \ |
40 --disable-largefile \ | 40 --disable-largefile \ |
41 --without-fftw | 41 --without-fftw |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 CustomBuildAndInstallStep() { | 45 CustomBuildAndInstallStep() { |
46 # assumes pwd has makefile | 46 # assumes pwd has makefile |
47 make clean | 47 make clean |
48 make CFLAGS='-DSSIZE_MAX="((ssize_t)(~((size_t)0)>>1))"' \ | 48 cflags="${NACLPORTS_CFLAGS} -DSSIZE_MAX=\"((ssize_t)(~((size_t)0)>>1))\"" |
49 install-libLTLIBRARIES install-data-am -j${OS_JOBS} | 49 make CFLAGS="${cflags}" install-libLTLIBRARIES install-data-am -j${OS_JOBS} |
50 DefaultTouchStep | 50 DefaultTouchStep |
51 } | 51 } |
52 | 52 |
53 | 53 |
54 CustomPackageInstall() { | 54 CustomPackageInstall() { |
55 DefaultPreInstallStep | 55 DefaultPreInstallStep |
56 DefaultDownloadStep | 56 DefaultDownloadStep |
57 DefaultExtractStep | 57 DefaultExtractStep |
58 DefaultPatchStep | 58 DefaultPatchStep |
59 CustomConfigureStep | 59 CustomConfigureStep |
60 CustomBuildAndInstallStep | 60 CustomBuildAndInstallStep |
61 DefaultCleanUpStep | 61 DefaultCleanUpStep |
62 } | 62 } |
63 | 63 |
64 CustomPackageInstall | 64 CustomPackageInstall |
65 exit 0 | 65 exit 0 |
OLD | NEW |