From 8092f93a4d4a549128cbe8a0c299a1cff17be577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Mon, 17 May 2021 00:36:28 +0100 Subject: [PATCH] [Glib] Our libiconv now has a pkg-config file --- G/Glib/build_tarballs.jl | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/G/Glib/build_tarballs.jl b/G/Glib/build_tarballs.jl index b0ed191d12b..5da8e3ab746 100644 --- a/G/Glib/build_tarballs.jl +++ b/G/Glib/build_tarballs.jl @@ -13,15 +13,8 @@ sources = [ # Bash recipe for building across all platforms script = raw""" cd $WORKSPACE/srcdir/glib-*/ -# Tell meson where to find libintl.h -SED_SCRIPT=(-e "s?c_args = \[]?c_args = ['-I${includedir}']?") -# We need to link to iconv, but ninja doesn't know how to do that as libiconv -# doesn't have a pkgconfig file. Let's give meson a tip. Note: on PowerPC the -# cross-file has already entries for `c_link_args`, so we have to append. -if [[ "${target}" == powerpc64le-* ]]; then - SED_SCRIPT+=(-e "s?c_link_args = \[\(.*\)]?c_link_args = [\1, '-liconv']?") -elif [[ "${target}" == *-freebsd* ]]; then - SED_SCRIPT+=(-e "s?c_link_args = \[]?c_link_args = ['-L${libdir}', '-liconv']?") + +if [[ "${target}" == *-freebsd* ]]; then # Our FreeBSD libc has `environ` as undefined symbol, so the linker will # complain if this symbol is used in the built library, even if this won't # be a problem at runtim. This flag allows having undefined symbols. @@ -33,11 +26,10 @@ elif [[ "${target}" == *-freebsd* ]]; then # Don't fail if getxattr is not available. The code is already ready # for this case with some small configure changes. atomic_patch -p1 ../patches/freebsd-have_xattr.patch -else - SED_SCRIPT+=(-e "s?c_link_args = \[]?c_link_args = ['-liconv']?") fi -sed -i "${SED_SCRIPT[@]}" \ +# Tell meson where to find libintl.h +sed -i "s?c_args = \[]?c_args = ['-I${includedir}']?" \ "${MESON_TARGET_TOOLCHAIN}" mkdir build_glib && cd build_glib