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

Unified Diff: ports/curl/build.sh

Issue 1285953002: Switch devenv to use pkg packages (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@toolchain_install
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ports/curl/build.sh
diff --git a/ports/curl/build.sh b/ports/curl/build.sh
index 9527b5e68082a95452a52653c6285404210b6d8c..779fd39cb572dc0921813ee646dc03fc15e8b2d4 100644
--- a/ports/curl/build.sh
+++ b/ports/curl/build.sh
@@ -5,36 +5,25 @@
export ac_cv_func_gethostbyname=yes
export ac_cv_func_getaddrinfo=no
export ac_cv_func_connect=yes
-export LIBS="-lnacl_io -pthread -l${NACL_CXX_LIB}"
+export LIBS="${NACL_CLI_MAIN_LIB} -l${NACL_CXX_LIB}"
if [ "${NACL_LIBC}" = "newlib" ]; then
LIBS+=" -lglibc-compat"
fi
EXECUTABLES="src/curl${NACL_EXEEXT}"
+NACLPORTS_CPPFLAGS+=" -Dmain=nacl_main"
+
if [ "${NACL_DEBUG}" = "1" ]; then
- CFLAGS+=" -DDEBUGBUILD"
+ NACLPORTS_CPPFLAGS+=" -DDEBUGBUILD"
EXTRA_CONFIGURE_ARGS="--enable-debug --disable-curldebug"
fi
-BuildStep() {
- # Run the build twice, initially to build the sel_ldr version
- # and secondly to build the PPAPI version based on nacl_io.
- # Remove curl-tool_main.o between builds to ensure it gets
- # rebuilt. This is the only object that depends on the PPAPI
- # define and therefore will differ between PPAPI and sel_ldr
- # versions.
- Remove src/curl-tool_main.o
- DefaultBuildStep
-
- Banner "Build curl_ppapi"
- Remove src/curl-tool_main.o
- sed -i.bak "s/CFLAGS = /CFLAGS = -DPPAPI /" src/Makefile
- sed -i.bak "s/curl\$(EXEEXT)/curl_ppapi\$(EXEEXT)/" src/Makefile
- local sedlibs="-lppapi_simple,-lcli_main,-lnacl_spawn,-lnacl_io,-lppapi"
- sedlibs="-Wl,--start-group,$sedlibs,--end-group -l${NACL_CXX_LIB}"
- sed -i.bak "s/LIBS = \$(BLANK_AT_MAKETIME)/LIBS = ${sedlibs}/" src/Makefile
- DefaultBuildStep
+InstallStep() {
+ DefaultInstallStep
+ MakeDir ${DESTDIR}${PREFIX}/share/curl
+ LogExecute ${SRC_DIR}/lib/mk-ca-bundle.pl \
+ ${DESTDIR}${PREFIX}/share/curl/ca-bundle.crt
}
PublishStep() {
@@ -54,17 +43,17 @@ PublishStep() {
MakeDir ${PUBLISH_DIR}
- local exe=${PUBLISH_DIR}/curl_ppapi_${NACL_ARCH}${NACL_EXEEXT}
+ local exe=${PUBLISH_DIR}/curl_${NACL_ARCH}${NACL_EXEEXT}
- LogExecute mv src/${EXECUTABLE_DIR}/curl_ppapi${NACL_EXEEXT} ${exe}
+ LogExecute cp ${DESTDIR}${PREFIX}/share/curl/ca-bundle.crt .
+ LogExecute cp src/${EXECUTABLE_DIR}/curl${NACL_EXEEXT} ${exe}
if [ "${NACL_ARCH}" = "pnacl" ]; then
LogExecute ${PNACLFINALIZE} ${exe}
fi
pushd ${PUBLISH_DIR}
- ${SRC_DIR}/lib/mk-ca-bundle.pl
LogExecute python ${NACL_SDK_ROOT}/tools/create_nmf.py \
- ${PUBLISH_DIR}/curl_ppapi*${NACL_EXEEXT} \
+ ${PUBLISH_DIR}/curl*${NACL_EXEEXT} \
-L${DESTDIR_LIB} \
-s . \
-o curl.nmf
« no previous file with comments | « ports/coreutils/build.sh ('k') | ports/curl/nacl.patch » ('j') | ports/curl/nacl.patch » ('J')

Powered by Google App Engine
This is Rietveld 408576698