ports/129461: [PATCH] textproc/wbxml2: update to 0.10.0

Alex Samorukov samm at os2.kiev.ua
Sat Dec 6 13:40:02 UTC 2008


>Number:         129461
>Category:       ports
>Synopsis:       [PATCH] textproc/wbxml2: update to 0.10.0
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 06 13:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Alex Samorukov
>Release:        FreeBSD 6.3-RELEASE-p1 i386
>Organization:
NetArt
>Environment:
System: FreeBSD deepvision.tsua.net 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #4: Fri Mar 28 05:16:52 EET 2008
>Description:
- Update to 0.10.0

Please, update this port ASAP, because current version is broken and non usable
because of last update from SVN patcset. Currently this lubrary is used by
libsyncml, and in it current state this libsyncml fail to sync correctly 
because of this issue. Also, project home changed, and build system moved from
autotools to cmake.

Added file(s):
- files/patch-aa

Removed file(s):
- files/patch-Makefile.am
- files/patch-configure.in
- files/patch-libwbxml2.pc.in
- files/patch-src_Makefile.am
- files/patch-src_wbxml.h
- files/patch-src_wbxml_encoder.c
- files/patch-src_wbxml_encoder.h
- files/patch-src_wbxml_parser.c
- files/patch-src_wbxml_tables.h
- files/patch-src_wbxml_tree.c
- files/patch-src_wbxml_tree.h
- files/patch-tools_Makefile.am

Port maintainer (czauner+ports at onlineloop.com) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- wbxml2-0.10.0.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/Makefile /usr/home/samm/tmp/wbxml2/Makefile
--- /usr/ports/textproc/wbxml2/Makefile	2008-08-20 03:57:25.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/Makefile	2008-12-06 15:27:56.000000000 +0200
@@ -6,30 +6,28 @@
 #
 
 PORTNAME=	wbxml2
-PORTVERSION=	0.9.2
-PORTREVISION=	2
+PORTVERSION=	0.10.0
 CATEGORIES=	textproc devel
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE} \
-		http://czauner.onlineloop.com/pub/FreeBSD/distfiles/
-MASTER_SITE_SUBDIR=	wbxmllib
-DISTNAME=	wbxml2-${PORTVERSION}
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR=	libwbxml
+DISTNAME=	libwbxml-${PORTVERSION}
 
 MAINTAINER=	czauner+ports at onlineloop.com
 COMMENT=	Library & tools for converting wbxml<->xml
 
 LIB_DEPENDS=	expat.6:${PORTSDIR}/textproc/expat2
 
-USE_AUTOTOOLS=	aclocal:19 autoconf:262 autoheader:262 automake:19 libtool:15
-AUTOMAKE_ARGS=	-acf
-USE_LDCONFIG=	yes
-USE_GNOME=	pkgconfig libxml2
-CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
-		LDFLAGS="-L${LOCALBASE}/lib"
-
-patch-autotools:
-	@${CP} ${LOCALBASE}/share/libtool/ltmain.sh ${WRKSRC}/ltmain.sh
-	@${CAT} ${LOCALBASE}/share/aclocal/libtool.m4 >> ${WRKSRC}/aclocal.m4
-	@${TOUCH} ${WRKSRC}/config.h.in
-	@${REINPLACE_CMD} 's|^.*install_prog.*instname.*destdir.*$$||' ${WRKSRC}/ltmain.sh
+USE_BZIP2=	YES
+USE_CMAKE=	YES
+
+WRKSRC=		${WRKDIR}/libwbxml-${PORTVERSION}/build
+CMAKE_SOURCE_PATH=..
+PATCH_WRKSRC=	${WRKDIR}/libwbxml-${PORTVERSION}
+
+pre-patch:
+	@cd ${PATCH_WRKSRC}
+
+post-extract:
+	${MKDIR} ${WRKSRC}
 
 .include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/distinfo /usr/home/samm/tmp/wbxml2/distinfo
