commit: 88c5e4df38c6bae4c44f7aff21443ff1a7866211 Author: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org> AuthorDate: Wed Jul 21 17:21:08 2021 +0000 Commit: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org> CommitDate: Wed Jul 21 17:48:22 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88c5e4df
dev-libs/libnest2d: replaced hard coded install dirs now using CMAKEs 'GNUInstallDirs' Bug: https://bugs.gentoo.org/802906 Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org> Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org> .../files/libnest2d-0.4-gnu-install-dirs.patch | 25 ++++++++++++ dev-libs/libnest2d/libnest2d-0.4-r2.ebuild | 45 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/dev-libs/libnest2d/files/libnest2d-0.4-gnu-install-dirs.patch b/dev-libs/libnest2d/files/libnest2d-0.4-gnu-install-dirs.patch new file mode 100644 index 00000000000..34484426f30 --- /dev/null +++ b/dev-libs/libnest2d/files/libnest2d-0.4-gnu-install-dirs.patch @@ -0,0 +1,25 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -114,6 +114,7 @@ + endif() + + include(CMakePackageConfigHelpers) ++include(GNUInstallDirs) + + write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/cmakeexports/${PROJECT_NAME}ConfigVersion.cmake" +@@ -123,10 +124,10 @@ + + install(TARGETS libnest2d libnest2d_headeronly ${LIBNAME} + EXPORT ${PROJECT_NAME}Targets +- RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib +- LIBRARY DESTINATION lib +- INCLUDES DESTINATION include) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + export(EXPORT ${PROJECT_NAME}Targets + FILE "${CMAKE_CURRENT_BINARY_DIR}/cmakeexports/${PROJECT_NAME}Targets.cmake" diff --git a/dev-libs/libnest2d/libnest2d-0.4-r2.ebuild b/dev-libs/libnest2d/libnest2d-0.4-r2.ebuild new file mode 100644 index 00000000000..88a93621c9d --- /dev/null +++ b/dev-libs/libnest2d/libnest2d-0.4-r2.ebuild @@ -0,0 +1,45 @@ +# 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 + "${FILESDIR}"/${P}-gnu-install-dirs.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) + -DCMAKE_INSTALL_LIBDIR=$(get_libdir) + ) + cmake_src_configure +}
