[Midnightbsd-cvs] mports: mports/textproc: add libxml

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Aug 31 02:08:04 EDT 2007


Log Message:
-----------
add libxml

Modified Files:
--------------
    mports/textproc:
        Makefile (r1.75 -> r1.76)

Added Files:
-----------
    mports/textproc/libxml:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-plist (r1.1)
    mports/textproc/libxml/files:
        patch-aa (r1.1)
        patch-config.h.in (r1.1)
        patch-configure (r1.1)
        patch-doc::Makefile.in (r1.1)
        patch-nanoftp.c (r1.1)
        patch-nanohttp.c (r1.1)

-------------- next part --------------
--- /dev/null
+++ textproc/libxml/pkg-descr
@@ -0,0 +1,3 @@
+XML parser library for GNOME
+
+WWW: http://xmlsoft.org/
--- /dev/null
+++ textproc/libxml/pkg-plist
@@ -0,0 +1,53 @@
+bin/xml-config
+etc/xmlConf.sh
+include/gnome-xml/HTMLparser.h
+include/gnome-xml/HTMLtree.h
+include/gnome-xml/SAX.h
+include/gnome-xml/debugXML.h
+include/gnome-xml/encoding.h
+include/gnome-xml/entities.h
+include/gnome-xml/nanoftp.h
+include/gnome-xml/nanohttp.h
+include/gnome-xml/parser.h
+include/gnome-xml/parserInternals.h
+include/gnome-xml/tree.h
+include/gnome-xml/uri.h
+include/gnome-xml/valid.h
+include/gnome-xml/xlink.h
+include/gnome-xml/xml-error.h
+include/gnome-xml/xmlIO.h
+include/gnome-xml/xmlmemory.h
+include/gnome-xml/xpath.h
+lib/libxml.a
+lib/libxml.la
+lib/libxml.so
+lib/libxml.so.5
+libdata/pkgconfig/libxml.pc
+share/doc/gnome-xml/DOM.gif
+share/doc/gnome-xml/book1.html
+share/doc/gnome-xml/gnome-xml-debugxml.html
+share/doc/gnome-xml/gnome-xml-encoding.html
+share/doc/gnome-xml/gnome-xml-entities.html
+share/doc/gnome-xml/gnome-xml-error.html
+share/doc/gnome-xml/gnome-xml-htmlparser.html
+share/doc/gnome-xml/gnome-xml-htmltree.html
+share/doc/gnome-xml/gnome-xml-nanoftp.html
+share/doc/gnome-xml/gnome-xml-nanohttp.html
+share/doc/gnome-xml/gnome-xml-parser.html
+share/doc/gnome-xml/gnome-xml-parserinternals.html
+share/doc/gnome-xml/gnome-xml-sax.html
+share/doc/gnome-xml/gnome-xml-tree.html
+share/doc/gnome-xml/gnome-xml-valid.html
+share/doc/gnome-xml/gnome-xml-xml-error.html
+share/doc/gnome-xml/gnome-xml-xmlio.html
+share/doc/gnome-xml/gnome-xml-xmlmemory.html
+share/doc/gnome-xml/gnome-xml-xpath.html
+share/doc/gnome-xml/index.sgml
+share/doc/gnome-xml/libxml-lib.html
+share/doc/gnome-xml/libxml-notes.html
+share/doc/gnome-xml/structure.gif
+share/doc/gnome-xml/xml.html
+ at exec ln -sf . %D/include/gnome-xml/libxml
+ at unexec rm -f %D/include/gnome-xml/libxml
+ at dirrm share/doc/gnome-xml
+ at dirrm include/gnome-xml
--- /dev/null
+++ textproc/libxml/Makefile
@@ -0,0 +1,29 @@
+# New ports collection makefile for:	libxml
+# Date created:				28 September 1998
+# Whom:					Yukihiro Nakai <Nakai at technologist.com>
+#
+# $MidnightBSD: mports/textproc/libxml/Makefile,v 1.1 2007/08/31 06:08:01 laffer1 Exp $
+# $FreeBSD: ports/textproc/libxml/Makefile,v 1.57 2007/01/28 09:07:45 kris Exp $
+#
+
+PORTNAME=	libxml
+PORTVERSION=	1.8.17
+PORTREVISION=	4
+CATEGORIES=	textproc gnome
+MASTER_SITES=	${MASTER_SITE_GNOME}
+MASTER_SITE_SUBDIR=	sources/libxml/1.8
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	XML parser library for GNOME
+
+USE_AUTOTOOLS=	libtool:15
+USE_GMAKE=	yes
+USE_GNOME=	pkgconfig
+GNU_CONFIGURE=	yes
+USE_LDCONFIG=	yes
+
+pre-patch:
+	@${FIND} ${WRKSRC} -name "*.[ch]" | ${XARGS} ${REINPLACE_CMD} -e \
+		's|malloc\.h|stdlib.h|g'
+
+.include <bsd.port.mk>
--- /dev/null
+++ textproc/libxml/distinfo
@@ -0,0 +1,3 @@
+MD5 (libxml-1.8.17.tar.gz) = 53846294aa850a7d042948176d1d19dc
+SHA256 (libxml-1.8.17.tar.gz) = bffd3178dec8d75e2cfe05f4a4c36319c8fd3206209e32ef84e1a7c5173a86ed
+SIZE (libxml-1.8.17.tar.gz) = 996351
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/textproc/Makefile,v
retrieving revision 1.75
retrieving revision 1.76
diff -Ltextproc/Makefile -Ltextproc/Makefile -u -r1.75 -r1.76
--- textproc/Makefile
+++ textproc/Makefile
@@ -43,6 +43,7 @@
     SUBDIR += libcroco
     SUBDIR += libuninameslist
     SUBDIR += libwpd
