File:  [cvs.NetBSD.org] / pkgsrc / databases / postgresql96 / patches / Attic / patch-src_Makefile.shlib
Revision 1.2: download - view: text, annotated - select for diffs
Mon Jan 22 11:05:30 2018 UTC (6 years, 9 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, HEAD
postgresql*: Use correct linker flags on SunOS.

$NetBSD: patch-src_Makefile.shlib,v 1.2 2018/01/22 11:05:30 jperkin Exp $

Use correct linker flags.

--- src/Makefile.shlib.orig	2017-11-06 22:08:55.000000000 +0000
+++ src/Makefile.shlib
@@ -150,17 +150,11 @@ endif
 
 ifeq ($(PORTNAME), freebsd)
   ifdef ELF_SYSTEM
-    ifdef SO_MAJOR_VERSION
-      shlib		= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
-    endif
     LINK.shared		= $(COMPILER) -shared
     ifdef soname
       LINK.shared	+= -Wl,-x,-soname,$(soname)
     endif
   else
-    ifdef SO_MAJOR_VERSION
-      shlib		= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
-    endif
     LINK.shared		= $(LD) -x -Bshareable -Bforcearchive
   endif
 endif
@@ -176,6 +170,17 @@ ifeq ($(PORTNAME), netbsd)
   endif
 endif
 
+ifeq ($(PORTNAME), dragonfly)
+  ifdef ELF_SYSTEM
+    LINK.shared 	= $(COMPILER) -shared
+    ifdef soname
+      LINK.shared	+= -Wl,-x,-soname,$(soname)
+    endif
+  else
+    LINK.shared 	= $(LD) -x -Bshareable -Bforcearchive
+  endif
+endif
+
 ifeq ($(PORTNAME), hpux)
   ifdef SO_MAJOR_VERSION
     shlib			= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
@@ -231,7 +236,7 @@ ifeq ($(PORTNAME), solaris)
     ifeq ($(with_gnu_ld), yes)
       LINK.shared	+= -Wl,-soname,$(soname)
     else
-      LINK.shared	+= -h $(soname)
+      LINK.shared	+= -Wl,-h,$(soname)
     endif
   endif
 endif
@@ -482,8 +487,10 @@ ifdef soname
 # we don't install $(shlib) on AIX
 # (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at)
 ifneq ($(PORTNAME), aix)
+ifeq ($(PORTNAME), cygwin)
+	$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'
+else
 	$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
-ifneq ($(PORTNAME), cygwin)
 ifneq ($(PORTNAME), win32)
 ifneq ($(shlib), $(shlib_major))
 	cd '$(DESTDIR)$(libdir)' && \
@@ -496,7 +503,7 @@ ifneq ($(shlib), $(shlib_bare))
 	$(LN_S) $(shlib) $(shlib_bare)
 endif
 endif # not win32
-endif # not cygwin
+endif # cygwin
 endif # not aix
 ifneq (,$(findstring $(PORTNAME),win32 cygwin))
 	$(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)'

CVSweb <webmaster@jp.NetBSD.org>