aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-08-14 18:36:41 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-08-14 18:37:56 +0000
commit78deabb5e1ef30032eabd04c854051d749c04da0 (patch)
tree69186232bb2a63c1af1671a38296a4d4efc654f7
parentcf5e9659ef7fbaebd172904d3a37446d13eabf28 (diff)
downloadports-78deabb5e1ef30032eabd04c854051d749c04da0.tar.gz
ports-78deabb5e1ef30032eabd04c854051d749c04da0.zip
math/py-rectangle-packer: New port: Rectangle packing library
-rw-r--r--math/Makefile1
-rw-r--r--math/py-rectangle-packer/Makefile26
-rw-r--r--math/py-rectangle-packer/distinfo3
-rw-r--r--math/py-rectangle-packer/pkg-descr5
4 files changed, 35 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 2a4291f27543..5e5bd2db07e7 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -960,6 +960,7 @@
SUBDIR += py-qdldl
SUBDIR += py-quadprog
SUBDIR += py-random2
+ SUBDIR += py-rectangle-packer
SUBDIR += py-roman
SUBDIR += py-rpy2
SUBDIR += py-rustworkx
diff --git a/math/py-rectangle-packer/Makefile b/math/py-rectangle-packer/Makefile
new file mode 100644
index 000000000000..b40ab1c7f6a2
--- /dev/null
+++ b/math/py-rectangle-packer/Makefile
@@ -0,0 +1,26 @@
+PORTNAME= rectangle-packer
+DISTVERSION= 2.0.1
+CATEGORIES= math python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Rectangle packing library
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+USES= python:3.6+
+USE_PYTHON= distutils cython autoplist unittest
+
+USE_GITHUB= yes
+GH_ACCOUNT= Penlect
+
+TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC= ${WRKSRC}/test
+
+post-install:
+ @${STRIP_CMD} \
+ ${STAGEDIR}${PYTHON_SITELIBDIR}/rpack/_core${PYTHON_EXT_SUFFIX}.so \
+ ${STAGEDIR}${PYTHON_SITELIBDIR}/rpack/_rpack${PYTHON_EXT_SUFFIX}.so
+
+.include <bsd.port.mk>
diff --git a/math/py-rectangle-packer/distinfo b/math/py-rectangle-packer/distinfo
new file mode 100644
index 000000000000..eb064206e95a
--- /dev/null
+++ b/math/py-rectangle-packer/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660501577
+SHA256 (Penlect-rectangle-packer-2.0.1_GH0.tar.gz) = 900c23384d7f0e58b9df72b6ce66bbfe57821cf87ca1c1e46ac960591b978a89
+SIZE (Penlect-rectangle-packer-2.0.1_GH0.tar.gz) = 98442
diff --git a/math/py-rectangle-packer/pkg-descr b/math/py-rectangle-packer/pkg-descr
new file mode 100644
index 000000000000..7436583f9ce2
--- /dev/null
+++ b/math/py-rectangle-packer/pkg-descr
@@ -0,0 +1,5 @@
+rectangle-packer solves the following problem: Given a set of rectangles with
+fixed orientations, find a bounding box of minimum area that contains them all
+with no overlap.
+
+WWW: https://github.com/Penlect/rectangle-packer