diff --git a/3rdparty/packages/FixGlibSource.sh b/3rdparty/packages/FixGlibSource.sh index da1943ac..b2b6637f 100755 --- a/3rdparty/packages/FixGlibSource.sh +++ b/3rdparty/packages/FixGlibSource.sh @@ -1,21 +1,13 @@ #!/usr/bin/env bash set -euo pipefail -SRC=$1/meson.build -THIRDPARTY_LIBDIR=$2/lib -THIRDPARTY_LIBDIR_SLASH_ESCAPED="${THIRDPARTY_LIBDIR//\//\\\/}\/" +MESON_BUILD_FILE=$1/meson.build +ANDROID_ABI_LEVEL=$2 -ANDROID_ABI_LEVEL=$3 - -echo "Before patching: " -grep "find_library('iconv'" $SRC -sed -i "s/find_library('iconv')/find_library('iconv', dirs: '${THIRDPARTY_LIBDIR_SLASH_ESCAPED}')/g" $SRC - -echo "" -echo "After patching: " -grep "find_library('iconv'" $SRC +sed -i "s/cc.find_library('iconv')/dependency('iconv')/g" $MESON_BUILD_FILE +sed -i "s/cc.find_library('intl'/dependency('intl'/g" $MESON_BUILD_FILE if [ "${ANDROID_ABI_LEVEL}" -lt "21" ]; then - echo "Patching $SRC to not use stpcpy. Meson detects it, however it is not avail." - sed -i "s/glib_conf.set('HAVE_STPCPY', 1)/#glib_conf.set('HAVE_STPCPY', 1)/g" $SRC + echo "Patching $MESON_BUILD_FILE to not use stpcpy. Meson detects it, however it is not avail." + sed -i "s/glib_conf.set('HAVE_STPCPY', 1)/#glib_conf.set('HAVE_STPCPY', 1)/g" $MESON_BUILD_FILE fi diff --git a/3rdparty/packages/glib-2.0.cmake b/3rdparty/packages/glib-2.0.cmake index fa84fad2..473f4498 100644 --- a/3rdparty/packages/glib-2.0.cmake +++ b/3rdparty/packages/glib-2.0.cmake @@ -10,6 +10,5 @@ ExternalProjectMeson(glib-2.0 UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/packages/FixGlibSource.sh ${CMAKE_CURRENT_BINARY_DIR}/glib-2.0-prefix/src/glib-2.0/ - ${THIRDPARTY_PREFIX} ${ANDROID_NATIVE_API_LEVEL} )