+    SUBDIR += libxml
     SUBDIR += libxml++
     SUBDIR += libxml++26
     SUBDIR += libxml2
--- /dev/null
+++ textproc/libxml/files/patch-configure
@@ -0,0 +1,13 @@
+
+$FreeBSD: ports/textproc/libxml/files/patch-configure,v 1.1 2002/04/30 23:17:59 sobomax Exp $
+
+--- configure	2002/04/30 21:56:31	1.1
++++ configure	2002/04/30 21:56:55
+@@ -5263,6 +5263,7 @@
+ 
+ # This can be used to rebuild libtool when needed
+ LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++$ac_aux_dir/ltconfig $LIBTOOL_DEPS
+ 
+ # Always use our own libtool.
+ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
--- /dev/null
+++ textproc/libxml/files/patch-config.h.in
@@ -0,0 +1,15 @@
+
+$FreeBSD: ports/textproc/libxml/files/patch-config.h.in,v 1.1 2001/08/13 11:17:10 sobomax Exp $
+
+--- config.h.in	2001/08/13 11:13:32	1.1
++++ config.h.in	2001/08/13 11:13:47
+@@ -72,9 +72,6 @@
+ /* Define if you have the <ieeefp.h> header file.  */
+ #undef HAVE_IEEEFP_H
+ 
+-/* Define if you have the <malloc.h> header file.  */
+-#undef HAVE_MALLOC_H
+-
+ /* Define if you have the <math.h> header file.  */
+ #undef HAVE_MATH_H
+ 
--- /dev/null
+++ textproc/libxml/files/patch-nanohttp.c
@@ -0,0 +1,45 @@
+--- nanohttp.c.orig	Wed Nov 10 15:15:05 2004
++++ nanohttp.c	Wed Nov 10 15:16:44 2004
+@@ -161,6 +161,7 @@
+     const char *cur = URL;
+     char buf[4096];
+     int index = 0;
++    const int indexMax = 4096 - 1;
+     int port = 0;
+ 
+     if (ctxt->protocol != NULL) { 
+@@ -177,7 +178,7 @@
+     }
+     if (URL == NULL) return;
+     buf[index] = 0;
+-    while (*cur != 0) {
++    while ((*cur != 0) && (index < indexMax)) {
+         if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) {
+ 	    buf[index] = 0;
+ 	    ctxt->protocol = xmlMemStrdup(buf);
+@@ -219,7 +220,7 @@
+     else {
+         index = 0;
+         buf[index] = 0;
+-	while (*cur != 0)
++	while ((*cur != 0) && (index < indexMax))
+ 	    buf[index++] = *cur++;
+ 	buf[index] = 0;
+ 	ctxt->path = xmlMemStrdup(buf);
+@@ -241,6 +242,7 @@
+     const char *cur = URL;
+     char buf[4096];
+     int index = 0;
++    const int indexMax = 4096 - 1;
+     int port = 0;
+ 
+     if (proxy != NULL) { 
+@@ -258,7 +260,7 @@
+ #endif
+     if (URL == NULL) return;
+     buf[index] = 0;
+-    while (*cur != 0) {
++    while ((*cur != 0) && (index < indexMax)) {
+         if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) {
+ 	    buf[index] = 0;
+ 	    index = 0;
--- /dev/null
+++ textproc/libxml/files/patch-doc::Makefile.in
@@ -0,0 +1,14 @@
+
+$FreeBSD: ports/textproc/libxml/files/patch-doc::Makefile.in,v 1.1 2002/04/30 23:17:59 sobomax Exp $
+
+--- doc/Makefile.in	2002/04/30 21:49:33	1.1
++++ doc/Makefile.in	2002/04/30 21:51:26
+@@ -106,7 +106,7 @@
+ # The directory containing the source code (if it contains documentation).
+ DOC_SOURCE_DIR = ..
+ 
+-HTML_DIR = $(datadir)/gnome-xml/html
++HTML_DIR = $(prefix)/share/doc
+ 
+ TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
--- /dev/null
+++ textproc/libxml/files/patch-nanoftp.c
@@ -0,0 +1,104 @@
+--- nanoftp.c.orig	Wed Nov 10 15:17:07 2004
++++ nanoftp.c	Wed Nov 10 15:19:56 2004
+@@ -65,6 +65,8 @@
+ #define FTP_GET_PASSWD		331
+ #define FTP_BUF_SIZE		512
+ 
++#define XML_NANO_MAX_URLBUF	4096
++
+ typedef struct xmlNanoFTPCtxt {
+     char *protocol;	/* the protocol name */
+     char *hostname;	/* the host name */
+@@ -203,7 +205,7 @@
+ xmlNanoFTPScanURL(void *ctx, const char *URL) {
+     xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+     const char *cur = URL;
+-    char buf[4096];
++    char buf[XML_NANO_MAX_URLBUF];
+     int index = 0;
+     int port = 0;
+ 
+@@ -221,7 +223,7 @@
+     }
+     if (URL == NULL) return;
+     buf[index] = 0;
+-    while (*cur != 0) {
++    while ((*cur != 0) && (index < XML_NANO_MAX_URLBUF - 1)) {
+         if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) {
+ 	    buf[index] = 0;
+ 	    ctxt->protocol = xmlMemStrdup(buf);
+@@ -234,7 +236,7 @@
+     if (*cur == 0) return;
+ 
+     buf[index] = 0;
+-    while (1) {
++    while (index < XML_NANO_MAX_URLBUF - 1) {
+         if (cur[0] == ':') {
+ 	    buf[index] = 0;
+ 	    ctxt->hostname = xmlMemStrdup(buf);
+@@ -263,7 +265,7 @@
+     else {
+         index = 0;
+         buf[index] = 0;
+-	while (*cur != 0)
++	while ((*cur != 0) && (index < XML_NANO_MAX_URLBUF-1))
+ 	    buf[index++] = *cur++;
+ 	buf[index] = 0;
+ 	ctxt->path = xmlMemStrdup(buf);
+@@ -288,7 +290,7 @@
+ xmlNanoFTPUpdateURL(void *ctx, const char *URL) {
+     xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+     const char *cur = URL;
+-    char buf[4096];
++    char buf[XML_NANO_MAX_URLBUF];
+     int index = 0;
+     int port = 0;
+ 
+@@ -301,7 +303,7 @@
+     if (ctxt->hostname == NULL)
+ 	return(-1);
+     buf[index] = 0;
+-    while (*cur != 0) {
++    while ((*cur != 0) && (index < XML_NANO_MAX_URLBUF-1)) {
+         if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) {
+ 	    buf[index] = 0;
+ 	    if (strcmp(ctxt->protocol, buf))
+@@ -353,7 +355,7 @@
+     else {
+         index = 0;
+         buf[index] = 0;
+-	while (*cur != 0)
++	while ((*cur != 0) && (index < XML_NANO_MAX_URLBUF-1))
+ 	    buf[index++] = *cur++;
+ 	buf[index] = 0;
+ 	ctxt->path = xmlMemStrdup(buf);
+@@ -374,7 +376,7 @@
+ void
+ xmlNanoFTPScanProxy(const char *URL) {
+     const char *cur = URL;
+-    char buf[4096];
++    char buf[XML_NANO_MAX_URLBUF];
+     int index = 0;
+     int port = 0;
+ 
+@@ -393,7 +395,7 @@
+ #endif
+     if (URL == NULL) return;
+     buf[index] = 0;
+-    while (*cur != 0) {
++    while ((*cur != 0) && (index < XML_NANO_MAX_URLBUF-1)) {
+         if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) {
+ 	    buf[index] = 0;
+ 	    index = 0;
+@@ -827,6 +829,11 @@
+ 	hp = gethostbyname(ctxt->hostname);
+     if (hp == NULL)
+         return(-1);
++
++    if ((unsigned int) hp->h_length >
++	sizeof(((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr)) {
++	return (-1);
++    }
+ 
+     /*
+      * Prepare the socket
--- /dev/null
+++ textproc/libxml/files/patch-aa
@@ -0,0 +1,22 @@
+--- Makefile.in.orig	Mon May 14 05:39:15 2001
++++ Makefile.in	Mon May 21 22:15:39 2001
+@@ -37,3 +37,3 @@
+ pkgdatadir = $(datadir)/@PACKAGE@
+-pkglibdir = $(libdir)/@PACKAGE@
++pkglibdir = $(prefix)/libdata/pkgconfig
+ pkgincludedir = $(includedir)/@PACKAGE@
+@@ -108,3 +108,3 @@
+ 
+-libxml_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@ @Z_LIBS@
++libxml_la_LDFLAGS = -version-info 5:0:0 @Z_LIBS@
+
+@@ -140,3 +140,3 @@
+ 
+-confexecdir = $(libdir)
++confexecdir = $(sysconfdir)
+ confexec_DATA = xmlConf.sh
+@@ -147,3 +147,3 @@
+ 
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = $(pkglibdir)
+ pkgconfig_DATA = libxml.pc


More information about the Midnightbsd-cvs mailing list