Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(835)

Side by Side Diff: examples/systems/bochs/nacl-bochs.sh

Issue 14172016: Enable glibc shared library support for zlib. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « examples/graphics/xaos/nacl-xaos.sh ('k') | examples/systems/dosbox/nacl-dosbox.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #
6 5
7 # nacl-bochs.sh 6 source pkg_info
8 # 7 source ../../../build_tools/common.sh
9 # usage: nacl-bochs.sh
10 #
11 # this script downloads, patches, and builds bochs for Native Client.
12 #
13 8
14 # Linux disk image 9 # Linux disk image
15 readonly LINUX_IMG_URL=http://commondatastorage.googleapis.com/nativeclient-mirr or/nacl/bochs-linux-img.tar.gz 10 readonly LINUX_IMG_URL=http://commondatastorage.googleapis.com/nativeclient-mirr or/nacl/bochs-linux-img.tar.gz
16 readonly LINUX_IMG_NAME=linux-img 11 readonly LINUX_IMG_NAME=linux-img
17 12
18 source pkg_info
19 source ../../../build_tools/common.sh
20
21 BOCHS_EXAMPLE_DIR=${NACL_SRC}/examples/systems/bochs 13 BOCHS_EXAMPLE_DIR=${NACL_SRC}/examples/systems/bochs
14 EXECUTABLES=bochs
22 15
23 CustomConfigureStep() { 16 CustomConfigureStep() {
24 Banner "Configuring ${PACKAGE_NAME}" 17 Banner "Configuring ${PACKAGE_NAME}"
25 # export the nacl tools 18 # export the nacl tools
26 export CC=${NACLCC} 19 export CC=${NACLCC}
27 export CXX=${NACLCXX} 20 export CXX=${NACLCXX}
28 export CXXFLAGS="-O2 -g -I${NACL_SDK_ROOT}/include" 21 export CXXFLAGS="-O2 -g -I${NACL_SDK_ROOT}/include"
29 export LDFLAGS="${NACLPORTS_LDFLAGS}" 22 export LDFLAGS="${NACLPORTS_LDFLAGS}"
30 if [ ${NACL_ARCH} = "pnacl" ] ; then 23 if [ ${NACL_ARCH} = "pnacl" ] ; then
31 export CXXFLAGS="-O3 -g -I${NACL_SDK_ROOT}/include" 24 export CXXFLAGS="-O3 -g -I${NACL_SDK_ROOT}/include"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 export LIBS="$LIBS -lnacl-mounts" 61 export LIBS="$LIBS -lnacl-mounts"
69 export LIBS="$LIBS -lpthread" 62 export LIBS="$LIBS -lpthread"
70 export LIBS="$LIBS -lppapi_cpp_COPY" 63 export LIBS="$LIBS -lppapi_cpp_COPY"
71 # TOOD(robertm): investigate why this is only necessary for pnacl 64 # TOOD(robertm): investigate why this is only necessary for pnacl
72 if [ ${NACL_ARCH} = "pnacl" ] ; then 65 if [ ${NACL_ARCH} = "pnacl" ] ; then
73 export LIBS="$LIBS -lnosys" 66 export LIBS="$LIBS -lnosys"
74 fi 67 fi
75 export LIBS="$LIBS -Wl,--end-group" 68 export LIBS="$LIBS -Wl,--end-group"
76 69
77 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} 70 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}
78 Remove ${PACKAGE_NAME}-build 71 Remove build-nacl
79 MakeDir ${PACKAGE_NAME}-build 72 MakeDir build-nacl
80 cd ${PACKAGE_NAME}-build 73 cd build-nacl
81 ../configure \ 74 ../configure \
82 --host=nacl \ 75 --host=nacl \
83 --disable-shared \ 76 --disable-shared \
84 --prefix=${NACLPORTS_PREFIX} \ 77 --prefix=${NACLPORTS_PREFIX} \
85 --exec-prefix=${NACLPORTS_PREFIX} \ 78 --exec-prefix=${NACLPORTS_PREFIX} \
86 --libdir=${NACLPORTS_LIBDIR} \ 79 --libdir=${NACLPORTS_LIBDIR} \
87 --oldincludedir=${NACLPORTS_INCLUDE} \ 80 --oldincludedir=${NACLPORTS_INCLUDE} \
88 --with-x=no \ 81 --with-x=no \
89 --with-x11=no \ 82 --with-x11=no \
90 --with-sdl=yes \ 83 --with-sdl=yes \
91 --with-gnu-ld 84 --with-gnu-ld
92 } 85 }
93 86
94 CustomExtractStep(){ 87 CustomExtractStep(){
95 Banner "Untaring ${PACKAGE_NAME}.tar.gz" 88 Banner "Untaring ${PACKAGE_NAME}.tar.gz"
96 ChangeDir ${NACL_PACKAGES_REPOSITORY} 89 ChangeDir ${NACL_PACKAGES_REPOSITORY}
97 Remove ${PACKAGE_NAME} 90 Remove ${PACKAGE_NAME}
98 if [ $OS_SUBDIR = "windows" ]; then 91 if [ $OS_SUBDIR = "windows" ]; then
99 tar --no-same-owner -zxf ${NACL_PACKAGES_TARBALLS}/${PACKAGE_NAME}.tar.gz 92 tar --no-same-owner -zxf ${NACL_PACKAGES_TARBALLS}/${PACKAGE_NAME}.tar.gz
100 else 93 else
101 tar zxf ${NACL_PACKAGES_TARBALLS}/${PACKAGE_NAME}.tar.gz 94 tar zxf ${NACL_PACKAGES_TARBALLS}/${PACKAGE_NAME}.tar.gz
102 fi 95 fi
103 } 96 }
104 97
105 CustomInstallStep(){ 98 CustomInstallStep(){
106 BOCHS_DIR=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} 99 BOCHS_DIR=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}
107 BOCHS_BUILD=${BOCHS_DIR}/${PACKAGE_NAME}-build 100 BOCHS_BUILD=${BOCHS_DIR}/build-nacl
108 101
109 ChangeDir ${BOCHS_DIR} 102 ChangeDir ${BOCHS_DIR}
110 mkdir -p img/usr/local/share/bochs/ 103 mkdir -p img/usr/local/share/bochs/
111 cp -r ${NACL_PACKAGES_REPOSITORY}/${LINUX_IMG_NAME} img/ 104 cp -r ${NACL_PACKAGES_REPOSITORY}/${LINUX_IMG_NAME} img/
112 mv img/linux-img/bochsrc old-bochsrc 105 mv img/linux-img/bochsrc old-bochsrc
113 cp ${START_DIR}/bochsrc img/linux-img/bochsrc 106 cp ${START_DIR}/bochsrc img/linux-img/bochsrc
114 cp -r ${BOCHS_DIR}/bios/VGABIOS-lgpl-latest img/ 107 cp -r ${BOCHS_DIR}/bios/VGABIOS-lgpl-latest img/
115 cp -r ${BOCHS_DIR}/bios/BIOS-bochs-latest img/ 108 cp -r ${BOCHS_DIR}/bios/BIOS-bochs-latest img/
116 cp -r ${BOCHS_DIR}/msrs.def img/ 109 cp -r ${BOCHS_DIR}/msrs.def img/
117 cd img 110 cd img
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 191
199 CustomPackageInstall() { 192 CustomPackageInstall() {
200 GameGetStep ${LINUX_IMG_URL} ${LINUX_IMG_NAME} 193 GameGetStep ${LINUX_IMG_URL} ${LINUX_IMG_NAME}
201 DefaultPreInstallStep 194 DefaultPreInstallStep
202 CustomDownloadStep2 ${URL} ${PACKAGE_NAME} \ 195 CustomDownloadStep2 ${URL} ${PACKAGE_NAME} \
203 ${BOCHS_EXAMPLE_DIR}/bochs-2.4.6.sha1 196 ${BOCHS_EXAMPLE_DIR}/bochs-2.4.6.sha1
204 DefaultExtractStep 197 DefaultExtractStep
205 CustomPatchStep 198 CustomPatchStep
206 CustomConfigureStep 199 CustomConfigureStep
207 DefaultBuildStep 200 DefaultBuildStep
208 if [ ${NACL_ARCH} = "pnacl" ] ; then 201 DefaultTranslateStep
209 DefaultTranslateStep ${PACKAGE_NAME} ${PACKAGE_NAME}-build/bochs 202 DefaultValidateStep
210 fi
211 CustomInstallStep 203 CustomInstallStep
212 DefaultCleanUpStep 204 DefaultCleanUpStep
213 } 205 }
214 206
215 CustomPackageInstall 207 CustomPackageInstall
216 exit 0 208 exit 0
OLDNEW
« no previous file with comments | « examples/graphics/xaos/nacl-xaos.sh ('k') | examples/systems/dosbox/nacl-dosbox.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698