<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/fa360f37c399707820f87bdd8ae3575710355adb">https://github.com/macports/macports-ports/commit/fa360f37c399707820f87bdd8ae3575710355adb</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new fa360f37c39 libfive: new port
</span>fa360f37c39 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit fa360f37c399707820f87bdd8ae3575710355adb
</span>Author: Szabolcs Horvát <szhorvat@gmail.com>
AuthorDate: Sun Apr 25 20:04:35 2021 +0200
<span style='display:block; white-space:pre;color:#404040;'> libfive: new port
</span>---
graphics/libfive/Portfile | 161 +++++++++++++++++++++
.../libfive/files/patch-remove-march-native.diff | 11 ++
2 files changed, 172 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/libfive/Portfile b/graphics/libfive/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..60a1381c01d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/libfive/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,161 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup cmake 1.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# libfive does not have releases; the master branch is recommended.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# See https://libfive.com/download/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup libfive libfive cdc363d0db9e8f14679df4ece2d798c36dc0119c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 20210521
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories graphics math cad
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MPL-2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {gmail.com:szhorvat @szhorvat} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://libfive.com/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Library for 3D solid modeling
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description libfive is a software library and set of tools for solid modeling, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ especially suited for parametric and procedural design. It is \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ infrastructure for generative design, mass customization, and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ domain-specific CAD tools.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 7dc6a719a5e9549ea0d1d6c3bb253278f23ad751 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 31771b203c2ff66b2adc444f5352613c48ccaa0ff2671c681d73be85488ab13c \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 878048
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Even though eigen3 is header-only, it must be a library dependency because
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# the libfive headers include it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib-append port:boost \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:eigen3 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libpng
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:bin/pkg-config:pkgconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.c_standard 1999
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.cxx_standard \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2017
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# These will be overridden by enabled variants
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_GUILE_BINDINGS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_PYTHON_BINDINGS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_STUDIO_APP=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-remove-march-native.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Guile binding:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# libfive supports Guile 3.0 as well, but MacPorts currently only includes 2.2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant guile description {Build guile bindings} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:guile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DBUILD_GUILE_BINDINGS=OFF -DBUILD_GUILE_BINDINGS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append GUILE_AUTO_COMPILE=0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # The Guile bindings are under GPL-2+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ! ("GPL-2+" in $license) } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ license-append GPL-2+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Python bindings:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The minimum supported Python version is 3.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythons_suffixes {37 38 39}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythons_ports {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend pythons_ports python${s}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set p python${s}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set v [string index ${s} 0].[string index ${s} 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set i [lsearch -exact ${pythons_ports} ${p}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set c [lreplace ${pythons_ports} ${i} ${i}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant ${p} description "Build bindings for Python ${v}" conflicts {*}${c} "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:${p}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_PYTHON_BINDINGS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DPython3_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/${v}/bin/python${v}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Studio app:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant studio requires guile description {Build GUI app} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PortGroup qt5 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ qt5.min_version 5.12
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DBUILD_STUDIO_APP=OFF -DBUILD_STUDIO_APP=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # The Studio app is under GPL-2+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ! ("GPL-2+" in $license) } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ license-append GPL-2+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # The Studio app only uses Qt, but does not use OpenSSL directly.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Qt's licenses include OpenSSLException.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ license_noconflict openssl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:librsvg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-build {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Create app icon
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set svg ${worksrcpath}/studio/deploy/icon/icon.svg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${build.dir}/icon.iconset
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach res {16 32 128 256 512} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set hres [expr 2*${res}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${worksrcpath} "${prefix}/bin/rsvg-convert -w ${res} ${svg} > ${build.dir}/icon.iconset/icon_${res}x${res}.png"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${worksrcpath} "${prefix}/bin/rsvg-convert -w ${hres} ${svg} > ${build.dir}/icon.iconset/icon_${res}x${res}@2x.png"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${build.dir}/studio/Studio.app/Contents/Resources
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${worksrcpath} "/usr/bin/iconutil -c icns -o ${build.dir}/studio/Studio.app/Contents/Resources/studio.icns ${build.dir}/icon.iconset"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Include actual version into Info.plist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|0\.0\.0|${version}|g" ${build.dir}/studio/Studio.app/Contents/Info.plist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${build.dir}/studio/Studio.app ${destroot}${applications_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set examplesdir ${prefix}/share/${name}/examples
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${examplesdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 {*}[glob ${worksrcpath}/studio/examples/*.io] ${destroot}${examplesdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes-append "${name} studio examples were installed into ${examplesdir}."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Testing:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# As of version 20210424 there may be test failures for REQUIRE( a.count() == 2 )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# See https://github.com/libfive/libfive/issues/424
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.cmd ${build.dir}/libfive/test/libfive-test
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Default variants:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set selected_python python39
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset python${s}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set selected_python python${s}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default_variants +studio +guile +${selected_python}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/libfive/files/patch-remove-march-native.diff b/graphics/libfive/files/patch-remove-march-native.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..1d001472953
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/libfive/files/patch-remove-march-native.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- CMakeLists.txt.old 2021-04-29 14:38:58.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ CMakeLists.txt 2021-04-29 14:39:18.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -47,7 +47,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ################################################################################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(NOT MSVC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -g -fPIC -pedantic -Werror=switch -march=native")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -g -fPIC -pedantic -Werror=switch")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(CMAKE_CXX_FLAGS_DEBUG "-O0")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DEIGEN_NO_DEBUG")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else()
</span></pre><pre style='margin:0'>
</pre>