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

Side by Side Diff: ports/pkg/build.sh

Issue 1417223003: Switch from using 'nacl_main' to 'main' entry point (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « ports/perl/nacl.patch ('k') | ports/python/build.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 # Copyright 2015 The Native Client Authors. All rights reserved. 1 # Copyright 2015 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 EXECUTABLES="src/pkg${NACL_EXEEXT}" 5 EXECUTABLES="src/pkg${NACL_EXEEXT}"
6 export LIBS+="-lbsd ${NACL_CLI_MAIN_LIB} -pthread" 6 NACLPORTS_LIBS+=" -lbsd -pthread"
7 7
8 EXTRA_CONFIGURE_ARGS+=" --prefix=/usr --exec-prefix=/usr" 8 EXTRA_CONFIGURE_ARGS+=" --prefix=/usr --exec-prefix=/usr"
9 NACLPORTS_CFLAGS+=" -Dmain=nacl_main"
10 9
11 if [ "${NACL_SHARED}" = "1" ]; then 10 if [ "${NACL_SHARED}" = "1" ]; then
12 LIBS+=" -lresolv -ldl -lrt" 11 NACLPORTS_LIBS+=" -lresolv -ldl -lrt"
13 EXECUTABLES+=" src/pkg-static${NACL_EXEEXT}" 12 EXECUTABLES+=" src/pkg-static${NACL_EXEEXT}"
14 EXTRA_CONFIGURE_ARGS+=" --enable-shared=yes --with-staticonly=no" 13 EXTRA_CONFIGURE_ARGS+=" --enable-shared=yes --with-staticonly=no"
15 NACLPORTS_CPPFLAGS+=" -D_GNU_SOURCE" 14 NACLPORTS_CPPFLAGS+=" -D_GNU_SOURCE"
16 else 15 else
17 EXTRA_CONFIGURE_ARGS+=" --enable-shared=no --with-staticonly=yes" 16 EXTRA_CONFIGURE_ARGS+=" --enable-shared=no --with-staticonly=yes"
18 fi 17 fi
19 18
19 EnableCliMain
20 EnableGlibcCompat 20 EnableGlibcCompat
21 21
22 ConfigureStep() { 22 ConfigureStep() {
23 ChangeDir ${SRC_DIR} 23 ChangeDir ${SRC_DIR}
24 ./autogen.sh 24 ./autogen.sh
25 PatchConfigure 25 PatchConfigure
26 ChangeDir ${BUILD_DIR} 26 ChangeDir ${BUILD_DIR}
27 DefaultConfigureStep 27 DefaultConfigureStep
28 } 28 }
29 29
(...skipping 11 matching lines...) Expand all
41 LDFLAGS+=" -L${libbsd_install}/usr/local/lib" 41 LDFLAGS+=" -L${libbsd_install}/usr/local/lib"
42 42
43 cd ${HOST_BUILD_DIR} 43 cd ${HOST_BUILD_DIR}
44 LogExecute ${SRC_DIR}/configure 44 LogExecute ${SRC_DIR}/configure
45 LogExecute make -j${OS_JOBS} 45 LogExecute make -j${OS_JOBS}
46 cd - 46 cd -
47 fi 47 fi
48 } 48 }
49 49
50 BuildStep() { 50 BuildStep() {
51 (unset LIBS && BuildHost) 51 (BuildHost)
52 DefaultBuildStep 52 DefaultBuildStep
53 if [ "${NACL_SHARED}" = "0" ]; then 53 if [ "${NACL_SHARED}" = "0" ]; then
54 LogExecute mv src/pkg-static${NACL_EXEEXT} src/pkg${NACL_EXEEXT} 54 LogExecute mv src/pkg-static${NACL_EXEEXT} src/pkg${NACL_EXEEXT}
55 fi 55 fi
56 } 56 }
57 57
58 TestStep() { 58 TestStep() {
59 if [[ ${TOOLCHAIN} = pnacl ]]; then 59 if [[ ${TOOLCHAIN} = pnacl ]]; then
60 return 60 return
61 fi 61 fi
62 if [[ ${NACL_SHARED} = 1 ]]; then 62 if [[ ${NACL_SHARED} = 1 ]]; then
63 LogExecute ${BUILD_DIR}/src/pkg-static -v 63 LogExecute ${BUILD_DIR}/src/pkg-static -v
64 else 64 else
65 LogExecute ${BUILD_DIR}/src/pkg -v 65 LogExecute ${BUILD_DIR}/src/pkg -v
66 fi 66 fi
67 } 67 }
68 68
69 InstallStep() { 69 InstallStep() {
70 DefaultInstallStep 70 DefaultInstallStep
71 LogExecute mv ${DESTDIR}/usr ${DESTDIR}/${PREFIX} 71 LogExecute mv ${DESTDIR}/usr ${DESTDIR}/${PREFIX}
72 if [ "${NACL_SHARED}" = "0" ]; then 72 if [ "${NACL_SHARED}" = "0" ]; then
73 LogExecute mv ${DESTDIR}/${PREFIX}/sbin/pkg-static${NACL_EXEEXT}\ 73 LogExecute mv ${DESTDIR}/${PREFIX}/sbin/pkg-static${NACL_EXEEXT}\
74 ${DESTDIR}/${PREFIX}/sbin/pkg${NACL_EXEEXT} 74 ${DESTDIR}/${PREFIX}/sbin/pkg${NACL_EXEEXT}
75 fi 75 fi
76 } 76 }
77 77
78 PublishStep() { 78 PublishStep() {
79 PublishMultiArch src/pkg-static${NACL_EXEEXT} pkg 79 PublishMultiArch src/pkg-static${NACL_EXEEXT} pkg
80 } 80 }
OLDNEW
« no previous file with comments | « ports/perl/nacl.patch ('k') | ports/python/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698