<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ae99c5b73d78710494896addf622c50a866edafb">https://github.com/macports/macports-ports/commit/ae99c5b73d78710494896addf622c50a866edafb</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 ae99c5b73d7 field3d: Fix build with python 3
</span>ae99c5b73d7 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ae99c5b73d78710494896addf622c50a866edafb
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Tue Feb 21 21:58:10 2023 -0600
<span style='display:block; white-space:pre;color:#404040;'> field3d: Fix build with python 3
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/66973
</span>---
graphics/field3d/Portfile | 2 +-
graphics/field3d/files/patch-SConstruct | 6 +++---
graphics/field3d/files/python3.patch | 38 +++++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/field3d/Portfile b/graphics/field3d/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 4c8eefc56a5..ae993e056e2 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/field3d/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/field3d/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -31,7 +31,6 @@ long_description Field3D is an open source library for storing voxel data
</span> data structures, mappings and file I/O routines to be added.
homepage https://sites.google.com/site/field3d/home
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin
</span>
compiler.cxx_standard 2014
configure.cxxflags-append -std=c++14
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,6 +42,7 @@ depends_lib-append port:ilmbase \
</span> variant universal {}
patchfiles patch-BuildSupport.py \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ python3.patch \
</span> patch-SConstruct
post-patch {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/field3d/files/patch-SConstruct b/graphics/field3d/files/patch-SConstruct
</span><span style='display:block; white-space:pre;color:#808080;'>index 592acef99c0..624c019f753 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/field3d/files/patch-SConstruct
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/field3d/files/patch-SConstruct
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,8 +1,8 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- SConstruct.FCS 2010-11-12 09:35:52.000000000 -0800
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ SConstruct 2011-08-09 09:43:20.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- SConstruct.orig 2020-03-11 10:54:36.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ SConstruct 2023-02-21 23:11:31.000000000 -0600
</span> @@ -38,6 +38,9 @@
<span style='display:block; white-space:pre;background:#ffe0e0;'>- env = Environment()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ env = Environment(CXXFLAGS="-std=c++11")
</span>
+env.Replace(CC = "@CC@")
+env.Replace(CXX = "@CXX@")
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/field3d/files/python3.patch b/graphics/field3d/files/python3.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..fe09ab3ea61
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/field3d/files/python3.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,38 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix build with python 3.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/imageworks/Field3D/issues/103
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/imageworks/Field3D/pull/104
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- BuildSupport.py.orig 2020-03-11 10:54:36.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ BuildSupport.py 2023-02-21 21:53:45.000000000 -0600
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -250,13 +250,13 @@
</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;'>+ def numCPUs():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if os.sysconf_names.has_key("SC_NPROCESSORS_ONLN"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if "SC_NPROCESSORS_ONLN" in os.sysconf_names:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ nCPUs = os.sysconf("SC_NPROCESSORS_ONLN")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if isinstance(nCPUs, int) and nCPUs > 0:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return nCPUs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return int(os.popen2("sysctl -n hw.ncpu")[1].read())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if os.environ.has_key("NUMBER_OF_PROCESSORS"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if "NUMBER_OF_PROCESSORS" in os.environ:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ nCPUs = int(os.environ["NUMBER_OF_PROCESSORS"]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if nCPUs > 0:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return nCPUs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -273,14 +273,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cmd = "install_name_tool "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cmd += "-id " + os.path.abspath(tgtName) + " "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cmd += tgtName
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- print cmd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print(cmd)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os.system(cmd)
</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;'>+ def bakeMathLibHeader(target, source, env):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if len(target) != 1 or len(source) != 1:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- print "Wrong number of arguments to bakeTypesIncludeFile"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ print("Wrong number of arguments to bakeTypesIncludeFile")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ out = open(str(target[0]), "w")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ inFile = open(str(source[0]))
</span></pre><pre style='margin:0'>
</pre>