update to new build system

This commit is contained in:
Marc Wäckerlin
2015-07-13 11:27:14 +00:00
parent 72be1818f1
commit 2f73e3bdff
33 changed files with 1586 additions and 400 deletions

View File

@@ -1,11 +1,19 @@
prefix=@PACKAGE_NAME@
exec_prefix=${prefix}
## @id $Id$
#
# This file has been added by bootstrap.sh on Mon, 13 July 2015 12:42:59 +0200
# Feel free to change it or even remove and rebuild it, up to your needs
#
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: @PACKAGE_NAME@
Description: C++ wrappers around pcsc-lite, cryptoki, openssh
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lxml-cxx
Libs.private:
Cflags: -I${includedir}
Description: @DESCRIPTION@
Version: @VERSION@
Libs: -L${libdir} -l@PACKAGE_NAME@ @LDFLAGS@
Cflags: -I${includedir} @CPPFLAGS@
Requires: @PKG_REQUIREMENTS@

View File

@@ -1,25 +1,14 @@
## @file
##
## $Id$
##
## @id $Id$
#
# This file has been added by bootstrap.sh on Mon, 13 July 2015 12:42:59 +0200
# Feel free to change it or even remove and rebuild it, up to your needs
#
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxml-cxx.pc
pkgconfig2dir = $(datarootdir)/pkgconfig
pkgconfig2_DATA = $(pkgconfig_DATA)
EXTRA_DIST = $(pkgconfig_DATA).in version.cxx.in
BUILT_SOURCES = version.cxx
AM_CXXFLAGS += -I ${top_srcdir}/src
lib_LTLIBRARIES = libxml-cxx.la
nobase_include_HEADERS = xml-cxx/xml.hxx xml-cxx/any.hxx
lib_LTLIBRARIES = libxml-cxx.la
libxml_cxx_la_SOURCES = xml.cxx version.cxx
libxml_cxx_la_LDFLAGS = -version-info ${LIB_VERSION}
DISTCLEANFILES = $(pkgconfig_DATA)
MAINTAINERCLEANFILES = makefile.in

40
src/version.cxx Normal file
View File

@@ -0,0 +1,40 @@
/*! @file
@id $
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <string>
namespace NAMESPACE {
std::string package_string() {
return PACKAGE_STRING;
}
std::string package_name() {
return PACKAGE_NAME;
}
std::string version() {
return PACKAGE_VERSION;
}
std::string build_date() {
return BUILD_DATE;
}
std::string author() {
return AUTHOR;
}
std::string description() {
return DESCRIPTION;
}
std::string readme() {
return README;
}
std::string logo() {
return PROJECT_LOGO;
}
std::string icon() {
return PROJECT_ICON;
}
const std::string WHAT("#(@) " PACKAGE_STRING);
const std::string IDENT("$Id: " PACKAGE_STRING);
}

33
src/version.hxx Normal file
View File

@@ -0,0 +1,33 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <string>
namespace NAMESPACE {
/// get package string which consists of package name and package version
std::string package_string();
/// get package name
std::string package_name();
/// get package version
std::string version();
/// get code build date
std::string build_date();
/// get author, i.e. copyright holder
std::string author();
/// get short package description (1st line of README)
std::string description();
/// get long package description (starting at 3rd line in README)
std::string readme();
/// get package logo file name
std::string logo();
/// get package icon file name
std::string icon();
/// used for <code>what filename</code>
extern const std::string WHAT;
/// used for <code>ident filename</code>
extern const std::string IDENT;
}

View File

@@ -5,6 +5,7 @@
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <mrw/string.hxx>
#include <xml-cxx/xml.hxx>
#include <iostream>
#include <sstream>
@@ -255,6 +256,7 @@ namespace xml {
for (Contents::const_iterator it(o._contents.begin());
it!=o._contents.end(); ++it)
_contents.push_back((*it)->clone(this).release());
return *this;
}
//! Clones But resets the parent reference.
/*! You get a new instance of the node, but detached from the
@@ -736,9 +738,7 @@ namespace xml {
Node::size_type min, Node::size_type max) */
UnsignedInteger::UnsignedInteger(std::string name, unsigned long i,
size_type min, size_type max) throw():
String(name,
dynamic_cast<std::stringstream&>(std::stringstream()<<i).str(),
min, max) {
String(name, mrw::string(i), min, max) {
}
std::auto_ptr<Node> UnsignedInteger::clone() const throw() {
return std::auto_ptr<Node>(new UnsignedInteger(*this));
@@ -755,7 +755,7 @@ namespace xml {
return *this;
}
std::string::size_type pos(txt.find_first_not_of("0123456789", start));
if (pos<last || pos==last && last==start)
if (pos<last || (pos==last && last==start))
throw type_mismatch(*this, txt,
"unsigned integer may only contain numbers");
unsigned long i(0);
@@ -957,8 +957,8 @@ namespace xml {
std::istream& is) const
throw(wrong_node_number) {
for (Node::size_type i(0); i<tpl.children(); ++i)
if (tpl[i].min()>0 && node->list(tpl[i].name()).size()<tpl[i].min()
|| 0<tpl[i].max() && tpl[i].max()<node->list(tpl[i].name()).size())
if ((tpl[i].min()>0 && node->list(tpl[i].name()).size()<tpl[i].min())
|| (0<tpl[i].max() && tpl[i].max()<node->list(tpl[i].name()).size()))
throw wrong_node_number(*node, is, tpl[i].name(),
node->list(tpl[i].name()).size(),
tpl[i].min(), tpl[i].max());