[packages/libmxmlplus] - new

qboosh qboosh at pld-linux.org
Sat Apr 19 10:20:54 CEST 2014


commit 39e03bfc7d264c76ed9b62ed999e5135fc0c858a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Apr 19 10:22:51 2014 +0200

    - new

 libmxmlplus-ac.patch  |  24 +++++++
 libmxmlplus-c++.patch | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++
 libmxmlplus.spec      |  96 ++++++++++++++++++++++++++++
 3 files changed, 292 insertions(+)
---
diff --git a/libmxmlplus.spec b/libmxmlplus.spec
new file mode 100644
index 0000000..59c67e2
--- /dev/null
+++ b/libmxmlplus.spec
@@ -0,0 +1,96 @@
+Summary:	Minimal XML library for C++
+Summary(pl.UTF-8):	Minimalna biblioteka XML dla C++
+Name:		libmxmlplus
+Version:	0.9.2
+Release:	1
+License:	LGPL v2.1
+Group:		Libraries
+Source0:	http://downloads.sourceforge.net/mxml/%{name}-%{version}.tar.gz
+# Source0-md5:	562b3aedaa78a16bf963f43327566e6a
+Patch0:		%{name}-ac.patch
+Patch1:		%{name}-c++.patch
+URL:		http://mxml.sourceforge.net/
+BuildRequires:	autoconf
+BuildRequires:	automake
+BuildRequires:	libstdc++-devel
+BuildRequires:	libtool >= 2:1.5
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Minimal XML is a library meant for extrememly fast and non-validating
+XML parsing.
+
+%description -l pl.UTF-8
+Minimal XML jest biblioteką z przeznaczeniem do ekstremalnie szybkiej
+analizy XML bez kontroli poprawności.
+
+%package devel
+Summary:	Header files for libmxmlplus
+Summary(pl.UTF-8):	Pliki nagłówkowe dla libmxmlplus
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	libstdc++-devel
+
+%description devel
+Header files for libmxmlplus.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe dla libmxmlplus.
+
+%package static
+Summary:	Static libmxmlplus library
+Summary(pl.UTF-8):	Statyczna biblioteka libmxmlplus
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static libmxmlplus library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libmxmlplus.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+# use include subdir to avoid conflicts with libmxml or mxml
+%configure \
+	--includedir=%{_includedir}/mxmlplus \
+	--enable-shared
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog NEWS RELNOTES TODO
+%attr(755,root,root) %{_libdir}/libmxmlplus.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libmxmlplus.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libmxmlplus.so
+%{_libdir}/libmxmlplus.la
+%{_includedir}/mxmlplus
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libmxmlplus.a
diff --git a/libmxmlplus-ac.patch b/libmxmlplus-ac.patch
new file mode 100644
index 0000000..41bbc28
--- /dev/null
+++ b/libmxmlplus-ac.patch
@@ -0,0 +1,24 @@
+--- libmxmlplus-0.9.2/configure.in.orig	2004-04-06 01:46:27.000000000 +0200
++++ libmxmlplus-0.9.2/configure.in	2014-04-19 09:46:29.462887375 +0200
+@@ -9,7 +9,7 @@
+ dnl Begin of script
+ dnl
+ 
+-AC_INIT( src )
++AC_INIT([src])
+ 
+ AC_REVISION($Revision: 1.4 $)
+ AC_CANONICAL_HOST
+@@ -92,12 +92,6 @@
+ 
+ RANLIB=ranlib
+ 
+-if test x$enable_debug = xyes; then
+-   CXXFLAGS="-g"
+-else
+-   CXXFLAGS="-O2"
+-fi
+-
+ dnl--------------------------------
+ dnl settings for makefiles
+ dnl
diff --git a/libmxmlplus-c++.patch b/libmxmlplus-c++.patch
new file mode 100644
index 0000000..ed674f1
--- /dev/null
+++ b/libmxmlplus-c++.patch
@@ -0,0 +1,172 @@
+--- libmxmlplus-0.9.2/include/mxml_node.h.orig	2004-04-11 02:07:53.000000000 +0200
++++ libmxmlplus-0.9.2/include/mxml_node.h	2014-04-19 09:51:49.709547370 +0200
+@@ -372,7 +372,7 @@
+       @param child the node to be removed
+       @throw NotFoundError if the node is not in the child list
+    */
+-   void Node::removeChild( Node *child ) throw( NotFoundError );
++   void removeChild( Node *child ) throw( NotFoundError );
+ 
+ 
+    Node *parent() const { return m_parent; }
+@@ -391,7 +391,7 @@
+       ...Or how many levels are above this node.
+       Can be called also for nodes that have not a valid symbolic path.
+    */
+-   int Node::depth() const;
++   int depth() const;
+ 
+    /** Returns a symbolic path leading to the node.
+       A Node path is the the list of all the ancestor node names, plus the
+@@ -412,7 +412,7 @@
+       @return the path leading to the node, or an empty string if the node
+          has not a valid path.
+    */
+-   std::string Node::path() const;
++   std::string path() const;
+ 
+ 
+    /* Clones the node and all its children.
+--- libmxmlplus-0.9.2/include/mxml_iterator.h.orig	2004-04-11 02:04:31.000000000 +0200
++++ libmxmlplus-0.9.2/include/mxml_iterator.h	2014-04-19 10:00:47.462869492 +0200
+@@ -15,7 +15,7 @@
+ template<class __Node >
+ __iterator<__Node> &__iterator<__Node>::__prev()
+ {
+-   assert( m_node != m_base );
++   assert( this->m_node != m_base );
+ 
+    if (m_node == 0 ) {
+       if ( m_base->parent() != 0 )
+@@ -75,21 +75,21 @@
+ template< class __Node >
+ __iterator<__Node> &__deep_iterator<__Node>::__next()
+ {
+-   assert( m_node != 0 );
++   assert( this->m_node != 0 );
+ 
+-   if ( m_node->child() != 0 ) {
+-      m_node = m_node->child();
++   if ( this->m_node->child() != 0 ) {
++      this->m_node = this->m_node->child();
+    }
+-   else if ( m_node->next() != 0 ) {
+-      m_node = m_node->next();
++   else if ( this->m_node->next() != 0 ) {
++      this->m_node = this->m_node->next();
+    }
+    else {
+-      while ( m_node->parent() != 0 ) {
+-         m_node = m_node->parent();
+-         if ( m_node->next() != 0 )
++      while ( this->m_node->parent() != 0 ) {
++         this->m_node = this->m_node->parent();
++         if ( this->m_node->next() != 0 )
+             break;
+       }
+-      m_node = m_node->next(); // can be NULL
++      this->m_node = this->m_node->next(); // can be NULL
+    }
+ 
+    return *this;
+@@ -142,16 +142,16 @@
+    int matches;
+    while ( this->m_node != 0 ) {
+       matches = 0;
+-      if ( m_name != "" && m_name == m_node->name() )
++      if ( m_name != "" && m_name == this->m_node->name() )
+          matches++;
+ 
+-      if ( m_attr != "" && m_node->hasAttribute( m_attr ) ) {
++      if ( m_attr != "" && this->m_node->hasAttribute( m_attr ) ) {
+          matches++;
+-         if ( m_valattr != "" && m_node->getAttribute( m_attr ) == m_valattr )
++         if ( m_valattr != "" && this->m_node->getAttribute( m_attr ) == m_valattr )
+             matches++;
+       }
+ 
+-      if ( m_data != "" && m_node->data().find( m_data ) != std::string::npos )
++      if ( m_data != "" && this->m_node->data().find( m_data ) != std::string::npos )
+          matches++;
+ 
+       if ( matches < m_maxmatch )
+@@ -184,7 +184,7 @@
+ template< class __Node >
+ __iterator<__Node> &__path_iterator<__Node>::__next()
+ {
+-   __Node *ptr = m_node;
++   __Node *ptr = this->m_node;
+    std::string name;
+    std::string::size_type pos = m_path.rfind('/');
+    
+@@ -197,11 +197,11 @@
+       name = m_path.substr( pos );
+    }
+    
+-   m_node = m_node->next();   
++   this->m_node = this->m_node->next();   
+    // todo: this sucks, must re-do it better
+-   while ( m_node ) {
+-      if ( name == "*" || m_node->name() == name ) break;
+-      m_node = m_node->next();   
++   while ( this->m_node ) {
++      if ( name == "*" || this->m_node->name() == name ) break;
++      this->m_node = this->m_node->next();   
+    }
+    
+    return *this;
+@@ -210,14 +210,14 @@
+ template< class __Node >
+ __iterator<__Node> &__path_iterator<__Node>::__prev()
+ {
+-   assert( m_node != 0 );
++   assert( this->m_node != 0 );
+ 
+-   __Node *ptr = m_node;
+-   m_node = m_node->prev();
++   __Node *ptr = this->m_node;
++   this->m_node = this->m_node->prev();
+    // todo: this sucks, must re-do it better
+-   while ( m_node != 0 ) {
+-      if ( m_node->name() == ptr->name() ) break;
+-      m_node = m_node->prev();
++   while ( this->m_node != 0 ) {
++      if ( this->m_node->name() == ptr->name() ) break;
++      this->m_node = this->m_node->prev();
+    }
+ 
+    return *this;
+@@ -250,9 +250,9 @@
+ template< class __Node >
+ __iterator<__Node> &__path_iterator<__Node>::__find()
+ {
+-   if ( m_node == 0 ) return *this;
++   if ( this->m_node == 0 ) return *this;
+    
+-   __Node *rootNode = m_node;
++   __Node *rootNode = this->m_node;
+    std::string firstName;
+    std::string::size_type pos;
+    if ( rootNode->nodeType() == Node::typeDocument ) 
+@@ -262,7 +262,7 @@
+          rootNode = rootNode->next();
+       if ( ! rootNode )
+       {
+-         m_node = 0;
++         this->m_node = 0;
+          return *this;
+       }
+    }
+@@ -295,10 +295,10 @@
+       {
+          if ( pos == std::string::npos ) 
+          {
+-            m_node = rootNode;
++            this->m_node = rootNode;
+          }
+          else {
+-            m_node = subfind( rootNode, pos+1 );
++            this->m_node = subfind( rootNode, pos+1 );
+          }
+          break;
+       }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libmxmlplus.git/commitdiff/39e03bfc7d264c76ed9b62ed999e5135fc0c858a



More information about the pld-cvs-commit mailing list