openbsd-ports/devel/ptlib/patches/patch-make_unix_mak
ajacoutot 75266ac947 Add -fPIC to PTLIB_CFLAGS to build with newer binutils.
As a bonus, drop patching for STDCCFLAGS used by ptlib dependencies
(/usr/local/share/ptlib/make/unix.mak) since PTLIB_CFLAGS is appended to
CFLAGS/CXXFLAGS automatically.
2015-05-22 15:16:24 +00:00

36 lines
1.0 KiB
Plaintext

$OpenBSD: patch-make_unix_mak,v 1.7 2015/05/22 15:16:24 ajacoutot Exp $
Make sure _SONAME is versioned (.so.X.Y versus .so).
--- make/unix.mak.orig Mon Feb 17 03:14:37 2014
+++ make/unix.mak Fri May 22 15:33:37 2015
@@ -192,8 +192,14 @@ ifeq ($(target_cpu),x86)
#PTLIB_CFLAGS += -m486
endif
-LDLIBS += -lossaudio
+ifeq ($(MACHTYPE),amd64)
+STDCCFLAGS += -DP_64BIT
+endif
+ifeq ($(MACHTYPE),sparc64)
+STDCCFLAGS += -DP_64BIT
+endif
+
P_USE_RANLIB := 1
#PTLIB_CFLAGS += -DP_USE_PRAGMA # migrated to configure
@@ -571,6 +577,12 @@ else
PTLIB_DEBUG_SONAME = $(subst .$(LIB_SUFFIX),.$(MAJOR_VERSION).$(MINOR_VERSION)$(BUILD_TYPE)$(BUILD_NUMBER).$(LIB_SUFFIX),$(PTLIB_DEBUG_FILE))
endif
+ifeq ($(target_os),OpenBSD)
+ PTLIB_FILE = lib$(PTLIB_BASE)$(LIB_TYPE).$(LIB_SUFFIX)
+ PTLIB_DEBUG_FILE= lib$(PTLIB_BASE)_d$(LIB_TYPE).$(LIB_SUFFIX)
+ PTLIB_SONAME = $(PTLIB_FILE).${LIBpt_VERSION}
+ PTLIB_DEBUG_SONAME = $(PTLIB_DEBUG_FILE).${LIBpt_VERSION}
+endif
###############################################################################
#