OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 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 | 6 |
7 # nacl-dosbox-0.74.sh | 7 # nacl-dosbox-0.74.sh |
8 # | 8 # |
9 # usage: nacl-dosbox-0.74.sh | 9 # usage: nacl-dosbox-0.74.sh |
10 # | 10 # |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 CustomConfigureStep() { | 23 CustomConfigureStep() { |
24 Banner "Configuring ${PACKAGE_NAME}" | 24 Banner "Configuring ${PACKAGE_NAME}" |
25 | 25 |
26 # export the nacl tools | 26 # export the nacl tools |
27 export CC=${NACLCC} | 27 export CC=${NACLCC} |
28 export CXX=${NACLCXX} | 28 export CXX=${NACLCXX} |
29 # NOTE: non-standard flag NACL_LDFLAGS because of some more hacking below | 29 # NOTE: non-standard flag NACL_LDFLAGS because of some more hacking below |
30 export CXXFLAGS="-O2 -g" | 30 export CXXFLAGS="-O2 -g" |
31 export NACL_LDFLAGS="" | 31 export NACL_LDFLAGS="" |
32 if [ ${NACL_PACKAGES_BITSIZE} == "pnacl" ] ; then | 32 if [ ${NACL_ARCH} = "pnacl" ] ; then |
33 export CXXFLAGS="-O3 -g" | 33 export CXXFLAGS="-O3 -g" |
34 export NACL_LDFLAGS="-O0 -static" | 34 export NACL_LDFLAGS="-O0 -static" |
35 fi | 35 fi |
36 export AR=${NACLAR} | 36 export AR=${NACLAR} |
37 export RANLIB=${NACLRANLIB} | 37 export RANLIB=${NACLRANLIB} |
38 export STRIP=${NACLSTRIP} | 38 export STRIP=${NACLSTRIP} |
39 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig | 39 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig |
40 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} | 40 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} |
41 | 41 |
42 export LIBS="-L${NACL_SDK_USR_LIB} \ | 42 export LIBS="-L${NACL_SDK_USR_LIB} \ |
43 -lm \ | 43 -lm \ |
44 -lpng \ | 44 -lpng \ |
45 -lz" | 45 -lz" |
46 | 46 |
47 CONFIG_FLAGS="--host=${CROSS_ID}-pc-nacl \ | 47 CONFIG_FLAGS="--host=${NACL_ARCH}-pc-nacl \ |
48 --prefix=${NACL_SDK_USR} \ | 48 --prefix=${NACL_SDK_USR} \ |
49 --exec-prefix=${NACL_SDK_USR} \ | 49 --exec-prefix=${NACL_SDK_USR} \ |
50 --libdir=${NACL_SDK_USR_LIB} \ | 50 --libdir=${NACL_SDK_USR_LIB} \ |
51 --oldincludedir=${NACL_SDK_USR_INCLUDE} \ | 51 --oldincludedir=${NACL_SDK_USR_INCLUDE} \ |
52 --with-sdl-prefix=${NACL_SDK_USR} \ | 52 --with-sdl-prefix=${NACL_SDK_USR} \ |
53 --with-sdl-exec-prefix=${NACL_SDK_USR}" | 53 --with-sdl-exec-prefix=${NACL_SDK_USR}" |
54 | 54 |
55 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 55 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
56 ./autogen.sh | 56 ./autogen.sh |
57 | 57 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 | 94 |
95 CustomInstallStep(){ | 95 CustomInstallStep(){ |
96 DOSBOX_DIR=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} | 96 DOSBOX_DIR=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} |
97 DOSBOX_BUILD=${DOSBOX_DIR}/${PACKAGE_NAME}-build | 97 DOSBOX_BUILD=${DOSBOX_DIR}/${PACKAGE_NAME}-build |
98 PUBLISH_DIR="${NACL_PACKAGES_PUBLISH}/${PACKAGE_NAME}" | 98 PUBLISH_DIR="${NACL_PACKAGES_PUBLISH}/${PACKAGE_NAME}" |
99 MakeDir ${PUBLISH_DIR} | 99 MakeDir ${PUBLISH_DIR} |
100 install ${START_DIR}/dosbox.html ${PUBLISH_DIR} | 100 install ${START_DIR}/dosbox.html ${PUBLISH_DIR} |
101 install ${START_DIR}/dosbox.nmf ${PUBLISH_DIR} | 101 install ${START_DIR}/dosbox.nmf ${PUBLISH_DIR} |
102 install ${DOSBOX_BUILD}/src/dosbox \ | 102 install ${DOSBOX_BUILD}/src/dosbox \ |
103 ${PUBLISH_DIR}/dosbox_x86-${NACL_PACKAGES_BITSIZE}.nexe | 103 ${PUBLISH_DIR}/dosbox_${NACL_ARCH}.nexe |
104 DefaultTouchStep | 104 DefaultTouchStep |
105 } | 105 } |
106 | 106 |
107 CustomPackageInstall() { | 107 CustomPackageInstall() { |
108 DefaultPreInstallStep | 108 DefaultPreInstallStep |
109 DefaultDownloadStep | 109 DefaultDownloadStep |
110 DefaultExtractStep | 110 DefaultExtractStep |
111 DefaultPatchStep | 111 DefaultPatchStep |
112 CustomConfigureStep | 112 CustomConfigureStep |
113 DefaultBuildStep | 113 DefaultBuildStep |
114 if [ ${NACL_PACKAGES_BITSIZE} == "pnacl" ] ; then | 114 if [ ${NACL_ARCH} = "pnacl" ] ; then |
115 DefaultTranslateStep ${PACKAGE_NAME} ${PACKAGE_NAME}-build/src/dosbox | 115 DefaultTranslateStep ${PACKAGE_NAME} ${PACKAGE_NAME}-build/src/dosbox |
116 fi | 116 fi |
117 CustomInstallStep | 117 CustomInstallStep |
118 DefaultCleanUpStep | 118 DefaultCleanUpStep |
119 } | 119 } |
120 | 120 |
121 CustomPackageInstall | 121 CustomPackageInstall |
122 exit 0 | 122 exit 0 |
OLD | NEW |