Date: 26 May 2000 05:32:54 -0000 From: lioux@uol.com.br To: FreeBSD-gnats-submit@freebsd.org Cc: cpiazza@FreeBSD.org Subject: ports/18822: Update port graphics/libwmf to build shared lib Message-ID: <20000526053254.99091.qmail@Fedaykin.here>
next in thread | raw e-mail | index | archive | help
>Number: 18822 >Category: ports >Synopsis: Update port graphics/libwmf to build shared lib >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu May 25 22:40:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Mario Sergio Fujikawa Ferreira >Release: FreeBSD 4.0-STABLE i386 >Organization: >Environment: FreeBSD Here.here 4.0-STABLE FreeBSD 4.0-STABLE #17: Wed May 24 19:49:37 EST 2000 root@:/usr/src/sys/compile/LIOUX i386 >Description: Just a simple update to libwmf to allow it to build shared lib counterparts to its .a libs. Besides, have it use its new shared libs. Futhermore, fixed PLIST; it wasn't ldconfiging on install. However, I still have got to figure a way to have it use our own version of gd. >How-To-Repeat: n/a >Fix: diff -ruN ./Makefile /home/lioux/bin/ports/libwmf/Makefile --- ./Makefile Wed May 24 04:32:02 2000 +++ /home/lioux/bin/ports/libwmf/Makefile Fri May 26 02:04:22 2000 @@ -13,6 +13,7 @@ MAINTAINER= cpiazza@FreeBSD.org LIB_DEPENDS= Xpm.4:${PORTSDIR}/graphics/xpm \ + gd.0:${PORTSDIR}/graphics/gd \ png.3:${PORTSDIR}/graphics/png \ ttf.4:${PORTSDIR}/print/freetype @@ -21,7 +22,11 @@ USE_XLIB= yes GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include/freetype \ + -I${LOCALBASE}/include/gd \ -I${LOCALBASE}/include" \ LIBS="-L${LOCALBASE}"/lib + +post-build: + @cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/patch-gd .include <bsd.port.mk> diff -ruN ./files/patch-gd /home/lioux/bin/ports/libwmf/files/patch-gd --- ./files/patch-gd Wed Dec 31 21:00:00 1969 +++ /home/lioux/bin/ports/libwmf/files/patch-gd Fri May 26 02:24:21 2000 @@ -0,0 +1,11 @@ +This will make gd happy and safe. + +--- gdwmfapi.h.orig Fri May 26 01:57:43 2000 ++++ gdwmfapi.h Fri May 26 01:58:01 2000 +@@ -1,5 +1,5 @@ + #include "wmfapi.h" +-#include "gd.h" ++#include "gd/gd.h" + + typedef struct _GD_Struct + { diff -ruN ./patches/patch-aa /home/lioux/bin/ports/libwmf/patches/patch-aa --- ./patches/patch-aa Mon May 22 13:38:34 2000 +++ /home/lioux/bin/ports/libwmf/patches/patch-aa Fri May 26 01:48:01 2000 @@ -1,15 +1,17 @@ ---- Makefile.in.orig Fri Dec 17 00:31:01 1999 -+++ Makefile.in Sat May 20 15:02:47 2000 -@@ -16,7 +16,7 @@ - +The share lib patch is based on a original idea of billf@FreeBSD.org +taken from his graphics/gd port. + +--- Makefile.in.orig Thu Dec 16 13:31:01 1999 ++++ Makefile.in Fri May 26 01:24:44 2000 +@@ -17,6 +17,7 @@ SHELL=/bin/sh --INSTALL = @INSTALL@ + INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INCLUDEDIR = @includedir@ -@@ -28,7 +28,7 @@ +@@ -28,13 +29,13 @@ libdir = @libdir@ mandir = @mandir@ @@ -18,7 +20,93 @@ MKINSTALLDIRS = $(srcdir)/mkinstalldirs -@@ -134,9 +134,9 @@ + SHELL = /bin/sh + +-.SUFFIXES: .C .o ++.SUFFIXES: .c .o .so + + WMFLIBOBJECTS = \ + wmfapi.o \ +@@ -53,35 +54,64 @@ + Xtext.o \ + rotated.o + +-TARGETS = wmftopng wmftofig xwmf ++LIBRARIES= \ ++ LIBXGD \ ++ LIBDIB \ ++ LIBXFIG \ ++ libwmf.a \ ++ libgdwmf.a \ ++ libxfwmf.a \ ++ libXwmf.a \ ++ libwmf.so.0 \ ++ libgdwmf.so.0 \ ++ libxfwmf.so.0 \ ++ libXwmf.so.0 ++ ++TARGETS = $(LIBRARIES) wmftopng wmftofig xwmf + + all: $(TARGETS) + +-xwmf: libwmf.a libXwmf.a xwmf.o LIBDIB ++xwmf: libwmf.so.0 libXwmf.so.0 xwmf.o LIBDIB + $(CC) $(LDFLAGS) -o xwmf xwmf.o -L. -lXwmf -lwmf $(LIBS) + +-wmftopng: libwmf.a libgdwmf.a wmftopng.o LIBXGD LIBDIB ++wmftopng: libwmf.so.0 libgdwmf.so.0 wmftopng.o LIBXGD LIBDIB + $(CC) $(LDFLAGS) -o wmftopng wmftopng.o -L. -lgdwmf -lwmf $(GDLIBS) + +-wmftofig: libwmf.a libxfwmf.a wmftofig.o LIBXFIG ++wmftofig: libwmf.so.0 libxfwmf.so.0 wmftofig.o LIBXFIG + $(CC) $(LDFLAGS) -o wmftofig wmftofig.o -L. -lxfwmf -lwmf $(XFLIBS) + + libwmf.a: $(WMFLIBOBJECTS) + $(AR) rc libwmf.a $(WMFLIBOBJECTS) + $(RANLIB) libwmf.a + ++libwmf.so.0: $(WMFLIBOBJECTS:S/o$/so/g) ++ $(CC) -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(WMFLIBOBJECTS:S/o$/so/g) $(LIBS) ++ ln -sf libwmf.so.0 libwmf.so ++ + libgdwmf.a: $(GDLIBOBJECTS) + $(AR) rc libgdwmf.a $(GDLIBOBJECTS) + $(RANLIB) libgdwmf.a + ++libgdwmf.so.0: $(GDLIBOBJECTS:S/o$/so/g) ++ $(CC) -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(GDLIBOBJECTS:S/o$/so/g) $(LIBS) ++ ln -sf libgdwmf.so.0 libgdwmf.so ++ + libxfwmf.a: $(XFLIBOBJECTS) + $(AR) rc libxfwmf.a $(XFLIBOBJECTS) + $(RANLIB) libxfwmf.a + ++libxfwmf.so.0: $(XFLIBOBJECTS:S/o$/so/g) ++ $(CC) -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(XFLIBOBJECTS:S/o$/so/g) $(LIBS) ++ ln -sf libxfwmf.so.0 libxfwmf.so ++ + libXwmf.a: $(XLIBOBJECTS) + $(AR) rc libXwmf.a $(XLIBOBJECTS) + $(RANLIB) libXwmf.a + ++libXwmf.so.0: $(XLIBOBJECTS:S/o$/so/g) ++ $(CC) -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(XLIBOBJECTS:S/o$/so/g) $(LIBS) ++ ln -sf libXwmf.so.0 libXwmf.so ++ + LIBDIB: + @echo making libdib in libdib + @(cd libdib && $(MAKE)) || exit 1 +@@ -97,6 +127,9 @@ + %.o: %.c + $(CC) $(CFLAGS) -c $*.c + ++.c.so: ++ $(CC) -fpic -DPIC $(CFLAGS) -c $(.IMPSRC) -o $(.TARGET) ++ + clean: cleansub + rm -rf *.o wmftopng wmftofig xwmf a.out core *.a .pure + +@@ -134,15 +167,24 @@ $(libdir) install: all installdirs installsub @@ -31,7 +119,15 @@ $(INSTALL_DATA) $(srcdir)/libwmf.a $(libdir)/libwmf.a $(INSTALL_DATA) $(srcdir)/libgdwmf.a $(libdir)/libgdwmf.a $(INSTALL_DATA) $(srcdir)/libXwmf.a $(libdir)/libXwmf.a -@@ -144,5 +144,6 @@ + $(INSTALL_DATA) $(srcdir)/libxfwmf.a $(libdir)/libxfwmf.a ++ $(INSTALL_DATA) $(srcdir)/libwmf.so.0 $(libdir)/libwmf.so.0 ++ ln -sf libwmf.so.0 $(libdir)/libwmf.so ++ $(INSTALL_DATA) $(srcdir)/libgdwmf.so.0 $(libdir)/libgdwmf.so.0 ++ ln -sf libgdwmf.so.0 $(libdir)/libgdwmf.so ++ $(INSTALL_DATA) $(srcdir)/libXwmf.so.0 $(libdir)/libXwmf.so.0 ++ ln -sf libXwmf.so.0 $(libdir)/libXwmf.so ++ $(INSTALL_DATA) $(srcdir)/libxfwmf.so.0 $(libdir)/libxfwmf.so.0 ++ ln -sf libxfwmf.so.0 $(libdir)/libxfwmf.so $(INSTALL_DATA) wmfapi.h $(INCLUDEDIR)/wmfapi.h $(INSTALL_DATA) gdwmfapi.h $(INCLUDEDIR)/gdwmfapi.h $(INSTALL_DATA) Xwmfapi.h $(INCLUDEDIR)/Xwmfapi.h diff -ruN ./patches/patch-ab /home/lioux/bin/ports/libwmf/patches/patch-ab --- ./patches/patch-ab Mon May 22 13:38:34 2000 +++ /home/lioux/bin/ports/libwmf/patches/patch-ab Fri May 26 01:35:28 2000 @@ -1,5 +1,5 @@ ---- xgd-1.7.3/Makefile.in.orig Fri Dec 17 00:31:47 1999 -+++ xgd-1.7.3/Makefile.in Sat May 20 15:04:39 2000 +--- xgd-1.7.3/Makefile.in.orig Thu Dec 16 13:31:47 1999 ++++ xgd-1.7.3/Makefile.in Fri May 26 00:46:31 2000 @@ -29,14 +29,14 @@ #If you don't have FreeType and/or Xpm installed, including the @@ -17,12 +17,12 @@ #If you do have FreeType and/or Xpm fully installed, uncomment a #variation of this and comment out the line above. Note that -@@ -80,26 +80,11 @@ +@@ -80,26 +80,18 @@ BIN_PROGRAMS=pngtogd pngtogd2 gdtopng gd2topng gd2copypal gdparttopng webpng TEST_PROGRAMS=gdtest gddemo gd2time gdtestttf -all: libxgd.a $(PROGRAMS) -+all: libxgd.a ++.SUFFIXES: .c .so .o -install: libxgd.a $(BIN_PROGRAMS) - $(INSTALL) libxgd.a $(INSTALL_LIB)/libxgd.a @@ -42,9 +42,43 @@ - $(INSTALL_DATA) gdfontmb.h $(INSTALL_INCLUDE)/gdfontmb.h - $(INSTALL_DATA) gdfonts.h $(INSTALL_INCLUDE)/gdfonts.h - $(INSTALL_DATA) gdfontt.h $(INSTALL_INCLUDE)/gdfontt.h -+install: libxgd.a ++.c.so: ++ $(CC) -fpic -DPIC $(CFLAGS) -c $(.IMPSRC) -o $(.TARGET) ++ ++all: libxgd.a libxgd.so.0 ++ ++install: libxgd.a libxgd.so.0 + $(INSTALL_DATA) libxgd.a $(INSTALL_LIB)/libxgd.a ++ $(INSTALL_DATA) libxgd.so.0 $(INSTALL_LIB)/libxgd.so.0 ++ ln -sf libxgd.so.0 $(INSTALL_LIB)/libxgd.so + $(INSTALL_DATA) gd.h $(INSTALL_INCLUDE)/xgd.h gddemo: gddemo.o libxgd.a $(CC) gddemo.o -o gddemo $(LIBDIRS) $(LIBS) +@@ -134,16 +126,19 @@ + gdtestttf: gdtestttf.o libxgd.a + $(CC) gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS) + +-libxgd.a: gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o \ ++OBJS= 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 gdxpm.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o \ +- gdfontg.o gdtables.o gdttf.o gdcache.o gdkanji.o \ +- gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h ++ gdfontg.o gdtables.o gdttf.o gdcache.o gdkanji.o ++INCS= gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h ++ ++libxgd.a: $(INCS) $(OBJS) + rm -f libxgd.a +- $(AR) rc libxgd.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 gdxpm.o \ +- gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \ +- gdtables.o gdttf.o gdcache.o gdkanji.o ++ $(AR) rc libxgd.a $(OBJS) + -ranlib libxgd.a ++ ++libxgd.so.0: $(INCS) $(OBJS:S/o$/so/g) ++ $(CC) -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(OBJS:S/o$/so/g) $(LIBDIRS) $(LIBS) ++ ln -sf libxgd.so.0 libxgd.so + + clean: + rm -f *.o *.a ${PROGRAMS} diff -ruN ./patches/patch-ac /home/lioux/bin/ports/libwmf/patches/patch-ac --- ./patches/patch-ac Wed Dec 31 21:00:00 1969 +++ /home/lioux/bin/ports/libwmf/patches/patch-ac Fri May 26 01:35:45 2000 @@ -0,0 +1,43 @@ +--- libxfig/Makefile.in.orig Tue Jul 13 10:16:20 1999 ++++ libxfig/Makefile.in Fri May 26 01:11:08 2000 +@@ -28,22 +28,29 @@ + + SHELL = /bin/sh + +-.SUFFIXES: .C .o ++.SUFFIXES: .c .o .so + + MYOBJECTS = \ + color.o \ + objlist.o \ + fileops.o + +-all: libxfig.a ++all: libxfig.a libxfig.so.0 + + libxfig.a: $(MYOBJECTS) + $(AR) rc libxfig.a $(MYOBJECTS) + $(RANLIB) libxfig.a + ++libxfig.so.0: $(MYOBJECTS:S/o$/so/g) ++ $(CC) -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(MYOBJECTS:S/o$/so/g) $(LIBS) ++ ln -sf libxfig.so.0 libxfig.so ++ + %.o: %.c + $(CC) $(CFLAGS) -c $*.c + ++.c.so: ++ $(CC) -fpic -DPIC $(CFLAGS) -c $(.IMPSRC) -o $(.TARGET) ++ + clean: + rm -rf *.o *.a core + +@@ -52,6 +59,8 @@ + + install: all installdirs + $(INSTALL_DATA) libxfig.a @libdir@/libxfig.a ++ $(INSTALL_DATA) libxfig.so.0 @libdir@/libxfig.so.0 ++ ln -sf libxfig.so.0 @libdir@/libxfig.so + + installdirs: + $(MKINSTALLDIRS) @libdir@ \ diff -ruN ./patches/patch-ad /home/lioux/bin/ports/libwmf/patches/patch-ad --- ./patches/patch-ad Wed Dec 31 21:00:00 1969 +++ /home/lioux/bin/ports/libwmf/patches/patch-ad Fri May 26 01:37:13 2000 @@ -0,0 +1,46 @@ +--- libdib/Makefile.in.orig Tue Jul 13 10:14:28 1999 ++++ libdib/Makefile.in Fri May 26 01:36:43 2000 +@@ -28,25 +28,32 @@ + + SHELL = /bin/sh + +-.SUFFIXES: .C .o ++.SUFFIXES: .c .o .so + + MYOBJECTS = \ + bytelevel.o \ + bintree.o \ + dibtoxpm.o + +-all: libdib.a test_dibtoxpm ++all: libdib.a libdib.so.0 test_dibtoxpm + + libdib.a: $(MYOBJECTS) + $(AR) rc libdib.a $(MYOBJECTS) + $(RANLIB) libdib.a + ++libdib.so.0: $(MYOBJECTS:S/o$/so/g) ++ $(CC) -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(MYOBJECTS:S/o$/so/g) $(LIBS) ++ ln -sf libdib.so.0 libdib.so ++ + test_dibtoxpm: libdib.a test_dibtoxpm.o + $(CC) $(LDFLAGS) -o test_dibtoxpm test_dibtoxpm.o -ldib + + %.o: %.c + $(CC) $(CFLAGS) -c $*.c + ++.c.so: ++ $(CC) -fpic -DPIC $(CFLAGS) -c $(.IMPSRC) -o $(.TARGET) ++ + clean: + rm -rf *.o *.a test_dibtoxpm a.out core + +@@ -60,6 +67,8 @@ + install: all installdirs + $(INSTALL_DATA) dibtoxpm.h $(INCLUDEDIR)/dibtoxpm.h + $(INSTALL_DATA) libdib.a @libdir@/libdib.a ++ $(INSTALL_DATA) libdib.so.0 @libdir@/libdib.so.0 ++ ln -sf libdib.so.0 @libdir@/libdib.so + + + # DO NOT DELETE THIS LINE -- make depend depends on it. diff -ruN ./pkg/PLIST /home/lioux/bin/ports/libwmf/pkg/PLIST --- ./pkg/PLIST Wed May 24 04:32:04 2000 +++ /home/lioux/bin/ports/libwmf/pkg/PLIST Fri May 26 00:44:37 2000 @@ -8,9 +8,25 @@ include/xgd.h include/xgdttf.h lib/libXwmf.a +lib/libXwmf.so +lib/libXwmf.so.0 lib/libdib.a +lib/libdib.so +lib/libdib.so.0 lib/libgdwmf.a +lib/libgdwmf.so +lib/libgdwmf.so.0 lib/libwmf.a +lib/libwmf.so +lib/libwmf.so.0 lib/libxfig.a +lib/libxfig.so +lib/libxfig.so.0 lib/libxfwmf.a +lib/libxfwmf.so +lib/libxfwmf.so.0 lib/libxgd.a +lib/libxgd.so +lib/libxgd.so.0 +@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %B +@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000526053254.99091.qmail>