Skip to content

Commit

Permalink
devel/py-donut-shellcode: Fix build on i386
Browse files Browse the repository at this point in the history
Reported by:	pkg-fallout
  • Loading branch information
alonsobsd committed May 16, 2023
1 parent 705ef4f commit e1e1e6f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 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}
Expand All @@ -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 <bsd.port.mk>
22 changes: 22 additions & 0 deletions 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']

0 comments on commit e1e1e6f

Please sign in to comment.