diff --git a/lib/build.sh b/lib/build.sh index 5155586..7152902 100644 --- a/lib/build.sh +++ b/lib/build.sh @@ -608,10 +608,21 @@ sanitize_sysroot_libs() { for lib in "${libs[@]}"; do local libPath="${LIBDIR}/${lib}" - local useLib="${libPath}.${USE_LIB_SUFF}" + local foundLib=false - if [[ ! -f ${useLib} ]]; then - echo_fail "could not find ${useLib}, something is wrong" + for useLib in "${libPath}"*"${USE_LIB_SUFF}"; do + test -f "${useLib}" || continue + foundLib=true + # darwin sometimes fails to set rpath correctly + if is_darwin && [[ ${STATIC} == 'OFF' ]]; then + install_name_tool \ + -id "${useLib}" \ + "${useLib}" || return 1 + fi + done + + if [[ ${foundLib} == false ]]; then + echo_fail "could not find ${libPath}*${USE_LIB_SUFF}, something is wrong" return 1 fi @@ -957,7 +968,7 @@ build_libvpx() { --enable-vp8 \ --enable-vp9 \ --enable-vp9-highbitdepth \ - --enable-better-hw-compatability \ + --enable-better-hw-compatibility \ --enable-webm-io \ --enable-libyuv || return 1 sanitize_sysroot_libs libvpx || return 1 diff --git a/lib/encode.sh b/lib/encode.sh index a38d4e4..cea603b 100644 --- a/lib/encode.sh +++ b/lib/encode.sh @@ -447,7 +447,7 @@ gen_encode_script() { echo 'ffmpeg "${ffmpegParams[@]}" -dolbyvision 0 "${OUTPUT}" || exit 1' # track-stats and clear title - if [[ ${FILE_EXT} == 'mkv' ]]; then + if [[ ${FILE_EXT} == 'mkv' ]] && has_cmd mkvpropedit; then { echo echo 'mkvpropedit "${OUTPUT}" --add-track-statistics-tags'