| OLD | NEW |
| 1 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2013 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="git git-remote-http git-remote-https" | 5 EXECUTABLES="git git-remote-http git-remote-https" |
| 6 | 6 |
| 7 BUILD_DIR=${SRC_DIR} | 7 BUILD_DIR=${SRC_DIR} |
| 8 export EXTLIBS="${NACL_CLI_MAIN_LIB}" | |
| 9 | 8 |
| 10 if [ "${NACL_SHARED}" != "1" ]; then | 9 if [ "${NACL_SHARED}" != "1" ]; then |
| 11 # These are needed so that the configure can detect libcurl when statically | 10 # These are needed so that the configure can detect libcurl when statically |
| 12 # linked. | 11 # linked. |
| 13 NACLPORTS_LIBS+=" -lcurl -lssl -lcrypto -lz" | 12 NACLPORTS_LIBS+=" -lcurl -lssl -lcrypto -lz" |
| 14 fi | 13 fi |
| 15 | 14 |
| 16 if [ ${OS_NAME} = "Darwin" ]; then | 15 if [ ${OS_NAME} = "Darwin" ]; then |
| 17 # gettext (msgfmt) doesn't exist on darwin by default. homebrew installs | 16 # gettext (msgfmt) doesn't exist on darwin by default. homebrew installs |
| 18 # it to /usr/local/opt/gettext, and we need it to be in the PATH when | 17 # it to /usr/local/opt/gettext, and we need it to be in the PATH when |
| 19 # building git | 18 # building git |
| 20 export PATH=${PATH}:/usr/local/opt/gettext/bin | 19 export PATH=${PATH}:/usr/local/opt/gettext/bin |
| 21 fi | 20 fi |
| 22 | 21 |
| 23 if [ "${NACL_LIBC}" = "newlib" ]; then | 22 if [ "${NACL_LIBC}" = "newlib" ]; then |
| 24 export NO_RT_LIBRARY=1 | 23 export NO_RT_LIBRARY=1 |
| 25 EXTLIBS+=" -lglibc-compat" | |
| 26 fi | 24 fi |
| 27 export CROSS_COMPILE=1 | 25 export CROSS_COMPILE=1 |
| 28 export NEEDS_CRYPTO_WITH_SSL=YesPlease | 26 export NEEDS_CRYPTO_WITH_SSL=YesPlease |
| 29 | 27 |
| 28 EnableCliMain |
| 30 EnableGlibcCompat | 29 EnableGlibcCompat |
| 31 | 30 |
| 32 ConfigureStep() { | 31 ConfigureStep() { |
| 33 NACLPORTS_CPPFLAGS+=" -Dpipe=nacl_spawn_pipe" | 32 NACLPORTS_CPPFLAGS+=" -Dpipe=nacl_spawn_pipe" |
| 34 autoconf | 33 autoconf |
| 35 | 34 |
| 36 if [ "${NACL_LIBC}" = "glibc" ]; then | 35 if [ "${NACL_LIBC}" = "glibc" ]; then |
| 37 # Because libcrypto.a needs dlsym we need to add this explicitly. | 36 # Because libcrypto.a needs dlsym we need to add this explicitly. |
| 38 # This is not normally needed when libcyrpto is a shared library. | 37 # This is not normally needed when libcyrpto is a shared library. |
| 39 NACLPORTS_LDFLAGS+=" -ldl" | 38 NACLPORTS_LIBS+=" -ldl" |
| 40 fi | 39 fi |
| 41 | 40 |
| 42 DefaultConfigureStep | 41 DefaultConfigureStep |
| 43 } | 42 } |
| 44 | 43 |
| 45 BuildStep() { | 44 BuildStep() { |
| 46 SetupCrossEnvironment | 45 SetupCrossEnvironment |
| 47 export CCLD=${CXX} | 46 export CCLD=${CXX} |
| 47 export EXTLIBS=${LIBS} |
| 48 # Git's build doesn't support building outside the source tree. | 48 # Git's build doesn't support building outside the source tree. |
| 49 # Do a clean to make rebuild after failure predictable. | 49 # Do a clean to make rebuild after failure predictable. |
| 50 LogExecute make clean | 50 LogExecute make clean |
| 51 DefaultBuildStep | 51 DefaultBuildStep |
| 52 } | 52 } |
| 53 | 53 |
| 54 InstallStep() { | 54 InstallStep() { |
| 55 SetupCrossEnvironment | 55 SetupCrossEnvironment |
| 56 export CCLD=${CXX} | 56 export CCLD=${CXX} |
| 57 export EXTLIBS=${LIBS} |
| 57 DefaultInstallStep | 58 DefaultInstallStep |
| 58 # Remove some of the git symlinks to save some space (since symlinks are | 59 # Remove some of the git symlinks to save some space (since symlinks are |
| 59 # currnely only supported via file copying). | 60 # currnely only supported via file copying). |
| 60 for f in ${DESTDIR}${PREFIX}/libexec/git-core/*; do | 61 for f in ${DESTDIR}${PREFIX}/libexec/git-core/*; do |
| 61 if [ -L $f ]; then | 62 if [ -L $f ]; then |
| 62 Remove $f | 63 Remove $f |
| 63 fi | 64 fi |
| 64 done | 65 done |
| 65 } | 66 } |
| OLD | NEW |