Skip to content

Commit

Permalink
librsvg: instead of using cygpath try to override the prefix when fet…
Browse files Browse the repository at this point in the history
…ching 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.
  • Loading branch information
lazka committed Dec 18, 2021
1 parent 516e413 commit 54e8257
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From f539faa31f32b240ad414cfb566bb343be148508 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <[email protected]>
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

12 changes: 0 additions & 12 deletions mingw-w64-librsvg/0005-hack-unixy-paths.patch

This file was deleted.

10 changes: 6 additions & 4 deletions mingw-w64-librsvg/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
}
Expand All @@ -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} \
Expand Down

0 comments on commit 54e8257

Please sign in to comment.