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

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

Issue 132343007: Add top level build script for building packages. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 6 years, 11 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 | « ports/crypto_ext/build.sh ('k') | ports/dosbox/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 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2013 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 source pkg_info
7 source ../../build_tools/common.sh
8 6
9 export ac_cv_func_gethostbyname=yes 7 export ac_cv_func_gethostbyname=yes
10 export ac_cv_func_getaddrinfo=no 8 export ac_cv_func_getaddrinfo=no
11 export ac_cv_func_connect=yes 9 export ac_cv_func_connect=yes
12 export LIBS="-lnacl_io -lpthread -l${NACL_CPP_LIB}" 10 export LIBS="-lnacl_io -lpthread -l${NACL_CPP_LIB}"
13 11
14 if [ $NACL_GLIBC = 1 ]; then 12 if [ $NACL_GLIBC = 1 ]; then
15 EXECUTABLE_DIR=.libs 13 EXECUTABLE_DIR=.libs
16 else 14 else
17 EXECUTABLE_DIR=. 15 EXECUTABLE_DIR=.
18 fi 16 fi
19 17
20 EXECUTABLES=src/${EXECUTABLE_DIR}/curl${NACL_EXEEXT} 18 EXECUTABLES=src/${EXECUTABLE_DIR}/curl${NACL_EXEEXT}
21 CFLAGS+=" -DDEBUGBUILD" 19 CFLAGS+=" -DDEBUGBUILD"
22 #EXTRA_CONFIGURE_ARGS="--enable-debug --disable-curldebug" 20 #EXTRA_CONFIGURE_ARGS="--enable-debug --disable-curldebug"
23 21
24 BuildStep() { 22 BuildStep() {
25 # Run the build twice, initially to build the sel_ldr version 23 # Run the build twice, initially to build the sel_ldr version
26 # and secondly to build the PPAPI version based on nacl_io. 24 # and secondly to build the PPAPI version based on nacl_io.
27 # Touch tool_main.c to ensure that it gets rebuilt each time. 25 # Touch tool_main.c to ensure that it gets rebuilt each time.
28 # This is the only file that depends on the PPAPI define and 26 # This is the only file that depends on the PPAPI define and
29 # therefore will differ between PPAPI and sel_ldr versions. 27 # therefore will differ between PPAPI and sel_ldr versions.
30 local SRC_DIR=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_DIR}
31 if [ -f ${SRC_DIR}/src/tool_main.c ]; then 28 if [ -f ${SRC_DIR}/src/tool_main.c ]; then
32 touch ${SRC_DIR}/src/tool_main.c 29 touch ${SRC_DIR}/src/tool_main.c
33 fi 30 fi
34 DefaultBuildStep 31 DefaultBuildStep
35 32
36 Banner "Build curl_ppapi" 33 Banner "Build curl_ppapi"
37 touch ${SRC_DIR}/src/tool_main.c 34 touch ${SRC_DIR}/src/tool_main.c
38 sed -i.bak "s/CFLAGS = /CFLAGS = -DPPAPI /" src/Makefile 35 sed -i.bak "s/CFLAGS = /CFLAGS = -DPPAPI /" src/Makefile
39 sed -i.bak "s/curl\$(EXEEXT)/curl_ppapi\$(EXEEXT)/" src/Makefile 36 sed -i.bak "s/curl\$(EXEEXT)/curl_ppapi\$(EXEEXT)/" src/Makefile
40 local sedlibs="-lppapi_simple -lnacl_io -lppapi_cpp -lppapi -l${NACL_CPP_LIB}" 37 local sedlibs="-lppapi_simple -lnacl_io -lppapi_cpp -lppapi -l${NACL_CPP_LIB}"
(...skipping 29 matching lines...) Expand all
70 LogExecute python ${NACL_SDK_ROOT}/tools/create_nmf.py \ 67 LogExecute python ${NACL_SDK_ROOT}/tools/create_nmf.py \
71 ${PUBLISH_DIR}/curl_ppapi*${NACL_EXEEXT} \ 68 ${PUBLISH_DIR}/curl_ppapi*${NACL_EXEEXT} \
72 -s ${PUBLISH_DIR} \ 69 -s ${PUBLISH_DIR} \
73 -o curl.nmf 70 -o curl.nmf
74 71
75 InstallNaClTerm ${PUBLISH_DIR} 72 InstallNaClTerm ${PUBLISH_DIR}
76 LogExecute cp ${START_DIR}/index.html ${PUBLISH_DIR} 73 LogExecute cp ${START_DIR}/index.html ${PUBLISH_DIR}
77 LogExecute cp ${START_DIR}/curl.js ${PUBLISH_DIR} 74 LogExecute cp ${START_DIR}/curl.js ${PUBLISH_DIR}
78 LogExecute cp curl.nmf ${PUBLISH_DIR} 75 LogExecute cp curl.nmf ${PUBLISH_DIR}
79 } 76 }
80
81 PackageInstall
82 exit 0
OLDNEW
« no previous file with comments | « ports/crypto_ext/build.sh ('k') | ports/dosbox/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698