You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
731 B

1 year ago
  1. if [ -f "${LIB_DIR}/libiconv.a" ]; then
  2. echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
  3. exit 0
  4. fi
  5. ICONV_DIR="${TMP_DIR}/libiconv"
  6. if [ ! -d "${ICONV_DIR}" ]; then
  7. git clone -b "v1.16_without_lib_prefix_defines" https://gitea.pep.foundation/buff/libiconv.git
  8. fi
  9. pushd "${ICONV_DIR}"
  10. export LDFLAGS="-arch ${ARCH}"
  11. export CC="$(xcrun --sdk ${SDK} -f clang) -arch ${ARCH} -isysroot ${SDK_PATH}"
  12. PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="${CURRENT_LIB_DIR}/lib/pkgconfig" ./configure --host=${HOST} --prefix=${CURRENT_LIB_DIR} --enable-static=yes --enable-shared=no
  13. make clean
  14. make -j4
  15. make install
  16. unset CFLAGS
  17. unset LDFLAGS
  18. unset CC
  19. popd