$NetBSD: patch-af,v 1.5 2017/11/10 18:17:55 khorben Exp $ (From the log for revision 1.4 of print/ghostscript/patches/patch-af) date: 2008/11/13 17:36:54; author: chuck; state: Exp; lines: +22 -4 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. XXX: this still leaves the issue of libgs.so (et al.) being hardwired in PLIST, instead of using libgs.dylib (et al.). i'm not sure of the best way to fix that. at least it compiles now.... --- base/unix-dll.mak.orig 2012-08-08 08:01:36.000000000 +0000 +++ base/unix-dll.mak @@ -59,13 +59,12 @@ LDFLAGS_SO=-shared -Wl,$(LD_SET_DT_SONAM # 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) +#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) #LDFLAGS_SO=-dynamiclib -flat_namespace -LDFLAGS_SO_MAC=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR) -#LDFLAGS_SO=-dynamiclib -install_name $(FRAMEWORK_NAME) +#Darwin#LDFLAGS_SO=-dynamiclib -install_name $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR) GS_SO=$(BINDIR)/$(GS_SONAME) GS_SO_MAJOR=$(BINDIR)/$(GS_SONAME_MAJOR) @@ -85,12 +84,12 @@ $(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR) # Build the small Ghostscript loaders, with Gtk+ and without $(GSSOC_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) - $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \ - -L$(BINDIR) -l$(GS) + $(GLCC) -g -o $(GSSOC_XE) $(LDFLAGS) $(PSSRC)dxmainc.c \ + -L$(BINDIR) -L$(PREFIX)/lib -Wl,-R$(PREFIX)/lib -l$(GS) $(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER) - $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \ - -L$(BINDIR) -l$(GS) $(SOC_LIBS) + $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(LDFLAGS) $(PSSRC)$(SOC_LOADER) \ + -L$(BINDIR) -L$(PREFIX)/lib -Wl,-R$(PREFIX)/lib -l$(GS) $(SOC_LIBS) # ------------------------- Recursive make targets ------------------------- #