#!/bin/mkpkg # description: SVG rendering library with gdk-pixbuf loader # url: https://gitlab.gnome.org/GNOME/librsvg name=librsvg version=2.62.4 release=1 depends=(cairo pango glib libxml2 gdk-pixbuf libunwind) makedeps=(meson rust cargo-c cargo-audit python3) source=(https://github.com/GNOME/$name/archive/refs/tags/$version.tar.gz) renames=($name-$version.tar.gz) sha256sums=( "83d2689f3ab78865ef9b250eb3ec09bd18c864d91e45d66e19ff60d7becfa23e" ) patch() { export CARGO_HOME="$SRC/.cargo" cd $name-$version cargo vendor --locked ../vendor mkdir -p .cargo printf '%s\n' \ '[source.crates-io]' \ 'replace-with = "vendored-sources"' \ '' \ '[source.vendored-sources]' \ 'directory = "../vendor"' \ > .cargo/config.toml cargo audit } build() { export CARGO_HOME="$SRC/.cargo" export CARGO_NET_OFFLINE=true export CARGO_HTTP_CAINFO=/etc/ssl/cert.pem export RUSTFLAGS="-C target-feature=-crt-static" cd $name-$version # build dir must live inside the source tree: meson's cargo_wrapper.py # runs cargo from the build root, so .cargo/config.toml is found from there meson setup _build \ --prefix=/usr \ --libdir=lib \ --buildtype=plain \ --wrap-mode=nodownload \ -D pixbuf=enabled \ -D pixbuf-loader=enabled \ -D rsvg-convert=disabled \ -D avif=disabled \ -D introspection=disabled \ -D vala=disabled \ -D docs=disabled \ -D tests=false meson compile -C _build DESTDIR=$PKG meson install -C _build rm -rf $PKG/usr/share/thumbnailers } signify() { untrusted comment: public key RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 } # vim: filetype=sh