| @@ -1,47 +1,51 @@ | | | @@ -1,47 +1,51 @@ |
1 | $NetBSD: patch-af,v 1.7 2012/10/07 14:19:18 mef Exp $ | | 1 | $NetBSD: patch-af,v 1.8 2012/10/10 02:18:25 mef Exp $ |
2 | | | 2 | |
3 | (From the log for revision 1.4 of print/ghostscript/patches/patch-af) | | 3 | (From the log for revision 1.4 of print/ghostscript/patches/patch-af) |
4 | date: 2008/11/13 17:36:54; author: chuck; state: Exp; lines: +22 -4 | | 4 | date: 2008/11/13 17:36:54; author: chuck; state: Exp; lines: +22 -4 |
5 | ghostscript has hand-rolled shared lib handling in src/unix-dll.mak | | 5 | ghostscript has hand-rolled shared lib handling in src/unix-dll.mak |
6 | that does not do the right thing on Darwin (where shared libs are | | 6 | that does not do the right thing on Darwin (where shared libs are |
7 | created with different linking flags and use dylib rather than so | | 7 | created with different linking flags and use dylib rather than so |
8 | as an extension). | | 8 | as an extension). |
9 | | | 9 | |
10 | You need to manually reconfigure unix-dll.mak to make it work, so | | 10 | You need to manually reconfigure unix-dll.mak to make it work, so |
11 | do it in hacks.mk. | | 11 | do it in hacks.mk. |
12 | | | 12 | |
13 | XXX: this still leaves the issue of libgs.so (et al.) being hardwired | | 13 | XXX: this still leaves the issue of libgs.so (et al.) being hardwired |
14 | in PLIST, instead of using libgs.dylib (et al.). i'm not sure of | | 14 | in PLIST, instead of using libgs.dylib (et al.). i'm not sure of |
15 | the best way to fix that. at least it compiles now.... | | 15 | the best way to fix that. at least it compiles now.... |
16 | | | 16 | |
17 | --- base/unix-dll.mak.orig 2012-02-08 17:48:48.000000000 +0900 | | 17 | --- base/unix-dll.mak.orig 2012-08-08 17:01:36.000000000 +0900 |
18 | +++ base/unix-dll.mak 2012-04-01 10:55:27.000000000 +0900 | | 18 | +++ base/unix-dll.mak 2012-10-10 10:03:50.000000000 +0900 |
19 | @@ -58,10 +58,10 @@ | | 19 | @@ -59,13 +59,12 @@ |
20 | | | 20 | |
21 | | | 21 | |
22 | # MacOS X | | 22 | # MacOS X |
23 | -#GS_SOEXT=dylib | | 23 | -#GS_SOEXT=dylib |
24 | -#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT) | | 24 | -#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT) |
25 | -#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) | | 25 | -#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) |
26 | -#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) | | 26 | -#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) |
27 | +#Darwin#GS_SOEXT=dylib | | 27 | +#Darwin#GS_SOEXT=dylib |
28 | +#Darwin#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT) | | 28 | +#Darwin#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT) |
29 | +#Darwin#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) | | 29 | +#Darwin#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT) |
30 | +#Darwin#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) | | 30 | +#Darwin#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT) |
31 | #LDFLAGS_SO=-dynamiclib -flat_namespace | | 31 | #LDFLAGS_SO=-dynamiclib -flat_namespace |
32 | LDFLAGS_SO_MAC=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR) | | 32 | -LDFLAGS_SO_MAC=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR) |
33 | #LDFLAGS_SO=-dynamiclib -install_name $(FRAMEWORK_NAME) | | 33 | -#LDFLAGS_SO=-dynamiclib -install_name $(FRAMEWORK_NAME) |
34 | @@ -85,11 +85,11 @@ | | 34 | +#Darwin#LDFLAGS_SO=-dynamiclib -install_name $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR) |
| | | 35 | |
| | | 36 | GS_SO=$(BINDIR)/$(GS_SONAME) |
| | | 37 | GS_SO_MAJOR=$(BINDIR)/$(GS_SONAME_MAJOR) |
| | | 38 | @@ -86,11 +85,11 @@ |
35 | # Build the small Ghostscript loaders, with Gtk+ and without | | 39 | # Build the small Ghostscript loaders, with Gtk+ and without |
36 | $(GSSOC_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) | | 40 | $(GSSOC_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) |
37 | $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \ | | 41 | $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \ |
38 | - -L$(BINDIR) -l$(GS) | | 42 | - -L$(BINDIR) -l$(GS) |
39 | + -L$(BINDIR) -Wl,-R$(PREFIX)/lib -l$(GS) | | 43 | + -L$(BINDIR) -Wl,-R$(PREFIX)/lib -l$(GS) |
40 | | | 44 | |
41 | $(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) | | 45 | $(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) |
42 | $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \ | | 46 | $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \ |
43 | - -L$(BINDIR) -l$(GS) $(SOC_LIBS) | | 47 | - -L$(BINDIR) -l$(GS) $(SOC_LIBS) |
44 | + -L$(BINDIR) -l$(GS) -Wl,-R$(PREFIX)/lib -l$(GS) $(SOC_LIBS) | | 48 | + -L$(BINDIR) -l$(GS) -Wl,-R$(PREFIX)/lib -l$(GS) $(SOC_LIBS) |
45 | | | 49 | |
46 | # ------------------------- Recursive make targets ------------------------- # | | 50 | # ------------------------- Recursive make targets ------------------------- # |
47 | | | 51 | |