ports/security/py-pyvex/files/patch-pyvex__c_Makefile
Tijl Coosemans 7d4723292c Update devel/gmake to 4.3.
Some changes have been made in this release that break backwards
compatibility.  Let USES=gmake force users to upgrade to this version so
port maintainers don't have to support older versions.

PR:		245725
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2020-05-09 19:24:49 +00:00

35 lines
906 B
Text

--- 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
@@ -22,15 +27,13 @@ endif
# deeply evil
# https://www.cmcrossroads.com/article/gnu-make-meets-file-names-spaces-them
-sp :=
-sp +=
-qs = $(subst ?,$(sp),$1)
-sq = $(subst $(sp),?,$1)
+qs = $(subst ?,\ ,$1)
+sq = $(subst \ ,?,$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