diff --git a/graphics/gd/Makefile b/graphics/gd/Makefile index 74eee13c0cc..31e0522c455 100644 --- a/graphics/gd/Makefile +++ b/graphics/gd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2000/06/22 03:48:45 brad Exp $ +# $OpenBSD: Makefile,v 1.18 2000/06/22 06:18:38 brad Exp $ # $FreeBSD: Makefile,v 1.5 1998/06/25 03:13:16 vanilla Exp $ DISTNAME= gd-1.8.3 @@ -22,20 +22,23 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes +USE_LIBTOOL= Yes MAKE_FLAGS= COMPILER="${CC}" FLAVORS= no_x11 .if defined(FLAVOR) && ${FLAVOR:L} == "no_x11" MAKE_FLAGS+= CFLAGS="${CFLAGS} -DHAVE_JPEG" \ - LIBS="-lm -lgd -lpng -ljpeg -lz" \ + LIBS="libgd.la -lm -lpng -ljpeg -lz" \ INCLUDEDIRS="-I. -I/usr/local/include" \ LIBDIRS="-L. -L/usr/local/lib" +FAKE_FLAGS+= ${MAKE_FLAGS} .else MAKE_FLAGS+= CFLAGS="${CFLAGS} -DHAVE_XPM -DHAVE_JPEG -DHAVE_LIBTTF" \ - LIBS="-lm -lgd -lpng -lz -ljpeg -lttf -lXpm -lX11" \ + LIBS="libgd.la -lm -lpng -lz -ljpeg -lttf -lXpm -lX11" \ INCLUDEDIRS="-I. -I/usr/local/include -I/usr/X11R6/include -I/usr/X11R6/include/X11" \ LIBDIRS="-L. -L/usr/local/lib -L/usr/X11R6/lib" +FAKE_FLAGS+= ${MAKE_FLAGS} .endif post-install: @@ -45,7 +48,3 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/index.html ${PREFIX}/share/examples/gd .include - -.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:U} == YES -MAKE_ENV= NO_SHARED_LIBS= Yes -.endif diff --git a/graphics/gd/patches/patch-aa b/graphics/gd/patches/patch-aa index 28bcea9fd91..bf4f2b8d96b 100644 --- a/graphics/gd/patches/patch-aa +++ b/graphics/gd/patches/patch-aa @@ -1,5 +1,5 @@ --- Makefile.orig Sat Jun 3 15:26:12 2000 -+++ Makefile Wed Jun 21 23:09:24 2000 ++++ Makefile Thu Jun 22 02:01:40 2000 @@ -51,13 +51,13 @@ LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib @@ -17,19 +17,9 @@ # # -@@ -74,27 +74,39 @@ - - BIN_PROGRAMS=pngtogd pngtogd2 gdtopng gd2topng gd2copypal gdparttopng webpng - TEST_PROGRAMS=gdtest gddemo gd2time gdtestttf -+VER=18.3 - -+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:U} == YES +@@ -78,68 +78,68 @@ all: libgd.a $(PROGRAMS) -+.else -+all: libgd.a libgd.so.${VER} $(PROGRAMS) -+.endif -+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:U} == YES install: libgd.a $(BIN_PROGRAMS) - sh ./install-item 644 libgd.a $(INSTALL_LIB)/libgd.a - sh ./install-item 755 pngtogd $(INSTALL_BIN)/pngtogd @@ -48,21 +38,15 @@ - sh ./install-item 644 gdfontmb.h $(INSTALL_INCLUDE)/gdfontmb.h - sh ./install-item 644 gdfonts.h $(INSTALL_INCLUDE)/gdfonts.h - sh ./install-item 644 gdfontt.h $(INSTALL_INCLUDE)/gdfontt.h -+.else -+install: libgd.a libgd.so.${VER} $(BIN_PROGRAMS) -+.endif -+ $(BSD_INSTALL_DATA) -m 644 libgd.a $(INSTALL_LIB) -+ @if [ -f libgd.so.${VER} ]; then \ -+ $(BSD_INSTALL_DATA) -m 644 libgd.so.${VER} $(INSTALL_LIB); \ -+ fi -+ $(BSD_INSTALL_PROGRAM) pngtogd $(INSTALL_BIN) -+ $(BSD_INSTALL_PROGRAM) pngtogd2 $(INSTALL_BIN) -+ $(BSD_INSTALL_PROGRAM) gdtopng $(INSTALL_BIN) -+ $(BSD_INSTALL_PROGRAM) gd2topng $(INSTALL_BIN) -+ $(BSD_INSTALL_PROGRAM) gd2copypal $(INSTALL_BIN) -+ $(BSD_INSTALL_PROGRAM) gdparttopng $(INSTALL_BIN) -+ $(BSD_INSTALL_PROGRAM) webpng $(INSTALL_BIN) -+ $(BSD_INSTALL_PROGRAM) bdftogd $(INSTALL_BIN) ++ libtool $(BSD_INSTALL_DATA) libgd.la $(INSTALL_LIB) ++ libtool $(BSD_INSTALL_PROGRAM) pngtogd $(INSTALL_BIN) ++ libtool $(BSD_INSTALL_PROGRAM) pngtogd2 $(INSTALL_BIN) ++ libtool $(BSD_INSTALL_PROGRAM) gdtopng $(INSTALL_BIN) ++ libtool $(BSD_INSTALL_PROGRAM) gd2topng $(INSTALL_BIN) ++ libtool $(BSD_INSTALL_PROGRAM) gd2copypal $(INSTALL_BIN) ++ libtool $(BSD_INSTALL_PROGRAM) gdparttopng $(INSTALL_BIN) ++ libtool $(BSD_INSTALL_PROGRAM) webpng $(INSTALL_BIN) ++ libtool $(BSD_INSTALL_PROGRAM) bdftogd $(INSTALL_BIN) + $(BSD_INSTALL_DATA) gd.h $(INSTALL_INCLUDE) + $(BSD_INSTALL_DATA) gdcache.h $(INSTALL_INCLUDE) + $(BSD_INSTALL_DATA) gd_io.h $(INSTALL_INCLUDE) @@ -73,11 +57,51 @@ + $(BSD_INSTALL_DATA) gdfontt.h $(INSTALL_INCLUDE) gddemo: gddemo.o libgd.a - $(CC) gddemo.o -o gddemo $(LIBDIRS) $(LIBS) -@@ -131,15 +143,23 @@ +- $(CC) gddemo.o -o gddemo $(LIBDIRS) $(LIBS) ++ libtool $(CC) gddemo.o -o gddemo $(LIBDIRS) $(LIBS) - libgd.a: gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o \ - gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o \ + pngtogd: pngtogd.o libgd.a +- $(CC) pngtogd.o -o pngtogd $(LIBDIRS) $(LIBS) ++ libtool $(CC) pngtogd.o -o pngtogd $(LIBDIRS) $(LIBS) + + webpng: webpng.o libgd.a +- $(CC) webpng.o -o webpng $(LIBDIRS) $(LIBS) ++ libtool $(CC) webpng.o -o webpng $(LIBDIRS) $(LIBS) + + pngtogd2: pngtogd2.o libgd.a +- $(CC) pngtogd2.o -o pngtogd2 $(LIBDIRS) $(LIBS) ++ libtool $(CC) pngtogd2.o -o pngtogd2 $(LIBDIRS) $(LIBS) + + gdtopng: gdtopng.o libgd.a +- $(CC) gdtopng.o -o gdtopng $(LIBDIRS) $(LIBS) ++ libtool $(CC) gdtopng.o -o gdtopng $(LIBDIRS) $(LIBS) + + gd2topng: gd2topng.o libgd.a +- $(CC) gd2topng.o -o gd2topng $(LIBDIRS) $(LIBS) ++ libtool $(CC) gd2topng.o -o gd2topng $(LIBDIRS) $(LIBS) + + gd2copypal: gd2copypal.o libgd.a +- $(CC) gd2copypal.o -o gd2copypal $(LIBDIRS) $(LIBS) ++ libtool $(CC) gd2copypal.o -o gd2copypal $(LIBDIRS) $(LIBS) + + gdparttopng: gdparttopng.o libgd.a +- $(CC) gdparttopng.o -o gdparttopng $(LIBDIRS) $(LIBS) ++ libtool $(CC) gdparttopng.o -o gdparttopng $(LIBDIRS) $(LIBS) + + gdtest: gdtest.o libgd.a +- $(CC) gdtest.o -o gdtest $(LIBDIRS) $(LIBS) ++ libtool $(CC) gdtest.o -o gdtest $(LIBDIRS) $(LIBS) + + gd2time: gd2time.o libgd.a +- $(CC) gd2time.o -o gd2time $(LIBDIRS) $(LIBS) ++ libtool $(CC) gd2time.o -o gd2time $(LIBDIRS) $(LIBS) + + gdtestttf: gdtestttf.o libgd.a +- $(CC) gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS) ++ libtool $(CC) gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS) + +-libgd.a: gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o \ +- gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o \ - gdfontg.o gdtables.o gdttf.o gdcache.o gdkanji.o wbmp.o gd_wbmp.o \ - gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h - rm -f libgd.a @@ -86,24 +110,18 @@ - gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \ - gdtables.o gdttf.o gdcache.o gdkanji.o wbmp.o gd_wbmp.o - -ranlib libgd.a -+ gdfontg.o gdtables.o gdttf.o gdcache.o gdkanji.o wbmp.o gd_wbmp.o -+ rm -f ${.TARGET} -+ $(AR) rc ${.TARGET} ${.ALLSRC} -+ -ranlib ${.TARGET} -+ -+libgd.so.${VER}: gd.so gd_gd.so gd_gd2.so gd_io.so gd_io_dp.so gd_io_file.so \ -+ gd_ss.so gd_io_ss.so gd_png.so gd_jpeg.so gdxpm.so gdfontt.so gdfonts.so \ -+ gdfontmb.so gdfontl.so gdfontg.so gdtables.so gdttf.so gdcache.so \ -+ gdkanji.so wbmp.o gd_wbmp.so -+ rm -f ${.TARGET} -+ ld -Bshareable -Bforcearchive -o ${.TARGET} ${.ALLSRC} ++libgd.a: gd.lo gd_gd.lo gd_gd2.lo gd_io.lo gd_io_dp.lo gd_io_file.lo gd_ss.lo \ ++ gd_io_ss.lo gd_png.lo gd_jpeg.lo gdxpm.lo gdfontt.lo gdfonts.lo \ ++ gdfontmb.lo gdfontl.lo gdfontg.lo gdtables.lo gdttf.lo gdcache.lo \ ++ gdkanji.lo wbmp.lo gd_wbmp.lo ++ libtool $(CC) ${CFLAGS} -o libgd.la ${.ALLSRC} \ ++ -version-info 18:3:0 -rpath $(INSTALL_LIB) clean: - rm -f *.o *.a ${PROGRAMS} test/gdtest.jpg test/gdtest.wbmp -+ rm -f *.o ${PROGRAMS} libgd.a libgd.so.${VER} test/gdtest.jpg test/gdtest.wbmp ++ rm -f *.o ${PROGRAMS} libgd.a libgd.so.18.3 test/gdtest.jpg test/gdtest.wbmp -+.SUFFIXES: .c .o .so -+.c.o: -+ ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -+.c.so: -+ ${CC} ${CFLAGS} -fpic -DPIC -c ${.IMPSRC} -o ${.TARGET} ++.SUFFIXES: .c .lo ++ ++.c.lo: ++ libtool ${CC} ${CFLAGS} -c ${.IMPSRC} diff --git a/graphics/gd/pkg/PLIST b/graphics/gd/pkg/PLIST index 0517aa99c97..1ab65454709 100644 --- a/graphics/gd/pkg/PLIST +++ b/graphics/gd/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.7 2000/06/12 17:25:49 brad Exp $ +@comment $OpenBSD: PLIST,v 1.8 2000/06/22 06:18:39 brad Exp $ bin/bdftogd bin/pngtogd bin/pngtogd2 @@ -16,6 +16,7 @@ include/gdfontmb.h include/gdfontl.h include/gdfontg.h lib/libgd.a +lib/libgd.la %%SHARED%% share/examples/gd/demoin.png share/examples/gd/demoout.png