ffmpeg-kit/scripts/android/rubberband.sh

27 lines
1.1 KiB
Bash
Raw Normal View History

2020-08-05 03:53:02 +03:00
#!/bin/bash
2020-11-23 00:51:45 +02:00
# ALWAYS CLEAN THE PREVIOUS BUILD
2020-08-05 03:53:02 +03:00
make distclean 2>/dev/null 1>/dev/null
2020-11-23 00:51:45 +02:00
# WORKAROUND TO DISABLE OPTIONAL FEATURES MANUALLY, SINCE ./configure DOES NOT PROVIDE OPTIONS FOR THEM
overwrite_file "${BASEDIR}"/tools/patch/make/rubberband/configure.ac "${BASEDIR}"/src/"${LIB_NAME}"/configure.ac || return 1
overwrite_file "${BASEDIR}"/tools/patch/make/rubberband/Makefile.android.in "${BASEDIR}"/src/"${LIB_NAME}"/Makefile.in || return 1
2020-08-05 03:53:02 +03:00
2020-11-23 00:51:45 +02:00
# WORKAROUND TO FIX PACKAGE CONFIG FILE DEPENDENCIES
overwrite_file "${BASEDIR}"/tools/patch/make/rubberband/rubberband.pc.in "${BASEDIR}"/src/"${LIB_NAME}"/rubberband.pc.in || return 1
${SED_INLINE} 's/%DEPENDENCIES%/sndfile, samplerate/g' "${BASEDIR}"/src/"${LIB_NAME}"/rubberband.pc.in || return 1
2020-08-05 03:53:02 +03:00
2020-11-23 00:51:45 +02:00
# ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS
autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1
2020-08-05 03:53:02 +03:00
./configure \
2020-11-23 00:51:45 +02:00
--prefix="${LIB_INSTALL_PREFIX}" \
--host="${HOST}" || return 1
2020-08-05 03:53:02 +03:00
2020-11-23 00:51:45 +02:00
make AR="$AR" -j$(get_cpu_count) || return 1
2020-08-05 03:53:02 +03:00
2020-11-23 00:51:45 +02:00
make install || return 1
2020-08-05 03:53:02 +03:00
# MANUALLY COPY PKG-CONFIG FILES
2020-11-23 00:51:45 +02:00
cp ./*.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1