| Index: build_tools/common.sh
|
| diff --git a/build_tools/common.sh b/build_tools/common.sh
|
| index 2c805173b3f10ea4b568cf4e7eb7c5e786de694b..a1105eb7c19ed2c05d2750a528734ef85db67bc5 100644
|
| --- a/build_tools/common.sh
|
| +++ b/build_tools/common.sh
|
| @@ -178,14 +178,20 @@ InitializeNaClGccToolchain() {
|
| # NACL_SDK_GCC_SPECS_PATH is where nacl-gcc 'specs' file will be installed
|
| readonly NACL_SDK_GCC_SPECS_PATH=${NACL_TOOLCHAIN_ROOT}/lib/gcc/x86_64-nacl/4.4.3
|
|
|
| - # NACL_SDK_USR is where the headers, libraries, etc. will be installed
|
| - readonly NACL_SDK_USR=${NACL_TOOLCHAIN_ROOT}/${NACL_CROSS_PREFIX}/usr
|
| - readonly NACL_SDK_USR_INCLUDE=${NACL_SDK_USR}/include
|
| + # NACLPORTS_PREFIX is where the headers, libraries, etc. will be installed
|
| + # Default to the usr folder within the SDK.
|
| + readonly NACLPORTS_PREFIX=${NACLPORTS_PREFIX:-${NACL_TOOLCHAIN_ROOT}/${NACL_CROSS_PREFIX}/usr}
|
| + readonly NACLPORTS_INCLUDE=${NACLPORTS_PREFIX}/include
|
| readonly NACL_SDK_LIB=${NACL_TOOLCHAIN_ROOT}/${NACL_ARCH}-nacl/${NACL_LIBDIR}
|
| - readonly NACL_SDK_USR_LIB=${NACL_SDK_USR}/lib
|
| - readonly NACL_SDK_USR_BIN=${NACL_SDK_USR}/bin
|
| + readonly NACLPORTS_LIBDIR=${NACLPORTS_PREFIX}/lib
|
| + readonly NACLPORTS_PREFIX_BIN=${NACLPORTS_PREFIX}/bin
|
|
|
| - # NACL_SDK_MULITARCH_USR is a version of NACL_SDK_USR that gets passed into
|
| + readonly NACLPORTS_CFLAGS="-I${NACLPORTS_INCLUDE}"
|
| + readonly NACLPORTS_LDFLAGS="-L${NACLPORTS_LIBDIR}"
|
| + export CFLAGS=${NACLPORTS_CFLAGS}
|
| + export LDFLAGS=${NACLPORTS_LDFLAGS}
|
| +
|
| + # NACL_SDK_MULITARCH_USR is a version of NACLPORTS_PREFIX that gets passed into
|
| # the gcc specs file. It has a gcc spec-file conditional for ${NACL_ARCH}
|
| readonly NACL_SDK_MULTIARCH_USR=${NACL_TOOLCHAIN_ROOT}/\%\(nacl_arch\)/usr
|
| readonly NACL_SDK_MULTIARCH_USR_INCLUDE=${NACL_SDK_MULTIARCH_USR}/include
|
| @@ -223,12 +229,12 @@ InitializePNaClToolchain() {
|
| # (used only by the cairo package)
|
| export NACLSTRINGS="$(which strings)"
|
|
|
| - # NACL_SDK_USR is where the headers, libraries, etc. will be installed
|
| + # NACLPORTS_PREFIX is where the headers, libraries, etc. will be installed
|
| # FIXME:
|
| - readonly NACL_SDK_USR=${NACL_SDK_BASE}/usr
|
| - readonly NACL_SDK_USR_INCLUDE=${NACL_SDK_USR}/include
|
| - readonly NACL_SDK_USR_LIB=${NACL_SDK_USR}/lib
|
| - readonly NACL_SDK_USR_BIN=${NACL_SDK_USR}/bin
|
| + readonly NACLPORTS_PREFIX=${NACL_SDK_BASE}/usr
|
| + readonly NACLPORTS_INCLUDE=${NACLPORTS_PREFIX}/include
|
| + readonly NACLPORTS_LIBDIR=${NACLPORTS_PREFIX}/lib
|
| + readonly NACLPORTS_PREFIX_BIN=${NACLPORTS_PREFIX}/bin
|
| }
|
|
|
| if [ ${NACL_ARCH} = "pnacl" ] ; then
|
| @@ -446,9 +452,9 @@ PatchSpecFile() {
|
|
|
| DefaultPreInstallStep() {
|
| cd ${NACL_NATIVE_CLIENT_SDK}/..
|
| - MakeDir ${NACL_SDK_USR}
|
| - MakeDir ${NACL_SDK_USR_INCLUDE}
|
| - MakeDir ${NACL_SDK_USR_LIB}
|
| + MakeDir ${NACLPORTS_PREFIX}
|
| + MakeDir ${NACLPORTS_INCLUDE}
|
| + MakeDir ${NACLPORTS_LIBDIR}
|
| MakeDir ${NACL_PACKAGES_REPOSITORY}
|
| MakeDir ${NACL_PACKAGES_TARBALLS}
|
| MakeDir ${NACL_PACKAGES_PUBLISH}
|
| @@ -515,9 +521,9 @@ DefaultConfigureStep() {
|
| export CXX=${NACLCXX}
|
| export AR=${NACLAR}
|
| export RANLIB=${NACLRANLIB}
|
| - export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig
|
| - export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB}
|
| - export FREETYPE_CONFIG=${NACL_SDK_USR_BIN}/freetype-config
|
| + export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig
|
| + export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR}
|
| + export FREETYPE_CONFIG=${NACLPORTS_PREFIX_BIN}/freetype-config
|
| export PATH=${NACL_BIN_PATH}:${PATH};
|
| ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}
|
| Remove ${PACKAGE_NAME}-build
|
| @@ -536,10 +542,10 @@ DefaultConfigureStep() {
|
| ../configure \
|
| --host=${conf_host} \
|
| --disable-shared \
|
| - --prefix=${NACL_SDK_USR} \
|
| - --exec-prefix=${NACL_SDK_USR} \
|
| - --libdir=${NACL_SDK_USR_LIB} \
|
| - --oldincludedir=${NACL_SDK_USR_INCLUDE} \
|
| + --prefix=${NACLPORTS_PREFIX} \
|
| + --exec-prefix=${NACLPORTS_PREFIX} \
|
| + --libdir=${NACLPORTS_LIBDIR} \
|
| + --oldincludedir=${NACLPORTS_INCLUDE} \
|
| --with-http=off \
|
| --with-html=off \
|
| --with-ftp=off \
|
|
|