[arch-commits] Commit in lib32-librsvg/trunk (PKGBUILD multilib.diff)

Jan Steffens heftig at archlinux.org
Sat Mar 17 19:27:13 UTC 2018


    Date: Saturday, March 17, 2018 @ 19:27:12
  Author: heftig
Revision: 308972

2.42.3-1

Added:
  lib32-librsvg/trunk/multilib.diff
Modified:
  lib32-librsvg/trunk/PKGBUILD

---------------+
 PKGBUILD      |   60 +++++++++++++++++++++++++++++++++-----------------------
 multilib.diff |   47 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-03-17 19:16:43 UTC (rev 308971)
+++ PKGBUILD	2018-03-17 19:27:12 UTC (rev 308972)
@@ -4,45 +4,57 @@
 # Contributor: Jan de Groot <jgc at archlinux.org>
 
 pkgname=lib32-librsvg
-pkgver=2.40.18
+pkgver=2.42.3
 pkgrel=1
-pkgdesc='A SVG viewing library (32-bit)'
-arch=('x86_64')
-url='https://wiki.gnome.org/Projects/LibRsvg'
-license=('LGPL')
-depends=('lib32-gdk-pixbuf2' 'lib32-libcroco' 'lib32-pango' 'librsvg')
-makedepends=('gcc-multilib' 'gobject-introspection' 'intltool' 'python2' 'vala')
-source=("https://download.gnome.org/sources/librsvg/${pkgver:0:4}/librsvg-${pkgver}.tar.xz")
-sha512sums=('faf503d0d881801ce129715e7ae979ee1675bd32beac9170b1889c94aac64caf486968bc86f3480463b84e94f28c1d805551ffdcb7068ecadd0688146e0fb182')
+pkgdesc="SVG rendering library (32-bit)"
+url="https://wiki.gnome.org/Projects/LibRsvg"
+arch=(x86_64)
+license=(LGPL)
+depends=(lib32-gdk-pixbuf2 lib32-pango lib32-libcroco librsvg)
+makedepends=(intltool gobject-introspection vala python2 gtk-doc git rustup)
+_commit=ca640d1185745665c61689b71c627e1d020a80b7  # tags/2.42.3^0
+source=("git+https://gitlab.gnome.org/GNOME/librsvg.git#commit=$_commit"
+        multilib.diff)
+sha256sums=('SKIP'
+            '1f61c67a7527dbf95d47e3782b0824b6ea5c0ce27bcd8b86de07b616a9b0a33e')
 
+pkgver() {
+  cd librsvg
+  git describe --tags | sed 's/-/+/g'
+}
+
+prepare() {
+  rustup default stable
+  rustup target add i686-unknown-linux-gnu
+
+  cd librsvg
+
+  # Hack to cross-compile rust only
+  patch -Np1 -i ../multilib.diff
+
+  NOCONFIGURE=1 ./autogen.sh
+}
+
 build() {
-  cd librsvg-${pkgver}
-
   export CC='gcc -m32'
   export CXX='g++ -m32'
-  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
+  export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
 
-  ./configure \
-    --prefix='/usr' \
-    --libdir='/usr/lib32' \
-    --enable-vala \
-    --disable-static
-
+  cd librsvg
+  ./configure --prefix=/usr --disable-static --enable-vala --disable-gtk-doc --libdir=/usr/lib32
   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
-
   make
 }
 
 check() {
-  cd librsvg-$pkgver
+  cd librsvg
   make check
 }
 
 package() {
-  cd librsvg-${pkgver}
-
-  make DESTDIR="${pkgdir}" install
-  rm -rf "${pkgdir}"/{etc,usr/{bin,include,share}}
+  cd librsvg
+  make DESTDIR="$pkgdir" install
+  rm -r "$pkgdir"/usr/{bin,include,share}
 }
 
 # vim: ts=2 sw=2 et:

Added: multilib.diff
===================================================================
--- multilib.diff	                        (rev 0)
+++ multilib.diff	2018-03-17 19:27:12 UTC (rev 308972)
@@ -0,0 +1,47 @@
+ Makefile.am  | 6 ++----
+ configure.ac | 4 +---
+ 2 files changed, 3 insertions(+), 7 deletions(-)
+
+diff --git c/Makefile.am i/Makefile.am
+index a5a16220..10c4bb57 100644
+--- c/Makefile.am
++++ i/Makefile.am
+@@ -114,21 +114,19 @@ else
+ CARGO_RELEASE_ARGS=--release
+ endif
+ 
+-if CROSS_COMPILING
+-CARGO_TARGET_ARGS=--target=$(host)
+-endif
++CARGO_TARGET_ARGS=--target=i686-unknown-linux-gnu
+ 
+ CARGO_VERBOSE = $(cargo_verbose_$(V))
+ cargo_verbose_ = $(cargo_verbose_$(AM_DEFAULT_VERBOSITY))
+ cargo_verbose_0 =
+ cargo_verbose_1 = --verbose
+ 
+ RUST_LIB=@abs_top_builddir@/target/@RUST_TARGET_SUBDIR@/librsvg_internals.a
+ CARGO_TARGET_DIR=@abs_top_builddir@/target
+ 
+ check-local:
+ 	cd $(srcdir) && \
+-	CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) cargo test
++	CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) cargo test $(CARGO_VERBOSE) $(CARGO_TARGET_ARGS) $(CARGO_RELEASE_ARGS)
+ 
+ clean-local:
+ 	cd $(top_srcdir) && \
+diff --git c/configure.ac i/configure.ac
+index 2fae2362..9d4004f8 100644
+--- c/configure.ac
++++ i/configure.ac
+@@ -289,9 +289,7 @@ fi
+ AM_CONDITIONAL([DEBUG_RELEASE], [test "x$debug_release" = "xyes"])
+ 
+ AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
+-if test "x$cross_compiling" = "xyes" ; then
+-	RUST_TARGET_SUBDIR="$host/$RUST_TARGET_SUBDIR"
+-fi
++RUST_TARGET_SUBDIR="i686-unknown-linux-gnu/$RUST_TARGET_SUBDIR"
+ AC_SUBST([RUST_TARGET_SUBDIR])
+ 
+ dnl ===========================================================================



More information about the arch-commits mailing list