Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jan 2020 10:44:41 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r523918 - in head/science/py-pymatgen: . files
Message-ID:  <202001231044.00NAifY1069904@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pkubaj
Date: Thu Jan 23 10:44:41 2020
New Revision: 523918
URL: https://svnweb.freebsd.org/changeset/ports/523918

Log:
  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)

Added:
  head/science/py-pymatgen/files/
  head/science/py-pymatgen/files/patch-setup.py   (contents, props changed)
Modified:
  head/science/py-pymatgen/Makefile

Modified: head/science/py-pymatgen/Makefile
==============================================================================
--- head/science/py-pymatgen/Makefile	Thu Jan 23 10:10:52 2020	(r523917)
+++ head/science/py-pymatgen/Makefile	Thu Jan 23 10:44:41 2020	(r523918)
@@ -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>

Added: head/science/py-pymatgen/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/py-pymatgen/files/patch-setup.py	Thu Jan 23 10:44:41 2020	(r523918)
@@ -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
++)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001231044.00NAifY1069904>