openbsd-ports/print/ghostscript/gnu/patches/patch-src_unix-dll_mak

68 lines
2.8 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-src_unix-dll_mak,v 1.7 2009/01/19 12:46:23 kili Exp $
--- src/unix-dll.mak.orig Tue Nov 27 23:58:40 2007
+++ src/unix-dll.mak Sun Jan 18 13:00:33 2009
@@ -39,7 +39,9 @@ GSSOC=$(BINDIR)/$(SOBINRELDIR)/$(GSSOC_XENAME)
# loader suporting display device using Gtk+
GSSOX_XENAME=$(GS)x$(XE)
GSSOX_XE=$(BINDIR)/$(GSSOX_XENAME)
-GSSOX=$(BINDIR)/$(SOBINRELDIR)/$(GSSOX_XENAME)
+GSSOX-Yes=$(BINDIR)/$(SOBINRELDIR)/$(GSSOX_XENAME)
+GSSOX-No=
+GSSOX=$(GSSOX-$(USE_GTK))
# shared library
GS_SONAME_BASE=lib$(GS)
@@ -47,9 +49,9 @@ GS_SONAME_BASE=lib$(GS)
# GNU/Linux
GS_SOEXT=so
GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
-GS_SONAME_MAJOR=$(GS_SONAME).$(GS_VERSION_MAJOR)
-GS_SONAME_MAJOR_MINOR=$(GS_SONAME).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR)
-LDFLAGS_SO=-shared -Wl,-soname=$(GS_SONAME_MAJOR)
+GS_SONAME_MAJOR=$(GS_SONAME).$(basename $(LIBgs_VERSION))
+GS_SONAME_MAJOR_MINOR=$(GS_SONAME).$(LIBgs_VERSION)
+LDFLAGS_SO=-shared
# MacOS X
#GS_SOEXT=dylib
@@ -78,11 +80,12 @@ $(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR)
# Build the small Ghostscript loaders, with Gtk+ and without
-$(GSSOC_XE): $(GS_SO) $(GLSRC)$(SOC_LOADER)
- $(GLCC) -g -o $(GSSOC_XE) $(GLSRC)dxmainc.c -L$(BINDIR) -l$(GS)
+$(GSSOC_XE): $(GS_SO) $(GLSRC)dxmainc.c
+ $(GLCC) -g -o $(GSSOC_XE) $(GLSRC)dxmainc.c -L$(BINDIR) -l$(GS) \
+ $(SOC_LIBS)
-$(GSSOX_XE): $(GS_SO) $(GLSRC)$(SOC_LOADER)
- $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(GLSRC)$(SOC_LOADER) \
+$(GSSOX_XE): $(GS_SO) $(GLSRC)dxmain.c
+ $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(GLSRC)dxmain.c \
-L$(BINDIR) -l$(GS) $(SOC_LIBS)
# ------------------------- Recursive make targets ------------------------- #
@@ -100,7 +103,7 @@ SODEFS=LDFLAGS='$(LDFLAGS) $(LDFLAGS_SO)'\
# Normal shared object
so: SODIRS
- $(MAKE) $(SODEFS) CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC) $(GSSOX)
+ $(MAKE) $(SODEFS) CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC) $(GSSOX)
# Debug shared object
# Note that this is in the same directory as the normal shared
@@ -117,12 +120,9 @@ install-so: so
-mkdir -p $(DESTDIR)$(libdir)
-mkdir -p $(DESTDIR)$(gsincludedir)
$(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
+ [ "$(USE_GTK)" = No ] || \
$(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
$(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
- $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
- ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
- $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
- 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) $(PSSRC)gdevdsp.h $(DESTDIR)$(gsincludedir)/gdevdsp.h