commit:     b3a62477a64a790d5f7a9958647bb5c79e20d4a6
Author:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  7 19:49:36 2021 +0000
Commit:     Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
CommitDate: Sun Mar  7 20:07:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3a62477

dev-libs/libnest2d: fixed used cpp version

Closes: https://bugs.gentoo.org/769488
Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>

 ...est2d-0.4-add-soversion-to-shared-library.patch | 21 +++++++++++
 .../files/libnest2d-0.4-fix-cpp-version.patch      | 11 ++++++
 dev-libs/libnest2d/libnest2d-0.4-r1.ebuild         | 43 ++++++++++++++++++++++
 dev-libs/libnest2d/metadata.xml                    |  3 ++
 4 files changed, 78 insertions(+)

diff --git 
a/dev-libs/libnest2d/files/libnest2d-0.4-add-soversion-to-shared-library.patch 
b/dev-libs/libnest2d/files/libnest2d-0.4-add-soversion-to-shared-library.patch
new file mode 100644
index 00000000000..456f543207a
--- /dev/null
+++ 
b/dev-libs/libnest2d/files/libnest2d-0.4-add-soversion-to-shared-library.patch
@@ -0,0 +1,21 @@
+From 12b64796aee24d5af41df3a10c4313dc713c3e74 Mon Sep 17 00:00:00 2001
+From: Karl Nilsson <[email protected]>
+Date: Wed, 13 Jan 2021 21:51:34 -0500
+Subject: [PATCH] CMake: add SOVERSION to shared library
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 374e90f..c2f2bec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -95,6 +95,7 @@ if(NOT LIBNEST2D_HEADER_ONLY)
+     add_library(${LIBNAME} ${PROJECT_SOURCE_DIR}/src/libnest2d.cpp)
+     set_target_properties(${LIBNAME} PROPERTIES PREFIX "")
+     set_target_properties(${LIBNAME} PROPERTIES DEBUG_POSTFIX "d")
++    set_target_properties(${LIBNAME} PROPERTIES SOVERSION "1.0")
+     target_link_libraries(${LIBNAME} PUBLIC libnest2d_headeronly)
+     target_compile_definitions(${LIBNAME} PUBLIC LIBNEST2D_STATIC)
+     target_sources(${LIBNAME} PRIVATE ${LIBNEST2D_SRCFILES})

diff --git a/dev-libs/libnest2d/files/libnest2d-0.4-fix-cpp-version.patch 
b/dev-libs/libnest2d/files/libnest2d-0.4-fix-cpp-version.patch
new file mode 100644
index 00000000000..4032618fb53
--- /dev/null
+++ b/dev-libs/libnest2d/files/libnest2d-0.4-fix-cpp-version.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,7 +2,7 @@
+
+ project(Libnest2D)
+
+-set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD 14)
+ set(CMAKE_CXX_STANDARD_REQUIRED)
+
+ # Add our own cmake module path.

diff --git a/dev-libs/libnest2d/libnest2d-0.4-r1.ebuild 
b/dev-libs/libnest2d/libnest2d-0.4-r1.ebuild
new file mode 100644
index 00000000000..721bfa9f47c
--- /dev/null
+++ b/dev-libs/libnest2d/libnest2d-0.4-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Library and framework for the 2D bin packaging problem"
+HOMEPAGE="https://github.com/tamasmeszaros/libnest2d";
+SRC_URI="https://github.com/tamasmeszaros/libnest2d/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0/1"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+IUSE="examples static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-cpp/eigen:3
+       dev-libs/boost
+       dev-libs/clipper
+       sci-libs/nlopt
+       "
+DEPEND="${RDEPEND}
+       test? ( >=dev-cpp/catch-2.9.1 )
+       "
+
+PATCHES=(
+       "${FILESDIR}"/${P}-add-disallowed-areas.patch
+       "${FILESDIR}"/${P}-add-soversion-to-shared-library.patch
+       "${FILESDIR}"/${P}-fix-cpp-version.patch
+       )
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_SHARED_LIBS=ON
+               -DLIBNEST2D_BUILD_EXAMPLES=$(usex examples)
+               -DLIBNEST2D_HEADER_ONLY=$(usex static-libs OFF ON)
+               -DLIBNEST2D_BUILD_UNITTESTS=$(usex test)
+       )
+       cmake_src_configure
+}

diff --git a/dev-libs/libnest2d/metadata.xml b/dev-libs/libnest2d/metadata.xml
index 6690b27e332..5b40bbe2f99 100644
--- a/dev-libs/libnest2d/metadata.xml
+++ b/dev-libs/libnest2d/metadata.xml
@@ -5,6 +5,9 @@
                <email>[email protected]</email>
                <name>Gentoo 3D Printer Project</name>
        </maintainer>
+       <slots>
+               <subslots>soname major version number</subslots>
+       </slots>
        <longdescription>
                Libnest2D is a library and framework for the 2D bin packaging 
problem. Inspired from the SVGNest Javascript
                library the project is built from scratch in C++11. The library 
is written with a policy that it should be

Reply via email to