summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 32 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 21270ce1df8f..6a56bafac9d8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,48 @@
+# Maintainer: pingplug <pingplug@foxmail.com>
+# Contributor: Schala Zeal <schalaalexiazeal@gmail.com>
+
pkgname=mingw-w64-librsvg
-pkgver=2.40.16
-pkgrel=2
+pkgver=2.42.2
+pkgrel=1
pkgdesc="A SVG viewing library (mingw-w64)"
arch=(any)
-url="https://live.gnome.org/LibRsvg"
+url="https://wiki.gnome.org/action/show/Projects/LibRsvg"
license=("LGPL")
makedepends=(mingw-w64-configure gdk-pixbuf2 intltool setconf)
depends=(mingw-w64-gdk-pixbuf2 mingw-w64-pango mingw-w64-libcroco)
options=(staticlibs !strip !buildflags)
-source=("http://ftp.gnome.org/pub/gnome/sources/librsvg/${pkgver%.*}/librsvg-$pkgver.tar.xz")
-sha256sums=('d48bcf6b03fa98f07df10332fb49d8c010786ddca6ab34cbba217684f533ff2e')
+source=("https://download.gnome.org/sources/librsvg/${pkgver%.*}/librsvg-$pkgver.tar.xz"
+ "configure-fix.patch"
+ "makefile-fix.patch")
+sha256sums=('0c550a0bffef768a436286116c03d9f6cd3f97f5021c13e7f093b550fac12562'
+ 'bfdeb5e47a473994e4bc17c52c3482fbb0c07a34e36a0752f826e7084f012f26'
+ 'f8479f7497abad01e0df81a93ed495e578c3adaf0f612e2c78a90177188b42b1')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+prepare() {
+ cd ${srcdir}
+ # fix wrong target in rust
+ patch -Np0 -i configure-fix.patch
+
+ cd "${srcdir}/librsvg-${pkgver}"
+ autoreconf
+
+ cd ${srcdir}
+ # fix the name of rust static libaray
+ # fix the way to link rust static libaray
+ patch -Np0 -i makefile-fix.patch
+}
+
build() {
- cd librsvg-$pkgver
- CXXFLAGS+=" -D_POSIX_SOURCE"
- CFLAGS+=" -D_POSIX_SOURCE"
+ cd "${srcdir}/librsvg-${pkgver}"
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
${_arch}-configure \
- --disable-introspection
- setconf Makefile AM_CFLAGS '-fno-common'
+ --disable-introspection \
+ --disable-tools
+ # pass static rust package to linker
+ sed -i "s/^deplibs_check_method=.*/deplibs_check_method=\"pass_all\"/g" libtool
make
popd
done
@@ -34,5 +55,6 @@ package() {
find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
+ rm -r "$pkgdir/usr/${_arch}/share/doc"
done
}