librsvg: Update to 2.40.2. Build with introspection. Fix dependencies.

This commit is contained in:
Alexpux
2014-04-18 10:26:07 +04:00
parent 19d0f47da5
commit e85e60d68a
3 changed files with 48 additions and 38 deletions

View File

@@ -3,43 +3,51 @@
_realname=librsvg
_mingw_suff=mingw-w64-${CARCH}
pkgname="${_mingw_suff}-${_realname}"
pkgver=2.40.1
pkgver=2.40.2
pkgrel=1
pkgdesc="A SVG viewing library (mingw-w64)"
arch=(any)
url="https://live.gnome.org/LibRsvg"
license=("LGPL")
makedepends=("${_mingw_suff}-gcc" "${_mingw_suff}-pkg-config" "${_mingw_suff}-gdk-pixbuf2" "setconf")
depends=("${_mingw_suff}-crt" "${_mingw_suff}-gdk-pixbuf2" "${_mingw_suff}-pango" "${_mingw_suff}-libcroco")
makedepends=("${_mingw_suff}-gcc"
"${_mingw_suff}-pkg-config"
"${_mingw_suff}-gdk-pixbuf2"
"${_mingw_suff}-gobject-introspection"
"setconf")
depends=("${_mingw_suff}-gdk-pixbuf2" "${_mingw_suff}-pango" "${_mingw_suff}-libcroco")
optdepends=("${_mingw_suff}-gtk3: for rsvg-view-3")
options=('staticlibs' 'strip')
source=("http://ftp.gnome.org/pub/gnome/sources/librsvg/${pkgver%.*}/${_realname}-$pkgver.tar.xz"
"realpath.c"
"rsvg-base.diff")
sha256sums=('8813b4fe776d5e7acbce28bacbaed30ccb0cec3734eb3632c711a16ebe2961d7'
"realpath.c"
"rsvg-base.diff"
give-cc-to-gir-scanner.mingw.patch)
sha256sums=('48049b643294636df7de1a4b997414d699666f5dc44776945c218a257d2a291c'
'fbc045170a622463ff2094a0fcedcf0c9f8f3d47b01d633e6ebe71b004ded4ce'
'6370818eb1a4000d9e70acf995152f3337e362903e4c82e962d51e0a2766ff04')
'1d96928913c3d3dca17f7d1340c3643c4a9f1466d2c3d6c9a444ee2ed12c906e'
'854f36c9bc1ad0f3a85ca2ec4e8b5c7d75ba035c45ad4915601210acf0321776')
prepare() {
cd "$srcdir/${_realname}-$pkgver"
cp "$srcdir/realpath.c" .
patch -Np0 -i "$srcdir/rsvg-base.diff"
patch -p1 -i "$srcdir/give-cc-to-gir-scanner.mingw.patch"
}
build() {
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
"${srcdir}"/${_realname}-$pkgver/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--disable-introspection \
--disable-tools
setconf Makefile AM_CFLAGS '-fno-common'
make
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
"${srcdir}"/${_realname}-$pkgver/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--enable-introspection \
--disable-tools
setconf Makefile AM_CFLAGS '-fno-common'
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR="$pkgdir" install
rm -r "${pkgdir}${MINGW_PREFIX}/share"
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR="$pkgdir" install
#rm -r "${pkgdir}${MINGW_PREFIX}/share"
}

View File

@@ -0,0 +1,20 @@
--- librsvg-2.40.2/Makefile.am.orig 2014-04-17 01:22:10.962400000 +0400
+++ librsvg-2.40.2/Makefile.am 2014-04-17 01:23:09.634000000 +0400
@@ -214,6 +214,8 @@
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = Rsvg-@RSVG_API_VERSION@.gir
+INTROSPECTION_SCANNER_ENV = \
+ CC="$(CC)"
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --symbol-prefix=rsvg --symbol-prefix=librsvg
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
@@ -238,7 +238,7 @@
pango \
libxml-2.0 \
$(NULL)
-Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_builddir) -DRSVG_COMPILATION
+Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_builddir) $(LIBRSVG_CFLAGS) -DRSVG_COMPILATION
Rsvg_@RSVG_API_VERSION_U@_gir_LIBS = librsvg-@RSVG_API_MAJOR_VERSION@.la
Rsvg_@RSVG_API_VERSION_U@_gir_SCANNERFLAGS = --c-include="librsvg/rsvg.h"

View File

@@ -8,21 +8,3 @@
/*
* This is configurable at runtime
@@ -2191,7 +2192,7 @@
g_object_unref (base);
/* FIXME portability */
- cdir = canonicalize_file_name (dir);
+ cdir = realpath(dir, NULL);
g_free (dir);
if (cdir == NULL)
goto deny;
@@ -2201,7 +2202,7 @@
goto deny;
/* FIXME portability */
- cpath = canonicalize_file_name (path);
+ cpath = realpath(path, NULL);
g_free (path);
if (cpath == NULL)