build.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. cd source
  3. chmod +x configure install-sh
  4. EXTRA_OPTS=""
  5. if [[ ${HOST} =~ .*darwin.* ]]; then
  6. EXTRA_OPTS="--enable-rpath"
  7. # TODO :: Fix this libtool cross-compilation bug
  8. export CC=$(dirname $(which ${CC}))/clang
  9. export CXX=$(dirname $(which ${CXX}))/clang++
  10. elif [[ ${HOST} =~ .*linux.* ]]; then
  11. # TODO :: This is a hack until we make it so that strong run-exports in requirements/build cause those
  12. # packages to be installed ino the host prefix during the build. This hack will not work for
  13. # real cross-compilation!
  14. export LD_LIBRARY_PATH=${PREFIX}/${HOST}/lib:${LD_LIBRARY_PATH}
  15. fi
  16. ./configure --prefix="${PREFIX}" \
  17. --build=${BUILD} \
  18. --host=${HOST} \
  19. --disable-samples \
  20. --disable-extras \
  21. --disable-layout \
  22. --disable-tests \
  23. --enable-static \
  24. "${EXTRA_OPTS}"
  25. make -j${CPU_COUNT} ${VERBOSE_CM}
  26. make check
  27. make install
  28. rm -rf ${PREFIX}/sbin