svn commit: r545103 - in head/cad/py-ocp: . files
Steve Wills
swills at FreeBSD.org
Sun Aug 16 12:53:48 UTC 2020
Author: swills
Date: Sun Aug 16 12:53:47 2020
New Revision: 545103
URL: https://svnweb.freebsd.org/changeset/ports/545103
Log:
cad/py-ocp: create port
OCP is a Python wrapper for OCCT (OpenCascade) generated using pywrap
primarily used by CadQuery.
WWW: https://github.com/CadQuery/OCP
PR: 248202
Submitted by: Neal Nelson <ports at nicandneal.net>
Added:
head/cad/py-ocp/
head/cad/py-ocp/Makefile (contents, props changed)
head/cad/py-ocp/distinfo (contents, props changed)
head/cad/py-ocp/files/
head/cad/py-ocp/files/patch-FindOpenCascade.cmake (contents, props changed)
head/cad/py-ocp/files/patch-OCCT_OpenGl__HaltonSampler.hxx (contents, props changed)
head/cad/py-ocp/files/patch-Standard.cpp (contents, props changed)
head/cad/py-ocp/pkg-descr (contents, props changed)
Added: head/cad/py-ocp/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/cad/py-ocp/Makefile Sun Aug 16 12:53:47 2020 (r545103)
@@ -0,0 +1,46 @@
+# $FreeBSD$
+
+PORTNAME= ocp
+DISTVERSION= 7.4-RC2
+CATEGORIES= cad
+# Direct access to github is needed because the release added an extra archive which
+# we need to build from, rather than the initial release.
+MASTER_SITES= https://github.com/CadQuery/OCP/releases/download/${DISTVERSION}/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= OCP_src_Linux
+
+MAINTAINER= ports at nicandneal.net
+COMMENT= Python wrapper for OCCT generated using pywrap
+
+LICENSE= APACHE20
+
+PATCH_DEPENDS= ${LOCALBASE}/include/OpenCASCADE/OpenGl_HaltonSampler.hxx:cad/opencascade
+LIB_DEPENDS= libTKernel.so:cad/opencascade
+BUILD_DEPENDS= ${LOCALBASE}/share/cmake/pybind11/pybind11Config.cmake:devel/pybind11 \
+ ${PYTHON_SITELIBDIR}/pybind11:devel/py-pybind11@${PY_FLAVOR}
+
+USES= cmake gl python:3.6+ zip
+USE_GL= gl glu glut
+
+WRKSRC= ${WRKDIR}/OCP_src_Ubuntu-16.04
+
+OCCT= ${LOCALBASE}/include/OpenCASCADE
+OCCT_LOCAL= ${WRKSRC}/OCCT
+
+CMAKE_ARGS= -DOPENCASCADE_INCLUDE_DIR=${OCCT} \
+ -DPYTHON_EXECUTABLE=${PYTHON_CMD}
+
+USE_PYTHON= flavors
+
+PLIST_FILES= ${PYTHON_SITELIBDIR}/OCP.so
+
+pre-patch:
+# Copy and patch a header file with a troublesome C++ standard mismatch.
+ ${MKDIR} ${OCCT_LOCAL}
+ ${CP} ${OCCT}/OpenGl_HaltonSampler.hxx ${OCCT_LOCAL}
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/
+ ${INSTALL_LIB} ${BUILD_WRKSRC}/OCP.so ${STAGEDIR}${PYTHON_SITELIBDIR}
+
+.include <bsd.port.mk>
Added: head/cad/py-ocp/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/cad/py-ocp/distinfo Sun Aug 16 12:53:47 2020 (r545103)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1595488164
+SHA256 (OCP_src_Linux.zip) = 126953106d7e52d3ec6c606ff3a34ecde5c6598899ab0c31279e185771304192
+SIZE (OCP_src_Linux.zip) = 50341316
Added: head/cad/py-ocp/files/patch-FindOpenCascade.cmake
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/cad/py-ocp/files/patch-FindOpenCascade.cmake Sun Aug 16 12:53:47 2020 (r545103)
@@ -0,0 +1,12 @@
+--- FindOpenCascade.cmake.orig 2020-06-12 09:48:04 UTC
++++ FindOpenCascade.cmake
+@@ -69,6 +69,6 @@ foreach( MOD ${OCCT_MODULES})
+
+ endforeach()
+
+-target_include_directories( OPENCASCADE INTERFACE ${OPENCASCADE_INCLUDE_DIR})
++target_include_directories( OPENCASCADE INTERFACE OCCT ${OPENCASCADE_INCLUDE_DIR})
+
+-find_package_handle_standard_args( OPENCASCADE DEFAULT_MSG OPENCASCADE_LIBRARIES OPENCASCADE_INCLUDE_DIR )
+\ No newline at end of file
++find_package_handle_standard_args( OPENCASCADE DEFAULT_MSG OPENCASCADE_LIBRARIES OPENCASCADE_INCLUDE_DIR )
Added: head/cad/py-ocp/files/patch-OCCT_OpenGl__HaltonSampler.hxx
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/cad/py-ocp/files/patch-OCCT_OpenGl__HaltonSampler.hxx Sun Aug 16 12:53:47 2020 (r545103)
@@ -0,0 +1,11 @@
+--- OCCT/OpenGl_HaltonSampler.hxx.orig 2020-06-15 08:29:45 UTC
++++ OCCT/OpenGl_HaltonSampler.hxx
+@@ -180,7 +180,7 @@ void OpenGl_HaltonSampler::initRandom (Random_number_g
+ {
+ aPerms[aBase][i] = i;
+ }
+- std::random_shuffle (aPerms[aBase].begin(), aPerms[aBase].end(), theRand);
++ std::shuffle (aPerms[aBase].begin(), aPerms[aBase].end(), theRand);
+ }
+ initTables (aPerms);
+ }
Added: head/cad/py-ocp/files/patch-Standard.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/cad/py-ocp/files/patch-Standard.cpp Sun Aug 16 12:53:47 2020 (r545103)
@@ -0,0 +1,17 @@
+--- Standard.cpp.orig 2020-05-29 13:26:32 UTC
++++ Standard.cpp
+@@ -902,10 +902,10 @@ py::module m = static_cast<py::module>(main_module.att
+ R"#(None)#" , py::arg("theOne"), py::arg("theTwo")
+ );
+ // ./opencascade/Standard_Time.hxx
+- m.def("IsEqual",
+- (Standard_Boolean (*)( const Standard_Time , const Standard_Time )) static_cast<Standard_Boolean (*)( const Standard_Time , const Standard_Time )>(&IsEqual),
+- R"#(None)#" , py::arg("theOne"), py::arg("theTwo")
+- );
++// m.def("IsEqual",
++// (Standard_Boolean (*)( const Standard_Time , const Standard_Time )) static_cast<Standard_Boolean (*)( const Standard_Time , const Standard_Time )>(&IsEqual),
++// R"#(None)#" , py::arg("theOne"), py::arg("theTwo")
++// );
+ // ./opencascade/Standard_NullValue.hxx
+ // ./opencascade/Standard_DefineHandle.hxx
+ // ./opencascade/Standard_Mutex.hxx
Added: head/cad/py-ocp/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/cad/py-ocp/pkg-descr Sun Aug 16 12:53:47 2020 (r545103)
@@ -0,0 +1,4 @@
+OCP is a Python wrapper for OCCT (OpenCascade) generated using pywrap
+primarily used by CadQuery.
+
+WWW: https://github.com/CadQuery/OCP
More information about the svn-ports-head
mailing list