Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Dec 2020 22:35:42 +0000 (UTC)
From:      Diane Bruce <db@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r559782 - in head/devel: . py-pynest2d py-pynest2d/files
Message-ID:  <202012312235.0BVMZgHk065739@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: db
Date: Thu Dec 31 22:35:41 2020
New Revision: 559782
URL: https://svnweb.freebsd.org/changeset/ports/559782

Log:
  cura is just a front-end, and heavily depends on its dependencies.
  without updating depended libraries, new version will not provide what
  the release note says. this is especially true in this PR, as the reporter
  needs fixes in cura engine, the slicer.
  
  Submitter was not clear with the bugs present. In any case I have corrected
  a few missing dependancies and am committing two of the dependencies
  for cura-engine.
  
  PR:		ports/251236
  Reported by:	trombik1973@gmail.com

Added:
  head/devel/py-pynest2d/
  head/devel/py-pynest2d/Makefile   (contents, props changed)
  head/devel/py-pynest2d/distinfo   (contents, props changed)
  head/devel/py-pynest2d/files/
  head/devel/py-pynest2d/files/patch-CMakeLists.txt   (contents, props changed)
  head/devel/py-pynest2d/files/patch-cmake_FindClipper.cmake   (contents, props changed)
  head/devel/py-pynest2d/files/patch-cmake_FindSIP.cmake   (contents, props changed)
  head/devel/py-pynest2d/files/patch-src_ItemGroup.sip   (contents, props changed)
  head/devel/py-pynest2d/files/patch-src_Pynest2D.sip   (contents, props changed)
  head/devel/py-pynest2d/pkg-descr   (contents, props changed)
  head/devel/py-pynest2d/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Thu Dec 31 22:28:44 2020	(r559781)
+++ head/devel/Makefile	Thu Dec 31 22:35:41 2020	(r559782)
@@ -4866,6 +4866,7 @@
     SUBDIR += py-pymaven-patch
     SUBDIR += py-pymisp
     SUBDIR += py-pympler
+    SUBDIR += py-pynest2d
     SUBDIR += py-pyopencl
     SUBDIR += py-pyparsing
     SUBDIR += py-pyperclip

Added: head/devel/py-pynest2d/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/Makefile	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+PORTNAME=	pynest2d
+DISTVERSION=	4.8.0
+CATEGORIES=	devel python
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	y@trombik.org
+COMMENT=	CPython bindings for libnest2d by Ultimaker
+
+LICENSE=	LGPL3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${LOCALBASE}/include/libnest2d/libnest2d.hpp:devel/libnest2d-ultimaker
+BUILD_DEPENDS=	${LOCALBASE}/include/libnest2d/libnest2d.hpp:devel/libnest2d-ultimaker
+LIB_DEPENDS=	libpolyclipping.so:graphics/polyclipping \
+		libboost_system.so:devel/boost-libs \
+		libnlopt.so:math/nlopt
+
+USES=		python:3.6+ cmake compiler:c++11-lang pyqt:5 pkgconfig
+
+USE_GITHUB=	yes
+GH_TUPLE=	Ultimaker:pynest2d:d31a381
+USE_PYQT=	sip pysip
+CMAKE_ARGS=	-DSIP_EXECUTABLE=${SIP} \
+			-DLIBNEST2D_INCLUDE_DIRS=${PREFIX}/include/libnest2d
+
+CONFIGURE_ENV=	CLIPPER_PATH=${LOCALBASE} VERBOSE=y
+.include <bsd.port.mk>

Added: head/devel/py-pynest2d/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/distinfo	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1608805108
+SHA256 (Ultimaker-pynest2d-4.8.0-d31a381_GH0.tar.gz) = 4dd62924608a6193643cdbef250c71a3fc23e560e3f21dc714648843e035a599
+SIZE (Ultimaker-pynest2d-4.8.0-d31a381_GH0.tar.gz) = 18169