--- /usr/ports/textproc/wbxml2/distinfo	2007-04-23 01:49:41.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/distinfo	2008-12-06 15:26:27.000000000 +0200
@@ -1,3 +1,3 @@
-MD5 (wbxml2-0.9.2.tar.gz) = 67a48fd9b69db8818a4dca5375c7993a
-SHA256 (wbxml2-0.9.2.tar.gz) = cb4909d8753dff7f6ac90a62a61ed1ae68e49ead2dbc60c22673c55bb0e14a36
-SIZE (wbxml2-0.9.2.tar.gz) = 304115
+MD5 (libwbxml-0.10.0.tar.bz2) = faaa28938e22ba839ca5eafbdaa1543b
+SHA256 (libwbxml-0.10.0.tar.bz2) = 35cee44dcec64dce0672aa412df174f6e794445a708d7179be683cb37a2a103e
+SIZE (libwbxml-0.10.0.tar.bz2) = 314569
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-Makefile.am /usr/home/samm/tmp/wbxml2/files/patch-Makefile.am
--- /usr/ports/textproc/wbxml2/files/patch-Makefile.am	2007-04-23 01:49:42.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-Makefile.am	1970-01-01 03:00:00.000000000 +0300
@@ -1,29 +0,0 @@
-
-$FreeBSD: ports/textproc/wbxml2/files/patch-Makefile.am,v 1.1 2007/04/22 22:49:42 sobomax Exp $
-
---- Makefile.am.orig
-+++ Makefile.am
-@@ -5,10 +5,10 @@
- 
- SUBDIRS = src tools
- 
--pkgconfigdir=$(libdir)/pkgconfig
-+pkgconfigdir=${prefix}/libdata/pkgconfig
- pkgconfig_DATA = libwbxml2.pc
- 
--wbxmldocdir = ${prefix}/share/doc/wbxml2-${VERSION}
-+wbxmldocdir = ${prefix}/share/doc/wbxml2
- wbxmldoc_DATA = \
- 	AUTHORS\
- 	bootstrap\
-@@ -25,8 +25,8 @@
- 	doxygen.h
- 
- install-data-local:
--	$(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
--	cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
-+#	$(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
-+#	cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
- 
- dist-bz2: distdir
- 	sed -e "s/tar.gz/tar.bz2/g" $(distdir)/wbxml2.spec > $(distdir)/wbxml2.spec.aux
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-aa /usr/home/samm/tmp/wbxml2/files/patch-aa
--- /usr/ports/textproc/wbxml2/files/patch-aa	1970-01-01 03:00:00.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-aa	2008-12-06 15:17:11.000000000 +0200
@@ -0,0 +1,11 @@
+--- CMakeLists.txt	2008-12-05 16:06:35.000000000 +0200
++++ CMakeLists.txt	2008-12-06 15:09:44.000000000 +0200
+@@ -152,7 +152,7 @@
+ ADD_DOCUMENTATION( TEXT FILE ${CMAKE_SOURCE_DIR}/TODO )
+ 
+ # todo: add requires in pc file
+-INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libwbxml2.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig/" )
++INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libwbxml2.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig/" )
+ 
+ # status output
+ INCLUDE( ShowStatus )
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-configure.in /usr/home/samm/tmp/wbxml2/files/patch-configure.in
--- /usr/ports/textproc/wbxml2/files/patch-configure.in	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-configure.in	1970-01-01 03:00:00.000000000 +0300
@@ -1,16 +0,0 @@
---- configure.in.orig	2008-06-15 05:56:12.000000000 +1000
-+++ configure.in	2008-06-15 05:56:24.000000000 +1000
-@@ -1,11 +1,11 @@
- dnl  Process this file with autoconf to produce a configure script.
- AC_INIT(doxygen.h)
--AM_INIT_AUTOMAKE(wbxml2, 0.9.0)
-+AM_INIT_AUTOMAKE(wbxml2, 0.9.2)
- AM_CONFIG_HEADER(config.h)
- 
- 
- dnl Define common variables
--VERSION="0.9.0"
-+VERSION="0.9.2"
- AC_SUBST(VERSION)
- RELEASE="1"
- AC_SUBST(RELEASE)
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-libwbxml2.pc.in /usr/home/samm/tmp/wbxml2/files/patch-libwbxml2.pc.in
--- /usr/ports/textproc/wbxml2/files/patch-libwbxml2.pc.in	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-libwbxml2.pc.in	1970-01-01 03:00:00.000000000 +0300
@@ -1,8 +0,0 @@
---- libwbxml2.pc.in.orig	2006-07-11 21:47:44.000000000 +1000
-+++ libwbxml2.pc.in	2008-06-15 06:58:26.000000000 +1000
-@@ -8,4 +8,4 @@
- Version: @VERSION@
- Requires: libxml-2.0 >= 2.6
- Libs: -L${libdir} -lwbxml2
--Cflags: -I${includedir}
-+Cflags: -I${includedir} -DHAVE_EXPAT -D_REENTRANT -DWBXML_ENCODER_USE_STRTBL -DWBXML_SUPPORT_WML -DWBXML_SUPPORT_WTA -DWBXML_SUPPORT_SI -DWBXML_SUPPORT_SL -DWBXML_SUPPORT_CO -DWBXML_SUPPORT_PROV -DWBXML_SUPPORT_EMN -DWBXML_SUPPORT_DRMREL -DWBXML_SUPPORT_OTA_SETTINGS -DWBXML_SUPPORT_SYNCML -DWBXML_SUPPORT_WV -DWBXML_SUPPORT_AIRSYNC
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-src_Makefile.am /usr/home/samm/tmp/wbxml2/files/patch-src_Makefile.am
--- /usr/ports/textproc/wbxml2/files/patch-src_Makefile.am	2007-04-23 01:49:42.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-src_Makefile.am	1970-01-01 03:00:00.000000000 +0300
@@ -1,25 +0,0 @@
-
-$FreeBSD: ports/textproc/wbxml2/files/patch-src_Makefile.am,v 1.1 2007/04/22 22:49:42 sobomax Exp $
-
---- src/Makefile.am
-+++ src/Makefile.am
-@@ -3,7 +3,7 @@
- INCLUDES =\
- 	 -I. -I/usr/include
- 
--CFLAGS =\
-+CFLAGS +=\
- 	 -DHAVE_CONFIG_H\
- 	 -DHAVE_EXPAT\
- 	 -D_REENTRANT\
-@@ -20,9 +20,7 @@
- 	 -DWBXML_SUPPORT_SYNCML\
- 	 -DWBXML_SUPPORT_WV\
- 	 -DWBXML_SUPPORT_AIRSYNC\
--	 -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes\
--	 -O3\
--	 -g
-+	 -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes
- 
- lib_LTLIBRARIES = libwbxml2.la
- 
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-src_wbxml.h /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml.h
--- /usr/ports/textproc/wbxml2/files/patch-src_wbxml.h	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml.h	1970-01-01 03:00:00.000000000 +0300
@@ -1,9 +0,0 @@
---- src/wbxml.h.orig	2006-07-11 21:47:44.000000000 +1000
-+++ src/wbxml.h	2008-06-15 06:58:54.000000000 +1000
-@@ -285,6 +285,7 @@
-     WBXMLVersion wbxml_version; /**< WBXML Version */
-     WB_BOOL keep_ignorable_ws;  /**< Keep Ignorable Whitespaces (Default: FALSE) */
-     WB_BOOL use_strtbl;         /**< Generate String Table (Default: TRUE) */
-+    WB_BOOL produce_anonymous;  /**< Produce an anonymous document (Default: FALSE) */
- } WBXMLGenWBXMLParams;
- 
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-src_wbxml_encoder.c /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_encoder.c
--- /usr/ports/textproc/wbxml2/files/patch-src_wbxml_encoder.c	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_encoder.c	1970-01-01 03:00:00.000000000 +0300
@@ -1,277 +0,0 @@
---- src/wbxml_encoder.c.orig	2006-07-11 21:47:45.000000000 +1000
-+++ src/wbxml_encoder.c	2008-06-15 08:45:31.000000000 +1000
-@@ -136,6 +136,7 @@
-     const WBXMLTagEntry *current_tag;       /**< Current Tag (See The Warning For This Field !) */
-     const WBXMLTreeNode *current_text_parent; /**< Text parent of current Node (See The Warning For This Field !) */
-     const WBXMLAttrEntry *current_attr;     /**< Current Attribute */
-+    WBXMLTreeNode *current_node;
-     WB_UTINY tagCodePage;                   /**< Current Tag Code Page */
-     WB_UTINY attrCodePage;                  /**< Current Attribute Code Page */
-     WB_BOOL ignore_empty_text;              /**< Do we ignore empty text nodes (ie: ignorable whitespaces)? */
-@@ -153,6 +154,7 @@
-     WB_BOOL use_strtbl;                     /**< Do we use String Table when generating WBXML output ? (default: YES) */
- #endif /* WBXML_ENCODER_USE_STRTBL */
-     WB_BOOL xml_encode_header;              /**< Do we generate XML Header ? */
-+    WB_BOOL produce_anonymous;
-     WBXMLVersion wbxml_version;             /**< WBXML Version to use (when generating WBXML output) */
-     WBXMLCharsetMIBEnum output_charset;     /**< Output charset encoding */
-     WB_BOOL flow_mode;                      /**< Is Flow Mode encoding activated ? */
-@@ -269,6 +271,7 @@
- static WBXMLError wbxml_encode_entity(WBXMLEncoder *encoder, WB_ULONG value);
- #endif /* 0 */
- static WBXMLError wbxml_encode_opaque(WBXMLEncoder *encoder, WBXMLBuffer *buff);
-+static WBXMLError wbxml_encode_opaque_data(WBXMLEncoder *encoder, WB_UTINY *data, WB_ULONG data_len);
- #if defined( WBXML_ENCODER_USE_STRTBL )
- static WBXMLError wbxml_encode_tableref(WBXMLEncoder *encoder, WB_ULONG offset);
- #endif /* WBXML_ENCODER_USE_STRTBL */
-@@ -292,7 +295,9 @@
- #if defined( WBXML_SUPPORT_DRMREL )
- static WBXMLError wbxml_encode_drmrel_content(WBXMLEncoder *encoder, WB_UTINY *buffer);
- #endif /* WBXML_SUPPORT_DRMREL */
--
-+#if defined( WBXML_SUPPORT_OTA_SETTINGS )
-+static WBXMLError wbxml_encode_ota_nokia_icon(WBXMLEncoder *encoder, WB_UTINY *buffer);
-+#endif
- #if defined( WBXML_ENCODER_USE_STRTBL )
- /* WBXML String Table Functions */
- static WBXMLStringTableElement *wbxml_strtbl_element_create(WBXMLBuffer *string, WB_BOOL is_stat);
-@@ -383,6 +388,7 @@
-     encoder->current_tag = NULL;
-     encoder->current_text_parent = NULL;
-     encoder->current_attr = NULL;
-+    encoder->current_node = NULL;
- 
-     encoder->tagCodePage = 0;
-     encoder->attrCodePage = 0;
-@@ -400,6 +406,7 @@
-     encoder->cdata = NULL;
- 
-     encoder->xml_encode_header = TRUE;
-+    encoder->produce_anonymous = FALSE;
- 
-     /* Default Version: WBXML 1.3 */
-     encoder->wbxml_version = WBXML_VERSION_13;
-@@ -450,6 +457,7 @@
-     
-     encoder->current_tag = NULL;
-     encoder->current_attr = NULL;
-+    encoder->current_node = NULL;
-     
-     encoder->tagCodePage = 0;
-     encoder->attrCodePage = 0;
-@@ -507,7 +515,13 @@
-     encoder->use_strtbl = use_strtbl;
- #endif /* WBXML_ENCODER_USE_STRTBL */
- }
--
-+WBXML_DECLARE(void) wbxml_encoder_set_produce_anonymous(WBXMLEncoder *encoder, WB_BOOL set_anonymous)
-+{
-+    if (encoder == NULL)
-+        return;
-+    
-+    encoder->produce_anonymous = set_anonymous;
-+}
- 
- WBXML_DECLARE(void) wbxml_encoder_set_wbxml_version(WBXMLEncoder *encoder, WBXMLVersion version)
- {
-@@ -637,6 +651,9 @@
- 
- WBXML_DECLARE(WBXMLError) wbxml_encoder_encode_node(WBXMLEncoder *encoder, WBXMLTreeNode *node)
- {
-+    if (encoder->flow_mode == FALSE) {
-+        WBXML_WARNING((WBXML_ENCODER, "You should NOT call wbxml_encoder_encode_node() if you are not in Flow Mode encoding ! (use wbxml_encoder_set_flow_mode(encoder, TRUE))"));
-+    }
-     return wbxml_encoder_encode_node_with_elt_end(encoder, node, TRUE);
- }
- 
-@@ -649,10 +666,6 @@
-     if ((encoder == NULL) || (node == NULL))
-         return WBXML_ERROR_BAD_PARAMETER;
-     
--    if (encoder->flow_mode == FALSE) {
--        WBXML_WARNING((WBXML_ENCODER, "You should NOT call wbxml_encoder_encode_node() if you are not in Flow Mode encoding ! (use wbxml_encoder_set_flow_mode(encoder, TRUE))"));
--    }
--    
-     /* Check that language table has been set */
-     if (encoder->lang == NULL)
-         return WBXML_ERROR_BAD_PARAMETER;
-@@ -965,6 +978,7 @@
- static WBXMLError parse_node(WBXMLEncoder *encoder, WBXMLTreeNode *node, WB_BOOL enc_end)
- {
-     WBXMLError ret = WBXML_OK;
-+    encoder->current_node = node;
- 
-     /* Parse this node */
-     switch (node->type) {
-@@ -1078,6 +1092,7 @@
- 
-     /* Reset Current Tag */
-     encoder->current_tag = NULL;
-+    encoder->current_node = NULL;
- 
-     /* Parse next node */
-     if (node->next != NULL)
-@@ -1464,7 +1479,7 @@
- 
-     /* Encode Public ID */
-     /* If WBXML Public Id is '0x01' (unknown), or we forced it, add the XML Public ID in the String Table */
--    if (encoder->textual_publicid || (public_id == WBXML_PUBLIC_ID_UNKNOWN))
-+    if ((encoder->textual_publicid || (public_id == WBXML_PUBLIC_ID_UNKNOWN)) && !encoder->produce_anonymous)
-     {
-         if (encoder->lang->publicID->xmlPublicID != NULL)
-         {
-@@ -1500,7 +1515,7 @@
-             else {
- #endif /* WBXML_ENCODER_USE_STRTBL */
-                 /* Length of String Table is length of XML Public ID */
--                strstbl_len = wbxml_buffer_len(pid);
-+                strstbl_len = wbxml_buffer_len(pid) + 1;
- 
-                 /* There is only the XML Public ID in String Table */
-                 public_id_index = 0;
-@@ -1548,7 +1563,8 @@
-             /* The append includes terminating NULL char */
-             if (!wbxml_buffer_append(header, pid))
-                 return WBXML_ERROR_ENCODER_APPEND_DATA;
--            
-+            if (!wbxml_buffer_append_char(header, WBXML_STR_END))
-+                return WBXML_ERROR_ENCODER_APPEND_DATA;
-             /* Clean up */
-             wbxml_buffer_destroy(pid);
-         }
-@@ -1870,7 +1886,7 @@
-      *  Encoder Language Specific Attribute Values
-      */
- 
--    if (ctx == WBXML_VALUE_ELEMENT_CTX_ATTR) {
-+    if ((ctx == WBXML_VALUE_ELEMENT_CTX_ATTR) && (encoder->current_attr != NULL)) {
-         switch (encoder->lang->langID) {
- #if defined( WBXML_SUPPORT_SI )
-         case WBXML_LANG_SI10:
-@@ -1892,7 +1908,16 @@
-             }
-             break;
- #endif /* WBXML_SUPPORT_EMN */
--
-+#if defined( WBXML_SUPPORT_OTA_SETTINGS )
-+        case WBXML_LANG_OTA_SETTINGS:
-+            if ((encoder->current_attr->wbxmlCodePage == 0x00) &&
-+                (encoder->current_attr->wbxmlToken == 0x11))
-+            {
-+                if ((ret = wbxml_encode_ota_nokia_icon(encoder, buffer)) != WBXML_NOT_ENCODED)
-+                    return ret;
-+            }
-+            break;
-+#endif /* WBXML_SUPPORT_OTA_SETTINGS */
-         default:
-             break;
-         }
-@@ -1936,7 +1961,8 @@
- #if defined( WBXML_SUPPORT_SYNCML )
-         /* If this is a SyncML document ? */
-         if ((encoder->lang->langID == WBXML_LANG_SYNCML_SYNCML10) ||
--            (encoder->lang->langID == WBXML_LANG_SYNCML_SYNCML11))
-+            (encoder->lang->langID == WBXML_LANG_SYNCML_SYNCML11) ||
-+            (encoder->lang->langID == WBXML_LANG_SYNCML_SYNCML12))
-         {
-             /** @todo We must check too if we are in a <Type> */
- 
-@@ -2219,6 +2245,11 @@
-  * @param list The Value Element list
-  * @return WBXML_OK if encoding is OK, an error code otherwise
-  */
-+static WBXMLError wbxml_encode_opaque(WBXMLEncoder *encoder, WBXMLBuffer *buff)
-+{
-+    return wbxml_encode_opaque_data(encoder, wbxml_buffer_get_cstr(buff), wbxml_buffer_len(buff));
-+}
-+
- static WBXMLError wbxml_encode_value_element_list(WBXMLEncoder *encoder, WBXMLList *list)
- {
-     WBXMLValueElement *elt = NULL;
-@@ -2438,18 +2469,18 @@
-  * @note  opaque = OPAQUE length *byte
-  *        length = mb_u_int32
-  */
--static WBXMLError wbxml_encode_opaque(WBXMLEncoder *encoder, WBXMLBuffer *buff)
-+static WBXMLError wbxml_encode_opaque_data(WBXMLEncoder *encoder, WB_UTINY *data, WB_ULONG data_len)
- {
-     /* Add WBXML_OPAQUE */
-     if (!wbxml_buffer_append_char(encoder->output, WBXML_OPAQUE))
-         return WBXML_ERROR_ENCODER_APPEND_DATA;
- 
-     /* Add Length */
--    if (!wbxml_buffer_append_mb_uint_32(encoder->output, wbxml_buffer_len(buff)))
-+    if (!wbxml_buffer_append_mb_uint_32(encoder->output, data_len))
-         return WBXML_ERROR_ENCODER_APPEND_DATA;
- 
-     /* Add Buffer */
--    if (!wbxml_buffer_append(encoder->output, buff))
-+    if (!wbxml_buffer_append_data(encoder->output, data, data_len))
-         return WBXML_ERROR_ENCODER_APPEND_DATA;
- 
-     return WBXML_OK;
-@@ -3146,8 +3177,54 @@
- }
- 
- #endif /* WBXML_SUPPORT_DRMREL */
-+#if defined( WBXML_SUPPORT_OTA_SETTINGS )
-+static WBXMLError wbxml_encode_ota_nokia_icon(WBXMLEncoder *encoder, WB_UTINY *buffer)
-+{
-+    WBXMLError ret = WBXML_NOT_ENCODED;
-+
-+    /* Is a VALUE attribute ? */
-+    if ((encoder->current_tag != NULL) &&
-+        (encoder->current_attr->wbxmlCodePage == 0x00) &&
-+        (encoder->current_attr->wbxmlToken == 0x11) &&
-+        (encoder->current_node && encoder->current_node->attrs))
-+    {
-+        WBXMLList *attrs = encoder->current_node->attrs;
-+        WB_ULONG index = 0;
-+        WB_ULONG nb_attrs = wbxml_list_len(attrs);
-+        WB_BOOL found = FALSE;
-+        
-+        /* Search for a NAME="ICON" attribute */
-+        while (!found && (index < nb_attrs)) {
-+            WBXMLAttribute *attr = (WBXMLAttribute*)wbxml_list_get(attrs, index);
-+        
-+            if ((WBXML_STRCMP("NAME", wbxml_attribute_get_xml_name(attr)) == 0) &&
-+                (WBXML_STRCMP("ICON", wbxml_attribute_get_xml_value(attr)) == 0))
-+            {
-+                WB_UTINY *data = NULL;
-+                WB_LONG data_len = 0;
- 
-+                /* Decode Base64 */
-+                if ((data_len = wbxml_base64_decode(buffer, &data)) < 0)
-+                    return WBXML_NOT_ENCODED;
-+
-+                /* Encode opaque */
-+                if ((ret = wbxml_encode_opaque_data(encoder, data, data_len)) != WBXML_OK)
-+                    return ret;
-+
-+                /* Free Data */
-+                wbxml_free(data);
-+
-+                found = TRUE;
-+            }
-+
-+            index++;
-+        }
-+    }
-+
-+    return ret;
-+}
- 
-+#endif /* WBXML_SUPPORT_OTA_SETTINGS */
- #if defined( WBXML_ENCODER_USE_STRTBL )
- 
- /****************************
-@@ -4019,7 +4096,8 @@
- #if defined( WBXML_SUPPORT_SYNCML )
-         /* Change text in <Type> from "application/vnd.syncml-devinf+wbxml" to "application/vnd.syncml-devinf+xml" */
-         if (((encoder->lang->langID == WBXML_LANG_SYNCML_SYNCML10) ||
--             (encoder->lang->langID == WBXML_LANG_SYNCML_SYNCML11)) &&
-+             (encoder->lang->langID == WBXML_LANG_SYNCML_SYNCML11) ||
-+             (encoder->lang->langID == WBXML_LANG_SYNCML_SYNCML12)) &&
-             (encoder->current_tag != NULL) &&
-             (encoder->current_tag->wbxmlCodePage == 0x01 ) &&
-             (encoder->current_tag->wbxmlToken == 0x13 ) &&
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-src_wbxml_encoder.h /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_encoder.h
--- /usr/ports/textproc/wbxml2/files/patch-src_wbxml_encoder.h	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_encoder.h	1970-01-01 03:00:00.000000000 +0300
@@ -1,10 +0,0 @@
---- src/wbxml_encoder.h.orig	2008-06-15 07:38:14.000000000 +1000
-+++ src/wbxml_encoder.h	2008-06-15 07:39:40.000000000 +1000
-@@ -116,6 +116,7 @@
-  * @note This function has no effect if WBXML_ENCODER_USE_STRTBL compilation flag is not set
-  */
- WBXML_DECLARE(void) wbxml_encoder_set_use_strtbl(WBXMLEncoder *encoder, WB_BOOL use_strtbl);
-+WBXML_DECLARE(void) wbxml_encoder_set_produce_anonymous(WBXMLEncoder *encoder, WB_BOOL set_anonymous);
- 
- /**
-  * @brief Set the WBXML Version of the output document, when generating WBXML [Default: 'WBXML_VERSION_TOKEN_13' (1.3)]
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-src_wbxml_parser.c /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_parser.c
--- /usr/ports/textproc/wbxml2/files/patch-src_wbxml_parser.c	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_parser.c	1970-01-01 03:00:00.000000000 +0300
@@ -1,300 +0,0 @@
---- src/wbxml_parser.c.orig	2006-07-11 21:47:45.000000000 +1000
-+++ src/wbxml_parser.c	2008-06-15 06:59:21.000000000 +1000
-@@ -153,11 +153,14 @@
- static WBXMLError parse_mb_uint32(WBXMLParser *parser, WB_ULONG *result);
- 
- /* Language Specific Decoding Functions */
-+static WBXMLError decode_base64_value(WBXMLBuffer **data);
-+
- #if defined( WBXML_SUPPORT_SI ) || defined( WBXML_SUPPORT_EMN )
- static WBXMLError decode_datetime(WBXMLBuffer *buff);
- #endif /* WBXML_SUPPORT_SI || WBXML_SUPPORT_EMN */
- 
- static WBXMLError decode_opaque_content(WBXMLParser *parser, WBXMLBuffer **data);
-+static WBXMLError decode_opaque_attr_value(WBXMLParser *parser, WBXMLBuffer **data);
- 
- #if defined( WBXML_SUPPORT_WV )
- static WBXMLError decode_wv_content(WBXMLParser *parser, WBXMLBuffer **data);
-@@ -165,10 +168,6 @@
- static WBXMLError decode_wv_datetime(WBXMLBuffer **data);
- #endif /* WBXML_SUPPORT_WV */
- 
--#if defined( WBXML_SUPPORT_DRMREL )
--static WBXMLError decode_drmrel_keyvalue(WBXMLBuffer **data);
--#endif /* WBXML_SUPPORT_DRMREL */
--
- /* Macro for error handling */
- #define CHECK_ERROR if (ret != WBXML_OK) return ret;
- 
-@@ -277,7 +276,7 @@
-             parser->charset = WBXML_PARSER_DEFAULT_CHARSET;
-       
-             WBXML_WARNING((WBXML_PARSER,
--                           "No charset information found, using default : %s",
-+                           "No charset information found, using default : %x",
-                            WBXML_PARSER_DEFAULT_CHARSET));
-         }
-     }
-@@ -659,12 +658,14 @@
-      * Do NOT keep 'WBXML_VERSION_UNKNOWN' (0xffffffff) because only one byte will change.
-      * (for example, if the version is 0x02, then parser->version will be 0xffffff02)
-      */
--    parser->version = WBXML_VERSION_10;
-+    WB_UTINY version = WBXML_VERSION_10;
-     
--    if ((ret = parse_uint8(parser, (WB_UTINY*) &parser->version)) != WBXML_OK)
-+    if ((ret = parse_uint8(parser, &version)) != WBXML_OK)
-         return ret;
-+    
-+    parser->version = version;
- 
--    WBXML_DEBUG((WBXML_PARSER, "(%d) Parsed version: '0x%X'", parser->pos - 1, (WB_TINY) parser->version));
-+    WBXML_DEBUG((WBXML_PARSER, "(%d) Parsed version: 1.%d", parser->pos - 1, parser->version));
- 
-     return WBXML_OK;
- }
-@@ -938,6 +939,8 @@
-     if ((ret = parse_stag(parser, &tag, &element)) != WBXML_OK ) {
-         return ret;
-     }
-+
-+    WBXML_DEBUG((WBXML_PARSER, "<%s>", wbxml_tag_get_xml_name(element)));
-   
-     /* Set Current Tag */
-     if (element->type == WBXML_VALUE_TOKEN) {
-@@ -990,11 +993,11 @@
-                                                attrs,
-                                                is_empty);
-     }
--      
-+    
-     /* Free Attributes */
-     free_attrs_table(attrs);
-     
--      
-+    
-     /* Parse *content */
-     if (!is_empty) {
-         /* There can be NO content */
-@@ -1023,7 +1026,7 @@
-             content = NULL;
-         }
-         
--        WBXML_DEBUG((WBXML_PARSER, "(%d) End of Element", parser->pos));
-+        WBXML_DEBUG((WBXML_PARSER, "(%d) End of Element", parser->pos - 1));
-         
-         /* Skip END */
-         parser->pos++;
-@@ -1037,7 +1040,9 @@
-                                              element,
-                                              is_empty);
-     }
--      
-+    
-+    WBXML_DEBUG((WBXML_PARSER, "</%s>", wbxml_tag_get_xml_name(element)));
-+    
-     /* Free Tag */
-     wbxml_tag_destroy(element);
-       
-@@ -1078,7 +1083,7 @@
-     WBXML_DEBUG((WBXML_PARSER, "(%d) Parsing switchPage", parser->pos));
- 
-     if ((WB_UTINY) parser->version < (WB_UTINY) WBXML_VERSION_12)
--        WBXML_WARNING((WBXML_PARSER, "No Switch Page mecanism possible in WBXML < %s", WBXML_VERSION_TEXT_12));
-+        WBXML_WARNING((WBXML_PARSER, "No Switch Page mecanism possible in WBXML < %s (current: %d)", WBXML_VERSION_TEXT_12, (WB_UTINY) parser->version));
- 
-     /* Skip SWITCH_PAGE token */
-     parser->pos++;
-@@ -1946,7 +1951,10 @@
-             WBXML_ERROR((WBXML_PARSER, "An Attribute value can't be 'opaque' in WBXML version < %s", WBXML_VERSION_TEXT_12));
-         }
-         
--        return parse_opaque(parser, result);
-+        if ((ret = parse_opaque(parser, result)) != WBXML_OK) 
-+            return ret;
-+        
-+        return decode_opaque_attr_value(parser, result);
-     }
-   
-   
-@@ -2209,6 +2217,40 @@
-  * Language Specific Decoding Functions 
-  */
- 
-+/**
-+ * @brief Decode a BASE64 value
-+ * @param data [in/out]The value to decode
-+ * @return WBXML_OK if OK, another error code otherwise
-+ */
-+static WBXMLError decode_base64_value(WBXMLBuffer **data)
-+{
-+    WB_UTINY   *result = NULL;
-+    WBXMLError  ret    = WBXML_OK;
-+    
-+    if ((data == NULL) || (*data == NULL)) {
-+        return WBXML_ERROR_INTERNAL;
-+    }
-+    
-+    if ((result = wbxml_base64_encode((const WB_UTINY *) wbxml_buffer_get_cstr(*data),
-+                                      wbxml_buffer_len(*data))) == NULL)
-+    {
-+        return WBXML_ERROR_B64_ENC;
-+    }
-+    
-+    /* Reset buffer */
-+    wbxml_buffer_delete(*data, 0, wbxml_buffer_len(*data));
-+    
-+    /* Set data */
-+    if (!wbxml_buffer_append_cstr(*data, result)) {
-+        ret = WBXML_ERROR_NOT_ENOUGH_MEMORY;
-+    }
-+    
-+    wbxml_free(result);
-+    
-+    return ret;
-+}
-+
-+
- #if ( defined( WBXML_SUPPORT_SI ) || defined( WBXML_SUPPORT_EMN ) )
- 
- /**************************************
-@@ -2297,8 +2339,6 @@
-  * @param parser The WBXML Parser
-  * @param data The Opaque data buffer
-  * @return WBXML_OK if OK, another error code otherwise
-- * @note Used for:
-- *      - WV 1.1 / 1.2
-  */
- static WBXMLError decode_opaque_content(WBXMLParser  *parser,
-                                         WBXMLBuffer **data)
-@@ -2318,13 +2358,14 @@
- #if defined( WBXML_SUPPORT_DRMREL )
- 
-     case WBXML_LANG_DRMREL10:
-+        /* ds:KeyValue */
-         if ((parser->current_tag->wbxmlCodePage == 0x00) &&
-             (parser->current_tag->wbxmlToken == 0x0C))
-         {
-             WBXMLError ret = WBXML_OK;
-             
--            /* Decode <KeyValue> */
--            if ((ret = decode_drmrel_keyvalue(data)) != WBXML_OK)
-+            /* Decode base64 value */ 
-+            if ((ret = decode_base64_value(data)) != WBXML_OK)
-                 return ret;
- 
-             return WBXML_OK;
-@@ -2332,7 +2373,62 @@
-         break;
- 
- #endif /* WBXML_SUPPORT_DRMREL */    
--    
-+
-+#if defined( WBXML_SUPPORT_SYNCML )
-+
-+    case WBXML_LANG_SYNCML_SYNCML10: 
-+    case WBXML_LANG_SYNCML_SYNCML11: 
-+    case WBXML_LANG_SYNCML_SYNCML12: 
-+        /* NextNonce */
-+        if ((parser->current_tag->wbxmlCodePage == 0x01) &&
-+            (parser->current_tag->wbxmlToken == 0x10)) 
-+        {
-+            WBXMLError ret = WBXML_OK;
-+            
-+            /* Decode base64 value */ 
-+            if ((ret = decode_base64_value(data)) != WBXML_OK)
-+                return ret;
-+                
-+            return WBXML_OK;
-+        }
-+        break;
-+
-+#endif /* WBXML_SUPPORT_SYNCML */    
-+
-+    default:
-+        /* NOP */
-+        break;
-+    } /* switch */
-+  
-+    return WBXML_OK;
-+}
-+
-+
-+/**
-+ * @brief Decode an Opaque Attribute Value buffer
-+ * @param parser The WBXML Parser
-+ * @param data The Opaque data buffer
-+ * @return WBXML_OK if OK, another error code otherwise
-+ */
-+static WBXMLError decode_opaque_attr_value(WBXMLParser *parser, WBXMLBuffer **data)
-+{
-+    switch (parser->langTable->langID) 
-+    {
-+#if defined( WBXML_SUPPORT_OTA_SETTINGS )
-+
-+    case WBXML_LANG_OTA_SETTINGS:
-+    {
-+        WBXMLError ret = WBXML_OK;
-+        
-+        /* Decode base64 value */
-+        if ((ret = decode_base64_value(data)) != WBXML_OK)
-+            return ret; 
-+
-+        return WBXML_OK;
-+    }
-+
-+#endif /* WBXML_SUPPORT_OTA_SETTINGS */ 
-+
-     default:
-         /* NOP */
-         break;
-@@ -2705,49 +2801,3 @@
- }
- 
- #endif /* WBXML_SUPPORT_WV */
--
--
--#if defined( WBXML_SUPPORT_DRMREL )
--
--/**************************************
-- * DRMREL 1.0
-- */
--
--/**
-- * @brief Decode a DRMREL 'KeyValue'
-- * @param data The KeyValue to decode
-- * @return WBXML_OK if OK, another error code otherwise
-- * @note Used for:
-- *      - DRMREL 1.0
-- * @note [OMA-Download-DRMREL-v1_0-20020913-C.PDF] - 7.1:
-- *       "The content of the <KeyValue> element MUST be in binary format using the ‘opaque’ token."
-- */
--static WBXMLError decode_drmrel_keyvalue(WBXMLBuffer **data)
--{
--    WB_UTINY   *result = NULL;
--    WBXMLError  ret    = WBXML_OK;
--  
--    if ((data == NULL) || (*data == NULL)) {
--        return WBXML_ERROR_INTERNAL;
--    }
--  
--    if ((result = wbxml_base64_encode((const WB_UTINY *) wbxml_buffer_get_cstr(*data),
--                                      wbxml_buffer_len(*data))) == NULL)
--    {
--        return WBXML_ERROR_B64_ENC;
--    }
--
--    /* Reset buffer */
--    wbxml_buffer_delete(*data, 0, wbxml_buffer_len(*data));
--
--    /* Set data */
--    if (!wbxml_buffer_append_cstr(*data, result)) {
--        ret = WBXML_ERROR_NOT_ENOUGH_MEMORY;
--    }
--
--    wbxml_free(result);
--  
--    return ret;
--}
--
--#endif /* WBXML_SUPPORT_DRMREL */
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-src_wbxml_tables.h /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_tables.h
--- /usr/ports/textproc/wbxml2/files/patch-src_wbxml_tables.h	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_tables.h	1970-01-01 03:00:00.000000000 +0300
@@ -1,13 +0,0 @@
---- src/wbxml_tables.h.orig	2008-06-15 07:35:57.000000000 +1000
-+++ src/wbxml_tables.h	2008-06-15 07:36:37.000000000 +1000
-@@ -108,8 +108,8 @@
- 
- /* SyncML 1.2 */
- #define WBXML_PUBLIC_ID_SYNCML_SYNCML12 0x1201
--#define WBXML_PUBLIC_ID_SYNCML_DEVINF12 0x1202
--#define WBXML_PUBLIC_ID_SYNCML_METINF12 0x1203
-+#define WBXML_PUBLIC_ID_SYNCML_METINF12 0x1202
-+#define WBXML_PUBLIC_ID_SYNCML_DEVINF12 0x1203
- 
- #define XML_PUBLIC_ID_SYNCML_SYNCML12 "-//SYNCML//DTD SyncML 1.2//EN"
- #define XML_PUBLIC_ID_SYNCML_DEVINF12 "-//SYNCML//DTD DevInf 1.2//EN"
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-src_wbxml_tree.c /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_tree.c
--- /usr/ports/textproc/wbxml2/files/patch-src_wbxml_tree.c	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_tree.c	1970-01-01 03:00:00.000000000 +0300
@@ -1,253 +0,0 @@
---- src/wbxml_tree.c.orig	2006-07-11 21:47:45.000000000 +1000
-+++ src/wbxml_tree.c	2008-06-15 06:59:31.000000000 +1000
-@@ -137,6 +137,7 @@
- 
-         /* Use String Table */
-         wbxml_encoder_set_use_strtbl(wbxml_encoder, TRUE);
-+        wbxml_encoder_set_produce_anonymous(wbxml_encoder, FALSE);
-     }
-     else {
-         /* WBXML Version */
-@@ -153,6 +156,7 @@
- 
-         /* String Table */
-         wbxml_encoder_set_use_strtbl(wbxml_encoder, params->use_strtbl);
-+        wbxml_encoder_set_produce_anonymous(wbxml_encoder, params->produce_anonymous);
- 
-         /** @todo Add parameter to call : wbxml_encoder_set_output_charset() */
-     }
-@@ -256,7 +262,8 @@
- 
- #else /* HAVE_EXPAT */
- 
--#if defined( HAVE_LIBXML )
-+//#if defined( HAVE_LIBXML )
-+#if 0
- 
-     /** @todo Use LibXML2 SAX interface ! */
-     return WBXML_ERROR_NO_XMLPARSER;
-@@ -333,7 +340,8 @@
- }
- 
- 
--#if defined( HAVE_LIBXML )
-+// #if defined( HAVE_LIBXML )
-+#if 0
- 
- WBXML_DECLARE(WBXMLError) wbxml_tree_from_libxml_doc(xmlDocPtr libxml_doc,
-                                                      WBXMLTree **tree)
-@@ -617,6 +625,40 @@
- }
- 
- 
-+WBXML_DECLARE(WBXMLError) wbxml_tree_node_extract(WBXMLTreeNode *node)
-+{
-+    if (node == NULL)
-+        return WBXML_ERROR_BAD_PARAMETER;
-+    
-+    /* Parent link */
-+    if (node->parent != NULL) {
-+        if (node->parent->children == node) {
-+            /* Update parent children */
-+		    node->parent->children = node->next;
-+        }
-+
-+        /* No more parent */
-+        node->parent = NULL;
-+    }
-+
-+    /* Next link */
-+    if (node->next != NULL) {
-+        /* Link next node to previous node */
-+        node->next->prev = node->prev;
-+        node->next = NULL;
-+    }
-+
-+    /* Previous link */
-+    if (node->prev != NULL) {
-+        /* Link previous node to next node */
-+        node->prev->next = node->next;
-+        node->prev = NULL;
-+    }
-+    
-+    return WBXML_OK;
-+}
-+
-+
- WBXML_DECLARE(WBXMLError) wbxml_tree_node_add_attr(WBXMLTreeNode *node,
-                                                    WBXMLAttribute *attr)
- {
-@@ -938,34 +982,17 @@
- }
- 
- 
--/** @todo Rewrite this function (use wbxml_tree_node_* functions) */
- WBXML_DECLARE(WB_BOOL) wbxml_tree_add_node(WBXMLTree *tree, WBXMLTreeNode *parent, WBXMLTreeNode *node)
- {
-     WBXMLTreeNode *tmp = NULL;
- 
-     if ((tree == NULL) || (node == NULL))
-         return FALSE;
--
--    /* Set parent to new node */
--    node->parent = parent;    
--
-+    
-     /* Check if this is the Root Element */
-     if (parent != NULL) {
--        /* This is not the Root Element... search for previous sibbling element */
--        if (parent->children != NULL) {
--            /* Add this Node to end of Sibbling Node list of Parent */
--            tmp = parent->children;
--
--            while (tmp->next != NULL)
--                tmp = tmp->next;
--            
--            node->prev = tmp;
--            tmp->next = node;
--        }
--        else {
--            /* No previous sibbling element */
--            parent->children = node;
--        }
-+        if (!wbxml_tree_node_add_child(parent, node))
-+            return FALSE;
-     }
-     else {
-         /* We do NOT allow replacement of an existing Tree Node */
-@@ -974,53 +1001,28 @@
- 
-         /* This is the Root Element */
-         tree->root = node;
-+        node->parent = NULL;
-     }
- 
-     return TRUE;
- }
- 
- 
--/** @todo Rewrite this function (use wbxml_tree_node_* functions) */
- WBXML_DECLARE(WBXMLError) wbxml_tree_extract_node(WBXMLTree *tree,
-                                                   WBXMLTreeNode *node)
- {
-     if ((tree == NULL) || (node == NULL))
-         return WBXML_ERROR_BAD_PARAMETER;
--
--    /* Parent link */
--    if (node->parent != NULL) {
--        if (node->parent->children == node) {
--            /* Update parent children */
--		    node->parent->children = node->next;
--        }
--
--        /* No more parent */
--        node->parent = NULL;
--    }
--    else {
-+    
-+    if (node == tree->root) {
-         /* Root removed ! */
-         tree->root = node->next;
-     }
- 
--    /* Next link */
--    if (node->next != NULL) {
--        /* Link next node to previous node */
--        node->next->prev = node->prev;
--        node->next = NULL;
--    }
--
--    /* Previous link */
--    if (node->prev != NULL) {
--        /* Link previous node to next node */
--        node->prev->next = node->next;
--        node->prev = NULL;
--    }
--
--    return WBXML_OK;
-+    return wbxml_tree_node_extract(node);
- }
- 
- 
--/** @todo Rewrite this function (use wbxml_tree_node_* functions) */
- WBXML_DECLARE(WBXMLTreeNode *) wbxml_tree_add_elt(WBXMLTree *tree,
-                                                   WBXMLTreeNode *parent,
-                                                   WBXMLTag *tag)
-@@ -1048,7 +1050,6 @@
- }
- 
- 
--/** @todo Rewrite this function (use wbxml_tree_node_* functions) */
- WBXML_DECLARE(WBXMLTreeNode *) wbxml_tree_add_elt_with_attrs(WBXMLTree *tree,
-                                                              WBXMLTreeNode *parent,
-                                                              WBXMLTag *tag,
-@@ -1075,36 +1076,15 @@
- }
- 
- 
--/** @todo Rewrite this function (use wbxml_tree_node_* functions) */
- WBXML_DECLARE(WBXMLTreeNode *) wbxml_tree_add_xml_elt(WBXMLTree *tree,
-                                                       WBXMLTreeNode *parent,
-                                                       WB_UTINY *name)
- {
--    const WBXMLTagEntry *tag_entry = NULL;
-     WBXMLTreeNode *node = NULL;
--    WBXMLTag *tag = NULL;
-     
--    /* Search for XML Tag Name in Table */
--    if ((tag_entry = wbxml_tables_get_tag_from_xml(tree->lang, (const WB_UTINY *) name)) != NULL) {
--        /* Found : token tag */
--        tag = wbxml_tag_create_token(tag_entry);
--    }
--    else {
--        /* Not found : literal tag */
--        tag = wbxml_tag_create_literal(name);
--    }
--
--    if (tag == NULL)
--        return NULL;
--
--    /* Create a new Node */
--    if ((node = wbxml_tree_node_create(WBXML_TREE_ELEMENT_NODE)) == NULL) {
--        wbxml_tag_destroy(tag);
-+    /* Create element node */
-+    if ((node = wbxml_tree_node_create_xml_elt(tree->lang, (const WB_UTINY *) name)) == NULL)
-         return NULL;
--    }
--    
--    /* Set Node Tag */
--    node->name = tag;
- 
-     /* Add this Node to Tree  */
-     if (!wbxml_tree_add_node(tree, parent, node)) {
-@@ -1116,7 +1096,6 @@
- }
- 
- 
--/** @todo Rewrite this function (use wbxml_tree_node_* functions) */
- WBXML_DECLARE(WBXMLTreeNode *) wbxml_tree_add_xml_elt_with_attrs(WBXMLTree *tree,
-                                                                  WBXMLTreeNode *parent,
-                                                                  WB_UTINY *name,
-@@ -1143,7 +1122,6 @@
- }
- 
- 
--/** @todo Rewrite this function (use wbxml_tree_node_* functions) */
- WBXML_DECLARE(WBXMLTreeNode *) wbxml_tree_add_text(WBXMLTree *tree,
-                                                    WBXMLTreeNode *parent,
-                                                    const WB_UTINY *text,
-@@ -1152,13 +1130,7 @@
-     WBXMLTreeNode *node = NULL;
- 
-     /* Create a new Node */
--    if ((node = wbxml_tree_node_create(WBXML_TREE_TEXT_NODE)) == NULL) {
--        return NULL;
--    }
--
--    /* Set Content */
--    if ((node->content = wbxml_buffer_create(text, len, len)) == NULL) {
--        wbxml_tree_node_destroy(node);
-+    if ((node = wbxml_tree_node_create_text(text, len)) == NULL) {
-         return NULL;
-     }
- 
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-src_wbxml_tree.h /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_tree.h
--- /usr/ports/textproc/wbxml2/files/patch-src_wbxml_tree.h	2008-07-05 03:31:20.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-src_wbxml_tree.h	1970-01-01 03:00:00.000000000 +0300
@@ -1,10 +0,0 @@
---- src/wbxml_tree.h.orig	2008-06-15 08:10:30.000000000 +1000
-+++ src/wbxml_tree.h	2008-06-15 08:11:09.000000000 +1000
-@@ -308,6 +308,7 @@
- WBXML_DECLARE(WB_BOOL) wbxml_tree_node_add_child(WBXMLTreeNode *parent,
-                                                  WBXMLTreeNode *node);
- 
-+WBXML_DECLARE(WBXMLError) wbxml_tree_node_extract(WBXMLTreeNode *node);
- /**
-  * @brief Add a WBXML Attribute to a Tree Node structure
-  * @param node The Tree Node to modify
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/files/patch-tools_Makefile.am /usr/home/samm/tmp/wbxml2/files/patch-tools_Makefile.am
--- /usr/ports/textproc/wbxml2/files/patch-tools_Makefile.am	2007-04-23 01:49:42.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/files/patch-tools_Makefile.am	1970-01-01 03:00:00.000000000 +0300
@@ -1,16 +0,0 @@
-
-$FreeBSD: ports/textproc/wbxml2/files/patch-tools_Makefile.am,v 1.1 2007/04/22 22:49:42 sobomax Exp $
-
---- tools/Makefile.am
-+++ tools/Makefile.am
-@@ -20,9 +20,7 @@
- 	 -DWBXML_SUPPORT_SYNCML\
- 	 -DWBXML_SUPPORT_WV\
- 	 -DWBXML_SUPPORT_AIRSYNC\
--	 -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes\
--	 -O3\
--	 -g
-+	 -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes
- 
- bin_PROGRAMS = wbxml2xml xml2wbxml
- 
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/pkg-descr /usr/home/samm/tmp/wbxml2/pkg-descr
--- /usr/ports/textproc/wbxml2/pkg-descr	2007-04-23 01:49:41.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/pkg-descr	2008-12-06 15:24:13.000000000 +0200
@@ -5,4 +5,4 @@
 and used to reduce bandwidth in mobile communications.
 
 Author: Aymerick Jehanne <aymerick at jehanne.org>
-WWW: 	http://libwbxml.aymerick.com/
+WWW: 	http://libwbxml.opensync.org/
diff -ruN --exclude=CVS /usr/ports/textproc/wbxml2/pkg-plist /usr/home/samm/tmp/wbxml2/pkg-plist
--- /usr/ports/textproc/wbxml2/pkg-plist	2007-04-23 01:49:41.000000000 +0300
+++ /usr/home/samm/tmp/wbxml2/pkg-plist	2008-12-06 15:21:49.000000000 +0200
@@ -17,21 +17,20 @@
 include/wbxml_tree.h
 include/wbxml_tree_clb_wbxml.h
 include/wbxml_tree_clb_xml.h
-lib/libwbxml2.a
+include/wbxml_config.h
 lib/libwbxml2.so
 lib/libwbxml2.so.0
+lib/libwbxml2.so.0.0.10
 libdata/pkgconfig/libwbxml2.pc
-share/doc/wbxml2/AUTHORS
-share/doc/wbxml2/BUGS
-share/doc/wbxml2/COPYING
-share/doc/wbxml2/ChangeLog
-share/doc/wbxml2/GNU-LGPL
-share/doc/wbxml2/INSTALL
-share/doc/wbxml2/NEWS
-share/doc/wbxml2/README
-share/doc/wbxml2/References
-share/doc/wbxml2/THANKS
-share/doc/wbxml2/TODO
-share/doc/wbxml2/bootstrap
-share/doc/wbxml2/doxygen.h
- at dirrm share/doc/wbxml2
+share/doc/libwbxml/AUTHORS
+share/doc/libwbxml/BUGS
+share/doc/libwbxml/COPYING
+share/doc/libwbxml/ChangeLog
+share/doc/libwbxml/GNU-LGPL
+share/doc/libwbxml/INSTALL
+share/doc/libwbxml/NEWS
+share/doc/libwbxml/README
+share/doc/libwbxml/References
+share/doc/libwbxml/THANKS
+share/doc/libwbxml/TODO
+ at dirrm share/doc/libwbxml
--- wbxml2-0.10.0.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list