Skip to content

Commit d8ca7ef

Browse files
Update glib fixes for iconv and libintl. both now provide pkg-config, can be found using 'dependency'
1 parent 0f98b60 commit d8ca7ef

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

3rdparty/packages/FixGlibSource.sh

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
SRC=$1/meson.build
4-
THIRDPARTY_LIBDIR=$2/lib
5-
THIRDPARTY_LIBDIR_SLASH_ESCAPED="${THIRDPARTY_LIBDIR//\//\\\/}\/"
3+
MESON_BUILD_FILE=$1/meson.build
4+
ANDROID_ABI_LEVEL=$2
65

7-
ANDROID_ABI_LEVEL=$3
8-
9-
echo "Before patching: "
10-
grep "find_library('iconv'" $SRC
11-
sed -i "s/find_library('iconv')/find_library('iconv', dirs: '${THIRDPARTY_LIBDIR_SLASH_ESCAPED}')/g" $SRC
12-
13-
echo ""
14-
echo "After patching: "
15-
grep "find_library('iconv'" $SRC
6+
sed -i "s/cc.find_library('iconv')/dependency('iconv')/g" $MESON_BUILD_FILE
167

8+
sed -i "s/cc.find_library('intl'/dependency('intl'/g" $MESON_BUILD_FILE
179

1810
if [ "${ANDROID_ABI_LEVEL}" -lt "21" ]; then
19-
echo "Patching $SRC to not use stpcpy. Meson detects it, however it is not avail."
20-
sed -i "s/glib_conf.set('HAVE_STPCPY', 1)/#glib_conf.set('HAVE_STPCPY', 1)/g" $SRC
11+
echo "Patching $MESON_BUILD_FILE to not use stpcpy. Meson detects it, however it is not avail."
12+
sed -i "s/glib_conf.set('HAVE_STPCPY', 1)/#glib_conf.set('HAVE_STPCPY', 1)/g" $MESON_BUILD_FILE
2113
fi

3rdparty/packages/glib-2.0.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ ExternalProjectMeson(glib-2.0
1010
UPDATE_COMMAND
1111
${CMAKE_CURRENT_SOURCE_DIR}/packages/FixGlibSource.sh
1212
${CMAKE_CURRENT_BINARY_DIR}/glib-2.0-prefix/src/glib-2.0/
13-
${THIRDPARTY_PREFIX}
1413
${ANDROID_NATIVE_API_LEVEL}
1514
)

0 commit comments

Comments
 (0)