Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/python-shapely
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-05-22 20:18:50 +0200
committerErich Eckner <git@eckner.net>2023-05-22 20:18:50 +0200
commite74cde76c104df82b120a7b13964cb786da8f565 (patch)
tree39967e24037929c04aaf79922aa260b437a60a5e /extra/python-shapely
parent73e1d3b448cc583ab38cae4d61a26f313fad946b (diff)
community -> extra
Diffstat (limited to 'extra/python-shapely')
-rw-r--r--extra/python-shapely/PKGBUILD23
-rw-r--r--extra/python-shapely/load_dll_c.patch13
2 files changed, 36 insertions, 0 deletions
diff --git a/extra/python-shapely/PKGBUILD b/extra/python-shapely/PKGBUILD
new file mode 100644
index 00000000..14ce07a9
--- /dev/null
+++ b/extra/python-shapely/PKGBUILD
@@ -0,0 +1,23 @@
+# temporary fix for:
+# - https://github.com/Toblerity/Shapely/pull/762
+#
+# which caused:
+# - https://community.ultimaker.com/topic/29721-archlinux32-cura-341/?_fromLogin=1#replyForm
+#
+source+=(load_dll_c.patch)
+sha512sums+=('6dee4823b76d5057beaed09e9ed529d03a9f76141598a4038f3c51cbca828b1f3e9203a25dab91ee1ff31fee2bf2781d6171dc662f5aa1715c9d5296f8607c60')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ $ i cd Shapely-$pkgver && patch -p1 -i "$srcdir/load_dll_c.patch"
+ '
+)"
+
+# patch CARCH to always use i686 build directory during testing
+eval "$(
+ declare -f check | \
+ sed '
+ /.*py.test/s/\$CARCH/i686/
+ '
+)"
diff --git a/extra/python-shapely/load_dll_c.patch b/extra/python-shapely/load_dll_c.patch
new file mode 100644
index 00000000..8efc8ec5
--- /dev/null
+++ b/extra/python-shapely/load_dll_c.patch
@@ -0,0 +1,13 @@
+diff -rauN Shapely-1.7.0/shapely/geos.py Shapely-1.7.0-load_dll-patch/shapely/geos.py
+--- Shapely-1.7.0/shapely/geos.py 2019-12-31 18:31:44.000000000 +0100
++++ Shapely-1.7.0-load_dll-patch/shapely/geos.py 2020-04-23 08:46:30.677274478 +0200
+@@ -87,7 +87,8 @@
+ _lgeos = load_dll('geos_c', fallbacks=alt_paths)
+ # Necessary for environments with only libc.musl
+ c_alt_paths = [
+- 'libc.musl-x86_64.so.1'
++ 'libc.musl-x86_64.so.1',
++ 'libc.so.6'
+ ]
+ free = load_dll('c', fallbacks=c_alt_paths).free
+ free.argtypes = [c_void_p]