archrelease: copy trunk to community-any
[ArchLinux/community.git] / pdfslicer / repos / community-x86_64 / PKGBUILD
blobaed5f06efc7b24b6d8f724618a5fed0222a0dee5
1 # Maintainer: Balló György <ballogyor+arch at gmail dot com>
3 pkgname=pdfslicer
4 pkgver=1.8.8
5 pkgrel=2
6 pkgdesc='Simple application to extract, merge, rotate and reorder pages of PDF documents'
7 arch=('x86_64')
8 url='https://junrrein.github.io/pdfslicer/'
9 license=('GPL3')
10 depends=('gtkmm3' 'poppler' 'qpdf')
11 makedepends=('cmake' 'git' 'intltool' 'ninja')
12 _commit=c843e4b5bff170d920aaf36debd454d11ac6e03b  # tags/v1.8.8
13 source=("git+https://github.com/junrrein/pdfslicer.git#commit=$_commit"
14         "git+https://github.com/ericniebler/range-v3.git"
15         "git+https://github.com/Microsoft/GSL.git"
16         "git+https://github.com/fmtlib/fmt.git"
17         qpdf-11.diff
18         catch2_fix.diff)
19 sha256sums=('SKIP'
20             'SKIP'
21             'SKIP'
22             'SKIP'
23             'SKIP'
24             'SKIP')
26 pkgver() {
27   cd $pkgname
28   git describe --tags | sed 's/^v//;s/-/+/g'
31 prepare() {
32   cd $pkgname
33   git submodule init
34   git submodule set-url third-party/range-v3 "$srcdir/range-v3"
35   git submodule set-url third-party/GSL "$srcdir/GSL"
36   git submodule set-url third-party/fmtlib "$srcdir/fmt"
37   git submodule update
39   patch -Np1 -i ../qpdf-11.diff
40   # https://patch-diff.githubusercontent.com/raw/prusa3d/PrusaSlicer/pull/6518.patch
41   patch -Np1 -i ../catch2_fix.diff
44 build() {
45   cmake -S $pkgname -B build -G Ninja -DCMAKE_INSTALL_PREFIX='/usr'
46   cmake --build build
49 package() {
50   DESTDIR="$pkgdir" cmake --install build
51   rm -r "$pkgdir"/usr/{include,lib}