From 0ed8473a414dc4346dcd8dedfe507b88ccace1ae Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sat, 30 Nov 2019 14:15:30 +0100 Subject: [PATCH] mxml, bump version, rename to mxml (#4410) --- dev-libs/mini-xml/mini_xml-2.6.recipe | 69 - .../mini-xml/patches/mini_xml-2.11.patchset | 98 -- dev-libs/mini-xml/patches/mini_xml-2.6.patch | 1542 ----------------- dev-libs/mxml/licenses/Mini-XML | 16 + .../mxml-3.1.recipe} | 35 +- dev-libs/mxml/patches/mxml-3.1.patchset | 28 + 6 files changed, 62 insertions(+), 1726 deletions(-) delete mode 100644 dev-libs/mini-xml/mini_xml-2.6.recipe delete mode 100644 dev-libs/mini-xml/patches/mini_xml-2.11.patchset delete mode 100644 dev-libs/mini-xml/patches/mini_xml-2.6.patch create mode 100644 dev-libs/mxml/licenses/Mini-XML rename dev-libs/{mini-xml/mini_xml-2.11.recipe => mxml/mxml-3.1.recipe} (67%) create mode 100644 dev-libs/mxml/patches/mxml-3.1.patchset diff --git a/dev-libs/mini-xml/mini_xml-2.6.recipe b/dev-libs/mini-xml/mini_xml-2.6.recipe deleted file mode 100644 index c8e5a9624..000000000 --- a/dev-libs/mini-xml/mini_xml-2.6.recipe +++ /dev/null @@ -1,69 +0,0 @@ -SUMMARY="Minimum XML Library" -DESCRIPTION="Mini-XML is a small XML parsing library that you can \ -use to read XML and XML-like data files in your application without \ -requiring large non-standard libraries." -HOMEPAGE="http://www.minixml.org/index.php" -COPYRIGHT="2003-2009 Michael R Sweet" -LICENSE="GNU LGPL v2" -REVISION="2" -SOURCE_URI="https://github.com/michaelrsweet/mxml/archive/release-$portVersion.tar.gz" -CHECKSUM_SHA256="91d13f51d33dbd17360cc51ce69cf046a7ff7ff256195064c092dc4dbd95810a" -SOURCE_FILENAME="mxml-$portVersion.tar.gz" -SOURCE_DIR="mxml-release-$portVersion" -PATCHES="mini_xml-$portVersion.patch" - -ARCHITECTURES="x86_gcc2 x86 x86_64" -SECONDARY_ARCHITECTURES="x86" - -libVersion="1.4" -libVersionCompat="$libVersion compat >= ${libVersion%.*}" - -PROVIDES=" - mini_xml$secondaryArchSuffix = $portVersion - cmd:mxmldoc$secondaryArchSuffix - lib:libmxml$secondaryArchSuffix = $libVersionCompat - lib:mxml$secondaryArchSuffix = $libVersionCompat - " -REQUIRES=" - haiku$secondaryArchSuffix - " - -PROVIDES_devel=" - mini_xml${secondaryArchSuffix}_devel = $portVersion - devel:libmxml$secondaryArchSuffix = $libVersionCompat - devel:mxml$secondaryArchSuffix = $libVersionCompat - " -REQUIRES_devel=" - mini_xml$secondaryArchSuffix == $portVersion base - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - " -BUILD_PREREQUIRES=" - cmd:gcc$secondaryArchSuffix - cmd:libtoolize$secondaryArchSuffix - cmd:make - " - -defineDebugInfoPackage mini_xml$secondaryArchSuffix \ - "$libDir"/libmxml.so.$libVersion - -BUILD() -{ - runConfigure ./configure --enable-shared - make $jobArgs -} - -INSTALL() -{ - make install - - prepareInstalledDevelLib libmxml - fixPkgconfig - - packageEntries devel \ - $developDir \ - $dataDir \ - $manDir/man3 -} diff --git a/dev-libs/mini-xml/patches/mini_xml-2.11.patchset b/dev-libs/mini-xml/patches/mini_xml-2.11.patchset deleted file mode 100644 index c420096ce..000000000 --- a/dev-libs/mini-xml/patches/mini_xml-2.11.patchset +++ /dev/null @@ -1,98 +0,0 @@ -From e2a3c296c54c0bb22d2b60a87ed4e8f076a4a550 Mon Sep 17 00:00:00 2001 -From: begasus -Date: Mon, 24 Sep 2018 08:31:32 +0200 -Subject: enable shared library - - -diff --git a/configure.ac b/configure.ac -index 47a0d41..c852d90 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -219,6 +219,14 @@ if test x$enable_shared != xno; then - LDFLAGS="$LDFLAGS -Wl,-R\$(libdir)" - ;; - -+ haiku*) -+ AC_MSG_RESULT(yes) -+ LIBMXML="libmxml.so.1.6" -+ DSO="\$(CC)" -+ DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-R\$(libdir) -shared \$(OPTIM)" -+ LDFLAGS="$LDFLAGS -Wl,-R\$(libdir)" -+ ;; -+ - darwin) - AC_MSG_RESULT(yes) - LIBMXML="libmxml.1.dylib" --- -2.19.0 - - -From 4b0ecbc14207e24623889a371b5404654f02cc27 Mon Sep 17 00:00:00 2001 -From: begasus -Date: Mon, 24 Sep 2018 08:27:13 +0200 -Subject: testmxml mxml.xml @MXML_EPUB@ break the build - - -diff --git a/Makefile.in b/Makefile.in -index eef14fe..03a203d 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -83,7 +83,7 @@ PUBLIBOBJS = mxml-attr.o mxml-entity.o mxml-file.o mxml-get.o \ - mxml-index.o mxml-node.o mxml-search.o mxml-set.o - LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o - OBJS = mmd.o mxmldoc.o testmxml.o zipc.o $(LIBOBJS) --ALLTARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml @MXML_EPUB@ -+ALLTARGETS = $(LIBMXML) mxmldoc - CROSSTARGETS = $(LIBMXML) mxmldoc - TARGETS = $(@TARGETS@) - --- -2.19.0 - - -From f3651900fc703003e95d6dbb9d599bf13e3faaa1 Mon Sep 17 00:00:00 2001 -From: begasus -Date: Mon, 24 Sep 2018 09:14:23 +0200 -Subject: import upstream patch - - -diff --git a/Makefile.in b/Makefile.in -index 03a203d..e720727 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -162,13 +162,13 @@ install: $(TARGETS) install-$(LIBMXML) install-libmxml.a - $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man3 - $(INSTALL_MAN) doc/mxml.man $(BUILDROOT)$(mandir)/man3/mxml.3 - --install-libmxml.a: -+install-libmxml.a: libmxml.a - echo Installing libmxml.a to $(BUILDROOT)$(libdir)... - $(INSTALL_DIR) $(BUILDROOT)$(libdir) - $(INSTALL_LIB) libmxml.a $(BUILDROOT)$(libdir) - $(RANLIB) $(BUILDROOT)$(libdir)/libmxml.a - --install-libmxml.so.1.6: -+install-libmxml.so.1.6: libmxml.so.1.6 - echo Installing libmxml.so to $(BUILDROOT)$(libdir)... - $(INSTALL_DIR) $(BUILDROOT)$(libdir) - $(INSTALL_LIB) libmxml.so.1.6 $(BUILDROOT)$(libdir) -@@ -177,14 +177,14 @@ install-libmxml.so.1.6: - $(RM) $(BUILDROOT)$(libdir)/libmxml.so.1 - $(LN) libmxml.so.1.6 $(BUILDROOT)$(libdir)/libmxml.so.1 - --install-libmxml.sl.1: -+install-libmxml.sl.1: libmxml.sl.1 - echo Installing libmxml.sl to $(BUILDROOT)$(libdir)... - $(INSTALL_DIR) $(BUILDROOT)$(libdir) - $(INSTALL_LIB) libmxml.sl.1 $(BUILDROOT)$(libdir) - $(RM) $(BUILDROOT)$(libdir)/libmxml.so - $(LN) libmxml.sl.1 $(BUILDROOT)$(libdir)/libmxml.sl - --install-libmxml.1.dylib: -+install-libmxml.1.dylib: libmxml.1.dylib - echo Installing libmxml.dylib to $(BUILDROOT)$(libdir)... - $(INSTALL_DIR) $(BUILDROOT)$(libdir) - $(INSTALL_LIB) libmxml.1.dylib $(BUILDROOT)$(libdir) --- -2.19.0 - diff --git a/dev-libs/mini-xml/patches/mini_xml-2.6.patch b/dev-libs/mini-xml/patches/mini_xml-2.6.patch deleted file mode 100644 index e52156c2d..000000000 --- a/dev-libs/mini-xml/patches/mini_xml-2.6.patch +++ /dev/null @@ -1,1542 +0,0 @@ -diff -urN mxml-2.6-orig/configure mxml-2.6/configure ---- mxml-2.6-orig/configure 2009-04-18 10:05:52.000000000 -0700 -+++ mxml-2.6/configure 2009-11-18 18:25:08.000000000 -0800 -@@ -4715,6 +4715,14 @@ - echo "${ECHO_T}yes" >&6; } - LIBMXML="libmxml.so.1.4" - DSO="\$(CC)" -+ DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi1.0,-soname,libmxml.so.1 -shared \$(OPTIM)" -+ ;; -+ -+ BeOS | Haiku) -+ { echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6; } -+ LIBMXML="libmxml.so.1.4" -+ DSO="\$(CC)" - DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-rpath,\$(libdir) -shared \$(OPTIM)" - LDFLAGS="$LDFLAGS -Wl,-rpath,\$(libdir)" - ;; -@@ -4821,6 +4829,10 @@ - # BSD, Darwin (MacOS X), and Linux - mandir="/usr/share/man" - ;; -+ BeOS* | Haiku*) -+ # BeOS, Haiku -+ mandir="/boot/common/share/man" -+ ;; - IRIX*) - # SGI IRIX - mandir="/usr/share/catman/u_man" -diff -urN mxml-2.6-orig/mxml.list mxml-2.6/mxml.list ---- mxml-2.6-orig/mxml.list 1969-12-31 16:00:00.000000000 -0800 -+++ mxml-2.6/mxml.list 2009-11-18 18:25:08.000000000 -0800 -@@ -0,0 +1,107 @@ -+# -+# "$Id: mxml.list.in 399 2009-05-17 17:20:51Z mike $" -+# -+# EPM software list file for Mini-XML, a small XML library. -+# -+# Copyright 2003-2009 by Michael Sweet. -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU Library General Public -+# License as published by the Free Software Foundation; either -+# version 2, or (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+ -+# Directories... -+$prefix=/boot/common -+$exec_prefix=/boot/common -+$bindir=${exec_prefix}/bin -+$datarootdir=${prefix}/share -+$docdir=${datarootdir}/doc/mxml -+$includedir=${prefix}/include -+$libdir=${exec_prefix}/lib -+$mandir=${datarootdir}/man -+$srcdir=. -+ -+$PICFLAG=1 -+ -+# Product information -+%product mxml -+%copyright 2003-2009 by Michael Sweet -+%vendor Michael Sweet -+%license ${srcdir}/COPYING -+%readme ${srcdir}/README -+%version 2.6 -+ -+%description < -- -- -- Add a node to a tree. -- --Adds the specified node to the parent. If the child argument is not --NULL, puts the new node before or after the specified child depending --on the value of the where argument. If the child argument is NULL, --puts the new node at the beginning of the child list (MXML_ADD_BEFORE) --or at the end of the child list (MXML_ADD_AFTER). The constant --MXML_ADD_TO_PARENT can be used to specify a NULL child pointer. -- -- mxml_node_t * -- Parent node -- -- -- int -- Where to add, MXML_ADD_BEFORE or MXML_ADD_AFTER -- -- -- mxml_node_t * -- Child node for where or MXML_ADD_TO_PARENT -- -- -- mxml_node_t * -- Node to add -- -- -- -- Delete a node and all of its children. -- --If the specified node has a parent, this function first removes the --node from its parent using the mxmlRemove() function. -- -- mxml_node_t * -- Node to delete -- -- -- -- Delete an attribute. -- --@since Mini-XML 2.4@ -- -- mxml_node_t * -- Element -- -- -- const char * -- Attribute name -- -- -- -- -- const char * -- Attribute value or NULL -- -- Get an attribute. -- --This function returns NULL if the node is not an element or the --named attribute does not exist. -- -- mxml_node_t * -- Element node -- -- -- const char * -- Name of attribute -- -- -- -- Set an attribute. -- --If the named attribute already exists, the value of the attribute --is replaced by the new string value. The string value is copied --into the element node. This function does nothing if the node is --not an element. -- -- mxml_node_t * -- Element node -- -- -- const char * -- Name of attribute -- -- -- const char * -- Attribute value -- -- -- -- Set an attribute with a formatted value. -- --If the named attribute already exists, the value of the attribute --is replaced by the new formatted string. The formatted string value is --copied into the element node. This function does nothing if the node --is not an element. -- --@since Mini-XML 2.3@ -- -- mxml_node_t * -- Element node -- -- -- const char * -- Name of attribute -- -- -- const char * -- Printf-style attribute value -- -- -- Additional arguments as needed -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Add a callback to convert entities to Unicode. -- -- mxml_entity_cb_t -- Callback function to add -- -- -- -- -- const char * -- Entity name or NULL -- -- Get the name that corresponds to the character value. -- --If val does not need to be represented by a named entity, NULL is returned. -- -- int -- Character value -- -- -- -- -- int -- Character value or -1 on error -- -- Get the character corresponding to a named entity. -- --The entity name can also be a numeric constant. -1 is returned if the --name is not known. -- -- const char * -- Entity name -- -- -- -- Remove a callback. -- -- mxml_entity_cb_t -- Callback function to remove -- -- -- -- -- mxml_node_t * -- Element node or NULL -- -- Find the named element. -- --The search is constrained by the name, attribute name, and value; any --NULL names or values are treated as wildcards, so different kinds of --searches can be implemented by looking for all elements of a given name --or all elements with a specific attribute. The descend argument determines --whether the search descends into child nodes; normally you will use --MXML_DESCEND_FIRST for the initial search and MXML_NO_DESCEND to find --additional direct descendents of the node. The top node argument --constrains the search to a particular node's children. -- -- mxml_node_t * -- Current node -- -- -- mxml_node_t * -- Top node -- -- -- const char * -- Element name or NULL for any -- -- -- const char * -- Attribute name, or NULL for none -- -- -- const char * -- Attribute value, or NULL for any -- -- -- int -- Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST -- -- -- -- Delete an index. -- -- mxml_index_t * -- Index to delete -- -- -- -- -- mxml_node_t * -- Next node or NULL if there is none -- -- Return the next node in the index. -- --Nodes are returned in the sorted order of the index. -- -- mxml_index_t * -- Index to enumerate -- -- -- -- -- mxml_node_t * -- Node or NULL if none found -- -- Find the next matching node. -- --You should call mxmlIndexReset() prior to using this function for --the first time with a particular set of "element" and "value" --strings. Passing NULL for both "element" and "value" is equivalent --to calling mxmlIndexEnum(). -- -- mxml_index_t * -- Index to search -- -- -- const char * -- Element name to find, if any -- -- -- const char * -- Attribute value, if any -- -- -- -- -- mxml_index_t * -- New index -- -- Create a new index. -- --The index will contain all nodes that contain the named element and/or --attribute. If both "element" and "attr" are NULL, then the index will --contain a sorted list of the elements in the node tree. Nodes are --sorted by element name and optionally by attribute value if the "attr" --argument is not NULL. -- -- mxml_node_t * -- XML node tree -- -- -- const char * -- Element to index or NULL for all -- -- -- const char * -- Attribute to index or NULL for none -- -- -- -- -- mxml_node_t * -- First node or NULL if there is none -- -- Reset the enumeration/find pointer in the index and --return the first node in the index. -- --This function should be called prior to using mxmlIndexEnum() or --mxmlIndexFind() for the first time. -- -- mxml_index_t * -- Index to reset -- -- -- -- -- mxml_node_t * -- First node or NULL if the file could not be read. -- -- Load a file descriptor into an XML node tree. -- --The nodes in the specified file are added to the specified top node. --If no top node is provided, the XML file MUST be well-formed with a --single parent node like <?xml> for the entire file. The callback --function returns the value type that should be used for child nodes. --If MXML_NO_CALLBACK is specified then all child nodes will be either --MXML_ELEMENT or MXML_TEXT nodes. -- --The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, --MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading --child nodes of the specified type. -- -- mxml_node_t * -- Top node -- -- -- int -- File descriptor to read from -- -- -- mxml_load_cb_t -- Callback function or MXML_NO_CALLBACK -- -- -- -- -- mxml_node_t * -- First node or NULL if the file could not be read. -- -- Load a file into an XML node tree. -- --The nodes in the specified file are added to the specified top node. --If no top node is provided, the XML file MUST be well-formed with a --single parent node like <?xml> for the entire file. The callback --function returns the value type that should be used for child nodes. --If MXML_NO_CALLBACK is specified then all child nodes will be either --MXML_ELEMENT or MXML_TEXT nodes. -- --The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, --MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading --child nodes of the specified type. -- -- mxml_node_t * -- Top node -- -- -- FILE * -- File to read from -- -- -- mxml_load_cb_t -- Callback function or MXML_NO_CALLBACK -- -- -- -- -- mxml_node_t * -- First node or NULL if the string has errors. -- -- Load a string into an XML node tree. -- --The nodes in the specified string are added to the specified top node. --If no top node is provided, the XML string MUST be well-formed with a --single parent node like <?xml> for the entire string. The callback --function returns the value type that should be used for child nodes. --If MXML_NO_CALLBACK is specified then all child nodes will be either --MXML_ELEMENT or MXML_TEXT nodes. -- --The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, --MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading --child nodes of the specified type. -- -- mxml_node_t * -- Top node -- -- -- const char * -- String to load -- -- -- mxml_load_cb_t -- Callback function or MXML_NO_CALLBACK -- -- -- -- -- mxml_node_t * -- New node -- -- Create a new CDATA node. -- --The new CDATA node is added to the end of the specified parent's child --list. The constant MXML_NO_PARENT can be used to specify that the new --CDATA node has no parent. The data string must be nul-terminated and --is copied into the new node. CDATA nodes use the MXML_ELEMENT type. -- --@since Mini-XML 2.3@ -- -- mxml_node_t * -- Parent node or MXML_NO_PARENT -- -- -- const char * -- Data string -- -- -- -- -- mxml_node_t * -- New node -- -- Create a new custom data node. -- --The new custom node is added to the end of the specified parent's child --list. The constant MXML_NO_PARENT can be used to specify that the new --element node has no parent. NULL can be passed when the data in the --node is not dynamically allocated or is separately managed. -- --@since Mini-XML 2.1@ -- -- mxml_node_t * -- Parent node or MXML_NO_PARENT -- -- -- void * -- Pointer to data -- -- -- mxml_custom_destroy_cb_t -- Function to destroy data -- -- -- -- -- mxml_node_t * -- New node -- -- Create a new element node. -- --The new element node is added to the end of the specified parent's child --list. The constant MXML_NO_PARENT can be used to specify that the new --element node has no parent. -- -- mxml_node_t * -- Parent node or MXML_NO_PARENT -- -- -- const char * -- Name of element -- -- -- -- -- mxml_node_t * -- New node -- -- Create a new integer node. -- --The new integer node is added to the end of the specified parent's child --list. The constant MXML_NO_PARENT can be used to specify that the new --integer node has no parent. -- -- mxml_node_t * -- Parent node or MXML_NO_PARENT -- -- -- int -- Integer value -- -- -- -- -- mxml_node_t * -- New node -- -- Create a new opaque string. -- --The new opaque node is added to the end of the specified parent's child --list. The constant MXML_NO_PARENT can be used to specify that the new --opaque node has no parent. The opaque string must be nul-terminated and --is copied into the new node. -- -- mxml_node_t * -- Parent node or MXML_NO_PARENT -- -- -- const char * -- Opaque string -- -- -- -- -- mxml_node_t * -- New node -- -- Create a new real number node. -- --The new real number node is added to the end of the specified parent's --child list. The constant MXML_NO_PARENT can be used to specify that --the new real number node has no parent. -- -- mxml_node_t * -- Parent node or MXML_NO_PARENT -- -- -- double -- Real number value -- -- -- -- -- mxml_node_t * -- New node -- -- Create a new text fragment node. -- --The new text node is added to the end of the specified parent's child --list. The constant MXML_NO_PARENT can be used to specify that the new --text node has no parent. The whitespace parameter is used to specify --whether leading whitespace is present before the node. The text --string must be nul-terminated and is copied into the new node. -- -- mxml_node_t * -- Parent node or MXML_NO_PARENT -- -- -- int -- 1 = leading whitespace, 0 = no whitespace -- -- -- const char * -- String -- -- -- -- -- mxml_node_t * -- New node -- -- Create a new formatted text fragment node. -- --The new text node is added to the end of the specified parent's child --list. The constant MXML_NO_PARENT can be used to specify that the new --text node has no parent. The whitespace parameter is used to specify --whether leading whitespace is present before the node. The format --string must be nul-terminated and is formatted into the new node. -- -- mxml_node_t * -- Parent node or MXML_NO_PARENT -- -- -- int -- 1 = leading whitespace, 0 = no whitespace -- -- -- const char * -- Printf-style frmat string -- -- -- Additional args as needed -- -- -- -- -- mxml_node_t * -- New ?xml node -- -- Create a new XML document tree. -- --The "version" argument specifies the version number to put in the --?xml element node. If NULL, version 1.0 is assumed. -- --@since Mini-XML 2.3@ -- -- const char * -- Version number to use -- -- -- -- -- int -- New reference count -- -- Release a node. -- --When the reference count reaches zero, the node (and any children) --is deleted via mxmlDelete(). -- --@since Mini-XML 2.3@ -- -- mxml_node_t * -- Node -- -- -- -- Remove a node from its parent. -- --Does not free memory used by the node - use mxmlDelete() for that. --This function does nothing if the node has no parent. -- -- mxml_node_t * -- Node to remove -- -- -- -- -- int -- New reference count -- -- Retain a node. -- --@since Mini-XML 2.3@ -- -- mxml_node_t * -- Node -- -- -- -- -- mxml_node_t * -- First node or NULL if the file could not be read. -- -- Load a file descriptor into an XML node tree --using a SAX callback. -- --The nodes in the specified file are added to the specified top node. --If no top node is provided, the XML file MUST be well-formed with a --single parent node like <?xml> for the entire file. The callback --function returns the value type that should be used for child nodes. --If MXML_NO_CALLBACK is specified then all child nodes will be either --MXML_ELEMENT or MXML_TEXT nodes. -- --The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, --MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading --child nodes of the specified type. -- --The SAX callback must call mxmlRetain() for any nodes that need to --be kept for later use. Otherwise, nodes are deleted when the parent --node is closed or after each data, comment, CDATA, or directive node. -- --@since Mini-XML 2.3@ -- -- mxml_node_t * -- Top node -- -- -- int -- File descriptor to read from -- -- -- mxml_load_cb_t -- Callback function or MXML_NO_CALLBACK -- -- -- mxml_sax_cb_t -- SAX callback or MXML_NO_CALLBACK -- -- -- void * -- SAX user data -- -- -- -- -- mxml_node_t * -- First node or NULL if the file could not be read. -- -- Load a file into an XML node tree --using a SAX callback. -- --The nodes in the specified file are added to the specified top node. --If no top node is provided, the XML file MUST be well-formed with a --single parent node like <?xml> for the entire file. The callback --function returns the value type that should be used for child nodes. --If MXML_NO_CALLBACK is specified then all child nodes will be either --MXML_ELEMENT or MXML_TEXT nodes. -- --The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, --MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading --child nodes of the specified type. -- --The SAX callback must call mxmlRetain() for any nodes that need to --be kept for later use. Otherwise, nodes are deleted when the parent --node is closed or after each data, comment, CDATA, or directive node. -- --@since Mini-XML 2.3@ -- -- mxml_node_t * -- Top node -- -- -- FILE * -- File to read from -- -- -- mxml_load_cb_t -- Callback function or MXML_NO_CALLBACK -- -- -- mxml_sax_cb_t -- SAX callback or MXML_NO_CALLBACK -- -- -- void * -- SAX user data -- -- -- -- -- mxml_node_t * -- First node or NULL if the string has errors. -- -- Load a string into an XML node tree --using a SAX callback. -- --The nodes in the specified string are added to the specified top node. --If no top node is provided, the XML string MUST be well-formed with a --single parent node like <?xml> for the entire string. The callback --function returns the value type that should be used for child nodes. --If MXML_NO_CALLBACK is specified then all child nodes will be either --MXML_ELEMENT or MXML_TEXT nodes. -- --The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK, --MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading --child nodes of the specified type. -- --The SAX callback must call mxmlRetain() for any nodes that need to --be kept for later use. Otherwise, nodes are deleted when the parent --node is closed or after each data, comment, CDATA, or directive node. -- --@since Mini-XML 2.3@ -- -- mxml_node_t * -- Top node -- -- -- const char * -- String to load -- -- -- mxml_load_cb_t -- Callback function or MXML_NO_CALLBACK -- -- -- mxml_sax_cb_t -- SAX callback or MXML_NO_CALLBACK -- -- -- void * -- SAX user data -- -- -- -- -- char * -- Allocated string or NULL -- -- Save an XML node tree to an allocated string. -- --This function returns a pointer to a string containing the textual --representation of the XML node tree. The string should be freed --using the free() function when you are done with it. NULL is returned --if the node would produce an empty string or if the string cannot be --allocated. -- --The callback argument specifies a function that returns a whitespace --string or NULL before and after each element. If MXML_NO_CALLBACK --is specified, whitespace will only be added before MXML_TEXT nodes --with leading whitespace and before attribute names inside opening --element tags. -- -- mxml_node_t * -- Node to write -- -- -- mxml_save_cb_t -- Whitespace callback or MXML_NO_CALLBACK -- -- -- -- -- int -- 0 on success, -1 on error. -- -- Save an XML tree to a file descriptor. -- --The callback argument specifies a function that returns a whitespace --string or NULL before and after each element. If MXML_NO_CALLBACK --is specified, whitespace will only be added before MXML_TEXT nodes --with leading whitespace and before attribute names inside opening --element tags. -- -- mxml_node_t * -- Node to write -- -- -- int -- File descriptor to write to -- -- -- mxml_save_cb_t -- Whitespace callback or MXML_NO_CALLBACK -- -- -- -- -- int -- 0 on success, -1 on error. -- -- Save an XML tree to a file. -- --The callback argument specifies a function that returns a whitespace --string or NULL before and after each element. If MXML_NO_CALLBACK --is specified, whitespace will only be added before MXML_TEXT nodes --with leading whitespace and before attribute names inside opening --element tags. -- -- mxml_node_t * -- Node to write -- -- -- FILE * -- File to write to -- -- -- mxml_save_cb_t -- Whitespace callback or MXML_NO_CALLBACK -- -- -- -- -- int -- Size of string -- -- Save an XML node tree to a string. -- --This function returns the total number of bytes that would be --required for the string but only copies (bufsize - 1) characters --into the specified buffer. -- --The callback argument specifies a function that returns a whitespace --string or NULL before and after each element. If MXML_NO_CALLBACK --is specified, whitespace will only be added before MXML_TEXT nodes --with leading whitespace and before attribute names inside opening --element tags. -- -- mxml_node_t * -- Node to write -- -- -- char * -- String buffer -- -- -- int -- Size of string buffer -- -- -- mxml_save_cb_t -- Whitespace callback or MXML_NO_CALLBACK -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Set the element name of a CDATA node. -- --The node is not changed if it is not a CDATA element node. -- --@since Mini-XML 2.3@ -- -- mxml_node_t * -- Node to set -- -- -- const char * -- New data string -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Set the data and destructor of a custom data node. -- --The node is not changed if it is not a custom node. -- --@since Mini-XML 2.1@ -- -- mxml_node_t * -- Node to set -- -- -- void * -- New data pointer -- -- -- mxml_custom_destroy_cb_t -- New destructor function -- -- -- -- Set the handling functions for custom data. -- --The load function accepts a node pointer and a data string and must --return 0 on success and non-zero on error. -- --The save function accepts a node pointer and must return a malloc'd --string on success and NULL on error. -- -- mxml_custom_load_cb_t -- Load function -- -- -- mxml_custom_save_cb_t -- Save function -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Set the name of an element node. -- --The node is not changed if it is not an element node. -- -- mxml_node_t * -- Node to set -- -- -- const char * -- New name string -- -- -- -- Set the error message callback. -- -- mxml_error_cb_t -- Error callback function -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Set the value of an integer node. -- --The node is not changed if it is not an integer node. -- -- mxml_node_t * -- Node to set -- -- -- int -- Integer value -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Set the value of an opaque node. -- --The node is not changed if it is not an opaque node. -- -- mxml_node_t * -- Node to set -- -- -- const char * -- Opaque string -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Set the value of a real number node. -- --The node is not changed if it is not a real number node. -- -- mxml_node_t * -- Node to set -- -- -- double -- Real number value -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Set the value of a text node. -- --The node is not changed if it is not a text node. -- -- mxml_node_t * -- Node to set -- -- -- int -- 1 = leading whitespace, 0 = no whitespace -- -- -- const char * -- String -- -- -- -- -- int -- 0 on success, -1 on failure -- -- Set the value of a text node to a formatted string. -- --The node is not changed if it is not a text node. -- -- mxml_node_t * -- Node to set -- -- -- int -- 1 = leading whitespace, 0 = no whitespace -- -- -- const char * -- Printf-style format string -- -- -- Additional arguments as needed -- -- -- -- Set the the wrap margin when saving XML data. -- --Wrapping is disabled when "column" is 0. -- --@since Mini-XML 2.3@ -- -- int -- Column for wrapping, 0 to disable wrapping -- -- -- -- -- mxml_node_t * -- Next node or NULL -- -- Walk to the next logical node in the tree. -- --The descend argument controls whether the first child is considered --to be the next node. The top node argument constrains the walk to --the node's children. -- -- mxml_node_t * -- Current node -- -- -- mxml_node_t * -- Top node -- -- -- int -- Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST -- -- -- -- -- mxml_node_t * -- Previous node or NULL -- -- Walk to the previous logical node in the tree. -- --The descend argument controls whether the previous node's last child --is considered to be the previous node. The top node argument constrains --the walk to the node's children. -- -- mxml_node_t * -- Current node -- -- -- mxml_node_t * -- Top node -- -- -- int -- Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST -- -- -- -- An XML element attribute value. -- -- char * -- Attribute name -- -- -- char * -- Attribute value -- -- -- -- struct mxml_attr_s -- An XML element attribute value. -- -- -- void(*)(void *) -- Custom data destructor -- -- -- int(*)(mxml_node_t *, const char *) -- Custom data load callback function -- -- -- An XML custom value. @since Mini-XML 2.1@ -- -- void * -- Pointer to (allocated) custom data -- -- -- mxml_custom_destroy_cb_t -- Pointer to destructor function -- -- -- -- char *(*)(mxml_node_t *) -- Custom data save callback function -- -- -- struct mxml_custom_s -- An XML custom value. @since Mini-XML 2.1@ -- -- -- An XML element value. -- -- mxml_attr_t * -- Attributes -- -- -- char * -- Name of element -- -- -- int -- Number of attributes -- -- -- -- struct mxml_element_s -- An XML element value. -- -- -- int(*)(const char *) -- Entity callback function -- -- -- void(*)(const char *) -- Error callback function -- -- -- An XML node index. -- -- int -- Allocated nodes in index -- -- -- char * -- Attribute used for indexing or NULL -- -- -- int -- Current node -- -- -- mxml_node_t ** -- Node array -- -- -- int -- Number of nodes in index -- -- -- -- struct mxml_index_s -- An XML node index. -- -- -- mxml_type_t(*)(mxml_node_t *) -- Load callback function -- -- -- An XML node. -- -- struct mxml_node_s * -- First child node -- -- -- struct mxml_node_s * -- Last child node -- -- -- struct mxml_node_s * -- Next node under same parent -- -- -- struct mxml_node_s * -- Parent node -- -- -- struct mxml_node_s * -- Previous node under same parent -- -- -- int -- Use count -- -- -- mxml_type_t -- Node type -- -- -- void * -- User data -- -- -- mxml_value_t -- Node value -- -- -- -- struct mxml_node_s -- An XML node. -- -- -- const char *(*)(mxml_node_t *, int) -- Save callback function -- -- -- void(*)(mxml_node_t *, mxml_sax_event_t, void *) -- SAX callback function -- -- -- SAX event type. -- -- CDATA node -- -- -- Comment node -- -- -- Data node -- -- -- Processing directive node -- -- -- Element closed -- -- -- Element opened -- -- -- -- enum mxml_sax_event_e -- SAX event type. -- -- -- An XML text value. -- -- char * -- Fragment string -- -- -- int -- Leading whitespace? -- -- -- -- struct mxml_text_s -- An XML text value. -- -- -- The XML node type. -- -- Custom data @since Mini-XML 2.1@ -- -- -- XML element with attributes -- -- -- Ignore/throw away node @since Mini-XML 2.3@ -- -- -- Integer value -- -- -- Opaque string -- -- -- Real value -- -- -- Text fragment -- -- -- -- The XML node type. -- enum mxml_type_e -- -- -- union mxml_value_u -- An XML node value. -- -- -- An XML node value. -- -- mxml_custom_t -- Custom data @since Mini-XML 2.1@ -- -- -- mxml_element_t -- Element -- -- -- int -- Integer number -- -- -- char * -- Opaque string -- -- -- double -- Real number -- -- -- mxml_text_t -- Text fragment -- -- -- -diff -urN mxml-2.6-orig/mxmldoc.c mxml-2.6/mxmldoc.c ---- mxml-2.6-orig/mxmldoc.c 2009-05-05 06:38:00.000000000 -0700 -+++ mxml-2.6/mxmldoc.c 2009-11-18 18:21:26.000000000 -0800 -@@ -57,7 +57,9 @@ - #ifndef WIN32 - # include - # include -+#ifndef __HAIKU__ - # include -+#endif - # include - extern char **environ; - #endif /* !WIN32 */ -diff -urN mxml-2.6-orig/temp1.xmlfd mxml-2.6/temp1.xmlfd ---- mxml-2.6-orig/temp1.xmlfd 1969-12-31 16:00:00.000000000 -0800 -+++ mxml-2.6/temp1.xmlfd 2009-11-18 18:25:08.000000000 -0800 -@@ -0,0 +1,29 @@ -+ -+ -+ -+ 123 -+ Now is the time for all good men to come to the aid of their -+country. -+ -+ -+ diff --git a/dev-libs/mxml/licenses/Mini-XML b/dev-libs/mxml/licenses/Mini-XML new file mode 100644 index 000000000..4856e344c --- /dev/null +++ b/dev-libs/mxml/licenses/Mini-XML @@ -0,0 +1,16 @@ +Mini-XML + +Copyright © 2003-2019 by Michael R Sweet + + +Exceptions to the Apache 2.0 License: +===================================== + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 or LGPLv2 (“Combined Software”) and if +a court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2 or LGPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of the +License, but only in their entirety and only with respect to the Combined +Software. diff --git a/dev-libs/mini-xml/mini_xml-2.11.recipe b/dev-libs/mxml/mxml-3.1.recipe similarity index 67% rename from dev-libs/mini-xml/mini_xml-2.11.recipe rename to dev-libs/mxml/mxml-3.1.recipe index 001a97875..ea789e11a 100644 --- a/dev-libs/mini-xml/mini_xml-2.11.recipe +++ b/dev-libs/mxml/mxml-3.1.recipe @@ -2,14 +2,17 @@ SUMMARY="Minimum XML Library" DESCRIPTION="Mini-XML is a small XML parsing library that you can \ use to read XML and XML-like data files in your application without \ requiring large non-standard libraries." -HOMEPAGE="http://www.minixml.org/index.php" -COPYRIGHT="2003-2014 Michael R Sweet" -LICENSE="GNU LGPL v2" +HOMEPAGE="https://www.msweet.org/mxml/ + https://github.com/michaelrsweet/mxml" +COPYRIGHT="2003-2019 Michael R Sweet" +LICENSE="Mini-XML + Apache v2 + GNU LGPL v2" REVISION="1" SOURCE_URI="https://github.com/michaelrsweet/mxml/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="7d3dfe661e50908fe41aef9b97ba6f7f158cab5208515c6be9f5bc9daf032329" -SOURCE_DIR="mxml-$portVersion" -PATCHES="mini_xml-$portVersion.patchset" +CHECKSUM_SHA256="0a50cbb42ad078e51589208997858c8d86ea95f255d61e4af5b3d635d2659603" +SOURCE_FILENAME="mxml-v$portVersion.tar.gz" +PATCHES="mxml-$portVersion.patchset" ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86" @@ -18,7 +21,7 @@ libVersion="1.6" libVersionCompat="$libVersion compat >= ${libVersion%.*}" PROVIDES=" - mini_xml$secondaryArchSuffix = $portVersion + mxml$secondaryArchSuffix = $portVersion cmd:mxmldoc$secondaryArchSuffix = $portVersion lib:libmxml$secondaryArchSuffix = $libVersionCompat " @@ -27,11 +30,11 @@ REQUIRES=" " PROVIDES_devel=" - mini_xml${secondaryArchSuffix}_devel = $portVersion + mxml${secondaryArchSuffix}_devel = $portVersion devel:libmxml$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" - mini_xml${secondaryArchSuffix}_devel == $portVersion base + mxml${secondaryArchSuffix}_devel == $portVersion base " BUILD_REQUIRES=" @@ -59,13 +62,11 @@ BUILD() INSTALL() { make install - prepareInstalledDevelLibs \ - libmxml - packageEntries devel \ - $developDir -} -TEST() -{ - make testmxml + prepareInstalledDevelLibs libmxml + fixPkgconfig + + packageEntries devel \ + $developDir \ + $manDir } diff --git a/dev-libs/mxml/patches/mxml-3.1.patchset b/dev-libs/mxml/patches/mxml-3.1.patchset new file mode 100644 index 000000000..eb36db4d4 --- /dev/null +++ b/dev-libs/mxml/patches/mxml-3.1.patchset @@ -0,0 +1,28 @@ +From b31124071358fcbfd979ceeddf6d479564ab2987 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 30 Nov 2019 11:31:57 +0100 +Subject: Enable shared library + + +diff --git a/configure.ac b/configure.ac +index 455537a..70d2c38 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -206,6 +206,14 @@ if test x$enable_shared != xno; then + LDFLAGS="$LDFLAGS -Wl,-R\$(libdir)" + ;; + ++ haiku*) ++ AC_MSG_RESULT(yes) ++ LIBMXML="libmxml.so.1.6" ++ DSO="\$(CC)" ++ DSOFLAGS="$DSOFLAGS -Wl,-soname,libmxml.so.1,-R\$(libdir) -shared \$(OPTIM)" ++ LDFLAGS="$LDFLAGS -Wl,-R\$(libdir)" ++ ;; ++ + darwin) + AC_MSG_RESULT(yes) + LIBMXML="libmxml.1.dylib" +-- +2.24.0 +