diff options
author | mi <mi@FreeBSD.org> | 2018-02-06 04:28:44 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2018-02-06 04:28:44 +0800 |
commit | d5d4e00e27b29a0c7ab2d8e0abdc3dc999e02125 (patch) | |
tree | 03092c31e1fa3303e416c749bf46ff578266b3db /www | |
parent | b338ce775ec8cd620ee7429b63ecc0e360f5eefa (diff) | |
download | freebsd-ports-gnome-d5d4e00e27b29a0c7ab2d8e0abdc3dc999e02125.tar.gz freebsd-ports-gnome-d5d4e00e27b29a0c7ab2d8e0abdc3dc999e02125.tar.zst freebsd-ports-gnome-d5d4e00e27b29a0c7ab2d8e0abdc3dc999e02125.zip |
Upgrade from 0.8.3 to 0.9.0 -- the option to parse HTML5 texts using gumbo
is the most significant improvement.
While here, (almost) get rid of the bundled expat code in favor of libbsdxml.
Diffstat (limited to 'www')
-rw-r--r-- | www/tdom/Makefile | 47 | ||||
-rw-r--r-- | www/tdom/distinfo | 5 | ||||
-rw-r--r-- | www/tdom/files/patch-bsdxml | 47 | ||||
-rw-r--r-- | www/tdom/files/patch-configure | 37 | ||||
-rw-r--r-- | www/tdom/files/patch-expat_xmlparse.c | 20 | ||||
-rw-r--r-- | www/tdom/files/patch-generic-tcldom.c | 21 | ||||
-rw-r--r-- | www/tdom/files/patch-generic-tclexpat.c | 11 | ||||
-rw-r--r-- | www/tdom/pkg-descr | 3 | ||||
-rw-r--r-- | www/tdom/pkg-plist | 1 |
9 files changed, 71 insertions, 121 deletions
diff --git a/www/tdom/Makefile b/www/tdom/Makefile index 59964a5d2adb..76b640fe4908 100644 --- a/www/tdom/Makefile +++ b/www/tdom/Makefile @@ -2,48 +2,41 @@ # $FreeBSD$ PORTNAME= tDOM -PORTVERSION= 0.8.3 +PORTVERSION= 0.9.0 CATEGORIES= www -MASTER_SITES= GHC http://mirrors.rit.edu/zi/ +MASTER_SITES= http://tdom.org/downloads/ +DISTNAME= ${PORTNAME:tl}-${PORTVERSION} +EXTRACT_SUFX= -src.tgz MAINTAINER= mi@aldan.algebra.com -COMMENT= High performance XML data processing with Tcl (ARGS for OpenACS) +COMMENT= High performance processing of XML and HTML data with Tcl -LICENSE= MPL11 MIT -LICENSE_COMB= multi -LICENSE_FILE_MIT= ${WRKSRC}/expat/COPYING +LICENSE= MPL11 +LICENSE_FILE= ${WRKSRC}/LICENSE -TDOMBASE= ${PREFIX}/lib/tdom${PORTVERSION} - -USES= gmake tar:tgz tcl:tea -USE_GITHUB= yes +USES= gmake tcl:tea CONFIGURE_ARGS= --enable-threads --disable-tdomalloc +CONFIGURE_ARGS+=--with-expat=/usr +EXTRACT_AFTER_ARGS=--exclude 'expat*/*.c' --exclude 'expat*/[a-mo-z]*.h' \ + --exclude 'domalloc*' TEST_TARGET= test PLIST_SUB= PORTVERSION=${PORTVERSION} -DOCS= CHANGES README README.AOL -HTMLDOCS= category-index.html dom.html domDoc.html domNode.html \ - expat.html expatapi.html index.html keyword-index.html \ - tdomcmd.html tnc.html - -OPTIONS_DEFINE= DOCS +DOCS= CHANGES README -pre-configure: - @${RM} ${WRKSRC}/generic/domalloc.? +OPTIONS_DEFINE= DOCS HTML5 +OPTIONS_DEFAULT=${OPTIONS_DEFINE} -post-install: - ${CHMOD} 755 ${STAGEDIR}${TDOMBASE} - ${CHMOD} 644 ${STAGEDIR}${TDOMBASE}/* +HTML5_DESC= Enable parsing of HTML5 (requires gumbo) +HTML5_LIB_DEPENDS=libgumbo.so:devel/gumbo +HTML5_CONFIGURE_ENABLE=html5 +HTML5_CFLAGS= -I${LOCALBASE}/include post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR}/html -.for FILE in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR}/${FILE} -.endfor -.for FILE in ${HTMLDOCS} - ${INSTALL_DATA} ${WRKSRC}/doc/${FILE} ${STAGEDIR}${DOCSDIR}/html/${FILE} -.endfor + ${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}/ + ${INSTALL_DATA} ${WRKSRC}/doc/*.html ${STAGEDIR}${DOCSDIR}/html/ .include <bsd.port.mk> diff --git a/www/tdom/distinfo b/www/tdom/distinfo index abaf8330105d..50ddd6e6bb60 100644 --- a/www/tdom/distinfo +++ b/www/tdom/distinfo @@ -1,2 +1,3 @@ -SHA256 (tDOM-0.8.3.tgz) = 496d5950907dd70db61bc20c55a05a5521363ce3c076e2fdd97270181bc720b9 -SIZE (tDOM-0.8.3.tgz) = 990367 +TIMESTAMP = 1517858044 +SHA256 (tdom-0.9.0-src.tgz) = 201e7f1b0df28b1f1921d9ec18f1ffd5a1b558c0509c54c88206b65a81ba2740 +SIZE (tdom-0.9.0-src.tgz) = 1065288 diff --git a/www/tdom/files/patch-bsdxml b/www/tdom/files/patch-bsdxml new file mode 100644 index 000000000000..6a767149877b --- /dev/null +++ b/www/tdom/files/patch-bsdxml @@ -0,0 +1,47 @@ +Use FreeBSD's Expat (a.k.a. bsdxml) instead of the bundled version. + + -mi + +--- configure 2017-08-24 09:59:41.657305804 -0400 ++++ configure 2018-02-05 14:36:36.444830000 -0500 +@@ -5443,8 +5443,8 @@ + ;; + *) +- if test -f "$with_expat/include/expat.h"; then ++ if test -f "$with_expat/include/bsdxml.h"; then + ac_cv_c_expat=`(cd $with_expat; pwd)` + else +- as_fn_error $? "${with_expat} directory doesn't contain expat.h" "$LINENO" 5 ++ as_fn_error $? "${with_expat} directory doesn't contain bsdxml.h" "$LINENO" 5 + fi + esac +@@ -5511,2 +5511,2 @@ + +- vars="-lexpat" ++ vars="-lbsdxml" +--- generic/dom.h 2017-08-23 10:19:33.726158496 -0400 ++++ generic/dom.h 2018-02-05 14:34:53.308599000 -0500 +@@ -39,5 +39,5 @@ + #include <tcl.h> + #include <ctype.h> +-#include <expat.h> ++#include <bsdxml.h> + #include <utf8conv.h> + +--- generic/tdom.h 2017-08-23 10:19:33.726158496 -0400 ++++ generic/tdom.h 2018-02-05 14:34:53.308798000 -0500 +@@ -1,5 +1,5 @@ + + #include "tcl.h" +-#include <expat.h> ++#include <bsdxml.h> + + +--- generic/tclexpat.h 2017-08-23 10:19:33.725158500 -0400 ++++ generic/tclexpat.h 2018-02-05 14:34:53.309022000 -0500 +@@ -1,4 +1,4 @@ + #include <tcl.h> +-#include <expat.h> ++#include <bsdxml.h> + + struct TclGenExpatInfo; diff --git a/www/tdom/files/patch-configure b/www/tdom/files/patch-configure deleted file mode 100644 index aa7654804378..000000000000 --- a/www/tdom/files/patch-configure +++ /dev/null @@ -1,37 +0,0 @@ ---- configure.orig 2007-08-15 21:40:11 UTC -+++ configure -@@ -6168,14 +6168,14 @@ extern "C" - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char $ac_func (); -+void * $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else --char (*f) () = $ac_func; -+void * (*f) () = $ac_func; - #endif - #ifdef __cplusplus - } -@@ -7261,7 +7261,7 @@ fi - CFLAGS_OPTIMIZE=-O - if test "$GCC" = "yes" ; then - CFLAGS_OPTIMIZE=-O2 -- CFLAGS_WARNING="-Wall -Wno-implicit-int" -+ CFLAGS_WARNING="-Wall -Wno-implicit-int -Wno-uninitialized" - else - CFLAGS_WARNING="" - fi -@@ -8402,7 +8402,7 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6 - # The -pthread needs to go in the CFLAGS, not LIBS - LIBS=`echo $LIBS | sed s/-pthread//` - CFLAGS="$CFLAGS -pthread" -- LDFLAGS="$LDFLAGS -pthread" -+ LDFLAGS="$LDFLAGS" - fi - case $system in - FreeBSD-3.*) diff --git a/www/tdom/files/patch-expat_xmlparse.c b/www/tdom/files/patch-expat_xmlparse.c deleted file mode 100644 index ab1a44cf8f37..000000000000 --- a/www/tdom/files/patch-expat_xmlparse.c +++ /dev/null @@ -1,20 +0,0 @@ ---- expat/xmlparse.c.orig 2007-07-31 00:16:28 UTC -+++ expat/xmlparse.c -@@ -1475,7 +1475,7 @@ XML_Parse(XML_Parser parser, const char - else if (bufferPtr == bufferEnd) { - const char *end; - int nLeftOver; -- enum XML_Error result; -+ enum XML_Error result = XML_STATUS_ERROR; - parseEndByteIndex += len; - positionPtr = s; - ps_finalBuffer = (XML_Bool)isFinal; -@@ -1499,6 +1499,8 @@ XML_Parse(XML_Parser parser, const char - ps_parsing = XML_FINISHED; - return result; - } -+ case XML_FINISHED: -+ /* nothing */; - } - } - diff --git a/www/tdom/files/patch-generic-tcldom.c b/www/tdom/files/patch-generic-tcldom.c deleted file mode 100644 index cc03d6bbb9dd..000000000000 --- a/www/tdom/files/patch-generic-tcldom.c +++ /dev/null @@ -1,21 +0,0 @@ ---- generic/tcldom.c.orig 2007-12-25 23:19:02 UTC -+++ generic/tcldom.c -@@ -5915,6 +5915,9 @@ int tcldom_DomObjCmd ( - | tcldom_EvalLocked - | - \---------------------------------------------------------------------------*/ -+#if !defined(Tcl_GetErrorLine) -+#define Tcl_GetErrorLine(interp) (interp->errorLine) -+#endif - - static - int tcldom_EvalLocked ( -@@ -5934,7 +5937,7 @@ int tcldom_EvalLocked ( - if (ret == TCL_ERROR) { - char msg[64 + TCL_INTEGER_SPACE]; - sprintf(msg, "\n (\"%s %s\" body line %d)", Tcl_GetString(objv[0]), -- Tcl_GetString(objv[1]), interp->errorLine); -+ Tcl_GetString(objv[1]), Tcl_GetErrorLine(interp)); - Tcl_AddErrorInfo(interp, msg); - } - diff --git a/www/tdom/files/patch-generic-tclexpat.c b/www/tdom/files/patch-generic-tclexpat.c deleted file mode 100644 index 5f4b50a2d130..000000000000 --- a/www/tdom/files/patch-generic-tclexpat.c +++ /dev/null @@ -1,11 +0,0 @@ ---- generic/tclexpat.c.orig 2008-03-04 20:34:28 UTC -+++ generic/tclexpat.c -@@ -42,6 +42,8 @@ - - #ifdef _MSC_VER - #include <io.h> -+#else -+#include <unistd.h> /* read() and close() live there */ - #endif - - #ifdef _POSIX_SOURCE diff --git a/www/tdom/pkg-descr b/www/tdom/pkg-descr index 4f49bb38b314..bf3695317d79 100644 --- a/www/tdom/pkg-descr +++ b/www/tdom/pkg-descr @@ -7,5 +7,4 @@ recommendation in XML (160K) needs only about 450K in memory)! Configured for OpenACS (http://openacs.org) -WWW: http://wiki.tcl.tk/1948 - http://tdom.github.com/ +WWW: http://www.tdom.org/ diff --git a/www/tdom/pkg-plist b/www/tdom/pkg-plist index b78d5c27230d..4dabad278a84 100644 --- a/www/tdom/pkg-plist +++ b/www/tdom/pkg-plist @@ -23,4 +23,3 @@ man/mann/tnc.n.gz %%PORTDOCS%%%%DOCSDIR%%/html/tnc.html %%PORTDOCS%%%%DOCSDIR%%/CHANGES %%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/README.AOL |