Subject: pkg/16554: make graphics/netpbm build on Solaris
To: maintainer <gnats-bugs@gnats.netbsd.org, tron@netbsd.org>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: netbsd-bugs
Date: 04/29/2002 18:43:27
>Number:         16554
>Category:       pkg
>Synopsis:       make graphics/netpbm build on Solaris
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 29 09:44:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Lubomir Sedlacik
>Release:        SunOS 5.8
>Organization:
>Environment:
>Description:

this adds check for OS into Makefile.config and sets proper LDFLAGS for
Solaris ld.  it also bans buildtools/try_ldconfig which is not needed at
all because this functionality is provided by mk/bsd.pkg.mk where needed.
(that script is really badly written anyway..)

>How-To-Repeat:

on Solaris machine do:
cd /usr/pkgsrc/graphics/netpbm && bmake

>Fix:


please don't forget to add patches/patch-ab, thanks.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Index: distinfo
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/graphics/netpbm/distinfo,v
retrieving revision 1.7
diff -u -r1.7 distinfo
--- distinfo	2002/03/20 12:42:11	1.7
+++ distinfo	2002/04/29 16:27:38
@@ -2,4 +2,5 @@
 
 SHA1 (netpbm-9.25.tgz) = 9c7f6a98348a5f3d6e908b514f33498b2a9c359a
 Size (netpbm-9.25.tgz) = 2052922 bytes
-SHA1 (patch-aa) = b8e3b12a2bc9f65c08b0836e8bc384db1ef66b9f
+SHA1 (patch-aa) = 7288a623ed96793271e27e73476918830f50b9e5
+SHA1 (patch-ab) = b6932fd52dff9a6acd01e42136ff7a70561c7434
Index: patches/patch-aa
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/graphics/netpbm/patches/patch-aa,v
retrieving revision 1.17
diff -u -r1.17 patch-aa
--- patch-aa	2002/03/20 12:42:12	1.17
+++ patch-aa	2002/04/29 16:27:38
@@ -1,7 +1,7 @@
 $NetBSD: patch-aa,v 1.17 2002/03/20 12:42:12 wiz Exp $
 
 --- Makefile.config.in.orig	Thu Mar 14 16:25:54 2002
-+++ Makefile.config.in
++++ Makefile.config.in	Mon Apr 29 17:19:59 2002
 @@ -33,7 +33,7 @@
  #Tru64 (= Digital Unix):
  #CC = cc
@@ -46,8 +46,14 @@
  endif
  
  # Linker options for created Netpbm shared libraries.
-@@ -182,9 +182,9 @@
+@@ -180,11 +180,15 @@
+ #Tru64:
+ #LDSHLIB = -shared -expect_unresolved "*"
  
++ifeq ($(OPSYS),SunOS)
++LDSHLIB = -Wl,-B,dynamic,-G,-h,$(SONAME) 
++endif
++
  ifeq ($(NEED_RUNTIME_PATH),Y)
  #If the linker is gcc (e.g. NetBSD):
 -#LDSHLIB += -Wl,--rpath,$(INSTALLLIBS)
@@ -58,7 +64,7 @@
  endif
  
  # On older systems, you have to make shared libraries out of position
-@@ -204,7 +204,7 @@
+@@ -204,7 +208,7 @@
  CFLAGS_SHLIB = 
  # Solaris or SunOS with gcc, and NetBSD:
  #CFLAGS_SHLIB = -fpic
@@ -67,7 +73,7 @@
  # Sun compiler:
  #CFLAGS_SHLIB = -Kpic
  #CFLAGS_SHLIB = -KPIC
-@@ -222,11 +222,11 @@
+@@ -222,11 +226,11 @@
  # The TIFF library.  See above.  If you want to build the tiff
  # converters, you must have the tiff library already installed.
  
@@ -83,7 +89,7 @@
  # OSF, Tru64:
  #TIFFLIB_DIR = /usr/local1/DEC/lib
  #TIFFHDR_DIR = /usr/local1/DEC/include
-@@ -250,11 +250,11 @@
+@@ -250,11 +254,11 @@
  # JPEG stuff statically linked in, in which case you won't need 
  # JPEGLIB_DIR in order to build the Tiff converters.
  
@@ -99,7 +105,7 @@
  # OSF, Tru64:
  #JPEGLIB_DIR = /usr/local1/DEC/lib
  #JPEGHDR_DIR = /usr/local1/DEC/include
-@@ -269,11 +269,11 @@
+@@ -269,11 +273,11 @@
  # The PNG library.  See above.  If you want to build the PNG
  # converters you must have the PNG library already installed.
  
@@ -115,7 +121,7 @@
  # OSF/Tru64:
  #PNGLIB_DIR = /usr/local1/DEC/lib
  #PNGHDR_DIR = /usr/local1/DEC/include
-@@ -317,7 +317,7 @@
+@@ -317,7 +321,7 @@
  # network functions is the option in ppmtompeg to run it on multiple
  # computers simultaneously.
  
@@ -124,7 +130,7 @@
  # Solaris, SunOS:
  #NETWORKLD = -lsocket -lnsl
  # Don't build network functions:
-@@ -364,7 +364,7 @@
+@@ -364,7 +368,7 @@
  #INSTALL_PREFIX = /djgpp
  # Typical:
  #INSTALL_PREFIX = /usr/local/



new file, patches/patch-ab
^^^^^^^^^^^^^^^^^^^^^^^^^^

--- /dev/null	Mon Apr 29 18:28:59 2002
+++ patches/patch-ab	Mon Apr 29 17:22:28 2002
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- GNUmakefile.orig	Sun Mar  3 18:19:06 2002
++++ GNUmakefile	Mon Apr 29 17:21:21 2002
+@@ -139,7 +139,9 @@
+ 	for i in $(SUBDIRS) ; do \
+ 	    $(MAKE) -C $$i -f $(SRCDIR)/$$i/Makefile install.lib ; \
+ 	done
+-	$(SRCDIR)/buildtools/try_ldconfig
++	# this script is badly broken and it's not needed at all.
++	# someone should realize that sh is not bash..
++	# $(SRCDIR)/buildtools/try_ldconfig
+ endif
+ 
+ 
>Release-Note:
>Audit-Trail:
>Unformatted: