openbsd-ports/devel/ptlib/patches/patch-make_lib_mak

37 lines
1.0 KiB
Plaintext

$OpenBSD: patch-make_lib_mak,v 1.6 2012/06/21 14:23:51 ajacoutot Exp $
--- make/lib.mak.orig Thu Apr 26 06:47:39 2012
+++ make/lib.mak Thu Jun 21 11:22:09 2012
@@ -28,6 +28,13 @@
# $Date: 2012/06/21 14:23:51 $
#
+ifeq ($(OSTYPE),OpenBSD)
+ ifeq ($(BUILD_TYPE),.)
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)
+ else
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)
+ endif
+else
ifeq (,$(findstring $(OSTYPE),Darwin cygwin mingw))
ifeq ($(BUILD_TYPE),.)
LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(BUILD_NUMBER)
@@ -41,6 +48,7 @@ else
LIBNAME_PAT = $(subst .$(LIB_SUFFIX),.$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)$(BUILD_NUMBER).$(LIB_SUFFIX),$(LIB_FILENAME))
endif
endif
+endif
LIB_SONAME = $(LIBNAME_PAT)
@@ -101,6 +109,10 @@ ifeq ($(P_SHAREDLIB),1)
LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
endif
endif
+ endif
+
+ ifeq ($(OSTYPE),OpenBSD)
+ LDSOOPTS += -fPIC
endif
$(LIBDIR)/$(LIB_FILENAME): $(LIBDIR)/$(LIBNAME_PAT)