mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-31 23:08:09 -07:00
media-gfx/openmesh: add 11.0.0, qt6
update HOMEPAGE / SRC_URI (redirect)
iuse :
qt6 -> gui
add doc
deps :
* media-libs/freeglut -> media-libs/libglvnd
* test : add dev-cpp/eigen
* doc, add :
app-text/doxygen[dot]
dev-texlive/texlive-latex
dev-texlive/texlive-latexextra (for xcolor.sty)
dev-texlive/texlive-latexrecommended (for newunicodechar.sty)
static-libs : set shared-libs only with a patch because previous sed-op
is no longer sufficient.
Closes: https://bugs.gentoo.org/836649
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/41285
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
committed by
Andreas Sturmlechner
parent
094ecb581e
commit
ae72a44e4e
@@ -1 +1,2 @@
|
||||
DIST OpenMesh-11.0.0.tar.bz2 5867933 BLAKE2B 5f4eb34365cfeedab8e5de818db955ed1a5ab42d2289e9ab686efda0f3057462848bdee0b53af0f81ddc6ea388ef64eecde923f468beb2078a77f2dff5c04753 SHA512 4667ef9ae935403455a57277bd81dd61eb967f81dcbcc8ce5a84d537d60db37b0155dc7c118b14f90e142e44b0a453fd98984de17e20fae62c86be2ddc6e9a69
|
||||
DIST OpenMesh-7.1.tar.bz2 22855582 BLAKE2B 778b3a40c2e476cdb2f50b5b4a90f8b6ae7852f166087426ff1db25c829cb4172cd7ed14db1a22229f7b4447e7ebeb0d6116647d929b7dab43d565192a8ac48e SHA512 bca0f937e08fe512efb436f5b96b83a1ff7945640e18fb1bb083956f04609560e29b1c1f7e058840791df77df6859fdd20ff6f49d80b908e8c1c5542b8615e6d
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
use find_package for GTest
|
||||
diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt
|
||||
index 0d7fb92..73127db 100644
|
||||
--- a/src/Unittests/CMakeLists.txt
|
||||
+++ b/src/Unittests/CMakeLists.txt
|
||||
@@ -73,20 +73,9 @@ if (NOT DEFINED OPENMESH_BUILD_UNIT_TESTS)
|
||||
endif()
|
||||
|
||||
if (OPENMESH_BUILD_UNIT_TESTS)
|
||||
- # Fetch Gtest from github
|
||||
- include(FetchContent)
|
||||
- FetchContent_Declare(
|
||||
- googletest
|
||||
- GIT_REPOSITORY https://github.com/google/googletest.git
|
||||
- GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # v1.14.0
|
||||
- #FIND_PACKAGE_ARGS NAMES GTest
|
||||
- )
|
||||
- # For Windows: Prevent overriding the parent project's compiler/linker settings
|
||||
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
- FetchContent_MakeAvailable(googletest)
|
||||
-
|
||||
enable_testing()
|
||||
|
||||
+ find_package(GTest CONFIG)
|
||||
find_package(Eigen3)
|
||||
|
||||
# Set correct include paths so that the compiler can find the headers
|
||||
@@ -0,0 +1,14 @@
|
||||
use commondir (share) for pkgconfig installation
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3aa8122..6d1bf51 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -193,7 +196,7 @@ set(PRIVATE_LIBS "-lOpenMeshCore -lOpenMeshTools")
|
||||
|
||||
configure_file("openmesh.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/openmesh.pc" @ONLY)
|
||||
|
||||
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openmesh.pc DESTINATION libdata/pkgconfig)
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openmesh.pc DESTINATION share/pkgconfig)
|
||||
|
||||
# generate target file
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
Set shared-libs only
|
||||
diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt
|
||||
index 48f5547..b6e4fd6 100644
|
||||
--- a/src/OpenMesh/Core/CMakeLists.txt
|
||||
+++ b/src/OpenMesh/Core/CMakeLists.txt
|
||||
@@ -151,16 +151,12 @@ if (WIN32)
|
||||
|
||||
|
||||
else ()
|
||||
- vci_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers})
|
||||
+ vci_add_library (OpenMeshCore SHARED ${sources} ${headers})
|
||||
|
||||
target_include_directories(OpenMeshCore PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
- target_include_directories(OpenMeshCoreStatic PUBLIC
|
||||
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
|
||||
- $<INSTALL_INTERFACE:include>)
|
||||
-
|
||||
set_target_properties (OpenMeshCore PROPERTIES VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} )
|
||||
endif ()
|
||||
diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt
|
||||
index 08baecb..1b24daa 100644
|
||||
--- a/src/OpenMesh/Tools/CMakeLists.txt
|
||||
+++ b/src/OpenMesh/Tools/CMakeLists.txt
|
||||
@@ -116,26 +116,18 @@ if (WIN32)
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
else ()
|
||||
- vci_add_library (OpenMeshTools SHAREDANDSTATIC ${sources} ${headers})
|
||||
+ vci_add_library (OpenMeshTools SHARED ${sources} ${headers})
|
||||
|
||||
target_include_directories(OpenMeshTools PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
- target_include_directories(OpenMeshToolsStatic PUBLIC
|
||||
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
|
||||
- $<INSTALL_INTERFACE:include>)
|
||||
-
|
||||
set_target_properties (OpenMeshTools PROPERTIES VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} )
|
||||
endif ()
|
||||
|
||||
target_link_libraries (OpenMeshTools OpenMeshCore)
|
||||
|
||||
-IF( NOT WIN32 )
|
||||
- target_link_libraries (OpenMeshToolsStatic OpenMeshCoreStatic)
|
||||
-ENDIF(NOT WIN32)
|
||||
-
|
||||
if ( (${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") AND BUILD_APPS )
|
||||
|
||||
if ( WIN32 )
|
||||
@@ -0,0 +1,27 @@
|
||||
make tests conditional
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3aa8122..6d1bf51 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -5,8 +5,9 @@ cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR)
|
||||
#set( CMAKE_CXX_STANDARD_REQUIRED TRUE )
|
||||
#set( CMAKE_CXX_STANDARD 11 )
|
||||
|
||||
-enable_testing()
|
||||
-
|
||||
+if(OPENMESH_BUILD_UNIT_TESTS)
|
||||
+ enable_testing()
|
||||
+endif()
|
||||
|
||||
project (OpenMesh
|
||||
VERSION 11.0.0
|
||||
@@ -118,7 +119,9 @@ endif()
|
||||
|
||||
# Do not build unit tests when build as external library
|
||||
if(${CMAKE_PROJECT_NAME} MATCHES "OpenMesh")
|
||||
+ if(OPENMESH_BUILD_UNIT_TESTS)
|
||||
add_subdirectory (src/Unittests)
|
||||
+ endif()
|
||||
else()
|
||||
# If built as a dependent project simulate effects of
|
||||
# successful finder run:
|
||||
34
media-gfx/openmesh/files/openmesh-11.0.0-unused_flags.patch
Normal file
34
media-gfx/openmesh/files/openmesh-11.0.0-unused_flags.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
prevent configure from failing as variables called are unset and needless here
|
||||
diff --git a/cmake-library/VCI/VCICompiler.cmake b/cmake-library/VCI/VCICompiler.cmake
|
||||
index eca35d8..983099a 100755
|
||||
--- a/cmake-library/VCI/VCICompiler.cmake
|
||||
+++ b/cmake-library/VCI/VCICompiler.cmake
|
||||
@@ -172,14 +172,6 @@ if (UNIX)
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${flag} ")
|
||||
endif()
|
||||
endforeach()
|
||||
-
|
||||
- # Add the release with debug info flags
|
||||
- foreach( flag ${ADDITIONAL_CXX_FLAGS} ${ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS} )
|
||||
- list (FIND ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${flag} _index)
|
||||
- if (${_index} EQUAL -1)
|
||||
- set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${flag} ")
|
||||
- endif()
|
||||
- endforeach()
|
||||
ENDIF()
|
||||
|
||||
|
||||
@@ -200,13 +192,5 @@ if (UNIX)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
- # Add the release with debug info flags
|
||||
- foreach( flag ${ADDITIONAL_C_FLAGS} ${ADDITIONAL_C_RELWITHDEBINFO_FLAGS} )
|
||||
- list (FIND ${CMAKE_C_FLAGS_RELWITHDEBINFO} ${flag} _index)
|
||||
- if (${_index} EQUAL -1)
|
||||
- set( CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${flag} ")
|
||||
- endif()
|
||||
- endforeach()
|
||||
-
|
||||
endif()
|
||||
endif ()
|
||||
104
media-gfx/openmesh/openmesh-11.0.0.ebuild
Normal file
104
media-gfx/openmesh/openmesh-11.0.0.ebuild
Normal file
@@ -0,0 +1,104 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
MY_PN="OpenMesh"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="Generic data structure to represent and manipulate polygonal meshes"
|
||||
HOMEPAGE="https://www.graphics.rwth-aachen.de/software/openmesh/"
|
||||
SRC_URI="https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/$(ver_cut 1-2)/${MY_P}.tar.bz2"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="4"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc gui test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
gui? (
|
||||
dev-qt/qtbase:6[gui,opengl,widgets]
|
||||
media-libs/libglvnd
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
# texlive-latexextra for xcolor.sty
|
||||
# texlive-latexrecommended for newunicodechar.sty
|
||||
BDEPEND="
|
||||
doc? (
|
||||
app-text/doxygen[dot]
|
||||
dev-texlive/texlive-latex
|
||||
dev-texlive/texlive-latexextra
|
||||
dev-texlive/texlive-latexrecommended
|
||||
)
|
||||
test? (
|
||||
dev-cpp/eigen:3
|
||||
dev-cpp/gtest
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-11.0.0-gtest_detection.patch
|
||||
"${FILESDIR}"/${PN}-11.0.0-pkgconfig_instdir.patch
|
||||
"${FILESDIR}"/${PN}-11.0.0-rm_static_libs.patch
|
||||
"${FILESDIR}"/${PN}-11.0.0-tests_conditionnal.patch
|
||||
"${FILESDIR}"/${PN}-11.0.0-unused_flags.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use doc; then
|
||||
doxygen -u Doc/doxy.config.in 2>/dev/null || die
|
||||
fi
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_SKIP_RPATH=ON
|
||||
# Enable tools by default
|
||||
-DBUILD_APPS=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=$(usex !gui)
|
||||
-DOPENMESH_BUILD_UNIT_TESTS=$(usex test)
|
||||
-DOPENMESH_DOCS=$(usex doc)
|
||||
-DQT_VERSION=6
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
|
||||
if use doc; then
|
||||
cmake_build doc
|
||||
# remove doxygen working files
|
||||
find "${BUILD_DIR}"/Build/share/OpenMesh/Doc/html/ \( \
|
||||
-iname '*.map' -o \
|
||||
-iname '*.md5' -o \
|
||||
-iname '*.repository' \
|
||||
\) -delete || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cp "${BUILD_DIR}"/src/Unittests/CTestTestfile.cmake "${BUILD_DIR}"/CTestTestfile.cmake || die
|
||||
local -x LD_LIBRARY_PATH="${BUILD_DIR}/Build/$(get_libdir)"
|
||||
# parallel tests cause failures to each other
|
||||
cmake_src_test -j1
|
||||
}
|
||||
|
||||
src_install() {
|
||||
use doc && local HTML_DOCS=( "${BUILD_DIR}"/Build/share/OpenMesh/Doc/html/. )
|
||||
|
||||
cmake_src_install
|
||||
|
||||
# we don't want to install the unittests binaries
|
||||
if use test; then
|
||||
rm "${ED}"/usr/bin/unittests{,_customvec,_doublevec} || die
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user