this is a fixed patch

links binary against shared lib
fixes the way it's called (goes to fake location)
binary/libs installed to fake/ before headers now (since headers
are generated, other order breaks)
sets LD_LIBRARY_PATH

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/tidy/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile    5 Oct 2005 09:39:20 -0000       1.19
+++ Makefile    18 Oct 2006 17:23:53 -0000
@@ -2,9 +2,10 @@
 
 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_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
 
@@ -34,6 +35,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}
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/tidy/distinfo,v
retrieving revision 1.7
diff -u -r1.7 distinfo
--- distinfo    5 Oct 2005 09:39:20 -0000       1.7
+++ distinfo    18 Oct 2006 17:23:53 -0000
@@ -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
Index: patches/patch-build_gmake_Makefile
===================================================================
RCS file: /cvs/ports/www/tidy/patches/patch-build_gmake_Makefile,v
retrieving revision 1.2
diff -u -r1.2 patch-build_gmake_Makefile
--- patches/patch-build_gmake_Makefile  19 Jul 2005 08:10:10 -0000      1.2
+++ patches/patch-build_gmake_Makefile  18 Oct 2006 17:34:25 -0000
@@ -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 @@
 -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 @@
  # 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 @@
  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 @@
        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 @@
 +      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
Index: pkg/PFRAG.shared
===================================================================
RCS file: pkg/PFRAG.shared
diff -N pkg/PFRAG.shared
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.shared    18 Oct 2006 17:34:51 -0000
@@ -0,0 +1,2 @@
[EMAIL PROTECTED] $OpenBSD$
[EMAIL PROTECTED] lib/libtidy.so.${LIBtidy_VERSION}
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/tidy/pkg/PLIST,v
retrieving revision 1.6
diff -u -r1.6 PLIST
--- pkg/PLIST   19 Jul 2005 08:10:10 -0000      1.6
+++ pkg/PLIST   18 Oct 2006 17:23:53 -0000
@@ -1,4 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.6 2005/07/19 08:10:10 aanriot Exp $
+%%SHARED%%
 bin/tab2space
 bin/tidy
 include/tidy/

Reply via email to