summaryrefslogtreecommitdiff
path: root/media-libs/lib3mf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /media-libs/lib3mf
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'media-libs/lib3mf')
-rw-r--r--media-libs/lib3mf/Manifest7
-rw-r--r--media-libs/lib3mf/files/lib3mf-1.8.1-0001-Gentoo-specific-avoid-pre-stripping-library.patch27
-rw-r--r--media-libs/lib3mf/files/lib3mf-1.8.1-0002-Add-library-link-dependencies.patch59
-rw-r--r--media-libs/lib3mf/files/lib3mf-1.8.1-0003-Change-installation-include-dir.patch44
-rw-r--r--media-libs/lib3mf/files/lib3mf-1.8.1-0004-Gentoo-specific-Remove-gtest-source-dir.patch35
-rw-r--r--media-libs/lib3mf/lib3mf-1.8.1.ebuild48
-rw-r--r--media-libs/lib3mf/metadata.xml21
7 files changed, 241 insertions, 0 deletions
diff --git a/media-libs/lib3mf/Manifest b/media-libs/lib3mf/Manifest
new file mode 100644
index 000000000000..660331deca5b
--- /dev/null
+++ b/media-libs/lib3mf/Manifest
@@ -0,0 +1,7 @@
+AUX lib3mf-1.8.1-0001-Gentoo-specific-avoid-pre-stripping-library.patch 1047 BLAKE2B 9c3e11728a7edba3d3e872361d587b4442fe7324d23ce4b2358017ba860e6395c2b0a1d0095344d7449227b4659087b72c97811036e2113967d0cb8be35b818d SHA512 3f187fdcc22277756cc1e1bffdff02d998dd7610964f0bac0cbf4c276eb2a2b24175c92471866931283a72e699b4e999732c2f1bbf1c45378720199eb7406fd2
+AUX lib3mf-1.8.1-0002-Add-library-link-dependencies.patch 2567 BLAKE2B 10bae2bc7422bd35b05fcb4c016f9391035baad0ff903b628ce8d6f7e8e2e3f758360306772c6a6603e24ab037d8e98348f616da4dae9b509c2e342697e57801 SHA512 97bef547c3c5e7e25bdec1d5f907852e883b62c6e481659cefb48f3b69f8a26804ff8ee45657349345f3d6e9452251b68043767a44b6ce3b4e759d6ada2c21de
+AUX lib3mf-1.8.1-0003-Change-installation-include-dir.patch 1737 BLAKE2B b6ffd368f7078d8a7ee06d49fab001b7fdc8969d52ac1e54efd4ef2184c9b8d2947eb5ca2fe77d9a7b6369adca15e9362db09d0c55ee921bef3d04741162f71e SHA512 cf2ebd71308f75a620b9ac7f213e5d794350f9b59f7840fcc5b3a49e20b75cd323fc99a074900d751c81ca86171a5acb29191fa05ebf6c8305b0ee3fd55dae99
+AUX lib3mf-1.8.1-0004-Gentoo-specific-Remove-gtest-source-dir.patch 1172 BLAKE2B d6e27b935d0a7644ba6a56e9da2159fd24a9f42831befe2acd0f9b26fa5c1266ac87de34c7ef2d709dfb12048f52a1a27232307a4df1c12ec099e5cb45d37c57 SHA512 f514ad5f37e6da0a45c81769ead73c6ef4c04d368dc6a129d3b3547147c3b47db2182bf630457c02fd67951c5c97ef43db2c770d4a0864003ebbc207c4974fe7
+DIST lib3mf-1.8.1.tar.gz 8415939 BLAKE2B 45652aab8c84eb5d500455db211eb911c6e74decf4fbbb652976847e1b3ea16db9c626bd37cd9669aefc8dea29c424e6518e0517e8f96fa6282771e34f840290 SHA512 f7fd75bcb6472de1595a018e5add516d0d78ab0aee92462b686b77f8d2bef05270e7b737cb7e1d31fc5850815056e753874c2f9ec456a455e8461c4010fe914a
+EBUILD lib3mf-1.8.1.ebuild 1071 BLAKE2B 966bd4679d323243bc3e2e6d71bb10d129d3e8b3cb2cc6b97d3585d0c4c7e2872013f9e266654aa0cd87963ce2a0eaf75113a9573b4d298e458d9b98b201204c SHA512 f9810c22416e408b17a414f5f2096de43c6226a246f3b8bd4fe17944b1ad40a5ce10861c29ffd59573041703a7693b3f9f97bbb5f37ab110a236d533ab9066b6
+MISC metadata.xml 710 BLAKE2B fabae078a873406cac5a29263385aea4801c30cd8d5740f824cc2440c66fffda375ff91c0c1a47a3fd74d874dde848564f268776d4bb8f31997ac7750e094f34 SHA512 d89c5b35348d6c2deff3c1409c0c111d2bdfa280c150d00afceaf9cf9eb6e91210e7566e21ac1e915523e2d7240a40e98c56295bc22918df5901742cf63dc575
diff --git a/media-libs/lib3mf/files/lib3mf-1.8.1-0001-Gentoo-specific-avoid-pre-stripping-library.patch b/media-libs/lib3mf/files/lib3mf-1.8.1-0001-Gentoo-specific-avoid-pre-stripping-library.patch
new file mode 100644
index 000000000000..c695283cffbb
--- /dev/null
+++ b/media-libs/lib3mf/files/lib3mf-1.8.1-0001-Gentoo-specific-avoid-pre-stripping-library.patch
@@ -0,0 +1,27 @@
+From d97ad4604af7998541567ec486f90dd528e839b1 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Wed, 8 Apr 2020 19:09:42 +0200
+Subject: [PATCH 1/4] [Gentoo-specific] avoid pre-stripping library
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5453440..c867224 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -104,7 +104,8 @@ if (UNIX OR MINGW)
+ # Uncomment the following to but the version info into the .so-file.
+ SET_TARGET_PROPERTIES(${PROJECT_NAME}_s PROPERTIES VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
+ SET_TARGET_PROPERTIES(${PROJECT_NAME}_s PROPERTIES SOVERSION "${PROJECT_VERSION_MAJOR}")
+- if (NOT APPLE)
++ # avoid pre-stripping on Gentoo, this is done by emerge
++ if (NOT APPLE OR (UNIX AND NOT CMAKE_BUILD_TYPE MATCHES "Gentoo"))
+ SET_TARGET_PROPERTIES(${PROJECT_NAME}_s PROPERTIES LINK_FLAGS -s)
+ endif()
+ if (NOT WIN32)
+--
+2.26.0
+
diff --git a/media-libs/lib3mf/files/lib3mf-1.8.1-0002-Add-library-link-dependencies.patch b/media-libs/lib3mf/files/lib3mf-1.8.1-0002-Add-library-link-dependencies.patch
new file mode 100644
index 000000000000..de5331ae66ec
--- /dev/null
+++ b/media-libs/lib3mf/files/lib3mf-1.8.1-0002-Add-library-link-dependencies.patch
@@ -0,0 +1,59 @@
+From 976f14e1ac26389dbfc04bcffd9f4e7e21197001 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Wed, 8 Apr 2020 20:05:16 +0200
+Subject: [PATCH] Add library link dependencies
+
+If USE_INCLUDED_LIBZIP and/or USE_INCLUDED_ZLIB are not set
+add them to target_link_libaries command.
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ CMakeLists.txt | 10 +++++++++-
+ UnitTests/CPP/CMakeLists.txt | 10 +++++++++-
+ 2 files changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c867224..df87806 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -130,7 +130,15 @@ add_library(${PROJECT_NAME} SHARED ${SRCS_MAIN_PLATFORM}
+ )
+ set(STARTUPPROJECT ${PROJECT_NAME})
+ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "" IMPORT_PREFIX "")
+-target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_s)
++if(USE_INCLUDED_LIBZIP AND USE_INCLUDED_ZLIB)
++ target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_s)
++elseif(USE_INCLUDED_LIBZIP AND NOT USE_INCLUDED_ZLIB)
++ target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_s z)
++elseif(USE_INCLUDED_ZLIB AND NOT USE_INCLUDED_LIBZIP)
++ target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_s zip)
++else()
++ target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_s zip z)
++endif()
+ if (UNIX OR MINGW)
+ # Uncomment the following to but the version info into the .so-file.
+ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${BUILD_NUMBER}")
+diff --git a/UnitTests/CPP/CMakeLists.txt b/UnitTests/CPP/CMakeLists.txt
+index 2fdf85d..24d32bf 100644
+--- a/UnitTests/CPP/CMakeLists.txt
++++ b/UnitTests/CPP/CMakeLists.txt
+@@ -22,7 +22,15 @@ if (WIN32)
+ endif()
+
+ target_include_directories(${TESTNAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Include ${gtest_SOURCE_DIR}/include)
+-target_link_libraries(${TESTNAME} ${PROJECT_NAME}_s gtest gtest_main)
++if(USE_INCLUDED_LIBZIP AND USE_INCLUDED_ZLIB)
++ target_link_libraries(${TESTNAME} ${PROJECT_NAME}_s gtest gtest_main)
++elseif(USE_INCLUDED_LIBZIP AND NOT USE_INCLUDED_ZLIB)
++ target_link_libraries(${TESTNAME} ${PROJECT_NAME}_s gtest gtest_main z)
++elseif(USE_INCLUDED_ZLIB AND NOT USE_INCLUDED_LIBZIP)
++ target_link_libraries(${TESTNAME} ${PROJECT_NAME}_s gtest gtest_main zip)
++else()
++ target_link_libraries(${TESTNAME} ${PROJECT_NAME}_s gtest gtest_main zip z)
++endif()
+ add_dependencies(${TESTNAME} ${PROJECT_NAME}_s)
+ set_target_properties(${TESTNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/")
+
+--
+2.26.0
+
diff --git a/media-libs/lib3mf/files/lib3mf-1.8.1-0003-Change-installation-include-dir.patch b/media-libs/lib3mf/files/lib3mf-1.8.1-0003-Change-installation-include-dir.patch
new file mode 100644
index 000000000000..3d79c0d4a4f0
--- /dev/null
+++ b/media-libs/lib3mf/files/lib3mf-1.8.1-0003-Change-installation-include-dir.patch
@@ -0,0 +1,44 @@
+From f61a4c09977097b0d456ce9e480c2630b90cdc30 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Wed, 8 Apr 2020 19:16:07 +0200
+Subject: [PATCH 3/4] Change installation include dir to a more specific one.
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ CMakeLists.txt | 6 +++---
+ lib3MF.pc.in | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index df87806..3101c65 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -148,9 +148,9 @@ install(TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+-install(DIRECTORY Include/Model DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+-install(DIRECTORY Include/Common DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
++install(DIRECTORY Include/Model DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/lib3mf")
++install(DIRECTORY Include/Common DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/lib3mf")
++install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/lib3mf")
+
+ #########################################################
+ configure_file(lib3MF.pc.in lib3MF.pc @ONLY)
+diff --git a/lib3MF.pc.in b/lib3MF.pc.in
+index 9afb6ee..cf8cafb 100644
+--- a/lib3MF.pc.in
++++ b/lib3MF.pc.in
+@@ -1,7 +1,7 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/lib3mf
+
+ Name: @PROJECT_NAME@
+ Description: @PROJECT_DESCRIPTION@
+--
+2.26.0
+
diff --git a/media-libs/lib3mf/files/lib3mf-1.8.1-0004-Gentoo-specific-Remove-gtest-source-dir.patch b/media-libs/lib3mf/files/lib3mf-1.8.1-0004-Gentoo-specific-Remove-gtest-source-dir.patch
new file mode 100644
index 000000000000..edc202e83038
--- /dev/null
+++ b/media-libs/lib3mf/files/lib3mf-1.8.1-0004-Gentoo-specific-Remove-gtest-source-dir.patch
@@ -0,0 +1,35 @@
+From f392342f819b59449228100b7de8c14eda3cc391 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Wed, 8 Apr 2020 19:55:40 +0200
+Subject: [PATCH] [Gentoo-specific] Remove gtest source dir
+
+We use system gtest on Gentoo
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ UnitTests/CMakeLists.txt | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/UnitTests/CMakeLists.txt b/UnitTests/CMakeLists.txt
+index 59ae773..1212228 100644
+--- a/UnitTests/CMakeLists.txt
++++ b/UnitTests/CMakeLists.txt
+@@ -1,7 +1,5 @@
+-ADD_SUBDIRECTORY (googletest EXCLUDE_FROM_ALL)
+ enable_testing()
+-
+-SET(gtest_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/googletest/googletest")
++
+ add_definitions( -DTESTFILESPATH="${CMAKE_CURRENT_SOURCE_DIR}/../TestFiles")
+ add_definitions( -DLTESTFILESPATH=L"${CMAKE_CURRENT_SOURCE_DIR}/../TestFiles")
+ add_definitions( -DLOUTFILESPATH=L"${CMAKE_BINARY_DIR}/")
+@@ -12,4 +10,4 @@ add_subdirectory(C_Interface)
+ # Tests on internal classes of the library
+ add_subdirectory(CPP)
+
+-set(STARTUPPROJECT ${STARTUPPROJECT} PARENT_SCOPE)
+\ No newline at end of file
++set(STARTUPPROJECT ${STARTUPPROJECT} PARENT_SCOPE)
+--
+2.26.0
+
diff --git a/media-libs/lib3mf/lib3mf-1.8.1.ebuild b/media-libs/lib3mf/lib3mf-1.8.1.ebuild
new file mode 100644
index 000000000000..a53ea513ef48
--- /dev/null
+++ b/media-libs/lib3mf/lib3mf-1.8.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Implementation of the 3D Manufacturing Format file standard"
+HOMEPAGE="https://3mf.io/"
+SRC_URI="https://github.com/3MFConsortium/$PN/archive/v$PV.tar.gz -> $P.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/libzip:=
+ sys-apps/util-linux
+ sys-libs/zlib
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( >=dev-cpp/gtest-1.8.0 )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-0001-Gentoo-specific-avoid-pre-stripping-library.patch"
+ "${FILESDIR}/${P}-0002-Add-library-link-dependencies.patch"
+ "${FILESDIR}/${P}-0003-Change-installation-include-dir.patch"
+ "${FILESDIR}/${P}-0004-Gentoo-specific-Remove-gtest-source-dir.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB3MF_TESTS=$(usex test)
+ -DUSE_INCLUDED_LIBZIP=OFF
+ -DUSE_INCLUDED_ZLIB=OFF
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ local DOCS=( CONTRIBUTING.md README.md )
+ use doc && DOCS+=( Lib3MF-1.pdf )
+ cmake_src_install
+}
diff --git a/media-libs/lib3mf/metadata.xml b/media-libs/lib3mf/metadata.xml
new file mode 100644
index 000000000000..ca7507f06ed5
--- /dev/null
+++ b/media-libs/lib3mf/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>waebbl@gmail.com</email>
+ <name>Bernd Waibel</name>
+</maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <description>Gentoo Proxy Maintainer Team</description>
+</maintainer>
+<longdescription>
+ Implementation of the 3MF manufacturing file standard from the 3MF
+ consortium.
+ It provides reading and writing capabilities for 3MF files, as well
+ as conversion and validation tools for input and output data.
+</longdescription>
+<upstream>
+ <remote-id type="github">3MFConsortium/lib3mf</remote-id>
+</upstream>
+</pkgmetadata>