2019-04-29 21:18:18 +10:00
|
|
|
# Description: SVG rendering library with cairo backend
|
2020-01-10 23:20:02 +11:00
|
|
|
# URL: https://wiki.gnome.org/Projects/LibRsvg
|
2019-04-29 21:18:18 +10:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2021-09-19 15:13:34 +10:00
|
|
|
# Depends on: brotli gdk-pixbuf pango rust
|
2022-05-31 22:21:12 +02:00
|
|
|
# Optional: clang graphite2 lld sccache
|
2019-04-29 21:18:18 +10:00
|
|
|
|
|
|
|
name=librsvg
|
2022-10-09 13:12:02 +02:00
|
|
|
version=2.55.1
|
2019-04-29 21:18:18 +10:00
|
|
|
release=1
|
|
|
|
source=(https://download.gnome.org/sources/$name/${version%.*}/$name-$version.tar.xz)
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $name-$version
|
|
|
|
|
2020-01-10 23:20:02 +11:00
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
|
|
|
|
2021-10-10 00:13:28 +11:00
|
|
|
export RUSTFLAGS+=' -C link-arg=-flto=thin'
|
2021-10-10 00:17:58 +11:00
|
|
|
prt-get isinst lld && export LD=ld.lld LDFLAGS+=' -Wl,-fuse-ld=lld' RUSTFLAGS+=' -C link-arg=-fuse-ld=lld'
|
2021-10-10 00:13:28 +11:00
|
|
|
prt-get isinst clang && export CC='clang' CXX='clang++' AR='llvm-ar' NM='llvm-nm' RANLIB='llvm-ranlib' \
|
|
|
|
CFLAGS+=' -flto=thin' CXXFLAGS+=' -flto=thin' LDFLAGS+=' -Wl,-flto=thin'
|
|
|
|
|
2021-09-19 15:13:34 +10:00
|
|
|
# causes segfault if set
|
2021-09-18 14:22:49 +02:00
|
|
|
unset __GL_NO_DSO_FINALIZER
|
|
|
|
|
2019-04-29 21:18:18 +10:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2019-10-15 18:43:55 +11:00
|
|
|
--disable-gtk-doc \
|
2021-09-18 14:22:49 +02:00
|
|
|
--disable-tools \
|
|
|
|
--disable-debug \
|
2021-09-19 15:13:34 +10:00
|
|
|
--disable-nls \
|
|
|
|
--enable-pixbuf-loader
|
2019-04-29 21:18:18 +10:00
|
|
|
|
|
|
|
make
|
|
|
|
make DESTDIR=$PKG install
|
|
|
|
|
2022-05-31 22:21:12 +02:00
|
|
|
rm -r $PKG/usr/share/doc
|
2019-04-29 21:18:18 +10:00
|
|
|
}
|