From 477bf828067dab0ea579b9d9dea7d50da49405af Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sat, 1 Dec 2018 04:11:06 -0200 Subject: [PATCH] New package: libSavitar-3.6.0 --- common/shlibs | 1 + srcpkgs/libSavitar-devel | 1 + srcpkgs/libSavitar-python3 | 1 + srcpkgs/libSavitar/patches/remove-rpath.patch | 16 +++++ .../libSavitar/patches/system-pugixml.patch | 72 +++++++++++++++++++ srcpkgs/libSavitar/template | 31 ++++++++ 6 files changed, 122 insertions(+) create mode 120000 srcpkgs/libSavitar-devel create mode 120000 srcpkgs/libSavitar-python3 create mode 100644 srcpkgs/libSavitar/patches/remove-rpath.patch create mode 100644 srcpkgs/libSavitar/patches/system-pugixml.patch create mode 100644 srcpkgs/libSavitar/template diff --git a/common/shlibs b/common/shlibs index 43bbb62a12..1a48ae122f 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3341,3 +3341,4 @@ libnss_mdns6_minimal.so.2 nss-mdns-0.14.1_1 libnss_mdns.so.2 nss-mdns-0.14.1_1 libnss_mdns4.so.2 nss-mdns-0.14.1_1 libnss_mdns6.so.2 nss-mdns-0.14.1_1 +libSavitar.so.0 libSavitar-2.7.0_1 diff --git a/srcpkgs/libSavitar-devel b/srcpkgs/libSavitar-devel new file mode 120000 index 0000000000..3f1d635183 --- /dev/null +++ b/srcpkgs/libSavitar-devel @@ -0,0 +1 @@ +libSavitar \ No newline at end of file diff --git a/srcpkgs/libSavitar-python3 b/srcpkgs/libSavitar-python3 new file mode 120000 index 0000000000..3f1d635183 --- /dev/null +++ b/srcpkgs/libSavitar-python3 @@ -0,0 +1 @@ +libSavitar \ No newline at end of file diff --git a/srcpkgs/libSavitar/patches/remove-rpath.patch b/srcpkgs/libSavitar/patches/remove-rpath.patch new file mode 100644 index 0000000000..29433be8ce --- /dev/null +++ b/srcpkgs/libSavitar/patches/remove-rpath.patch @@ -0,0 +1,16 @@ +Author: Gregor Riepl +Description: Remove RPATH from build flags. + It's not needed on Linux and may cause maintenance problems. + See: https://wiki.debian.org/RpathIssue +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -59,8 +59,6 @@ + set(SAVITAR_VERSION 0.1.0) + set(SAVITAR_SOVERSION 0) + +-set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) +- + if(BUILD_STATIC) + add_library(Savitar STATIC ${savitar_SRCS}) + else() + diff --git a/srcpkgs/libSavitar/patches/system-pugixml.patch b/srcpkgs/libSavitar/patches/system-pugixml.patch new file mode 100644 index 0000000000..2ededc2b08 --- /dev/null +++ b/srcpkgs/libSavitar/patches/system-pugixml.patch @@ -0,0 +1,72 @@ +Author: Gregor Riepl +Description: Depend on system pugixml. + Upstream bundled their own version of pugixml. + On Debian, we have a maintained packages of this library, + so use that instead. +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -8,7 +8,9 @@ + option(BUILD_STATIC "Build as a static library" OFF) + + +-add_subdirectory(pugixml) ++find_path(PUGIXML_INCLUDE_DIR "pugixml.hpp" REQUIRED) ++find_library(PUGIXML_LIBRARY pugixml REQUIRED) ++include_directories(${PUGIXML_INCLUDE_DIR} SYSTEM) + + if(BUILD_PYTHON) + set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) +@@ -65,7 +67,7 @@ + add_library(Savitar SHARED ${savitar_SRCS}) + endif() + +-target_link_libraries(Savitar PUBLIC pugixml) ++target_link_libraries(Savitar PUBLIC ${PUGIXML_LIBRARY}) + + if(NOT WIN32 OR CMAKE_COMPILER_IS_GNUCXX) + set_target_properties(Savitar PROPERTIES COMPILE_FLAGS -fPIC) +--- src/MeshData.cpp ++++ src/MeshData.cpp +@@ -17,7 +17,7 @@ + */ + + #include "MeshData.h" +-#include "../pugixml/src/pugixml.hpp" ++#include + #include + + using namespace Savitar; +--- src/Scene.cpp ++++ src/Scene.cpp +@@ -17,7 +17,7 @@ + */ + + #include "Scene.h" +-#include "../pugixml/src/pugixml.hpp" ++#include + #include + #include + using namespace Savitar; +--- src/SceneNode.cpp ++++ src/SceneNode.cpp +@@ -17,7 +17,7 @@ + */ + + #include "SceneNode.h" +-#include "../pugixml/src/pugixml.hpp" ++#include + #include + using namespace Savitar; + +--- src/ThreeMFParser.h ++++ src/ThreeMFParser.h +@@ -21,7 +21,7 @@ + + #include "SavitarExport.h" + #include "SceneNode.h" +-#include "../pugixml/src/pugixml.hpp" ++#include + + #include + namespace Savitar + diff --git a/srcpkgs/libSavitar/template b/srcpkgs/libSavitar/template new file mode 100644 index 0000000000..2fb26c755c --- /dev/null +++ b/srcpkgs/libSavitar/template @@ -0,0 +1,31 @@ +# Template file for 'libSavitar' +pkgname=libSavitar +version=3.6.0 +revision=1 +build_style=cmake +hostmakedepends="python3" +makedepends="python3-sip-devel python3-devel pugixml-devel" +short_desc="C++ implementation of 3mf loading" +maintainer="maxice8 " +license="LGPL-3.0-or-later" +homepage="https://github.com/Ultimaker/libSavitar" +distfiles="https://github.com/Ultimaker/libSavitar/archive/${version}.tar.gz" +checksum=2542fc07844987cb736b03a36e3e9ea4f1002a7ba0965852ff7d954f79969cf5 +nocross="can't find sip on cross environment" + +libSavitar-devel_package() { + depends="libSavitar-${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/cmake + vmove "usr/lib/*.so" + } +} + +libSavitar-python3_package() { + short_desc+=" - Python3 bindings" + pkg_install() { + vmove ${py3_sitelib} + } +}