# Maintainer: Natanael Copa pkgname=inkscape pkgver=1.3 _pkgdate=2023-07-21 _pkgcommit=0e150ed6c4 pkgrel=0 pkgdesc="Vector-based drawing program - svg compliant" url="https://inkscape.org/" arch="all" license="GPL-2.0-or-later AND LGPL-2.1-or-later" depends=" adwaita-icon-theme desktop-file-utils py3-cssselect py3-lxml py3-numpy " makedepends=" boost-dev cmake dbus-dev font-dejavu gc-dev graphicsmagick-dev gtkmm3-dev gspell-dev lcms2-dev lib2geom-dev libcdr-dev libjpeg-turbo-dev libsoup-dev libtool libvisio-dev libxml2-dev libxslt-dev perl poppler-dev popt-dev potrace-dev python3-dev samurai " checkdepends=" bash gtest-dev imagemagick " subpackages=" $pkgname-dbg libinkscape_base $pkgname-doc $pkgname-tutorials::noarch $pkgname-lang $pkgname-view $pkgname-bash-completion " source="https://media.inkscape.org/dl/resources/file/inkscape-$pkgver.tar.xz page_size.patch " options="!check" # take extremely long and use absurd amounts of memory ldpath="/usr/lib/inkscape" builddir="$srcdir"/$pkgname-${pkgver}_${_pkgdate}_$_pkgcommit build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi # reduce size of debug syms CFLAGS="$CFLAGS -O2 -DNDEBUG -g1" \ CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations -O2 -DNDEBUG -g1" \ cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DBUILD_TESTING="$(want_check && echo ON || echo OFF)" \ $CMAKE_CROSSOPTS cmake --build build } check() { INKSCAPE_DATADIR="$builddir/share" \ PATH="$PATH:$PWD" ninja -C build check } package() { depends="libinkscape_base=$pkgver-r$pkgrel" DESTDIR="$pkgdir" cmake --install build } view() { pkgdesc="Viewing program for SVG files" depends="libinkscape_base=$pkgver-r$pkgrel" amove usr/bin/inkview } doc() { default_doc amove usr/share/inkscape/examples } tutorials() { depends= pkgdesc="$pkgdesc (tutorials)" amove usr/share/inkscape/tutorials } libinkscape_base() { pkgdesc="base libinkscape_base.so to share with inkview" amove usr/lib/inkscape/libinkscape_base.so* } sha512sums=" 1eb488105586bf98a51c7109ab2e23292f039e5f0e66de4d3684a73f0ab408d89ee55560517d3185370ad3f32b31cf03d149df02ba5c895fe386dd1581fcb2e8 inkscape-1.3.tar.xz c2a4b72a97b1d1a5fd5bdd3821125704095294664fa0ad8ac81c41bae0b695273a06629872414ee7e4b056f297f529af43eb264edc1695e0afe0973eb10c44fc page_size.patch "