aboutsummaryrefslogtreecommitdiff
path: root/science/py-pymatgen
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2020-01-23 10:44:41 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2020-01-23 10:44:41 +0000
commit2d53df590ee23a0c48062910b0acd7735ca26b51 (patch)
treeddf2a1546ef3d616f5e02ed8220c8fe342ae1172 /science/py-pymatgen
parentbed00a1384db0d0afd7fabf188f0719738c035e7 (diff)
downloadports-2d53df590ee23a0c48062910b0acd7735ca26b51.tar.gz
ports-2d53df590ee23a0c48062910b0acd7735ca26b51.zip
science/py-pymatgen: fix build on GCC architectures
C++11 compiler is necessary:cc1plus: error: unrecognized command line option "-std=c++11" -march=native is specified in CXXFLAGS and may break runtime on some x86: cc1plus: error: unrecognized command line option "-march=native" Approved by: portmgr (ports compliance)
Notes
Notes: svn path=/head/; revision=523918
Diffstat (limited to 'science/py-pymatgen')
-rw-r--r--science/py-pymatgen/Makefile2
-rw-r--r--science/py-pymatgen/files/patch-setup.py18
2 files changed, 19 insertions, 1 deletions
diff --git a/science/py-pymatgen/Makefile b/science/py-pymatgen/Makefile
index 738ff4d665d1..948c0ea6a279 100644
--- a/science/py-pymatgen/Makefile
+++ b/science/py-pymatgen/Makefile
@@ -29,7 +29,7 @@ RUN_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}tabulate>0:devel/py-tabulate@${PY_FLAVOR}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}netCDF4>0:science/py-netCDF4@${PY_FLAVOR} # see https://github.com/materialsproject/pymatgen/issues/1386
-USES= python:3.5+
+USES= compiler:c++11-lang python:3.5+
USE_PYTHON= distutils concurrent autoplist
.include <bsd.port.mk>
diff --git a/science/py-pymatgen/files/patch-setup.py b/science/py-pymatgen/files/patch-setup.py
new file mode 100644
index 000000000000..a1e9b3834348
--- /dev/null
+++ b/science/py-pymatgen/files/patch-setup.py
@@ -0,0 +1,18 @@
+--- setup.py.orig 2020-01-23 10:17:29 UTC
++++ setup.py
+@@ -31,7 +31,7 @@ if sys.platform.startswith('win') and platform.machine
+ extra_link_args.append('-Wl,--allow-multiple-definition')
+
+ cpp_extra_link_args = extra_link_args
+-cpp_extra_compile_args = ["-Wno-cpp", "-Wno-unused-function", "-O2", "-march=native", '-std=c++11']
++cpp_extra_compile_args = ["-Wno-cpp", "-Wno-unused-function", "-O2", '-std=c++11']
+ if sys.platform.startswith('darwin'):
+ cpp_extra_compile_args.append("-stdlib=libc++")
+ cpp_extra_link_args = ["-O2", "-march=native", '-stdlib=libc++']
+@@ -189,4 +189,4 @@ setup(
+ 'get_environment = pymatgen.cli.get_environment:main',
+ ]
+ }
+-)
+\ No newline at end of file
++)