summaryrefslogtreecommitdiff
path: root/print/ghostscript-agpl/patches/patch-af
blob: 474e4c800da8347ac01d8a9208a097cbb8d6b269 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$NetBSD: patch-af,v 1.5 2015/12/10 11:58:58 markd Exp $

ghostscript has hand-rolled shared lib handling in src/unix-dll.mak
that does not do the right thing on Darwin (where shared libs are
created with different linking flags and use dylib rather than so
as an extension).

You need to manually reconfigure unix-dll.mak to make it work, so
do it in hacks.mk.

Add gserrors.h to the installed files (Bug 696301)

--- base/unix-dll.mak.orig	2015-10-05 08:21:11.000000000 +0000
+++ base/unix-dll.mak
@@ -64,11 +64,11 @@ GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE)$
 
 
 # MacOS X
-#GS_SOEXT=dylib
-#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
-#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
-#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
-#LDFLAGS_SO=-dynamiclib -flat_namespace
+#Darwin#GS_SOEXT=dylib
+#Darwin#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
+#Darwin#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
+#Darwin#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
+#Darwin#LDFLAGS_SO=-dynamiclib -install_name $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
 #LDFLAGS_SO_MAC=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR)
 #LDFLAGS_SO=-dynamiclib -install_name $(FRAMEWORK_NAME)
 
@@ -94,11 +94,11 @@ so-links-subtarget:	$(GS_SO)
 # Build the small Ghostscript loaders, with Gtk+ and without
 $(GSSOC_XE): so-links-subtarget $(PSSRC)$(SOC_LOADER)
 	$(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \
-	-L$(BINDIR) -l$(GS_SO_BASE)
+	-L$(BINDIR) -Wl,-R$(PREFIX)/lib -l$(GS_SO_BASE)
 
 $(GSSOX_XE): so-links-subtarget $(PSSRC)$(SOC_LOADER)
 	$(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \
-	-L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS)
+	-L$(BINDIR) -Wl,-R$(PREFIX)/lib -l$(GS_SO_BASE) $(SOC_LIBS)
 
 # ------------------------- Recursive make targets ------------------------- #
 
@@ -184,6 +184,7 @@ install-so-subtarget: so-subtarget
 	ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
 	$(INSTALL_DATA) $(PSSRC)iapi.h $(DESTDIR)$(gsincludedir)iapi.h
 	$(INSTALL_DATA) $(PSSRC)ierrors.h $(DESTDIR)$(gsincludedir)ierrors.h
+	$(INSTALL_DATA) $(GLSRC)gserrors.h $(DESTDIR)$(gsincludedir)gserrors.h
 	$(INSTALL_DATA) $(DEVSRC)gdevdsp.h $(DESTDIR)$(gsincludedir)gdevdsp.h
 
 soinstall: