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-snes-1.53.sh | 7 # nacl-snes-1.53.sh |
8 # | 8 # |
9 # Usage: nacl-snes-1.53.sh | 9 # Usage: nacl-snes-1.53.sh |
10 # | 10 # |
11 # This script downloads, patches, and builds an snes9x-based SNES emulator for | 11 # This script downloads, patches, and builds an snes9x-based SNES emulator for |
12 # Native Client. | 12 # Native Client. |
13 | 13 |
14 readonly URL='http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/s
nes9x-1.53-src.tar.bz2' | 14 readonly URL='http://commondatastorage.googleapis.com/nativeclient-mirror/nacl/s
nes9x-1.53-src.tar.bz2' |
15 #readonly URL='https://sites.google.com/site/bearoso/snes9x/snes9x-1.53-src.tar.
bz2?attredirects=0&d=1' | 15 #readonly URL='https://sites.google.com/site/bearoso/snes9x/snes9x-1.53-src.tar.
bz2?attredirects=0&d=1' |
16 readonly PATCH_FILE=nacl-snes-1.53.patch | 16 readonly PATCH_FILE=nacl-snes-1.53.patch |
17 PACKAGE_NAME=snes9x-1.53 | 17 PACKAGE_NAME=snes9x-1.53 |
18 | 18 |
19 source ../../../build_tools/common.sh | 19 source ../../../build_tools/common.sh |
20 | 20 |
21 DOSBOX_EXAMPLE_DIR=${NACL_SRC}/examples/games/snes9x-1.53 | 21 DOSBOX_EXAMPLE_DIR=${NACL_SRC}/examples/games/snes9x-1.53 |
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 export CXXFLAGS="-I${NACL_SDK_ROOT}/include" | 29 export CXXFLAGS="${NACLPORTS_CFLAGS} -I${NACL_SDK_ROOT}/include" |
30 export LDFLAGS="" | 30 export LDFLAGS="${NACLPORTS_LDFLAGS}" |
31 if [ ${NACL_ARCH} = "pnacl" ] ; then | 31 if [ ${NACL_ARCH} = "pnacl" ] ; then |
32 export CXXFLAGS="-O3 -g" | 32 export CXXFLAGS="${NACLPORTS_CFLAGS} -O3 -g" |
33 export LDFLAGS="-O0 -static" | 33 export LDFLAGS="${NACLPORTS_LDFLAGS} -O0 -static" |
34 fi | 34 fi |
35 export AR=${NACLAR} | 35 export AR=${NACLAR} |
36 export RANLIB=${NACLRANLIB} | 36 export RANLIB=${NACLRANLIB} |
37 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig | 37 export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig |
38 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} | 38 export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR} |
39 | 39 |
40 CONFIG_FLAGS="--host=nacl \ | 40 CONFIG_FLAGS="--host=nacl \ |
41 --prefix=${NACL_SDK_USR} \ | 41 --prefix=${NACLPORTS_PREFIX} \ |
42 --exec-prefix=${NACL_SDK_USR} \ | 42 --exec-prefix=${NACLPORTS_PREFIX} \ |
43 --libdir=${NACL_SDK_USR_LIB} \ | 43 --libdir=${NACLPORTS_LIBDIR} \ |
44 --oldincludedir=${NACL_SDK_USR_INCLUDE} \ | 44 --oldincludedir=${NACLPORTS_INCLUDE} \ |
45 --disable-gamepad \ | 45 --disable-gamepad \ |
46 --disable-gzip \ | 46 --disable-gzip \ |
47 --disable-zip \ | 47 --disable-zip \ |
48 --disable-jma \ | 48 --disable-jma \ |
49 --disable-screenshot \ | 49 --disable-screenshot \ |
50 --disable-netplay \ | 50 --disable-netplay \ |
51 --without-x \ | 51 --without-x \ |
52 --enable-sound" | 52 --enable-sound" |
53 | 53 |
54 export LIBS="-L${NACL_SDK_USR_LIB} \ | 54 export LIBS="-L${NACLPORTS_LIBDIR} \ |
55 -lnacl-mounts -lppapi_cpp -lppapi \ | 55 -lnacl-mounts -lppapi_cpp -lppapi \ |
56 -lpthread -lstdc++" | 56 -lpthread -lstdc++" |
57 | 57 |
58 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}-src/unix | 58 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}-src/unix |
59 cp -f ${START_DIR}/pepper.cpp . | 59 cp -f ${START_DIR}/pepper.cpp . |
60 cp -f ${START_DIR}/nacl.h . | 60 cp -f ${START_DIR}/nacl.h . |
61 cp -f ${START_DIR}/nacl.cpp . | 61 cp -f ${START_DIR}/nacl.cpp . |
62 cp -f ${START_DIR}/event_queue.h . | 62 cp -f ${START_DIR}/event_queue.h . |
63 autoconf && ./configure ${CONFIG_FLAGS} | 63 autoconf && ./configure ${CONFIG_FLAGS} |
64 } | 64 } |
(...skipping 21 matching lines...) Expand all Loading... |
86 if [ ${NACL_ARCH} = "pnacl" ] ; then | 86 if [ ${NACL_ARCH} = "pnacl" ] ; then |
87 # NOTE: snes9x has unusual dirnames | 87 # NOTE: snes9x has unusual dirnames |
88 DefaultTranslateStep ${PACKAGE_NAME}-src unix/snes9x | 88 DefaultTranslateStep ${PACKAGE_NAME}-src unix/snes9x |
89 fi | 89 fi |
90 CustomInstallStep | 90 CustomInstallStep |
91 DefaultCleanUpStep | 91 DefaultCleanUpStep |
92 } | 92 } |
93 | 93 |
94 CustomPackageInstall | 94 CustomPackageInstall |
95 exit 0 | 95 exit 0 |
OLD | NEW |