From aecd085a9152fcae794c62b483c09bb7b02d12a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Tue, 26 Jan 2021 15:36:17 -0300 Subject: [PATCH] wxWidgets-gtk3: fix some cross builds. Projects that include use wx-config to get flags for where it's located. For example, "-I /usr/armv7l-linux-musleabihf/lib/wx/include/gtk3-unicode-3.0". Unfortunately, wx-config uses libdir from the native package, /usr/lib$host_wordsize, which breaks cross builds for targets with different word sizes. Fix this by changing "lib$wordsize" to "lib". Fixes #27495 --- srcpkgs/wxWidgets-gtk3/template | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/srcpkgs/wxWidgets-gtk3/template b/srcpkgs/wxWidgets-gtk3/template index 1081bc8853d..7847442b405 100644 --- a/srcpkgs/wxWidgets-gtk3/template +++ b/srcpkgs/wxWidgets-gtk3/template @@ -1,7 +1,7 @@ # Template file for 'wxWidgets-gtk3' pkgname=wxWidgets-gtk3 version=3.0.5.1 -revision=3 +revision=4 wrksrc="wxWidgets-${version}" build_style=gnu-configure configure_args="--with-gtk=3 --enable-unicode --with-opengl --with-sdl @@ -34,11 +34,12 @@ post_install() { ln -sf ../lib/wx/config/${_config} ${DESTDIR}/usr/bin/wx-config-gtk3 # - ignore --host option; breaks configure scripts when # cross compiling (isn’t necessary in our case anyway) - sed -i -e '/^libdir="\/usr/s,/usr,${exec_prefix},' \ + vsed -i -e '/^libdir="\/usr/s,/usr,${exec_prefix},' \ -e '/^bindir="\/usr/s,/usr,${exec_prefix},' \ -e 's/is_cross().*/is_cross() { false; }/g' \ -e '/--\*=\*)/i --host=\*) continue;;' \ - $DESTDIR/usr/lib/wx/config/gtk3-unicode-3.0 + -e "s/lib${XBPS_WORDSIZE}/lib/g" \ + $DESTDIR/usr/lib/wx/config/${_config} } wxWidgets-common_package() {