commit:     627f06a62019f29f43fb5f542865b2274cdfc210
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Thu Oct 21 05:12:46 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 24 04:06:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=627f06a6

media-gfx/openscad: fix search for lib3mf

Reported-by: Jan Psota <jasiu <AT> belsznica.pl>
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/22650
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../openscad-9999-0001-fix-to-find-lib3mf-2.patch  | 36 ----------------------
 ...-config-name-and-include-directory-search.patch | 31 +++++++++++++++++++
 media-gfx/openscad/openscad-9999.ebuild            |  9 ++----
 3 files changed, 33 insertions(+), 43 deletions(-)

diff --git 
a/media-gfx/openscad/files/openscad-9999-0001-fix-to-find-lib3mf-2.patch 
b/media-gfx/openscad/files/openscad-9999-0001-fix-to-find-lib3mf-2.patch
deleted file mode 100644
index 0ca19d33646..00000000000
--- a/media-gfx/openscad/files/openscad-9999-0001-fix-to-find-lib3mf-2.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 15bf93ab04e6fd61507f138bcfc6f9c770d9479b Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <[email protected]>
-Date: Thu, 11 Feb 2021 23:14:31 +0100
-Subject: [PATCH] fix to find lib3mf-2
-
-Lib3mf-2 uses lowercase name for it's pkg-config file.
-
-Signed-off-by: Bernd Waibel <[email protected]>
----
- cmake/Modules/FindLib3MF.cmake | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cmake/Modules/FindLib3MF.cmake b/cmake/Modules/FindLib3MF.cmake
-index 7a1ee285..b062c09c 100644
---- a/cmake/Modules/FindLib3MF.cmake
-+++ b/cmake/Modules/FindLib3MF.cmake
-@@ -15,14 +15,14 @@ message(STATUS "Searching for lib3mf.")
- # We still fall back to the rest of detection code here.
- # Travis CI Ubuntu Trusty environment has some issue with pkg-config
- # not finding the version.
--pkg_check_modules(LIB3MF lib3MF)
-+pkg_check_modules(LIB3MF lib3mf)
- 
- # default to uppercase for 1.0 library name
- set(LIB3MF_LIB "3MF")
- 
- # some distribution packages are missing version information for 2.0
- if (LIB3MF_VERSION STREQUAL "" AND LIB3MF_FOUND)
--  if (EXISTS "/usr/include/lib3mf" AND EXISTS 
"/usr/include/lib3mf/lib3mf_implicit.hpp")
-+  if (EXISTS "/usr/include/lib3mf" AND EXISTS 
"/usr/include/lib3mf/Bindings/Cpp/lib3mf_implicit.hpp")
-     set(LIB3MF_VERSION "2.0.0")
-   endif()
- endif()
--- 
-2.30.1
-

diff --git 
a/media-gfx/openscad/files/openscad-9999-fix-pkg-config-name-and-include-directory-search.patch
 
b/media-gfx/openscad/files/openscad-9999-fix-pkg-config-name-and-include-directory-search.patch
new file mode 100644
index 00000000000..a448deec37d
--- /dev/null
+++ 
b/media-gfx/openscad/files/openscad-9999-fix-pkg-config-name-and-include-directory-search.patch
@@ -0,0 +1,31 @@
+From 2483ee56960c99c35036273fc9fc2877eac772fc Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <[email protected]>
+Date: Wed, 20 Oct 2021 19:46:08 +0200
+Subject: [PATCH] fix pkg-config name and include directory search
+
+Signed-off-by: Bernd Waibel <[email protected]>
+---
+ cmake/Modules/FindLib3MF.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/Modules/FindLib3MF.cmake b/cmake/Modules/FindLib3MF.cmake
+index 44858364..ad2f01ca 100644
+--- a/cmake/Modules/FindLib3MF.cmake
++++ b/cmake/Modules/FindLib3MF.cmake
+@@ -14,11 +14,11 @@
+ # Travis CI Ubuntu Trusty environment has some issue with pkg-config
+ # not finding the version.
+ find_package(PkgConfig REQUIRED QUIET)
+-pkg_check_modules(PC_LIB3MF lib3MF)
++pkg_check_modules(PC_LIB3MF lib3mf)
+ set(LIB3MF_VERSION ${PC_LIB3MF_VERSION})
+ 
+ find_path(LIB3MF_INCLUDE_DIRS
+-    NAMES Model/COM/NMR_DLLInterfaces.h
++    NAMES lib3mf_implicit.hpp
+     HINTS $ENV{LIB3MF_INCLUDEDIR}
+           ${PC_LIB3MF_INCLUDEDIR}
+           ${PC_LIB3MF_INCLUDE_DIRS}
+-- 
+2.33.1
+

diff --git a/media-gfx/openscad/openscad-9999.ebuild 
b/media-gfx/openscad/openscad-9999.ebuild
index c4a9b06dc70..f7e74169b9e 100644
--- a/media-gfx/openscad/openscad-9999.ebuild
+++ b/media-gfx/openscad/openscad-9999.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit cmake elisp-common git-r3 xdg
 
@@ -71,12 +71,7 @@ DOCS=(
        doc/testing.txt
 )
 
-src_prepare() {
-       if has_version ">=media-libs/lib3mf-2"; then
-               eapply "${FILESDIR}/${P}-0001-fix-to-find-lib3mf-2.patch"
-       fi
-       cmake_src_prepare
-}
+PATCHES=( 
"${FILESDIR}"/${P}-fix-pkg-config-name-and-include-directory-search.patch )
 
 src_configure() {
        local mycmakeargs=(

Reply via email to