pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/ghostscript ghostscript has hand-rolled shared l...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/41958d62eab0
branches:  trunk
changeset: 550029:41958d62eab0
user:      chuck <chuck%pkgsrc.org@localhost>
date:      Thu Nov 13 17:36:54 2008 +0000

description:
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....

diffstat:

 print/ghostscript/Makefile         |   6 +++++-
 print/ghostscript/distinfo         |   4 ++--
 print/ghostscript/hacks.mk         |  13 ++++++++++++-
 print/ghostscript/patches/patch-af |  26 ++++++++++++++++++++++----
 4 files changed, 41 insertions(+), 8 deletions(-)

diffs (93 lines):

diff -r 1cc7642a6d65 -r 41958d62eab0 print/ghostscript/Makefile
--- a/print/ghostscript/Makefile        Thu Nov 13 15:11:58 2008 +0000
+++ b/print/ghostscript/Makefile        Thu Nov 13 17:36:54 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.52 2008/09/05 15:50:03 tron Exp $
+# $NetBSD: Makefile,v 1.53 2008/11/13 17:36:54 chuck Exp $
 
 DISTNAME=      ghostscript-8.63
 PKGREVISION=   1
@@ -54,6 +54,10 @@
 CFLAGS+=               -fPIC
 .endif
 
+###.if ${OPSYS} == "Darwin"
+###MAKEFLAGS= "LDFLAGS_SO=-dynamiclib"
+###.endif
+
 # Interim IRIX build fix, the real problem is that fontconfig.pc doesn't
 # require linking against libiconv when it should do so.
 .if ${OPSYS} == "IRIX"
diff -r 1cc7642a6d65 -r 41958d62eab0 print/ghostscript/distinfo
--- a/print/ghostscript/distinfo        Thu Nov 13 15:11:58 2008 +0000
+++ b/print/ghostscript/distinfo        Thu Nov 13 17:36:54 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2008/09/03 21:31:12 markd Exp $
+$NetBSD: distinfo,v 1.18 2008/11/13 17:36:54 chuck Exp $
 
 SHA1 (ghostscript-8.63.tar.bz2) = c97159d3cccb0b1b5fc409715c6321a7256717ec
 RMD160 (ghostscript-8.63.tar.bz2) = 817d5c1539d88be979c42f67a9246f690328da33
@@ -6,4 +6,4 @@
 SHA1 (patch-ab) = 2477242c4c5f6b6feaaa217deb1aa37485f2fac5
 SHA1 (patch-ad) = 8b3b743b2d6405ea35bfb16970942ecd55702401
 SHA1 (patch-ae) = df329ac87f9ed97b76f0a7fff738050e8c35794a
-SHA1 (patch-af) = 03c517d7af0546aef8688e8c153f155be9f913f0
+SHA1 (patch-af) = 41c4ad8c2a096485ea3fe730ef38423506308bed
diff -r 1cc7642a6d65 -r 41958d62eab0 print/ghostscript/hacks.mk
--- a/print/ghostscript/hacks.mk        Thu Nov 13 15:11:58 2008 +0000
+++ b/print/ghostscript/hacks.mk        Thu Nov 13 17:36:54 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.1 2007/01/09 21:03:02 tv Exp $
+# $NetBSD: hacks.mk,v 1.2 2008/11/13 17:36:54 chuck Exp $
 
 ### [Tue Jan  9 15:57:05 EST 2007 : tv]
 ### Interix has u_int64_t, but not uint64_t
@@ -9,3 +9,14 @@
 PKG_HACKS+=            interix-uint64_t
 CPPFLAGS.Interix+=     -Duint64_t=u_int64_t
 .endif
+
+### [ Thu Nov 13 12:30:45 EST 2008 : chuck]
+### gs has hand-rolled shared lib handling that doesn't do the right
+### thing on Darwin by default, you need to reconfigure unix-dll.mak
+### to make it work.
+.if ${OPSYS} == "Darwin"
+post-patch:
+       ${SED} -e 's/^#Darwin#//' ${WRKSRC}/src/unix-dll.mak > \
+               ${WRKSRC}/src/unix-darwin.mak
+       ${MV} ${WRKSRC}/src/unix-darwin.mak ${WRKSRC}/src/unix-dll.mak
+.endif
diff -r 1cc7642a6d65 -r 41958d62eab0 print/ghostscript/patches/patch-af
--- a/print/ghostscript/patches/patch-af        Thu Nov 13 15:11:58 2008 +0000
+++ b/print/ghostscript/patches/patch-af        Thu Nov 13 17:36:54 2008 +0000
@@ -1,8 +1,26 @@
-$NetBSD: patch-af,v 1.3 2008/09/03 21:31:12 markd Exp $
+$NetBSD: patch-af,v 1.4 2008/11/13 17:36:54 chuck Exp $
 
---- src/unix-dll.mak.orig      2007-11-28 11:58:40.000000000 +1300
-+++ src/unix-dll.mak
-@@ -79,11 +79,11 @@ $(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR)
+--- src/unix-dll.mak.orig      2007-11-27 17:58:40.000000000 -0500
++++ src/unix-dll.mak   2008-11-13 10:50:06.000000000 -0500
+@@ -52,12 +52,12 @@
+ LDFLAGS_SO=-shared -Wl,-soname=$(GS_SONAME_MAJOR)
+ 
+ # MacOS X
+-#GS_SOEXT=dylib
++#Darwin#GS_SOEXT=dylib
+-#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
++#Darwin#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
+-#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
++#Darwin#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_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
+ #LDFLAGS_SO=-dynamiclib -flat-namespace
+-#LDFLAGS_SO=-dynamiclib -install-name $(GS_SONAME_MAJOR_MINOR)
++#Darwin#LDFLAGS_SO=-dynamiclib -install_name $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
+ #LDFLAGS_SO=-dynamiclib
+ 
+ GS_SO=$(BINDIR)/$(GS_SONAME)
+@@ -79,11 +79,11 @@
  # Build the small Ghostscript loaders, with Gtk+ and without
  
  $(GSSOC_XE): $(GS_SO) $(GLSRC)$(SOC_LOADER)



Home | Main Index | Thread Index | Old Index