mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
manifold, new recipe, version 3.0.1 (#12010)
This commit is contained in:
85
sci-mathematics/manifold/manifold-3.0.1.recipe
Normal file
85
sci-mathematics/manifold/manifold-3.0.1.recipe
Normal file
@@ -0,0 +1,85 @@
|
||||
SUMMARY="Geometry library for topological robustness"
|
||||
DESCRIPTION="Manifold is a geometry library dedicated to creating and operating on manifold \
|
||||
triangle meshes. A manifold mesh is a mesh that represents a solid object, and so is very \
|
||||
important in manufacturing, CAD, structural analysis, etc. Manifold also supports arbitrary \
|
||||
vertex properties and enables mapping of materials for rendering use-cases. Our primary goal is \
|
||||
reliability: guaranteed manifold output without caveats or edge cases. Our secondary goal is \
|
||||
performance: efficient algorithms that make extensive use of parallelization, or pipelining when \
|
||||
only a single thread is available."
|
||||
HOMEPAGE="https://github.com/elalish/manifold"
|
||||
COPYRIGHT="2022-2024 manifold contributors"
|
||||
LICENSE="Apache v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/elalish/manifold/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5e84fdaab7933a00fb4279a9bbe2885e94db3adfc45a2ef56ae35abfe5e6ea43"
|
||||
SOURCE_FILENAME="manifold-v$portVersion.tar.gz"
|
||||
PATCHES="manifold-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
manifold$secondaryArchSuffix = $portVersion
|
||||
lib:libmanifold$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libmanifoldc$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libClipper2$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
manifold${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libmanifold$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libmanifoldc$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
manifold$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libClipper2$secondaryArchSuffix
|
||||
# devel:libgtest$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs \
|
||||
-DMANIFOLD_TEST=OFF
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libmanifold \
|
||||
libmanifoldc
|
||||
fixPkgconfig
|
||||
|
||||
# Fix usage of hardcoded "/include":
|
||||
sed -e "s|\(\${_IMPORT_PREFIX}\)/include|\1/$relativeIncludeDir|" -i \
|
||||
$libDir/cmake/manifold/manifoldTargets.cmake
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
ctest --test-dir build --output-on-failure
|
||||
}
|
||||
54
sci-mathematics/manifold/patches/manifold-3.0.1.patchset
Normal file
54
sci-mathematics/manifold/patches/manifold-3.0.1.patchset
Normal file
@@ -0,0 +1,54 @@
|
||||
From ca329ae93306913aac51813b47f83da730379dcf Mon Sep 17 00:00:00 2001
|
||||
From: Luc Schrijvers <begasus@gmail.com>
|
||||
Date: Tue, 18 Mar 2025 11:09:52 +0100
|
||||
Subject: Disable position_independen_code, werror
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7a4c0f6..ef5a270 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -95,7 +95,7 @@ mark_as_advanced(TRACY_MEMORY_USAGE)
|
||||
mark_as_advanced(MANIFOLD_FUZZ)
|
||||
|
||||
# Always build position independent code for relocatability
|
||||
-set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
+set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
|
||||
|
||||
# Various Compiler Flags
|
||||
if(MANIFOLD_FUZZ)
|
||||
@@ -164,7 +164,7 @@ else()
|
||||
endif()
|
||||
elseif(PROJECT_IS_TOP_LEVEL)
|
||||
# only do -Werror if we are the top level project
|
||||
- list(APPEND WARNING_FLAGS -Werror)
|
||||
+ list(APPEND WARNING_FLAGS)
|
||||
endif()
|
||||
list(APPEND MANIFOLD_FLAGS ${WARNING_FLAGS})
|
||||
if(
|
||||
--
|
||||
2.48.1
|
||||
|
||||
|
||||
From c78584f5ad5b9e73d2773eee015643d924eb224e Mon Sep 17 00:00:00 2001
|
||||
From: Luc Schrijvers <begasus@gmail.com>
|
||||
Date: Tue, 18 Mar 2025 11:10:12 +0100
|
||||
Subject: Build fix
|
||||
|
||||
|
||||
diff --git a/src/sparse.h b/src/sparse.h
|
||||
index a25ea61..50fec0e 100644
|
||||
--- a/src/sparse.h
|
||||
+++ b/src/sparse.h
|
||||
@@ -48,7 +48,7 @@ class SparseIndices {
|
||||
defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || \
|
||||
defined(__THUMBEL__) || defined(__AARCH64EL__) || defined(_MIPSEL) || \
|
||||
defined(__MIPSEL) || defined(__MIPSEL__) || defined(__EMSCRIPTEN__) || \
|
||||
- defined(_WIN32)
|
||||
+ defined(_WIN32) || defined(__HAIKU__)
|
||||
static constexpr size_t pOffset = 1;
|
||||
#else
|
||||
#error "unknown architecture"
|
||||
--
|
||||
2.48.1
|
||||
|
||||
Reference in New Issue
Block a user