summaryrefslogtreecommitdiff
path: root/security/py-pyvex/files
diff options
context:
space:
mode:
Diffstat (limited to 'security/py-pyvex/files')
-rw-r--r--security/py-pyvex/files/patch-pyvex__c_Makefile28
-rw-r--r--security/py-pyvex/files/patch-setup.py28
-rw-r--r--security/py-pyvex/files/patch-vex_Makefile-gcc11
3 files changed, 67 insertions, 0 deletions
diff --git a/security/py-pyvex/files/patch-pyvex__c_Makefile b/security/py-pyvex/files/patch-pyvex__c_Makefile
new file mode 100644
index 000000000000..b0408ea31318
--- /dev/null
+++ b/security/py-pyvex/files/patch-pyvex__c_Makefile
@@ -0,0 +1,28 @@
+--- pyvex_c/Makefile.orig 2019-04-16 21:08:49 UTC
++++ pyvex_c/Makefile
+@@ -4,6 +4,11 @@ ifeq ($(UNAME), Darwin)
+ STATIC_LIBRARY_FILE=libpyvex.a
+ LDFLAGS=-Wl,-install_name,$(LIBRARY_FILE)
+ endif
++ifeq ($(UNAME), FreeBSD)
++ LIBRARY_FILE=libpyvex.so
++ STATIC_LIBRARY_FILE=libpyvex.a
++ LDFLAGS=-Wl,-soname,$(LIBRARY_FILE) %%LDFLAGS%%
++endif
+ ifeq ($(UNAME), Linux)
+ LIBRARY_FILE=libpyvex.so
+ STATIC_LIBRARY_FILE=libpyvex.a
+@@ -27,10 +32,10 @@ sp +=
+ qs = $(subst ?,$(sp),$1)
+ sq = $(subst $(sp),?,$1)
+
+-CC=gcc
+-AR=ar
++CC?=gcc
++AR?=ar
+ INCFLAGS=-I "$(VEX_INCLUDE_PATH)"
+-CFLAGS=-g -O2 -Wall -shared -fPIC -std=c99 $(INCFLAGS)
++CFLAGS=-g %%CFLAGS%% -Wall -shared -fPIC $(INCFLAGS)
+
+ OBJECTS=pyvex.o logging.o analysis.o postprocess.o
+ HEADERS=pyvex.h
diff --git a/security/py-pyvex/files/patch-setup.py b/security/py-pyvex/files/patch-setup.py
new file mode 100644
index 000000000000..2a0bbd077218
--- /dev/null
+++ b/security/py-pyvex/files/patch-setup.py
@@ -0,0 +1,28 @@
+--- setup.py.orig 2020-01-08 00:58:26 UTC
++++ setup.py
+@@ -73,10 +73,8 @@ def _build_vex():
+ e['MULTIARCH'] = '1'
+ e['DEBUG'] = '1'
+
+- cmd1 = ['nmake', '/f', 'Makefile-msvc', 'all']
+- cmd2 = ['make', '-f', 'Makefile-gcc', '-j', str(multiprocessing.cpu_count()), 'all']
+- cmd3 = ['gmake', '-f', 'Makefile-gcc', '-j', str(multiprocessing.cpu_count()), 'all']
+- for cmd in (cmd1, cmd2, cmd3):
++ cmd3 = ['gmake', '-f', 'Makefile-gcc', '-j', '%%MAKE_JOBS_NUMBER%%', 'all']
++ for cmd in (cmd3,):
+ try:
+ if subprocess.call(cmd, cwd=VEX_PATH, env=e) == 0:
+ break
+@@ -91,10 +89,8 @@ def _build_pyvex():
+ e['VEX_INCLUDE_PATH'] = os.path.join(VEX_PATH, 'pub')
+ e['VEX_LIB_FILE'] = os.path.join(VEX_PATH, 'libvex.lib')
+
+- cmd1 = ['nmake', '/f', 'Makefile-msvc']
+- cmd2 = ['make', '-j', str(multiprocessing.cpu_count())]
+- cmd3 = ['gmake', '-j', str(multiprocessing.cpu_count())]
+- for cmd in (cmd1, cmd2, cmd3):
++ cmd3 = ['gmake', '-j', '%%MAKE_JOBS_NUMBER%%']
++ for cmd in (cmd3,):
+ try:
+ if subprocess.call(cmd, cwd='pyvex_c', env=e) == 0:
+ break
diff --git a/security/py-pyvex/files/patch-vex_Makefile-gcc b/security/py-pyvex/files/patch-vex_Makefile-gcc
new file mode 100644
index 000000000000..782ab5e1a92f
--- /dev/null
+++ b/security/py-pyvex/files/patch-vex_Makefile-gcc
@@ -0,0 +1,11 @@
+--- vex/Makefile-gcc.orig 2020-03-02 17:34:06 UTC
++++ vex/Makefile-gcc
+@@ -44,7 +44,7 @@ CFLAGS := -Ipub -Ipriv \
+ ifeq ($(DEBUG),1)
+ CFLAGS += -g
+ else
+-CFLAGS += -O2
++#CFLAGS += -O2
+ endif
+
+ # These are a separate set of defines that compile for parallel environments