Merge pull request #10359 from lazka/librsvg-new-hack

librsvg: instead of using cygpath try to override the prefix when fetching the gdk-pixbuf paths
This commit is contained in:
Christoph Reiter
2021-12-18 16:02:52 +01:00
committed by GitHub
3 changed files with 38 additions and 16 deletions

View File

@@ -0,0 +1,32 @@
From f539faa31f32b240ad414cfb566bb343be148508 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
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

View File

@@ -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])

View File

@@ -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} \