From e1e1e6f6c1a215dc3af4544a1eb042d8efc47838 Mon Sep 17 00:00:00 2001 From: Jose Alonso Cardenas Marquez Date: Tue, 16 May 2023 00:07:46 -0500 Subject: [PATCH] devel/py-donut-shellcode: Fix build on i386 Reported by: pkg-fallout --- devel/py-donut-shellcode/Makefile | 5 ++++- devel/py-donut-shellcode/files/patch-setup.py | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 devel/py-donut-shellcode/files/patch-setup.py diff --git a/devel/py-donut-shellcode/Makefile b/devel/py-donut-shellcode/Makefile index 8b086bcf069fd..e7023195ae725 100644 --- a/devel/py-donut-shellcode/Makefile +++ b/devel/py-donut-shellcode/Makefile @@ -1,5 +1,6 @@ PORTNAME= donut-shellcode DISTVERSION= 1.0.2 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -10,7 +11,9 @@ WWW= https://github.com/TheWover/donut LICENSE= BSD3CLAUSE -USES= python:3.6+ +USES= dos2unix python:3.6+ USE_PYTHON= distutils autoplist +DOS2UNIX_GLOB= *.py + .include diff --git a/devel/py-donut-shellcode/files/patch-setup.py b/devel/py-donut-shellcode/files/patch-setup.py new file mode 100644 index 0000000000000..ac211d79f3e12 --- /dev/null +++ b/devel/py-donut-shellcode/files/patch-setup.py @@ -0,0 +1,22 @@ +--- setup.py.orig 2023-05-16 05:00:53 UTC ++++ setup.py +@@ -1,10 +1,18 @@ + from setuptools import Extension, setup + import sys ++import platform + + with open("README.md", "r") as fh: + long_description = fh.read() + +-static_libraries = ['aplib64'] ++if platform.system() == 'FreeBSD': ++ if platform.machine() == 'i386': ++ static_libraries = ['aplib32'] ++ elif platform.machine() == 'amd64': ++ static_libraries = ['aplib64'] ++else: ++ static_libraries = ['aplib64'] ++ + static_lib_dir = 'lib' + libraries = [] + library_dirs = ['lib']