[PATCH] testing/py3-pyclipper: new aport
Export this patch
---
testing/py3-pyclipper/10-system-libs.patch | 30 ++++++++++++++++++
testing/py3-pyclipper/APKBUILD | 36 ++++++++++++++++++++++
2 files changed, 66 insertions(+)
create mode 100644 testing/py3-pyclipper/10-system-libs.patch
create mode 100644 testing/py3-pyclipper/APKBUILD
diff --git a/testing/py3-pyclipper/10-system-libs.patch b/testing/py3-pyclipper/10-system-libs.patch
new file mode 100644
index 0000000000..cc1c738856
--- /dev/null
+++ b/testing/py3-pyclipper/10-system-libs.patch
@@ -0,0 +1,30 @@
+--- a/setup.py
++++ b/setup.py
+@@ -23,7 +23,7 @@
+ from Cython.Distutils import build_ext
+
+ print('Development mode: Compiling Cython modules from .pyx sources.')
+- sources = ["pyclipper/pyclipper.pyx", "pyclipper/clipper.cpp"]
++ sources = ["pyclipper/pyclipper.pyx"]
+
+ from setuptools.command.sdist import sdist as _sdist
+
+@@ -40,7 +40,7 @@
+
+ else:
+ print('Distribution mode: Compiling Cython generated .cpp sources.')
+- sources = ["pyclipper/pyclipper.cpp", "pyclipper/clipper.cpp"]
++ sources = ["pyclipper/pyclipper.cpp"]
+ cmdclass = {}
+
+
+@@ -51,6 +51,9 @@
+ ext = Extension("pyclipper",
+ sources=sources,
+ language="c++",
++ include_dirs=['/usr/include/polyclipping'],
++ libraries=['polyclipping'],
++ library_dirs=['/usr/lib'],
+ # define extra macro definitions that are used by clipper
+ # Available definitions that can be used with pyclipper:
+ # use_lines, use_int32
diff --git a/testing/py3-pyclipper/APKBUILD b/testing/py3-pyclipper/APKBUILD
new file mode 100644
index 0000000000..4ce356a068
--- /dev/null
+++ b/testing/py3-pyclipper/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Sascha Brawer <sascha@brawer.ch>
+pkgname=py3-pyclipper
+pkgver=1.1.0
+pkgrel=0
+pkgdesc="Cython wrapper for clipper"
+url="https://github.com/fonttools/pyclipper"
+arch="all"
+license="MIT"
+depends="python3"
+makedepends="cython py3-setuptools python3-dev"
+checkdepends="py3-pytest"
+source="$pkgname-$pkgver.tar.gz::https://github.com/fonttools/pyclipper/archive/$pkgver.post2.tar.gz
+ 10-system-libs.patch
+ "
+builddir="$srcdir/pyclipper-$pkgver.post2"
+
+prepare() {
+ default_prepare
+ rm pyclipper/clipper.cpp pyclipper/clipper.hpp
+}
+
+build() {
+ git init
+ python3 setup.py build
+}
+
+check() {
+ python3 setup.py test
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="2c5044ef3a516e909a1f2e87a4824660bf02721f830a0dfb6a853eae02875b6e45a0aaaf3c3591ad7a5b6679364a366c5977f7ba1f44899f98a7c2f95f2f5061 py3-pyclipper-1.1.0.tar.gz
+f15b927ce6b40413fa3f44b8e3a4bebc8799a981babaa7e69b73b525c155dbe60c46a373509df886709daaa8c15169a9f38239f34da9d1f886f90ca61247a034 10-system-libs.patch"
--
2.24.1