summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFabioLolix2024-03-09 23:12:54 +0100
committerFabioLolix2024-03-09 23:12:54 +0100
commit2a8113d71f047d70cd2695c77a75800d7a9099ec (patch)
treeac2cd2641e0bcdfafc42c9a89d97747650c93e60 /PKGBUILD
parent2cdd80791b7d7b231b5e693bafca37e6e1bb67d7 (diff)
downloadaur-resvg-git.tar.gz
revision
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD68
1 files changed, 33 insertions, 35 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8ada701a5825..6fa7fe63f912 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,8 @@
+
+
_pkgname=resvg
pkgname=${_pkgname}-git
-pkgver=0.9.0.r11.ge207cc3
+pkgver=0.40.0.r3.g25fd2503
pkgrel=1
pkgdesc='SVG rendering library and CLI'
arch=(i686 x86_64)
@@ -10,68 +12,64 @@ depends=(gdk-pixbuf2)
optdepends=(
'qt5-base: For the Qt backend'
'cairo: For the cairo backend'
- 'kio: For the dolphin thumbnailer'
+ 'kio5: For the dolphin thumbnailer'
)
-makedepends=(cargo qt5-base qt5-tools kio cairo pango git cmake extra-cmake-modules)
+makedepends=(cargo qt5-base qt5-tools kio5 cairo pango git cmake extra-cmake-modules)
conflicts=($_pkgname)
provides=($_pkgname)
source=("git+${url}.git#branch=master")
sha256sums=('SKIP')
pkgver() {
- cd "${srcdir}/${_pkgname}"
+ cd "resvg"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}
+prepare() {
+ cd "resvg"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+ mkdir -p tools/kde-dolphin-thumbnailer/build
+}
+
build() {
- cd "${srcdir}/${_pkgname}"
- for dir in capi tools/{render,u}svg; do
- (
- msg2 "Building $dir"
- cd "$dir"
- if grep -q cairo-backend Cargo.toml; then
- cargo build --release --features='qt-backend cairo-backend'
- else
- cargo build --release
- fi
- )
- done
+ cd "resvg"
+
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --workspace --frozen --release --all-features
+
(
- msg2 "Building tools/viewsvg"
cd tools/viewsvg
qmake PREFIX="$pkgdir/usr"
make
)
+
(
- msg2 "Building tools/kde-dolphin-thumbnailer"
- cd tools/kde-dolphin-thumbnailer
- mkdir -p build
- cd build
+ cd tools/kde-dolphin-thumbnailer/build
cmake .. \
+ -Wno-dev \
-DCMAKE_CXX_FLAGS="-L../../../target/release" \
-DCMAKE_INSTALL_PREFIX="$pkgdir/$(qtpaths --install-prefix)" \
-DQT_PLUGIN_INSTALL_DIR="$pkgdir/$(qtpaths --plugin-dir)" \
-DCMAKE_BUILD_TYPE=Release
make
)
-
- msg2 'Building docs'
+
cargo doc --release --no-deps -p resvg-capi
}
+check() {
+ cd "resvg"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
+}
+
package() {
- cd "${srcdir}/${_pkgname}"
-
- for tool in {render,u}svg; do
- install -Dm755 target/release/$tool "$pkgdir/usr/bin/$tool"
- done
- install -Dm755 tools/viewsvg/viewsvg "$pkgdir/usr/bin/viewsvg"
- (
- cd tools/kde-dolphin-thumbnailer/build
- make install
- )
- install -Dm755 target/release/libresvg.so "$pkgdir/usr/lib/libresvg.so"
- install -Dm644 capi/include/resvg.h "$pkgdir/usr/include/resvg.h"
+ cd "resvg"
+ install -Dm755 -t "$pkgdir/usr/bin/" target/release/{resvg,usvg} tools/viewsvg/viewsvg
+ make -C tools/kde-dolphin-thumbnailer/build install
+ install -Dm755 -t "$pkgdir/usr/lib/" target/release/libresvg.so
+ install -Dm644 -t "$pkgdir/usr/include/" crates/c-api/*.h
install -d "$pkgdir/usr/share/doc/resvg"
cp -r target/doc/* "$pkgdir/usr/share/doc/resvg"
}