Added: head/devel/py-pynest2d/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/files/patch-CMakeLists.txt	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1,10 @@
+--- CMakeLists.txt.orig	2020-12-24 21:32:13 UTC
++++ CMakeLists.txt
+@@ -44,6 +44,6 @@ set(SIP_EXTRA_FILES_DEPEND
+     src/String.sip
+ )
+ 
+-set(SIP_EXTRA_OPTIONS -g)  # Always release the GIL before calling C++ methods.
++set(SIP_EXTRA_OPTIONS -g -n PyQt5.sip)  # Always release the GIL before calling C++ methods.
+ include_directories(src/ ${SIP_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS} ${CLIPPER_INCLUDE_DIRS} ${NLopt_INCLUDE_DIRS} ${LIBNEST2D_INCLUDE_DIRS})
+ add_sip_python_module(pynest2d src/Pynest2D.sip ${CLIPPER_LIBRARIES} ${NLopt_LIBRARIES})

Added: head/devel/py-pynest2d/files/patch-cmake_FindClipper.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/files/patch-cmake_FindClipper.cmake	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1,13 @@
+--- cmake/FindClipper.cmake.orig	2020-12-24 21:19:11 UTC
++++ cmake/FindClipper.cmake
+@@ -55,8 +55,8 @@ set(LIB_SEARCHDIRS 
+ 
+ set(_deb_postfix "d")
+ 
+-find_library(CLIPPER_LIBRARIES_RELEASE polyclipping ${LIB_SEARCHDIRS})
+-find_library(CLIPPER_LIBRARIES_DEBUG polyclipping${_deb_postfix} ${LIB_SEARCHDIRS})
++find_library(CLIPPER_LIBRARIES_RELEASE libpolyclipping.so ${LIB_SEARCHDIRS})
++find_library(CLIPPER_LIBRARIES_DEBUG libpolyclipping${_deb_postfix} ${LIB_SEARCHDIRS})
+ 
+ if(CLIPPER_LIBRARIES_${CLIPPER_BUILD_TYPE})
+     set(CLIPPER_LIBRARIES "${CLIPPER_LIBRARIES_${CLIPPER_BUILD_TYPE}}")

Added: head/devel/py-pynest2d/files/patch-cmake_FindSIP.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/files/patch-cmake_FindSIP.cmake	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1,32 @@
+--- cmake/FindSIP.cmake.orig	2020-12-24 21:03:56 UTC
++++ cmake/FindSIP.cmake
+@@ -57,16 +57,26 @@ endif()
+ 
+ get_filename_component(_python_binary_path ${Python3_EXECUTABLE} DIRECTORY)
+ 
+-find_program(SIP_EXECUTABLE sip
++find_program(SIP_EXECUTABLE sip5
+     HINTS ${CMAKE_PREFIX_PATH}/bin ${CMAKE_INSTALL_PATH}/bin ${_python_binary_path} ${Python3_SITELIB}/PyQt5
+ )
+ 
++execute_process(
++    COMMAND sip-module --sip-h --target-dir ${CMAKE_BINARY_DIR} PyQt5.sip
++    RESULT_VARIABLE _process_status
++    OUTPUT_VARIABLE _process_output
++    OUTPUT_STRIP_TRAILING_WHITESPACE
++)
++if(NOT ${_process_status} EQUAL 0)
++    message(FATAL_ERROR "Failed to get sip.h. Error: ${_process_output}")
++endif()
++
+ find_path(SIP_INCLUDE_DIRS sip.h
+-    HINTS ${CMAKE_PREFIX_PATH}/include ${CMAKE_INSTALL_PATH}/include ${Python3_INCLUDE_DIRS} ${Python3_SITELIB}/PyQt5
++    HINTS ${CMAKE_BINARY_DIR} ${CMAKE_PREFIX_PATH}/include ${CMAKE_INSTALL_PATH}/include ${Python3_INCLUDE_DIRS} ${Python3_SITELIB}/PyQt5
+ )
+ 
+ execute_process(
+-    COMMAND ${Python3_EXECUTABLE} -c "import sip; print(sip.SIP_VERSION_STR)"
++    COMMAND ${Python3_EXECUTABLE} -c "import PyQt5.sip; print(PyQt5.sip.SIP_VERSION_STR)"
+     RESULT_VARIABLE _process_status
+     OUTPUT_VARIABLE _process_output
+     OUTPUT_STRIP_TRAILING_WHITESPACE

Added: head/devel/py-pynest2d/files/patch-src_ItemGroup.sip
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/files/patch-src_ItemGroup.sip	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1,42 @@
+--- src/ItemGroup.sip.orig	2020-12-24 22:41:47 UTC
++++ src/ItemGroup.sip
+@@ -23,7 +23,7 @@
+         for(size_t i = 0; i < size; ++i)
+         {
+             Item item = sipCpp->at(0);
+-            PyObject* python_item = sipConvertFromInstance(&item, sipClass_Item, sipTransferObj);
++            PyObject* python_item = sipConvertFromType(&item, sipType_Item, sipTransferObj);
+             if(!python_item)
+             {
+                 Py_DECREF(result_list);
+@@ -48,20 +48,20 @@
+         PyObject* list_item;
+         while(list_item = PyIter_Next(iterator))
+         {
+-            if(!sipCanConvertToInstance(list_item, sipClass_Item, SIP_NOT_NONE))
++            if(!sipCanConvertToType(list_item, sipType_Item, SIP_NOT_NONE))
+             {
+                 PyErr_Format(PyExc_TypeError, "Object in iterable cannot be converted to a libnest2d Item.");
+                 *sipIsErr = 1;
+                 break;
+             }
+             int state;
+-            Item* item = reinterpret_cast<Item*>(sipConvertToInstance(list_item, sipClass_Item, 0, SIP_NOT_NONE, &state, sipIsErr));
++            Item* item = reinterpret_cast<Item*>(sipConvertToType(list_item, sipType_Item, 0, SIP_NOT_NONE, &state, sipIsErr));
+             if(!*sipIsErr)
+             {
+                 result->push_back(*item);
+             }
+ 
+-            sipReleaseInstance(item, sipClass_Item, state);
++            sipReleaseType(item, sipType_Item, state);
+             Py_DECREF(list_item);
+         }
+ 
+@@ -74,4 +74,4 @@
+         *sipCppPtr = result;
+         return sipGetState(sipTransferObj);
+     %End
+-};
+\ No newline at end of file
++};

Added: head/devel/py-pynest2d/files/patch-src_Pynest2D.sip
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/files/patch-src_Pynest2D.sip	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1,35 @@
+--- src/Pynest2D.sip.orig	2020-12-24 22:47:54 UTC
++++ src/Pynest2D.sip
+@@ -49,7 +49,7 @@ using namespace placers;
+         for(size_t i = 0; i < size; ++i)
+         {
+             Item* item = sipCpp->at(0);
+-            PyObject* python_item = sipConvertFromInstance(item, sipClass_Item, sipTransferObj);
++            PyObject* python_item = sipConvertFromType(item, sipType_Item, sipTransferObj);
+             if(!python_item)
+             {
+                 Py_DECREF(result_list);
+@@ -74,20 +74,20 @@ using namespace placers;
+         PyObject* list_item;
+         while(list_item = PyIter_Next(iterator))
+         {
+-            if(!sipCanConvertToInstance(list_item, sipClass_Item, SIP_NOT_NONE))
++            if(!sipCanConvertToType(list_item, sipType_Item, SIP_NOT_NONE))
+             {
+                 PyErr_Format(PyExc_TypeError, "Object in iterable cannot be converted to a libnest2d Item.");
+                 *sipIsErr = 1;
+                 break;
+             }
+             int state;
+-            Item* item = reinterpret_cast<Item*>(sipConvertToInstance(list_item, sipClass_Item, 0, SIP_NOT_NONE, &state, sipIsErr));
++            Item* item = reinterpret_cast<Item*>(sipConvertToType(list_item, sipType_Item, 0, SIP_NOT_NONE, &state, sipIsErr));
+             if(!*sipIsErr)
+             {
+                 storage_vector->push_back(item);
+             }
+ 
+-            sipReleaseInstance(item, sipClass_Item, state);
++            sipReleaseType(item, sipType_Item, state);
+             Py_DECREF(list_item);
+         }
+ 

Added: head/devel/py-pynest2d/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/pkg-descr	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1,3 @@
+Python bindings for libnest2d by Ultimaker
+
+WWW: https://github.com/Ultimaker/libnest2d

Added: head/devel/py-pynest2d/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-pynest2d/pkg-plist	Thu Dec 31 22:35:41 2020	(r559782)
@@ -0,0 +1 @@
+%%PYTHON_SITELIBDIR%%/pynest2d.so



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