diff options
-rw-r--r-- | libs/.cvsignore | 4 | ||||
-rw-r--r-- | libs/Makefile.am | 24 | ||||
-rw-r--r-- | libs/README | 9 | ||||
-rw-r--r-- | libs/files/domc-0.7.0.tar.gz | bin | 0 -> 118510 bytes | |||
-rw-r--r-- | libs/files/domc-library.patch | 104 | ||||
-rw-r--r-- | libs/files/libmba-0.7.0.tar.gz | bin | 0 -> 166909 bytes | |||
-rw-r--r-- | libs/files/libmba-library.patch | 54 | ||||
-rw-r--r-- | libs/prepare-libraries.sh | 29 |
8 files changed, 224 insertions, 0 deletions
diff --git a/libs/.cvsignore b/libs/.cvsignore new file mode 100644 index 0000000..eb7fb70 --- /dev/null +++ b/libs/.cvsignore @@ -0,0 +1,4 @@ +domc +libmba +Makefile +Makefile.in diff --git a/libs/Makefile.am b/libs/Makefile.am new file mode 100644 index 0000000..6a8c88d --- /dev/null +++ b/libs/Makefile.am @@ -0,0 +1,24 @@ + +EXTRA_DIST = files prepare-libraries.sh libmba domc + +# We have to take over here and do all these things ourselves +# as the libraries' make files aren't automake compatible + +all: + chmod -R u+rw $(srcdir)/libmba + $(MAKE) -C $(srcdir)/libmba $@ + chmod -R u+rw $(srcdir)/domc + $(MAKE) -C $(srcdir)/domc $@ + +clean: + chmod -R u+rw $(srcdir)/libmba + $(MAKE) -C $(srcdir)/libmba $@ + chmod -R u+rw $(srcdir)/domc + $(MAKE) -C $(srcdir)/domc $@ + +install: + + +dist-hook: clean + rm -rf `find $(distdir)/ -name CVS` + diff --git a/libs/README b/libs/README new file mode 100644 index 0000000..d5e3435 --- /dev/null +++ b/libs/README @@ -0,0 +1,9 @@ + +This folder includes the DOMC library that's used by rtfx for creating an in-memory +XML tree. It was written by Michael B. Allen: + +http://www.ioplex.com/~miallen/domc/ + +Because we want to avoid too dependencies, and because DOMC is small, we build +it here and link it in statically. The 'prepare-libraries.sh' shell script +decompresses the library tars and patches them to work with rtfx. diff --git a/libs/files/domc-0.7.0.tar.gz b/libs/files/domc-0.7.0.tar.gz Binary files differnew file mode 100644 index 0000000..1886fde --- /dev/null +++ b/libs/files/domc-0.7.0.tar.gz diff --git a/libs/files/domc-library.patch b/libs/files/domc-library.patch new file mode 100644 index 0000000..614bf15 --- /dev/null +++ b/libs/files/domc-library.patch @@ -0,0 +1,104 @@ +diff -r -C3 domc-0.7.0/Makefile domc/Makefile +*** domc-0.7.0/Makefile 2003-03-22 17:08:50.000000000 -0700 +--- domc/Makefile 2004-07-29 12:47:32.702686029 -0600 +*************** +*** 1,7 **** +! prefix = /usr/local +! includedir = $(prefix)/include +! libdir = $(prefix)/lib +! mandir = $(prefix)/man + CC = gcc + LIBNAME = domc + MAJVERSION = 0.7 +--- 1,8 ---- +! _EXTRA = -I../libmba/src/ -L../libmba/ +! prefix = ./ +! includedir = $(prefix) +! libdir = $(prefix) +! mandir = $(prefix) + CC = gcc + LIBNAME = domc + MAJVERSION = 0.7 +*************** +*** 11,25 **** + SOVERSION = lib$(LIBNAME).so.$(MAJVERSION) + DISTRO = $(LIBNAME)-$(MINVERSION) + RPM_OPT_FLAGS = -O2 +! CFLAGS = -Wall -W -DMSGNO $(RPM_OPT_FLAGS) -I$(includedir) -L$(libdir) + #CFLAGS = -Wall -W -DMSGNO -I$(includedir) -L$(libdir) $(RPM_OPT_FLAGS) -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wtraditional -Wconversion -Waggregate-return -Wno-parentheses +! OBJS = src/expatls.o src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o + MAN = DOM_CharacterData.3m.gz DOM_Document.3m.gz DOM_Element.3m.gz DOM_Implementation.3m.gz DOM_NamedNodeMap.3m.gz DOM_Node.3m.gz DOM_NodeList.3m.gz DOM_Text.3m.gz + + all: $(ARNAME)($(OBJS)) $(SONAME) src/defines.h + + $(SONAME): $(OBJS) +! $(CC) -shared $(OBJS) -L$(libdir) -lmba -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME) + + .c.a: + $(CC) $(CFLAGS) -c -o $*.o $< +--- 12,26 ---- + SOVERSION = lib$(LIBNAME).so.$(MAJVERSION) + DISTRO = $(LIBNAME)-$(MINVERSION) + RPM_OPT_FLAGS = -O2 +! CFLAGS = -Wall -W -DMSGNO $(RPM_OPT_FLAGS) $(_EXTRA) -I$(includedir) -L$(libdir) + #CFLAGS = -Wall -W -DMSGNO -I$(includedir) -L$(libdir) $(RPM_OPT_FLAGS) -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wtraditional -Wconversion -Waggregate-return -Wno-parentheses +! OBJS = src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o + MAN = DOM_CharacterData.3m.gz DOM_Document.3m.gz DOM_Element.3m.gz DOM_Implementation.3m.gz DOM_NamedNodeMap.3m.gz DOM_Node.3m.gz DOM_NodeList.3m.gz DOM_Text.3m.gz + + all: $(ARNAME)($(OBJS)) $(SONAME) src/defines.h + + $(SONAME): $(OBJS) +! $(CC) -shared $(OBJS) $(_EXTRA) -L$(libdir) -lmba -Wl,-h,$(SOVERSION) -o $(SONAME) + + .c.a: + $(CC) $(CFLAGS) -c -o $*.o $< +*************** +*** 47,51 **** + + clean: + rm -f $(OBJS) $(ARNAME) $(SONAME) $(includedir)/domc.h $(libdir)/$(ARNAME) $(libdir)/$(SONAME) $(libdir)/$(SOVERSION) $(libdir)/lib$(LIBNAME).so $(DISTRO).zip +! cd $(mandir)/man3 && rm -f $(MAN) + +--- 48,52 ---- + + clean: + rm -f $(OBJS) $(ARNAME) $(SONAME) $(includedir)/domc.h $(libdir)/$(ARNAME) $(libdir)/$(SONAME) $(libdir)/$(SOVERSION) $(libdir)/lib$(LIBNAME).so $(DISTRO).zip +! # cd $(mandir)/man3 && rm -f $(MAN) + +diff -r -C3 domc-0.7.0/src/defines.h domc/src/defines.h +*** domc-0.7.0/src/defines.h 2003-03-22 16:35:36.000000000 -0700 +--- domc/src/defines.h 2004-07-29 12:40:28.443671463 -0600 +*************** +*** 21,27 **** + #define HAVE_ENCDEC 0 + #define HAVE_STRDUP 1 + #define HAVE_STRNLEN 0 +! #define HAVE_EXPAT 195 + #define HAVE_MBSTATE 0 + #define HAVE_WCWIDTH 0 + #define HAVE_SNPRINTF 0 +--- 21,27 ---- + #define HAVE_ENCDEC 0 + #define HAVE_STRDUP 1 + #define HAVE_STRNLEN 0 +! #define HAVE_EXPAT 0 + #define HAVE_MBSTATE 0 + #define HAVE_WCWIDTH 0 + #define HAVE_SNPRINTF 0 +*************** +*** 35,41 **** + #define HAVE_ENCDEC 0 + #define HAVE_STRDUP 1 + #define HAVE_STRNLEN 1 +! #define HAVE_EXPAT 195 + #define HAVE_MBSTATE 1 + #define HAVE_WCWIDTH 1 + #define HAVE_SNPRINTF 1 +--- 35,41 ---- + #define HAVE_ENCDEC 0 + #define HAVE_STRDUP 1 + #define HAVE_STRNLEN 1 +! #define HAVE_EXPAT 0 + #define HAVE_MBSTATE 1 + #define HAVE_WCWIDTH 1 + #define HAVE_SNPRINTF 1 diff --git a/libs/files/libmba-0.7.0.tar.gz b/libs/files/libmba-0.7.0.tar.gz Binary files differnew file mode 100644 index 0000000..fe2f752 --- /dev/null +++ b/libs/files/libmba-0.7.0.tar.gz diff --git a/libs/files/libmba-library.patch b/libs/files/libmba-library.patch new file mode 100644 index 0000000..207dde7 --- /dev/null +++ b/libs/files/libmba-library.patch @@ -0,0 +1,54 @@ +diff -r -C3 libmba-0.7.0/Makefile libmba/Makefile +*** libmba-0.7.0/Makefile 2003-10-15 02:56:32.000000000 -0600 +--- libmba/Makefile 2004-07-29 12:47:27.532270825 -0600 +*************** +*** 1,7 **** +! prefix = /usr/local +! includedir = $(prefix)/include +! libdir = $(prefix)/lib +! mandir = $(prefix)/man + CC = gcc + LIBNAME = mba + MAJVERSION = 0.7 +--- 1,7 ---- +! prefix = ./ +! includedir = $(prefix) +! libdir = $(prefix) +! mandir = $(prefix) + CC = gcc + LIBNAME = mba + MAJVERSION = 0.7 +*************** +*** 23,29 **** + all: $(ARNAME)($(OBJS)) $(SONAME) + + $(SONAME): $(ARNAME)($(OBJS)) $(OBJS) +! $(CC) -shared $(OBJS) -L$(libdir) -lc -lexpat -lutil -Wl,-h,$(SOVERSION) -o $(SONAME) + + .c.a: + $(CC) $(CFLAGS) -c $< -o $*.o +--- 23,29 ---- + all: $(ARNAME)($(OBJS)) $(SONAME) + + $(SONAME): $(ARNAME)($(OBJS)) $(OBJS) +! $(CC) -shared $(OBJS) -L$(libdir) -lc -lutil -Wl,-h,$(SOVERSION) -o $(SONAME) + + .c.a: + $(CC) $(CFLAGS) -c $< -o $*.o +*************** +*** 53,59 **** + clean: + rm -rf $(includedir)/mba + rm -f $(OBJS) $(ARNAME) $(SONAME) $(libdir)/$(ARNAME) $(libdir)/$(SONAME) $(libdir)/$(SOVERSION) $(libdir)/lib$(LIBNAME).so $(DISTRO).zip +! cd $(mandir)/man3 && rm -f $(MAN) + + sho: src/shellout.c src/mba/shellout.h + gcc -Wall -W -DTEST -DMSGNO -lmba -lutil -o sho src/shellout.c +--- 53,59 ---- + clean: + rm -rf $(includedir)/mba + rm -f $(OBJS) $(ARNAME) $(SONAME) $(libdir)/$(ARNAME) $(libdir)/$(SONAME) $(libdir)/$(SOVERSION) $(libdir)/lib$(LIBNAME).so $(DISTRO).zip +! # cd $(mandir)/man3 && rm -f $(MAN) + + sho: src/shellout.c src/mba/shellout.h + gcc -Wall -W -DTEST -DMSGNO -lmba -lutil -o sho src/shellout.c diff --git a/libs/prepare-libraries.sh b/libs/prepare-libraries.sh new file mode 100644 index 0000000..b993312 --- /dev/null +++ b/libs/prepare-libraries.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# Unzips, prepares and patches the domc and depending libraries +# for use with the rtfx. +# +# The tar files should be in the 'files' directory as should the +# patches. + +cd `dirname $0` + +# Delete the original directories +rm -rf domc || exit 1 +rm -rf libmba || exit 1 + +# Unzip the libraries +echo "untarring dist files..." +tar -zxf files/domc-*.tar.gz || exit 1 +tar -zxf files/libmba-*.tar.gz || exit 1 + +# Rename the directories +echo "renaming directories..." +mv domc-* domc || exit 1 +mv libmba-* libmba || exit 1 + +# Patch the directories +echo "patching the distributions..." +patch -p0 < files/domc-library.patch +patch -p0 < files/libmba-library.patch + |