archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / lib32-librsvg / trunk / PKGBUILD
blobbdc08f59974959af4902c2b146b041c1dafbae43
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Maxime Gauduin <alucryd@archlinux.org>
3 # Contributor: jtts <jussaar@mbnet.fi>
4 # Contributor: Jan de Groot <jgc@archlinux.org>
6 pkgname=lib32-librsvg
7 pkgver=2.56.0
8 pkgrel=1
9 epoch=2
10 pkgdesc="SVG rendering library (32-bit)"
11 url="https://wiki.gnome.org/Projects/LibRsvg"
12 arch=(x86_64)
13 license=(LGPL)
14 depends=(
15   lib32-cairo
16   lib32-freetype2
17   lib32-gdk-pixbuf2
18   lib32-glib2
19   lib32-harfbuzz
20   lib32-libxml2
21   lib32-pango
22   librsvg
24 makedepends=(
25   git
26   gobject-introspection
27   lib32-rust-libs
28   rust
30 checkdepends=(ttf-dejavu)
31 _commit=b831e077174ae608d8cd09e532fc0e7ce1fe5c4f  # tags/2.56.0^0
32 source=("git+https://gitlab.gnome.org/GNOME/librsvg.git#commit=$_commit"
33         multilib.diff)
34 sha256sums=('SKIP'
35             'f9e033a5dd6d08aeb90672f25ab8853bc4bb5fa4c21119c32a77bf5eb37bd4a3')
37 pkgver() {
38   cd librsvg
39   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
42 prepare() {
43   cd librsvg
45   # Hack to remove docs and cross-compile rust only
46   git apply -3 ../multilib.diff
48   NOCONFIGURE=1 ./autogen.sh
51 # Use LTO
52 export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
54 # Use debug
55 export CARGO_PROFILE_RELEASE_DEBUG=2
57 build() {
58   cd librsvg
60   export CC='gcc -m32'
61   export CXX='g++ -m32'
62   export PKG_CONFIG=i686-pc-linux-gnu-pkg-config
63   export RUST_TARGET=i686-unknown-linux-gnu
65   ./configure --prefix=/usr --disable-static --disable-vala \
66     --disable-introspection --libdir=/usr/lib32
67   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
68   make
71 check() {
72   # Test suite is very dependent on the versions of
73   # Cairo, Pango, FreeType and HarfBuzz
74   make -C librsvg check || :
77 package() {
78   provides=(librsvg-${pkgver%%.*}.so)
80   make -C librsvg DESTDIR="$pkgdir" install
82   rm -r "$pkgdir"/usr/{bin,include,share}
85 # vim:set sw=2 sts=-1 et: