Subject: pkg/7403: graphics/gd does not build shared library
To: None <gnats-bugs@gnats.netbsd.org>
From: Jarkko Torppa <torppa@staff.megabaud.fi>
List: netbsd-bugs
Date: 04/16/1999 10:23:47
>Number: 7403
>Category: pkg
>Synopsis: graphics/gd does not build shared library
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 16 09:50:01 1999
>Last-Modified:
>Originator: Jarkko Torppa
>Organization:
Jarkko Torppa torppa@staff.megabaud.fi
Megabaud Internet-palvelut
>Release: 1.3.3
>Environment:
System: NetBSD polykoira.megabaud.fi 1.3.3 NetBSD 1.3.3 (POLY) #0: Wed Apr 14 11:23:12 EEST 1999 root@polykoira.megabaud.fi:/usr/src/sys/arch/i386/compile/POLY i386
>Description:
grahics/gd does not build shared library, because of that building of
php3 is a bit hard when one has grahics/gd library installed
>How-To-Repeat:
Build graphics/gd and build php3 from packages or with -L/usr/pkg/lib
>Fix:
Here is patch to gd package
It looks horrendous because it contains patch to patch.
diff -r -u gd.orig/Makefile gd/Makefile
--- gd.orig/Makefile Fri Aug 21 14:19:50 1998
+++ gd/Makefile Fri Apr 16 19:36:17 1999
@@ -10,6 +10,8 @@
MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.boutell.com/gd/
+USE_LIBTOOL= yes
+
pre-install:
${MKDIR} ${PREFIX}/include/gd
${MKDIR} ${PREFIX}/share/examples/gd
diff -r -u gd.orig/patches/patch-aa gd/patches/patch-aa
--- gd.orig/patches/patch-aa Fri Aug 7 14:23:35 1998
+++ gd/patches/patch-aa Fri Apr 16 03:50:36 1999
@@ -1,27 +1,47 @@
-$NetBSD: patch-aa,v 1.2 1998/08/07 10:40:46 agc Exp $
-
---- Makefile.orig Tue Aug 8 14:28:27 1995
-+++ Makefile Sat Jun 14 18:19:04 1997
-@@ -7,9 +7,9 @@
+$NetBSD$
+--- Makefile.orig Tue Aug 8 15:28:27 1995
++++ Makefile Fri Apr 16 03:49:36 1999
+@@ -7,28 +7,32 @@
#If the ar command fails on your system, consult the ar manpage
#for your system.
-CC=gcc
-AR=ar
-CFLAGS=-O
-+#CC=gcc
-+#AR=ar
-+#CFLAGS=-O
- LIBS=-L./ -lgd -lm
+-LIBS=-L./ -lgd -lm
++CC=${LIBTOOL} cc
++LIBS=libgd.la -lm
++OBJS=gd.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o
all: libgd.a gddemo giftogd webgif
-@@ -32,3 +32,11 @@
+
+ gddemo: gddemo.o libgd.a gd.h gdfonts.h gdfontl.h
+- $(CC) gddemo.o -o gddemo $(LIBS)
++ ${LIBTOOL} --mode=link cc gddemo.o -o gddemo $(LIBS)
+
+ giftogd: giftogd.o libgd.a gd.h
+- $(CC) giftogd.o -o giftogd $(LIBS)
++ ${LIBTOOL} --mode=link cc giftogd.o -o giftogd $(LIBS)
+
+-libgd.a: gd.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
+- gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h
+- rm -f libgd.a
+- $(AR) rc libgd.a gd.o gdfontt.o gdfonts.o gdfontmb.o \
+- gdfontl.o gdfontg.o
++libgd.a: ${OBJS} gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h
++ ${LIBTOOL} --mode=link cc -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 0:0
+
+ webgif: webgif.o libgd.a gd.h
+- $(CC) webgif.o -o webgif $(LIBS)
++ ${LIBTOOL} --mode=link cc webgif.o -o webgif $(LIBS)
+
clean:
- rm -f *.o *.a gddemo giftogd
+- rm -f *.o *.a gddemo giftogd
++ rm -f *.lo *.o *.a gddemo giftogd
+install:
-+ install -cs -o bin -g bin gddemo giftogd webgif ${PREFIX}/bin
-+ install -c -o bin -g bin libgd.a ${PREFIX}/lib
++ ${LIBTOOL} --mode=install install -cs -o bin -g bin gddemo giftogd webgif ${PREFIX}/bin
++ ${LIBTOOL} --mode=install install -c -o bin -g bin libgd.la ${PREFIX}/lib
+ install -c -o bin -g bin gd.h gdfonts.h ${PREFIX}/include/gd
+ install -c -o bin -g bin gdfontt.h gdfontmb.h ${PREFIX}/include/gd
+ install -c -o bin -g bin gdfontl.h gdfontg.h ${PREFIX}/include/gd
diff -r -u gd.orig/pkg/PLIST gd/pkg/PLIST
--- gd.orig/pkg/PLIST Sun Mar 8 14:27:59 1998
+++ gd/pkg/PLIST Fri Apr 16 03:45:34 1999
@@ -9,6 +9,7 @@
include/gd/gdfonts.h
include/gd/gdfontt.h
lib/libgd.a
+lib/libgd.so.0.0
share/examples/gd/demoin.gif
share/examples/gd/index.html
@dirrm include/gd
>Audit-Trail:
>Unformatted: