From 54e8257252708f1515227944654897eac2e98640 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 18 Dec 2021 15:10:23 +0100 Subject: [PATCH] librsvg: instead of using cygpath try to override the prefix when fetching the gdk-pixbuf paths setting the new prefix is actually a bug fix, which doesn't fix our weird path translation problem, but it allows us to set MSYS2_ARG_CONV_EXCL to preserve the prefix in unix form. --- ...ss-prefix-to-pkg-config-when-retriev.patch | 32 +++++++++++++++++++ mingw-w64-librsvg/0005-hack-unixy-paths.patch | 12 ------- mingw-w64-librsvg/PKGBUILD | 10 +++--- 3 files changed, 38 insertions(+), 16 deletions(-) create mode 100644 mingw-w64-librsvg/0001-configure-set-pass-prefix-to-pkg-config-when-retriev.patch delete mode 100644 mingw-w64-librsvg/0005-hack-unixy-paths.patch diff --git a/mingw-w64-librsvg/0001-configure-set-pass-prefix-to-pkg-config-when-retriev.patch b/mingw-w64-librsvg/0001-configure-set-pass-prefix-to-pkg-config-when-retriev.patch new file mode 100644 index 0000000000000..2cd06dfdd3713 --- /dev/null +++ b/mingw-w64-librsvg/0001-configure-set-pass-prefix-to-pkg-config-when-retriev.patch @@ -0,0 +1,32 @@ +From f539faa31f32b240ad414cfb566bb343be148508 Mon Sep 17 00:00:00 2001 +From: Christoph Reiter +Date: Sat, 18 Dec 2021 13:25:40 +0100 +Subject: [PATCH] configure: set pass prefix to pkg-config when retrieving + paths + +Otherwise we get back paths for the installed prefix and not the one +we want to install to. +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d06baf3b..20267fd9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -193,9 +193,9 @@ AS_IF([test "x$enable_pixbuf_loader" = "xyes"], [ + + # First try the standalone gdk-pixbuf + gdk_pixbuf_binary_version="`$PKG_CONFIG --variable=gdk_pixbuf_binary_version gdk-pixbuf-2.0`" +- gdk_pixbuf_binarydir="`$PKG_CONFIG --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0`" +- gdk_pixbuf_moduledir=`$PKG_CONFIG --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0` +- gdk_pixbuf_cache_file=`$PKG_CONFIG --variable gdk_pixbuf_cache_file gdk-pixbuf-2.0` ++ gdk_pixbuf_binarydir="`$PKG_CONFIG "--define-variable=prefix=$prefix" --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0`" ++ gdk_pixbuf_moduledir="`$PKG_CONFIG "--define-variable=prefix=$prefix" --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0`" ++ gdk_pixbuf_cache_file="`$PKG_CONFIG "--define-variable=prefix=$prefix" --variable gdk_pixbuf_cache_file gdk-pixbuf-2.0`" + ]) + + AC_SUBST([gdk_pixbuf_binary_version]) +-- +2.34.1 + diff --git a/mingw-w64-librsvg/0005-hack-unixy-paths.patch b/mingw-w64-librsvg/0005-hack-unixy-paths.patch deleted file mode 100644 index 469553c347a51..0000000000000 --- a/mingw-w64-librsvg/0005-hack-unixy-paths.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- librsvg-2.52.2/configure.ac.orig 2021-10-25 20:30:12.514119000 +0200 -+++ librsvg-2.52.2/configure.ac 2021-10-25 20:31:46.363107600 +0200 -@@ -184,6 +184,9 @@ - gdk_pixbuf_binarydir="`$PKG_CONFIG --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0`" - gdk_pixbuf_moduledir=`$PKG_CONFIG --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0` - gdk_pixbuf_cache_file=`$PKG_CONFIG --variable gdk_pixbuf_cache_file gdk-pixbuf-2.0` -+ gdk_pixbuf_binarydir=`cygpath -u $gdk_pixbuf_binarydir` -+ gdk_pixbuf_moduledir=`cygpath -u $gdk_pixbuf_moduledir` -+ gdk_pixbuf_cache_file=`cygpath -u $gdk_pixbuf_cache_file` - ]) - - AC_SUBST([gdk_pixbuf_binary_version]) diff --git a/mingw-w64-librsvg/PKGBUILD b/mingw-w64-librsvg/PKGBUILD index 57ae4c45fb449..cb97de130929d 100644 --- a/mingw-w64-librsvg/PKGBUILD +++ b/mingw-w64-librsvg/PKGBUILD @@ -4,7 +4,7 @@ _realname=librsvg pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.52.5 -pkgrel=1 +pkgrel=2 pkgdesc="SVG rendering library (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64') @@ -22,14 +22,14 @@ depends=("${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2" optdepends=("${MINGW_PACKAGE_PREFIX}-gtk3: for rsvg-view-3") options=('staticlibs' 'strip') source=("https://download.gnome.org/sources/librsvg/${pkgver%.*}/${_realname}-${pkgver}.tar.xz" - "0005-hack-unixy-paths.patch") + "0001-configure-set-pass-prefix-to-pkg-config-when-retriev.patch") sha256sums=('407cbbab518137ea18a3f3220bea180fbee75f3e5bd6ba10a7a862c1a6f74d82' - '8f77800142cbd51c8d19b4f601ebc35bbcbb5e8a3b3ffb445013ed52b5b27b32') + '189eec6486c9ef6cf1071af9750405bc41e16ae3a55ad663435e574369fec915') prepare() { cd "${srcdir}/${_realname}-${pkgver}" - patch -p1 -i "${srcdir}/0005-hack-unixy-paths.patch" + patch -p1 -i "${srcdir}/0001-configure-set-pass-prefix-to-pkg-config-when-retriev.patch" autoreconf -fiv } @@ -45,6 +45,8 @@ build() { # an argument passed to glib-mkenums starts with a c++ comment export MSYS2_ARG_CONV_EXCL="/*" + # so the unix path gets preserved when passed through pkg-config + MSYS2_ARG_CONV_EXCL="$MSYS2_ARG_CONV_EXCL;--define-variable=prefix" ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \