93 lines
1.9 KiB
Bash
93 lines
1.9 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
|
# Maintainer: Fabian Bornschein <fabiscafe@archlinux.org>
|
|
# Contributor: Jan de Groot <jgc@archlinux.org>
|
|
|
|
pkgbase=librsvg
|
|
pkgname=(
|
|
librsvg
|
|
librsvg-docs
|
|
)
|
|
pkgver=2.58.2
|
|
pkgrel=1
|
|
epoch=2
|
|
pkgdesc="SVG rendering library"
|
|
url="https://wiki.gnome.org/Projects/LibRsvg"
|
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
|
license=(LGPL-2.1-or-later)
|
|
depends=(
|
|
cairo
|
|
freetype2
|
|
gcc-libs
|
|
gdk-pixbuf2
|
|
glib2
|
|
glibc
|
|
harfbuzz
|
|
libxml2
|
|
pango
|
|
)
|
|
makedepends=(
|
|
gi-docgen
|
|
git
|
|
gobject-introspection
|
|
python-docutils
|
|
rust
|
|
vala
|
|
)
|
|
checkdepends=(ttf-dejavu)
|
|
source=("git+https://gitlab.gnome.org/GNOME/librsvg.git?signed#tag=$pkgver")
|
|
b2sums=('a77ade3efef46dff529b2dcaffffaa49292b1af2f8154ff5f6caec66ccb2e32425d416fd0a4cdd5c4964fdac3684bebdf22abfd5291eeec64ad37cb7967c3554')
|
|
validpgpkeys=(
|
|
263F590F7E0FE1CB3EA274B0167637EB6FB8DCCE # Federico Mena Quintero <federico@gnome.org>
|
|
)
|
|
|
|
prepare() {
|
|
cd librsvg
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
}
|
|
|
|
# Use LTO
|
|
export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
|
|
|
|
# Use debug
|
|
export CARGO_PROFILE_RELEASE_DEBUG=2
|
|
|
|
build() {
|
|
local configure_options=(
|
|
--prefix=/usr
|
|
--disable-static
|
|
--enable-gtk-doc
|
|
--enable-vala
|
|
)
|
|
|
|
cd librsvg
|
|
./configure "${configure_options[@]}"
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
|
|
make
|
|
}
|
|
|
|
check() {
|
|
# Test suite is very dependent on the versions of
|
|
# Cairo, Pango, FreeType and HarfBuzz
|
|
# Tests need nightly features
|
|
RUSTC_BOOTSTRAP=1 make -C librsvg check || :
|
|
}
|
|
|
|
package_librsvg() {
|
|
provides=(librsvg-${pkgver%%.*}.so)
|
|
|
|
make -C librsvg DESTDIR="$pkgdir" install
|
|
|
|
mkdir -p doc/usr/share
|
|
mv {"$pkgdir",doc}/usr/share/doc
|
|
}
|
|
|
|
package_librsvg-docs() {
|
|
pkgdesc+=" (documentation)"
|
|
depends=()
|
|
|
|
mv doc/* "$pkgdir"
|
|
}
|
|
|
|
# vim:set sw=2 sts=-1 et:
|