From ae882a6fdab42d94bd6fd84bb858670888a7043e Mon Sep 17 00:00:00 2001 From: pvalchev Date: Wed, 18 Oct 2006 18:22:56 +0000 Subject: [PATCH] update to tidy-051026 build shared library (to be used by outside apps like php, etc) fix makefile to allow fake to work w/ that. based on diff from Dan Brosemer , thx --- www/tidy/Makefile | 12 +++-- www/tidy/distinfo | 24 +++++----- www/tidy/patches/patch-build_gmake_Makefile | 50 +++++++++++++++++---- www/tidy/pkg/PFRAG.shared | 2 + www/tidy/pkg/PLIST | 3 +- 5 files changed, 66 insertions(+), 25 deletions(-) create mode 100644 www/tidy/pkg/PFRAG.shared diff --git a/www/tidy/Makefile b/www/tidy/Makefile index 154c1d1d7ff..573d59dba7a 100644 --- a/www/tidy/Makefile +++ b/www/tidy/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.19 2005/10/05 09:39:20 bernd Exp $ +# $OpenBSD: Makefile,v 1.20 2006/10/18 18:22:56 pvalchev Exp $ COMMENT= "validate, correct, and pretty-print HTML files" -TIDYDATE= 050921 +TIDYDATE= 051026 DISTNAME= tidy_src_${TIDYDATE} PKGNAME= tidy-${TIDYDATE} +SHARED_LIBS= tidy 1.0 CATEGORIES= www @@ -23,8 +24,8 @@ MASTER_SITES0= ${HOMEPAGE}docs/ MASTER_SITES1= ${HOMEPAGE}test/ EXTRACT_SUFX= .tgz DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ - tidy_docs_050705${EXTRACT_SUFX}:0 \ - tidy_test_050919${EXTRACT_SUFX}:1 + tidy_docs_051020${EXTRACT_SUFX}:0 \ + tidy_test_051026${EXTRACT_SUFX}:1 USE_GMAKE= Yes @@ -35,6 +36,9 @@ WRKBUILD= ${WRKDIST}/build/gmake DOCDIR= ${PREFIX}/share/doc/tidy +MAKE_FLAGS= TIDY_MAJOR=${LIBtidy_VERSION:R} TIDY_MINOR=${LIBtidy_VERSION:E} +FAKE_FLAGS= TIDY_MAJOR=${LIBtidy_VERSION:R} TIDY_MINOR=${LIBtidy_VERSION:E} + post-install: ${INSTALL_DATA_DIR} ${DOCDIR} ${INSTALL_DATA} ${WRKSRC}/htmldoc/*.{cfg,css,gif,html} ${DOCDIR} diff --git a/www/tidy/distinfo b/www/tidy/distinfo index 5ff46166ff6..f0d6fc22c34 100644 --- a/www/tidy/distinfo +++ b/www/tidy/distinfo @@ -1,12 +1,12 @@ -MD5 (tidy_docs_050705.tgz) = 2e6533fc48b077ff6243deaf21a781de -MD5 (tidy_src_050921.tgz) = 82c76c061abfdf5f67d02951b4dd2a02 -MD5 (tidy_test_050919.tgz) = c9ca834e381537039e516da549662651 -RMD160 (tidy_docs_050705.tgz) = 49b8c2eaf87a0291b1bef6479cf1eeda6b720f52 -RMD160 (tidy_src_050921.tgz) = 958f532245412e3f8ac5bdd56edc5693cadf4b5b -RMD160 (tidy_test_050919.tgz) = 337ca275ca6af513b1bf2a5bd4b10a2a244e90fe -SHA1 (tidy_docs_050705.tgz) = b243d7910ce2fe57a8df27ff8f775e6d397c732d -SHA1 (tidy_src_050921.tgz) = 4a53aa129e2575004dcbaf0cf4c5c3f1637723b0 -SHA1 (tidy_test_050919.tgz) = d214f85d581ceeeb4ec58d24d8d7494e10e62125 -SIZE (tidy_docs_050705.tgz) = 150359 -SIZE (tidy_src_050921.tgz) = 256079 -SIZE (tidy_test_050919.tgz) = 106674 +MD5 (tidy_docs_051020.tgz) = 86de2f198e57399c063d2567b2a25628 +MD5 (tidy_src_051026.tgz) = 1e39fafd6808978871346658c8da1454 +MD5 (tidy_test_051026.tgz) = 4b35b2e0495ad2fc1bc391f779c9541d +RMD160 (tidy_docs_051020.tgz) = 63f033560af9a53393d9a3f656f26bb12bf505b6 +RMD160 (tidy_src_051026.tgz) = 0cae41f8c0cec51d4600d1bf2aac338cf60aa6b9 +RMD160 (tidy_test_051026.tgz) = 1caaf13ce9d484d8321b8b370782966066ea3a6f +SHA1 (tidy_docs_051020.tgz) = 04988d51267566db6899e8061d9f2e5b58fbeec4 +SHA1 (tidy_src_051026.tgz) = 53be36945344af0c4080c34ebc95728bf8617f1c +SHA1 (tidy_test_051026.tgz) = a790c98bdabffb8c181796e7ef4007cfbeb1f370 +SIZE (tidy_docs_051020.tgz) = 150402 +SIZE (tidy_src_051026.tgz) = 256131 +SIZE (tidy_test_051026.tgz) = 107014 diff --git a/www/tidy/patches/patch-build_gmake_Makefile b/www/tidy/patches/patch-build_gmake_Makefile index 68875910e54..06a22b23015 100644 --- a/www/tidy/patches/patch-build_gmake_Makefile +++ b/www/tidy/patches/patch-build_gmake_Makefile @@ -1,6 +1,5 @@ -$OpenBSD: patch-build_gmake_Makefile,v 1.2 2005/07/19 08:10:10 aanriot Exp $ ---- build/gmake/Makefile.orig Tue May 3 08:58:08 2005 -+++ build/gmake/Makefile Tue Jul 12 12:03:54 2005 +--- build/gmake/Makefile.orig Fri Jul 15 08:58:10 2005 ++++ build/gmake/Makefile Wed Oct 18 19:34:22 2006 @@ -58,8 +58,8 @@ SHELL=/bin/sh PROJECT=tidy @@ -19,7 +18,7 @@ $OpenBSD: patch-build_gmake_Makefile,v 1.2 2005/07/19 08:10:10 aanriot Exp $ -CC= gcc -CFLAGS= -g -Wall -Wno-switch -Wno-parentheses -I $(INCDIR) +#CC= gcc -+CFLAGS+= -I $(INCDIR) ++CFLAGS+= -fPIC -I $(INCDIR) # flags only supported with gcc 3.x # CFLAGS += -Wunused-parameter @@ -29,16 +28,28 @@ $OpenBSD: patch-build_gmake_Makefile,v 1.2 2005/07/19 08:10:10 aanriot Exp $ # OTHERCFLAGS+= -DSUPPORT_ACCESSIBILITY_CHECKS=1 -DSUPPORT_UTF16_ENCODINGS=1 -DSUPPORT_ASIAN_ENCODINGS=1 ifdef SUPPORT_UTF16_ENCODINGS CFLAGS += -DSUPPORT_UTF16_ENCODINGS=$(SUPPORT_UTF16_ENCODINGS) -@@ -115,7 +115,7 @@ LIBSUFFIX = .a +@@ -112,10 +112,12 @@ TIDY_MINOR = 0 + # This will come from autoconf again + LIBPREFIX = lib + LIBSUFFIX = .a ++SHAREDLIBSUFFIX = .so OBJSUF = .o LIBRARY = $(LIBDIR)/$(LIBPREFIX)$(PROJECT)$(LIBSUFFIX) -AR=ar -r ++SHAREDLIBRARY = $(LIBDIR)/$(LIBPREFIX)$(PROJECT)$(SHAREDLIBSUFFIX).$(TIDY_MAJOR).$(TIDY_MINOR) +#AR=ar -r XSLTPROC = xsltproc -@@ -164,7 +164,7 @@ doc: $(DOCS) +@@ -158,17 +160,21 @@ LIBHFILES= \ + $(SRCDIR)/tidy-int.h + + +-all: $(LIBRARY) $(EXES) ++all: $(LIBRARY) $(SHAREDLIBRARY) $(EXES) + + doc: $(DOCS) $(LIBRARY): $(OBJFILES) if [ ! -d $(LIBDIR) ]; then mkdir $(LIBDIR); fi @@ -47,7 +58,28 @@ $OpenBSD: patch-build_gmake_Makefile,v 1.2 2005/07/19 08:10:10 aanriot Exp $ ifdef RANLIB $(RANLIB) $@ endif -@@ -205,19 +205,19 @@ clean: + ++$(SHAREDLIBRARY): $(OBJFILES) ++ if [ ! -d $(LIBDIR) ]; then mkdir $(LIBDIR); fi ++ $(CC) -shared -fPIC -o $(SHAREDLIBRARY) $(OBJFILES) ++ + $(OBJDIR)/%$(OBJSUF): $(SRCDIR)/%.c $(HFILES) $(LIBHFILES) Makefile + if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi + $(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ -c $< +@@ -182,10 +188,10 @@ $(BINDIR)/tab2space: $(APPDIR)/tab2space + $(CC) $(CFLAGS) $(OTHERCFLAGS) -o $@ $(APPDIR)/tab2space.c $(LIBS) + + $(HELPXML): $(BINDIR)/$(PROJECT) +- $(BINDIR)/$(PROJECT) -xml-help > $@ ++ LD_LIBRARY_PATH=$(libinst) $(bininst)/$(PROJECT) -xml-help > $@ + + $(CONFIGXML): $(BINDIR)/$(PROJECT) +- $(BINDIR)/$(PROJECT) -xml-config > $@ ++ LD_LIBRARY_PATH=$(libinst) $(bininst)/$(PROJECT) -xml-config > $@ + + $(DOCDIR)/quickref.html: $(DOCDIR)/quickref-html.xsl $(CONFIGXML) + $(XSLTPROC) -o $@ $(DOCDIR)/quickref-html.xsl $(CONFIGXML) +@@ -205,19 +211,20 @@ clean: if [ "$(BINDIR)" != "$(TOPDIR)" -a -d $(BINDIR) ]; then rmdir $(BINDIR); fi installhdrs: $(HFILES) @@ -59,6 +91,7 @@ $OpenBSD: patch-build_gmake_Makefile,v 1.2 2005/07/19 08:10:10 aanriot Exp $ if [ ! -d "$(libinst)" ]; then mkdir -p "$(libinst)"; fi - cp -f $(LIBRARY) "$(libinst)/" + ${BSD_INSTALL_DATA} $(LIBRARY) "$(libinst)/" ++ ${BSD_INSTALL_DATA} $(SHAREDLIBRARY) "$(libinst)/" installexes: $(EXES) - if [ ! -d "$(bininst)" ]; then mkdir -p "$(bininst)"; fi @@ -72,4 +105,5 @@ $OpenBSD: patch-build_gmake_Makefile,v 1.2 2005/07/19 08:10:10 aanriot Exp $ + if [ ! -d "$(maninst)/man1" ]; then ${BSD_INSTALL_MAN_DIR} "$(maninst)/man1"; fi; + ${BSD_INSTALL_MAN} $(DOCDIR)/tidy.1 "$(maninst)/man1/tidy.1"; - install: installhdrs installib installmanpage installexes +-install: installhdrs installib installmanpage installexes ++install: installib installexes installmanpage installhdrs diff --git a/www/tidy/pkg/PFRAG.shared b/www/tidy/pkg/PFRAG.shared new file mode 100644 index 00000000000..225c75571a0 --- /dev/null +++ b/www/tidy/pkg/PFRAG.shared @@ -0,0 +1,2 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1 2006/10/18 18:22:56 pvalchev Exp $ +@lib lib/libtidy.so.${LIBtidy_VERSION} diff --git a/www/tidy/pkg/PLIST b/www/tidy/pkg/PLIST index 451b6ab8ce0..00961d39800 100644 --- a/www/tidy/pkg/PLIST +++ b/www/tidy/pkg/PLIST @@ -1,4 +1,5 @@ -@comment $OpenBSD: PLIST,v 1.6 2005/07/19 08:10:10 aanriot Exp $ +@comment $OpenBSD: PLIST,v 1.7 2006/10/18 18:22:56 pvalchev Exp $ +%%SHARED%% bin/tab2space bin/tidy include/tidy/