summaryrefslogtreecommitdiff
path: root/libsavitar
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-01-15 20:59:10 +0100
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-01-18 10:15:05 +0100
commit4373712345010e5420145874ab8696268bb6c0d1 (patch)
treedbfa72f8a1a5a417e39a0b90e4ea53066eccc5c9 /libsavitar
parent5905e8e12426785e76820ffa24033379d4d13295 (diff)
downloadarchlinuxewe-4373712345010e5420145874ab8696268bb6c0d1.tar.xz
libsavitar new
Diffstat (limited to 'libsavitar')
-rw-r--r--libsavitar/PKGBUILD42
-rw-r--r--libsavitar/use_system_pugixml.patch22
2 files changed, 64 insertions, 0 deletions
diff --git a/libsavitar/PKGBUILD b/libsavitar/PKGBUILD
new file mode 100644
index 000000000..fe7a60c7a
--- /dev/null
+++ b/libsavitar/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Jelle van der Waa <jelle@archlinux.org>
+# Contributor: neodarz <neodarz@neodarz.net>
+
+pkgname=libsavitar
+pkgver=4.13.0
+pkgrel=1
+pkgdesc="C++ implementation of 3mf loading with SIP python bindings"
+arch=('x86_64')
+url="https://github.com/Ultimaker/libsavitar"
+license=('AGPL')
+depends=('python' 'pugixml')
+makedepends=('cmake' 'python-sip4' 'sip4')
+source=($pkgname-$pkgver.tar.gz::https://github.com/Ultimaker/libSavitar//archive/${pkgver}.tar.gz use_system_pugixml.patch)
+sha512sums=('a446131c0bbcc34e55c093032af823b9750797f06297bea9fd4d64838e793811e71679a1f6ae99be9fc9382a23e8763140147c7a6eea0a310f6f2d40b53be3bf'
+ 'b312dcf43bf334001da98da93388da99731eacf417fe3a9dff51831bdd1f0ab5487377925bebce05e227533be2680b1a45f3203b0a7b9de9a77280a206ec7b26')
+
+prepare() {
+ cd "libSavitar-${pkgver}"
+ sed -i 's,DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages,DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
+ sed -i 's,DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages/cura),DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/cura),g' CMakeLists.txt
+
+ # don't install a second system pugixml; WONTFIX upstream due to:
+ # "It's been decided that an external dependency makes setting up your
+ # development environment for Cura needlessly difficult."
+ patch -Np1 -i "$srcdir"/use_system_pugixml.patch
+}
+
+build() {
+ cd "libSavitar-${pkgver}"
+ mkdir build && cd build
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package() {
+ cd "libSavitar-${pkgver}/build"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/libsavitar/use_system_pugixml.patch b/libsavitar/use_system_pugixml.patch
new file mode 100644
index 000000000..841c016df
--- /dev/null
+++ b/libsavitar/use_system_pugixml.patch
@@ -0,0 +1,22 @@
+From b76fcd6da723cc725f2703d6c1b82b954a1bd03a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gabriel=20F=C3=A9ron?= <feron.gabriel@gmail.com>
+Date: Tue, 18 Jun 2019 22:45:17 +0200
+Subject: [PATCH] Don't build pugixml
+
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index eecd5e9..7ec2b2b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,8 +15,6 @@ if(BUILD_TESTS)
+ find_package(Threads QUIET)
+ endif()
+
+-add_subdirectory(pugixml)
+-
+ if(BUILD_PYTHON)
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+
+--
+2.21.0
+