[med-svn] [Git][med-team/libzeep][master] 6 commits: Change rules to fix configure

Maarten L. Hekkelman gitlab at salsa.debian.org
Thu Nov 12 15:00:55 GMT 2020



Maarten L. Hekkelman pushed to branch master at Debian Med / libzeep


Commits:
40bc8e13 by Maarten L. Hekkelman at 2020-11-11T09:58:17+01:00
Change rules to fix configure

- - - - -
8c0d7e74 by Maarten L. Hekkelman at 2020-11-11T11:24:42+01:00
update test rules to link static to zeep libraries

- - - - -
b029f059 by Maarten L. Hekkelman at 2020-11-12T09:52:10+01:00
remove build dependency on mrc

- - - - -
0c08ff56 by Maarten L. Hekkelman at 2020-11-12T09:52:27+01:00
New upstream version 5.0.2
- - - - -
71dd72a6 by Maarten L. Hekkelman at 2020-11-12T09:52:29+01:00
Update upstream source from tag 'upstream/5.0.2'

Update to upstream version '5.0.2'
with Debian dir c71ec78619002ff970f12b3bf77f4eedc9a72380
- - - - -
a6848faf by Maarten L. Hekkelman at 2020-11-12T15:40:55+01:00
update debian files for new upstream release

- - - - -


25 changed files:

- .gitignore
- .travis.yml
- GNUmakefile.in
- changelog
- configure
- configure.ac
- debian/changelog
- debian/control
- + debian/libzeep-dev.examples
- debian/libzeep5.0.docs → debian/libzeep-http5.docs
- + debian/libzeep-json5.docs
- + debian/libzeep-xml5.docs
- − debian/patches/docs-patch
- debian/patches/install-targets
- debian/patches/series
- debian/rules
- + debian/test/control
- + debian/test/run-build-test
- doc/Jamfile.v2
- examples/GNUmakefile.in → examples/GNUmakefile
- lib-http/GNUmakefile.in
- lib-http/src/controller-rsrc.cpp
- lib-json/GNUmakefile.in
- lib-json/src/parser.cpp
- lib-xml/GNUmakefile.in


Changes:

=====================================
.gitignore
=====================================
@@ -15,7 +15,7 @@ autom4te.cache
 config.log
 config.status
 GNUmakefile
-*/GNUmakefile
+lib-*/GNUmakefile
 aclocal.m4
 libtool
 lib/


=====================================
.travis.yml
=====================================
@@ -2,15 +2,20 @@ language: cpp
 
 os:
   - linux
-  # - osx
+  - osx
 
 dist: focal
 
-# osx_image: xcode12
+osx_image: xcode12
 
 compiler:
   - gcc
-  # - clang
+  - clang
+
+arch:
+    - amd64
+    - ppc64le
+    - s390x
 
 addons:
   apt:
@@ -27,8 +32,8 @@ addons:
       - fop
 
 before_install:
-  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update            ; fi
-  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install boost make; fi
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update      ; fi
+  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install make; fi
 
 script:
   - ./configure


=====================================
GNUmakefile.in
=====================================
@@ -19,8 +19,10 @@ LIBS				= @LIBS@
 prefix				= @prefix@
 exec_prefix			= @exec_prefix@
 libdir				= @libdir@
+datarootdir			= @datarootdir@
 includedir			= @includedir@
 docdir				= @docdir@
+pkgconfigdir		= $(libdir)/pkgconfig
 
 BOOST_LIBS			= program_options
 ZEEP_LIBS			= http json xml
@@ -44,7 +46,7 @@ endif
 
 LIBTOOL_DEPS = @LIBTOOL_DEPS@
 libtool: $(LIBTOOL_DEPS)
-	$(SHELL) ./config.status --recheck
+	$(SHELL) ./config.status libtool
 
 LIBTOOL = $(SHELL) @abs_top_builddir@/libtool
 CXXCOMPILE = $(LIBTOOL) --silent --tag=CXX --mode=compile $(CXX) $(CXXFLAGS)
@@ -54,7 +56,7 @@ CXXLINK = $(LIBTOOL) --silent --tag=CXX --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS
 CXXFLAGS            += -Wall -Wno-multichar
 
 VERSION             = @PACKAGE_VERSION@
-DIST_NAME           = @PACKAGE_NAME@
+DIST_NAME           = @PACKAGE_NAME at -@PACKAGE_VERSION@
 
 OUTPUT_DIR			?= ./lib
 
@@ -83,26 +85,12 @@ define ZEEPLIB_template =
 lib-$(1):
 	+$(MAKE) -C lib-$(1) lib
 
-.PHONY: install-$(1)
-install-$(1):
-	+$(MAKE) -C lib-$(1) install
-
-.PHONY: install-$(1)-lib
-install-$(1)-lib:
-	+$(MAKE) -C lib-$(1) install-lib
-
-.PHONY: install-$(1)-dev
-install-$(1)-dev:
-	+$(MAKE) -C lib-$(1) install-dev
-
-lib-$(1): $(OUTPUT_DIR)
-
 endef
 
 $(foreach part,$(ZEEP_LIB_PARTS),$(eval $(call ZEEPLIB_template,$(part))))
 
 .PHONY: libraries
-libraries: $(ZEEP_LIBS:%=lib-%)
+libraries: $(ZEEP_LIBS:%=lib-%) | $(OUTPUT_DIR)
 
 .PHONY: test
 test: $(ZEEP_LIB_PARTS:%=%_test)
@@ -121,23 +109,52 @@ doc:
 endif
 
 .PHONY: all	
-all: libraries test examples
+all: libraries
+ifeq "$(BUILD_DOCS)" "1"
+all: doc
+endif
 
+# Install the libraries
 .PHONY: install-libs
-install-libs: $(ZEEP_LIBS:%=install-%-lib)
+install-libs: libraries
+	install -d $(libdir)
+	for lib in $(ZEEP_LIB_PARTS); do \
+		$(LIBTOOL) --mode=install install lib-$${lib}/libzeep-$${lib}.la $(libdir);\
+	done
 
+# Install header files and .pc files
 .PHONY: install-dev
-install-dev: $(ZEEP_LIBS:%=install-%-dev)
+install-dev: libraries
+	for dir in . ./http ./json ./xml ; do \
+		install -d $(includedir)/zeep/$${dir}; \
+		for hdr in include/zeep/$${dir}/*.hpp ; do \
+			install $${hdr} $(includedir)/zeep/$${dir}; \
+		done; \
+	done
+	install -d $(pkgconfigdir)
+	for lib in $(ZEEP_LIB_PARTS); do \
+		install -m 644 lib-$${lib}/libzeep-$${lib}.pc $(pkgconfigdir)/libzeep-$${lib}.pc; \
+	done
 
 .PHONY: install-doc
 install-doc: doc
-	cd doc; for f in `find html -type f`; do install -D $$f $(docdir)/libzeep-doc/$$f; done
+	cd doc; for d in `find html -type d`; do install -d $(docdir)/libzeep-doc/$$d; done
+	cd doc; for f in `find html -type f`; do install $$f $(docdir)/libzeep-doc/$$f; done
+	mkdir $(DIST_NAME)
+	git archive master | tar -x -C $(DIST_NAME)
+	cd $(DIST_NAME); tar cvf ../examples.tgz examples/
+	install examples.tgz $(docdir)/libzeep-doc/examples.tgz
+	rm -rf $(DIST_NAME) examples.tgz
 
 .PHONY: install
-install: $(ZEEP_LIBS:%=install-%)
+install: install-libs install-dev
+ifeq "$(BUILD_DOCS)" "1"
+	+$(MAKE) install-doc
+endif
 
 .PHONY: clean
 clean: $(ZEEP_LIB_PARTS:%=%_clean)
+	rm -rf lib/*
 	$(MAKE) -C examples clean
 	cd doc; $$(which $(BJAM) > /dev/null) && $(BJAM) clean || echo "No $(BJAM) installed, cannot clean doc"
 	rm -f $(DIST_NAME).tgz


=====================================
changelog
=====================================
@@ -1,3 +1,8 @@
+Version 5.0.2
+- Add support for building shared libraries
+- Decoupled example code from rest, should now be build after installation,
+  or use the STAGE=1 option to make.
+
 Version 5.0.1
 
 - Update makefile to include changes made for the Debian package


=====================================
configure
=====================================
@@ -653,6 +653,8 @@ PTHREAD_CC
 ax_pthread_config
 MRC
 DEBUG
+LZ_LT_VERSION
+LZ_TL_CURRENT
 LIBTOOL_DEPS
 CXXCPP
 CPP
@@ -744,8 +746,8 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-enable_static
 enable_shared
+enable_static
 with_pic
 enable_fast_install
 with_aix_soname
@@ -1400,8 +1402,8 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-shared[=PKGS]  build shared libraries [default=no]
+  --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
@@ -3863,67 +3865,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
-  enableval=$enable_static; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
-      for pkg in $enableval; do
-	IFS=$lt_save_ifs
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS=$lt_save_ifs
-      ;;
-    esac
-else
-  enable_static=yes
-fi
-
-
-
-
-
-
-
-
-
-# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
-  enableval=$enable_shared; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
-      for pkg in $enableval; do
-	IFS=$lt_save_ifs
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS=$lt_save_ifs
-      ;;
-    esac
-else
-  enable_shared=no
-fi
-
-
-
-
-
-
-
-
 
 case `pwd` in
   *\ * | *\	*)
@@ -8287,6 +8228,35 @@ func_stripname_cnf ()
 
 
 # Set options
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for pkg in $enableval; do
+	IFS=$lt_save_ifs
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac
+else
+  enable_shared=no
+fi
+
+
+
+
+
+
+
 
 
 
@@ -8297,6 +8267,36 @@ func_stripname_cnf ()
 
 
 
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for pkg in $enableval; do
+	IFS=$lt_save_ifs
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac
+else
+  enable_static=yes
+fi
+
+
+
+
+
+
+
+
 
 
 # Check whether --with-pic was given.
@@ -15865,6 +15865,16 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
 
+LZ_CURRENT=5
+LZ_REVISION=0
+LZ_AGE=0
+
+LZ_TL_CURRENT="${LZ_CURRENT}"
+LZ_LT_VERSION="${LZ_CURRENT}:${LZ_REVISION}:${LZ_AGE}"
+
+
+
+
 # Extract the first word of "sh", so it can be a program name with args.
 set dummy sh; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -18144,7 +18154,7 @@ fi
 
 BUILD_DIR="$abs_top_builddir"
 
-ac_config_files="$ac_config_files GNUmakefile lib-xml/GNUmakefile lib-json/GNUmakefile lib-http/GNUmakefile examples/GNUmakefile lib-xml/libzeep-xml.pc lib-json/libzeep-json.pc lib-http/libzeep-http.pc"
+ac_config_files="$ac_config_files GNUmakefile lib-xml/GNUmakefile lib-json/GNUmakefile lib-http/GNUmakefile lib-xml/libzeep-xml.pc lib-json/libzeep-json.pc lib-http/libzeep-http.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -18865,10 +18875,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 sed_quote_subst='$sed_quote_subst'
 double_quote_subst='$double_quote_subst'
 delay_variable_subst='$delay_variable_subst'
-enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
@@ -19251,7 +19261,6 @@ do
     "lib-xml/GNUmakefile") CONFIG_FILES="$CONFIG_FILES lib-xml/GNUmakefile" ;;
     "lib-json/GNUmakefile") CONFIG_FILES="$CONFIG_FILES lib-json/GNUmakefile" ;;
     "lib-http/GNUmakefile") CONFIG_FILES="$CONFIG_FILES lib-http/GNUmakefile" ;;
-    "examples/GNUmakefile") CONFIG_FILES="$CONFIG_FILES examples/GNUmakefile" ;;
     "lib-xml/libzeep-xml.pc") CONFIG_FILES="$CONFIG_FILES lib-xml/libzeep-xml.pc" ;;
     "lib-json/libzeep-json.pc") CONFIG_FILES="$CONFIG_FILES lib-json/libzeep-json.pc" ;;
     "lib-http/libzeep-http.pc") CONFIG_FILES="$CONFIG_FILES lib-http/libzeep-http.pc" ;;
@@ -19729,15 +19738,15 @@ available_tags='CXX '
 
 # ### BEGIN LIBTOOL CONFIG
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
 
 # Whether or not to build shared libraries.
 build_libtool_libs=$enable_shared
 
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
 
 # What type of objects to build.
 pic_mode=$pic_mode


=====================================
configure.ac
=====================================
@@ -13,11 +13,22 @@ AC_CONFIG_MACRO_DIR([config/m4])
 AC_PREFIX_DEFAULT(/usr/local)
 
 AC_PROG_INSTALL
-AC_ENABLE_STATIC
-AC_DISABLE_SHARED
-AC_PROG_LIBTOOL
+
+dnl Shared libraries are not convenient
+LT_INIT([disable-shared])
 AC_SUBST(LIBTOOL_DEPS)
 
+dnl versioning
+LZ_CURRENT=5
+LZ_REVISION=0
+LZ_AGE=0
+
+LZ_TL_CURRENT="${LZ_CURRENT}"
+LZ_LT_VERSION="${LZ_CURRENT}:${LZ_REVISION}:${LZ_AGE}"
+
+AC_SUBST(LZ_TL_CURRENT)
+AC_SUBST(LZ_LT_VERSION)
+
 AC_PATH_PROG([SHELL], [sh])
 
 AC_ARG_VAR([DEBUG], [Build a debug version of the library])
@@ -99,7 +110,6 @@ AC_OUTPUT([GNUmakefile
 		   lib-xml/GNUmakefile
 		   lib-json/GNUmakefile
 		   lib-http/GNUmakefile
-		   examples/GNUmakefile
 		   lib-xml/libzeep-xml.pc
 		   lib-json/libzeep-json.pc
 		   lib-http/libzeep-http.pc])


=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+libzeep (5.0.2-1) unstable; urgency=medium
+
+  * Fix FTBFS (Closes: #974074)
+    + remove override_dh_auto_configure and add --enable-shared flag to
+      override_dh_auto_configure-arch
+
+ -- Maarten L. Hekkelman <maarten at hekkelman.com>  Thu, 12 Nov 2020 09:55:07 +0100
+
 libzeep (5.0.1-1) unstable; urgency=medium
 
   * Fix writing HTML, proper empty elements


=====================================
debian/control
=====================================
@@ -6,7 +6,6 @@ Section: libs
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
                autoconf-archive,
-               mrc,
                libboost-dev,
                libboost-program-options-dev,
                libboost-date-time-dev,
@@ -26,7 +25,7 @@ Package: libzeep-dev
 Architecture: any
 Section: libdevel
 Depends: ${misc:Depends},
-         libzeep5.0 (= ${binary:Version}),
+         libzeep-http5 (= ${binary:Version}),
          libboost-dev,
          libboost-program-options-dev,
          pkg-config
@@ -71,11 +70,11 @@ Description: Documentation for libzeep
  This specific package contains the documentation you can use to develop new
  software using libzeep.
 
-Package: libzeep5.0
+Package: libzeep-xml5
 Architecture: any
 Depends: ${misc:Depends},
          ${shlibs:Depends}
-Description: Library files for libzeep
+Description: XML Library file for libzeep
  Libzeep is a C++ library providing a validating XML parser, XML DOM tree
  implementation, XPath 1.0 support and code to create SOAP/REST servers as
  well as a full web application framework.
@@ -89,4 +88,46 @@ Description: Library files for libzeep
  C++ methods as web services. And there's a full web application framework to
  create dynamic web sites in C++ and XHTML.
  .
- This package contains the shared library only.
+ This package contains the shared library for XML processing only.
+
+Package: libzeep-json5
+Architecture: any
+Depends: ${misc:Depends},
+         ${shlibs:Depends}
+Description: JSON Library file for libzeep
+ Libzeep is a C++ library providing a validating XML parser, XML DOM tree
+ implementation, XPath 1.0 support and code to create SOAP/REST servers as
+ well as a full web application framework.
+ .
+ libzeep was originally designed to create SOAP servers in C++ easily. The
+ current incarnation provides a full validating XML parser creating a DOM tree
+ that can be iterated using STL container like methods. The tree can be searched
+ using XPath 1.0 queries.
+ .
+ There's also code to create SOAP and REST servers based allowing to export
+ C++ methods as web services. And there's a full web application framework to
+ create dynamic web sites in C++ and XHTML.
+ .
+ This package contains the shared library for JSON processing only.
+
+Package: libzeep-http5
+Architecture: any
+Depends: ${misc:Depends},
+         ${shlibs:Depends},
+         libzeep-xml5 (= ${binary:Version}),
+         libzeep-json5 (= ${binary:Version})
+Description: HTTP Library file for libzeep
+ Libzeep is a C++ library providing a validating XML parser, XML DOM tree
+ implementation, XPath 1.0 support and code to create SOAP/REST servers as
+ well as a full web application framework.
+ .
+ libzeep was originally designed to create SOAP servers in C++ easily. The
+ current incarnation provides a full validating XML parser creating a DOM tree
+ that can be iterated using STL container like methods. The tree can be searched
+ using XPath 1.0 queries.
+ .
+ There's also code to create SOAP and REST servers based allowing to export
+ C++ methods as web services. And there's a full web application framework to
+ create dynamic web sites in C++ and XHTML.
+ .
+ This package contains the shared library for the web application part.


=====================================
debian/libzeep-dev.examples
=====================================
@@ -0,0 +1 @@
+examples/*
\ No newline at end of file


=====================================
debian/libzeep5.0.docs → debian/libzeep-http5.docs
=====================================


=====================================
debian/libzeep-json5.docs
=====================================
@@ -0,0 +1 @@
+README.md


=====================================
debian/libzeep-xml5.docs
=====================================
@@ -0,0 +1 @@
+README.md


=====================================
debian/patches/docs-patch deleted
=====================================
@@ -1,23 +0,0 @@
-Description: Add some rules to find the right tools and files
-Author: Maarten L. Hekkelman <maarten at hekkelman.com>
-Last-Update: Thu, 10 Sep 2020 08:55:19 +0200
-
---- a/doc/Jamfile.v2
-+++ b/doc/Jamfile.v2
-@@ -1,3 +1,16 @@
-+using boostbook
-+  : /usr/share/xml/docbook/stylesheet/docbook-xsl/
-+  : /usr/share/xml/docbook/schema/dtd/4.2/
-+  : /usr/share/boostbook
-+  ;
-+
-+using xsltproc : /usr/bin/xsltproc ;
-+
-+using doxygen : /usr/bin/doxygen ;
-+
-+using fop : /usr/bin/fop ;
-+
-+using quickbook : /usr/bin/quickbook ;
- 
- doxygen autodoc
-     :


=====================================
debian/patches/install-targets
=====================================
@@ -1,10 +1,16 @@
 Description: Fix makefiles to install parts at the correct location
 Author: Maarten L. Hekkelman <maarten at hekkelman.com>
 Last-Update: Thu, 10 Sep 2020 08:55:19 +0200
+Forwarded: not-needed
 
 --- a/GNUmakefile.in
 +++ b/GNUmakefile.in
-@@ -16,7 +16,7 @@
+@@ -12,11 +12,11 @@
+ firstTarget: all
+ 
+ CXX					= @CXX@
+-CXXFLAGS			= @CXXFLAGS@ @BOOST_CPPFLAGS@
++CXXFLAGS			= $(CPPFLAGS) @CXXFLAGS@ @BOOST_CPPFLAGS@
  LDFLAGS				= @LDFLAGS@ @BOOST_LDFLAGS@
  LIBS				= @LIBS@
  
@@ -12,41 +18,39 @@ Last-Update: Thu, 10 Sep 2020 08:55:19 +0200
 +prefix				= $(DESTDIR)@prefix@
  exec_prefix			= @exec_prefix@
  libdir				= @libdir@
- includedir			= @includedir@
-@@ -95,6 +95,14 @@
- install-$(1)-dev:
- 	+$(MAKE) -C lib-$(1) install-dev
+ datarootdir			= @datarootdir@
+@@ -85,6 +85,19 @@
+ lib-$(1):
+ 	+$(MAKE) -C lib-$(1) lib
  
-+.PHONY: install-$(1)-lib
-+install-$(1)-lib:
-+	+$(MAKE) -C lib-$(1) install-lib
++.PHONY: install-$(1)-so
++install-$(1)-so:
++	install -d $(libdir)
++	install lib-$(1)/.libs/libzeep-$(1).so.5.0.0 $(libdir)
++	cd $(libdir); ln -s -f libzeep-$(1).so.5.0.0 libzeep-$(1).so.5
 +
 +.PHONY: install-$(1)-dev
 +install-$(1)-dev:
-+	+$(MAKE) -C lib-$(1) install-dev
++	install -d $(libdir)
++	$(LIBTOOL) --mode=install install lib-$(1)/libzeep-$(1).la $(libdir);
++	rm $(libdir)/libzeep-$(1).so.5.0.0
++	rm $(libdir)/libzeep-$(1).so.5
 +
- lib-$(1): $(OUTPUT_DIR)
- 
  endef
-@@ -121,7 +129,17 @@
- endif
  
- .PHONY: all	
--all: libraries test examples
-+all: libraries
-+
-+.PHONY: install-libs
-+install-libs: $(ZEEP_LIBS:%=install-%-lib)
-+
-+.PHONY: install-dev
-+install-dev: $(ZEEP_LIBS:%=install-%-dev)
-+
-+.PHONY: install-doc
-+install-doc: doc
-+	cd doc; for f in `find html -type f`; do install -D $$f $(docdir)/libzeep-doc/$$f; done
+ $(foreach part,$(ZEEP_LIB_PARTS),$(eval $(call ZEEPLIB_template,$(part))))
+@@ -140,11 +153,6 @@
+ install-doc: doc
+ 	cd doc; for d in `find html -type d`; do install -d $(docdir)/libzeep-doc/$$d; done
+ 	cd doc; for f in `find html -type f`; do install $$f $(docdir)/libzeep-doc/$$f; done
+-	mkdir $(DIST_NAME)
+-	git archive master | tar -x -C $(DIST_NAME)
+-	cd $(DIST_NAME); tar cvf ../examples.tgz examples/
+-	install examples.tgz $(docdir)/libzeep-doc/examples.tgz
+-	rm -rf $(DIST_NAME) examples.tgz
  
- .PHONY: install-libs
- install-libs: $(ZEEP_LIBS:%=install-%-lib)
+ .PHONY: install
+ install: install-libs install-dev
 --- a/lib-http/GNUmakefile.in
 +++ b/lib-http/GNUmakefile.in
 @@ -14,7 +14,7 @@
@@ -58,25 +62,82 @@ Last-Update: Thu, 10 Sep 2020 08:55:19 +0200
  exec_prefix			= @exec_prefix@
  libdir				= @libdir@
  includedir			= @includedir@
+@@ -131,12 +131,10 @@
+ -include $(OBJECTS:%.lo=%.d)
+ 
+ $(OBJDIR)/%.lo: %.cpp | $(OBJDIR)
+-	@ echo ">>" $<
+-	@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
++	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
+ 
+ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
+-	@ echo ">>" $<
+-	@ $(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
+ 
+ .PHONY: clean
+ clean:
+@@ -162,8 +160,7 @@
+ endif
+ 
+ test/$(1)-test: lib $$($(1)_OBJECTS)
+-	@ echo ">>> building $(1)-test"
+-	@ $(CXX) -o $$@ $$($(1)_OBJECTS) $$(CFLAGS) $$(CXXFLAGS) $(LDFLAGS) -L../lib $(ZEEP_LIBS:%=-lzeep-%) $(BOOST_LIBS:%=-lboost_%) $(LIBS)
++	$(CXX) -o $$@ $$($(1)_OBJECTS) $$(CFLAGS) $$(CXXFLAGS) $(LDFLAGS) -L../lib $(ZEEP_LIBS:%=-lzeep-%) $(BOOST_LIBS:%=-lboost_%) $(LIBS)
+ 
+ .PHONY: $(1)-test
+ $(1)-test: test/$(1)-test
 --- a/lib-json/GNUmakefile.in
 +++ b/lib-json/GNUmakefile.in
-@@ -15,7 +15,7 @@
- LDFLAGS				= @LDFLAGS@ @LIBS@ @BOOST_LDFLAGS@
- LIBS				= @BOOST_DATE_TIME_LIB@ @LIBS@
+@@ -92,12 +92,10 @@
+ -include $(OBJECTS:%.lo=%.d)
  
--prefix				= @prefix@
-+prefix				= $(DESTDIR)@prefix@
- exec_prefix			= @exec_prefix@
- libdir				= @libdir@
- includedir			= @includedir@
+ $(OBJDIR)/%.lo: %.cpp | $(OBJDIR)
+-	@ echo ">>" $<
+-	@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
++	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
+ 
+ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
+-	@ echo ">>" $<
+-	@ $(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
+ 
+ .PHONY: clean
+ clean:
+@@ -115,8 +113,7 @@
+ $(1)_OBJECTS = $$(OBJDIR)/$(1)-test.o
+ 
+ test/$(1)-test: lib $$($(1)_OBJECTS)
+-	@ echo ">>> building $(1)-test"
+-	@ $(CXX) -o $$@ $$($(1)_OBJECTS) $$(CFLAGS) $$(CXXFLAGS) $(LDFLAGS) -L../lib $(ZEEP_LIBS:%=-lzeep-%) $(BOOST_LIBS:%=-lboost_%) $(LIBS)
++	$(CXX) -o $$@ $$($(1)_OBJECTS) $$(CFLAGS) $$(CXXFLAGS) $(LDFLAGS) -L../lib $(ZEEP_LIBS:%=-lzeep-%) $(BOOST_LIBS:%=-lboost_%) $(LIBS)
+ 
+ .PHONY: $(1)-test
+ $(1)-test: test/$(1)-test
 --- a/lib-xml/GNUmakefile.in
 +++ b/lib-xml/GNUmakefile.in
-@@ -14,7 +14,7 @@
- LDFLAGS				= @LDFLAGS@ @LIBS@ @BOOST_LDFLAGS@
- LIBS				= @LIBS@
+@@ -98,12 +98,10 @@
+ -include $(OBJECTS:%.lo=%.d)
  
--prefix				= @prefix@
-+prefix				= $(DESTDIR)@prefix@
- exec_prefix			= @exec_prefix@
- libdir				= @libdir@
- includedir			= @includedir@
+ $(OBJDIR)/%.lo: %.cpp | $(OBJDIR)
+-	@ echo ">>" $<
+-	@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
++	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
+ 
+ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
+-	@ echo ">>" $<
+-	@ $(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
++	$(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $(OBJDIR)/$*.d -c -o $@ $<
+ 
+ .PHONY: clean
+ clean:
+@@ -133,8 +131,7 @@
+ $(1)_OBJECTS = $$(OBJDIR)/$(1)-test.o
+ 
+ test/$(1)-test: lib $$($(1)_OBJECTS)
+-	@ echo ">>> building $(1)-test"
+-	@ $(CXX) -o $$@ $$($(1)_OBJECTS) $$(CFLAGS) $$(CXXFLAGS) $(LDFLAGS) -L../lib $(ZEEP_LIBS:%=-lzeep-%) $(BOOST_LIBS:%=-lboost_%) $(LIBS)
++	$(CXX) -o $$@ $$($(1)_OBJECTS) $$(CFLAGS) $$(CXXFLAGS) $(LDFLAGS) -L../lib $(ZEEP_LIBS:%=-lzeep-%) $(BOOST_LIBS:%=-lboost_%) $(LIBS)
+ 
+ .PHONY: $(1)-test
+ $(1)-test: test/$(1)-test


=====================================
debian/patches/series
=====================================
@@ -1,2 +1 @@
 install-targets
-docs-patch


=====================================
debian/rules
=====================================
@@ -7,25 +7,22 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 LC_ALL := C.UTF-8
 export LC_ALL
 
-export LIBRARY_VERSION=5.0
-
 %:
 	dh $@
 
 override_dh_auto_configure:
-	dh_auto_configure -- --enable-documentation
+	dh_auto_configure -- --enable-shared --disable-documentation
 
 override_dh_auto_install:
-	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep5.0 install-libs
+	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep-json5 install-json-so
+	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep-http5 install-http-so
+	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep-xml5 install-xml-so
+	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep-dev install-json-dev
+	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep-dev install-http-dev
+	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep-dev install-xml-dev
 	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep-dev install-dev
 	$(MAKE) DESTDIR=$(CURDIR)/debian/libzeep-doc install-doc
 
-override_dh_auto_configure-arch:
-	dh_auto_configure -- --enable-shared --disable-documentation
-
-override_dh_auto_configure-indep:
-	dh_auto_configure -- --enable-shared
-
 override_dh_auto_build-indep:
 	cd $(CURDIR)/doc/ && bjam
 	find -type f -iname "*.md5" -delete
@@ -39,6 +36,3 @@ override_dh_install:
 	## cleaning up dependency_libs filed in *.la files
 	sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
 	dh_install
-
-override_dh_makeshlibs:
-	dh_makeshlibs -- -v$(LIBRARY_VERSION)


=====================================
debian/test/control
=====================================
@@ -0,0 +1,3 @@
+Tests: run-build-test
+Depends: @
+Restrictions: allow-stderr


=====================================
debian/test/run-build-test
=====================================
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+set -x
+
+pkg="libzeep-doc"
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+tar -x /usr/share/doc/${pkg}/examples.tgz -C $AUTOPKGTEST_TMP
+
+cd $AUTOPKGTEST_TMP
+
+make


=====================================
doc/Jamfile.v2
=====================================
@@ -1,3 +1,16 @@
+using boostbook
+  : /usr/share/xml/docbook/stylesheet/docbook-xsl/
+  : /usr/share/xml/docbook/schema/dtd/4.2/
+  : /usr/share/boostbook
+  ;
+
+using xsltproc : /usr/bin/xsltproc ;
+
+using doxygen : /usr/bin/doxygen ;
+
+using fop : /usr/bin/fop ;
+
+using quickbook : /usr/bin/quickbook ;
 
 doxygen autodoc
     :


=====================================
examples/GNUmakefile.in → examples/GNUmakefile
=====================================
@@ -5,49 +5,16 @@
 # Distributed under the Boost Software License, Version 1.0.
 #    (See accompanying file LICENSE_1_0.txt or copy at
 #          http://www.boost.org/LICENSE_1_0.txt)
+#
+# This makefile assumes you already installed libzeep
 
 .PHONY: firstTarget
 firstTarget: all
 
-CXX					= @CXX@
-CXXFLAGS			= @CXXFLAGS@ @BOOST_CPPFLAGS@
-LDFLAGS				= @LDFLAGS@ @BOOST_LDFLAGS@
-LIBS				= @LIBS@
-
-prefix				= @prefix@
-exec_prefix			= @exec_prefix@
-libdir				= @libdir@
-includedir			= @includedir@
-
-ifneq "$(CHECK_CONFIG)" ""
-
-GNUmakefile: ../config.status GNUmakefile.in
-	cd ..; $(SHELL) ./config.status
-
-../config.status: ../configure
-	cd ..; $(SHELL) ./config.status --recheck
-
-../configure: ../configure.ac
-	cd ..; autoconf
-
-endif
-
 # main build variables
-CXXFLAGS            += -I. -pthread -I ../include/
+CXXFLAGS            += -pthread -std=c++17
 WARNINGS            += all no-multichar
 
-# Use the DEBUG flag to build debug versions of the code
-DEBUG               = @DEBUG@
-
-# resource support?
-MRC					= @MRC@
-ifneq "x$(MRC)" "x"
-USE_RSRC			= 1
-DEFINES				+= USE_RSRC
-else
-USE_RSRC			= 0
-endif
-
 ifeq "$(DEBUG)" "1"
 DEFINES				+= DEBUG
 CXXFLAGS            += -g -O0
@@ -57,10 +24,6 @@ CXXFLAGS			+= -O3
 DEFINES				+= NDEBUG
 endif
 
-# targets
-
-VPATH += src:test
-
 CXXFLAGS			+= $(DEFINES:%=-D%)
 CXXFLAGS			+= $(WARNINGS:%=-W%)
 
@@ -69,6 +32,11 @@ ifeq "$(DEBUG)" "1"
 	OBJDIR	:= $(OBJDIR).dbg
 endif
 
+ifeq "$(STAGE)" "1"
+CXXFLAGS			+= -I ../include
+LDFLAGS				+= -L ../lib
+endif
+
 BINDIR = bin
 
 $(OBJDIR) $(BINDIR):
@@ -78,12 +46,9 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
 	@ echo "cc>" $<
 	@ $(CXX) -MD -c -o $@ $< $(CFLAGS) $(CXXFLAGS)
 
-$(OBJDIR)/dummy_rsrc.o:
-	$(MRC) -o $@ test.xml
-
 .PHONY: clean
 clean:
-	rm -rf $(OBJDIR)/* $(EXAMPLES)
+	rm -rf $(OBJDIR)/* $(EXAMPLES:%=$(BINDIR)/%)
 
 ZEEP_LIBS = http xml json
 BOOST_LIBS = system
@@ -94,13 +59,9 @@ define EXAMPLE_template =
 
 $(1)_OBJECTS = $$(OBJDIR)/$(1).o
 
-ifneq ($$(USE_RSRC),0)
-$(1)_OBJECTS += $$(OBJDIR)/dummy_rsrc.o
-endif
-
 $(BINDIR)/$(1): $$($(1)_OBJECTS) | $(BINDIR)
 	@ echo "ld> $(1)"
-	@ $(CXX) -o $$@ $$($(1)_OBJECTS) $$(CFLAGS) $$(CXXFLAGS) $(LDFLAGS) -L../lib $(ZEEP_LIBS:%=-lzeep-%) $(BOOST_LIBS:%=-lboost_%) $(LIBS)
+	@ $(CXX) -o $$@ $$($(1)_OBJECTS) $$(CFLAGS) $$(CXXFLAGS) $(LDFLAGS) $(ZEEP_LIBS:%=-lzeep-%) $(BOOST_LIBS:%=-lboost_%) $(LIBS)
 
 endef
 


=====================================
lib-http/GNUmakefile.in
=====================================
@@ -21,6 +21,7 @@ includedir			= @includedir@
 pkgconfigdir		= $(libdir)/pkgconfig
 
 LIB_NAME			= @PACKAGE_NAME at -http
+LIB_VERSION			= @LZ_LT_VERSION@
 LIB_TARGET			= $(LIB_NAME).la
 STAGE_DIR			= @abs_top_builddir@/lib
 
@@ -37,14 +38,17 @@ GNUmakefile: ../config.status GNUmakefile.in
 
 endif
 
+$(LIB_NAME).pc: $(LIB_NAME).pc.in GNUmakefile
+	cd ..; $(SHELL) ./config.status lib-http/$(LIB_NAME).pc
+
 # libtool stuff
 
 LIBTOOL = $(SHELL) @abs_top_builddir@/libtool
 CXXCOMPILE = $(LIBTOOL) --silent --tag=CXX --mode=compile $(CXX) $(CXXFLAGS)
-CXXLINK = $(LIBTOOL) --silent --tag=CXX --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --silent --tag=CXX --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -version-info $(LIB_VERSION) -o $@
 
 # main build variables
-CXXFLAGS            += -I. -pthread -I ../include/
+CXXFLAGS            += -I. -I ../include/
 WARNINGS            += all no-multichar
 
 # Use the DEBUG flag to build debug versions of the code
@@ -117,54 +121,12 @@ src/mrsrc.h:
 
 endif
 
-HEADERS = \
-	zeep/value-serializer.hpp \
-	zeep/streambuf.hpp \
-	zeep/crypto.hpp \
-	zeep/config.hpp \
-	zeep/exception.hpp \
-	zeep/unicode-support.hpp \
-	zeep/type-traits.hpp \
-	zeep/http/message-parser.hpp \
-	zeep/http/daemon.hpp \
-	zeep/http/rest-controller.hpp \
-	zeep/http/header.hpp \
-	zeep/http/preforked-server.hpp \
-	zeep/http/connection.hpp \
-	zeep/http/reply.hpp \
-	zeep/http/request.hpp \
-	zeep/http/soap-controller.hpp \
-	zeep/http/error-handler.hpp \
-	zeep/http/html-controller.hpp \
-	zeep/http/tag-processor.hpp \
-	zeep/http/template-processor.hpp \
-	zeep/http/controller.hpp \
-	zeep/http/login-controller.hpp \
-	zeep/http/security.hpp \
-	zeep/http/server.hpp \
-	zeep/http/el-processing.hpp
-
 $(LIB_TARGET): $(OBJECTS)
 	$(CXXLINK) -rpath $(libdir) $(OBJECTS) $(LIBS)
 	$(LIBTOOL) --mode=install cp $@ $(STAGE_DIR)
 
 .PHONY: lib
-lib: $(LIB_TARGET)
-
-.PHONY: install-lib
-install-lib: lib
-	install -d $(libdir)
-	$(LIBTOOL) --mode=install install $(LIB_TARGET) $(libdir)
-
-.PHONY: install-dev
-install-dev:
-	install -d $(includedir)/zeep/http
-	for f in $(HEADERS); do install ../include/$$f $(includedir)/$$f; done
-	install -d $(pkgconfigdir)
-	install -m 644 $(LIB_NAME).pc $(pkgconfigdir)/$(LIB_NAME).pc
-
-.PHONY: install
-install: install-lib install-dev
+lib: $(LIB_TARGET) $(LIB_NAME).pc
 
 -include $(OBJECTS:%.lo=%.d)
 
@@ -178,7 +140,7 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
 
 .PHONY: clean
 clean:
-	rm -rf $(OBJDIR)/* $(LIB_TARGET) ../$(LIB_NAME)* ../.libs/$(LIB_NAME)* ../lib/$(LIB_NAME)* $(LIB_NAME).pc
+	rm -rf $(OBJDIR)/* $(LIB_TARGET) .libs ../lib/$(LIB_NAME)* $(LIB_NAME).pc
 
 $(OBJDIR)/test_rsrc.o: test/fragment-file.xhtml src/mrsrc.h
 	$(MRC) -o $@ $<
@@ -205,7 +167,7 @@ test/$(1)-test: lib $$($(1)_OBJECTS)
 
 .PHONY: $(1)-test
 $(1)-test: test/$(1)-test
-	cd test; ./$(1)-test $$($(1)_PARAMS)
+	cd test; LD_LIBRARY_PATH=$(STAGE_DIR) ./$(1)-test $$($(1)_PARAMS)
 
 endef
 


=====================================
lib-http/src/controller-rsrc.cpp
=====================================
@@ -9,11 +9,415 @@
 #include <zeep/streambuf.hpp>
 #include <zeep/http/template-processor.hpp>
 
-#include "mrsrc.h"
-
 namespace ba = boost::algorithm;
 namespace fs = std::filesystem;
 
+// --------------------------------------------------------------------
+// We have a special, private version of mrsrc here. To be able to create
+// shared libraries and still be able to link when there's no mrc used.
+
+namespace mrsrc
+{
+	/// \brief Internal data structure as generated by mrc
+	struct rsrc_imp
+	{
+		unsigned int m_next;
+		unsigned int m_child;
+		unsigned int m_name;
+		unsigned int m_size;
+		unsigned int m_data;
+	};
+}
+
+extern const __attribute__((weak)) mrsrc::rsrc_imp gResourceIndex[];
+extern const __attribute__((weak)) char gResourceData[];
+extern const __attribute__((weak)) char gResourceName[];
+
+namespace mrsrc
+{
+	class rsrc_data
+	{
+	  public:
+		static rsrc_data& instance()
+		{
+			static rsrc_data s_instance;
+			return s_instance;
+		}
+
+		const rsrc_imp* index() const		{ return m_index; }
+
+		const char* data(unsigned int offset) const
+		{
+			return m_data + offset;
+		}
+		
+		const char* name(unsigned int offset) const
+		{
+			return m_name + offset;
+		}
+
+	  private:
+
+		rsrc_data()
+		{
+			if (gResourceIndex and gResourceIndex and gResourceName)
+			{
+				m_index = gResourceIndex;
+				m_data = gResourceData;
+				m_name = gResourceName;
+			}
+		}
+
+		rsrc_imp m_dummy = {};
+		const rsrc_imp* m_index = &m_dummy;
+		const char* m_data = "";
+		const char* m_name = "";
+	};
+
+	/// \brief Class mrsrc::rsrc contains a pointer to the data in the
+	/// resource, as well as offering an iterator interface to its
+	/// children.
+
+	class rsrc
+	{
+	  public:
+
+		rsrc() : m_impl(rsrc_data::instance().index()) {}
+
+		rsrc(const rsrc& other)
+			: m_impl(other.m_impl) {}
+
+		rsrc& operator=(const rsrc& other)
+		{
+			m_impl = other.m_impl;
+			return *this;
+		}
+
+		rsrc(std::filesystem::path path);
+
+		std::string name() const { return rsrc_data::instance().name(m_impl->m_name); }
+
+		const char* data() const { return rsrc_data::instance().data(m_impl->m_data); }
+
+		unsigned long size() const { return m_impl->m_size; }
+
+		explicit operator bool() const { return m_impl != NULL and m_impl->m_size > 0; }
+
+		template<typename RSRC>
+		class iterator_t
+		{
+		  public:
+
+			using iterator_category = std::input_iterator_tag;
+			using value_type = RSRC;
+			using difference_type = std::ptrdiff_t;
+			using pointer = value_type*;
+			using reference = value_type&;
+
+			iterator_t(const rsrc_imp* cur)
+				: m_cur(cur) {}
+
+			iterator_t(const iterator_t& i)
+				: m_cur(i.m_cur)
+			{
+			}
+	
+			iterator_t& operator=(const iterator_t& i)
+			{
+				m_cur = i.m_cur;
+				return *this;
+			}
+
+			reference operator*()		{ return m_cur; }
+			pointer operator->()		{ return& m_cur; }
+
+			iterator_t& operator++()
+			{
+				if (m_cur.m_impl->m_next)
+					m_cur.m_impl = rsrc_data::instance().index() + m_cur.m_impl->m_next;
+				else
+					m_cur.m_impl = nullptr;
+				return *this;
+			}
+
+			iterator_t operator++(int)
+			{
+				auto tmp(*this);
+				this->operator++();
+				return tmp;
+			}
+
+			bool operator==(const iterator_t& rhs) const		{ return m_cur.m_impl == rhs.m_cur.m_impl; }
+			bool operator!=(const iterator_t& rhs) const		{ return m_cur.m_impl != rhs.m_cur.m_impl; }
+
+		  private:
+			value_type	m_cur;
+		};
+
+		using iterator = iterator_t<rsrc>;
+
+		iterator begin() const
+		{
+			const rsrc_imp* impl = nullptr;
+			if (m_impl and m_impl->m_child)
+				impl = rsrc_data::instance().index() + m_impl->m_child;
+			return iterator(impl);
+		}
+
+		iterator end() const
+		{
+			return iterator(nullptr);
+		}
+
+	  private:
+		rsrc(const rsrc_imp* imp)
+			: m_impl(imp) {}
+
+		const rsrc_imp *m_impl;
+	};
+
+	inline rsrc::rsrc(std::filesystem::path p)
+	{
+		m_impl = rsrc_data::instance().index();
+
+		// using std::filesytem::path would have been natural here of course....
+		
+		auto pb = p.begin();
+		auto pe = p.end();
+
+		while (m_impl != nullptr and pb != pe)
+		{
+			auto name = *pb++;
+
+			const rsrc_imp* impl = nullptr;
+			for (rsrc child: *this)
+			{
+				if (child.name() == name)
+				{
+					impl = child.m_impl;
+					break;
+				}
+			}
+
+			m_impl = impl;
+		}
+
+		if (pb != pe)	// not found
+			m_impl = nullptr;
+	}
+
+	// --------------------------------------------------------------------
+	
+	template<typename CharT, typename Traits>
+	class basic_streambuf : public std::basic_streambuf<CharT, Traits>
+	{
+	  public:
+
+		typedef CharT								char_type;
+		typedef Traits								traits_type;
+		typedef typename traits_type::int_type		int_type;
+		typedef typename traits_type::pos_type		pos_type;
+		typedef typename traits_type::off_type		off_type;
+
+		/// \brief constructor taking a \a path to the resource in memory
+		basic_streambuf(const std::string& path)
+			: m_rsrc(path)
+		{
+			init();
+		}
+
+		/// \brief constructor taking a \a rsrc 
+		basic_streambuf(const rsrc& rsrc)
+			: m_rsrc(rsrc)
+		{
+			init();
+		}
+
+		basic_streambuf(const basic_streambuf&) = delete;
+
+		basic_streambuf(basic_streambuf&& rhs)
+			: basic_streambuf(rhs.m_rsrc)
+		{
+		}
+
+		basic_streambuf& operator=(const basic_streambuf&) = delete;
+
+		basic_streambuf& operator=(basic_streambuf&& rhs)
+		{
+			swap(rhs);
+			return *this;
+		}
+
+		void swap(basic_streambuf& rhs)
+		{
+			std::swap(m_begin, rhs.m_begin);
+			std::swap(m_end, rhs.m_end);
+			std::swap(m_current, rhs.m_current);
+		}
+
+	  private:
+
+		void init()
+		{
+			m_begin = reinterpret_cast<const char_type*>(m_rsrc.data());
+			m_end = reinterpret_cast<const char_type*>(m_rsrc.data() + m_rsrc.size());
+			m_current = m_begin;
+		}
+
+		int_type underflow()
+		{
+			if (m_current == m_end)
+				return traits_type::eof();
+
+			return traits_type::to_int_type(*m_current);
+		}
+
+		int_type uflow()
+		{
+			if (m_current == m_end)
+				return traits_type::eof();
+
+			return traits_type::to_int_type(*m_current++);
+		}
+
+		int_type pbackfail(int_type ch)
+		{
+			if (m_current == m_begin or (ch != traits_type::eof() and ch != m_current[-1]))
+				return traits_type::eof();
+
+			return traits_type::to_int_type(*--m_current);
+		}
+
+		std::streamsize showmanyc()
+		{
+			assert(std::less_equal<const char*>()(m_current, m_end));
+			return m_end - m_current;
+		}
+
+		pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which)
+		{
+			switch (dir)
+			{
+				case std::ios_base::beg:
+					m_current = m_begin + off;
+					break;
+
+				case std::ios_base::end:
+					m_current = m_end + off;
+					break;
+
+				case std::ios_base::cur:
+					m_current += off;
+					break;
+				
+				default:
+					break;
+			}
+
+			if (m_current < m_begin)
+				m_current = m_begin;
+			
+			if (m_current > m_end)
+				m_current = m_end;
+
+			return m_current - m_begin;
+		}
+
+		pos_type seekpos(pos_type pos, std::ios_base::openmode which)
+		{
+			m_current = m_begin + pos;
+
+			if (m_current < m_begin)
+				m_current = m_begin;
+			
+			if (m_current > m_end)
+				m_current = m_end;
+
+			return m_current - m_begin;
+		}
+
+	  private:
+		rsrc m_rsrc;
+		const char_type* m_begin;
+		const char_type* m_end;
+		const char_type* m_current;
+	};
+
+	using streambuf = basic_streambuf<char, std::char_traits<char>>;
+
+	// --------------------------------------------------------------------
+	// class mrsrc::istream
+
+	template<typename CharT, typename Traits>
+	class basic_istream : public std::basic_istream<CharT, Traits>
+	{
+	  public:
+		typedef CharT	 						char_type;
+		typedef Traits	 						traits_type;
+		typedef typename traits_type::int_type	int_type;
+		typedef typename traits_type::pos_type	pos_type;
+		typedef typename traits_type::off_type	off_type;
+
+	  private:
+
+		using __streambuf_type = basic_streambuf<CharT, Traits>;
+		using __istream_type = std::basic_istream<CharT, Traits>;
+
+		__streambuf_type m_buffer;
+	
+	  public:
+
+		basic_istream(const std::string& path)
+			: __istream_type(&m_buffer)
+			, m_buffer(path)
+		{
+			this->init(&m_buffer);
+		}
+		
+		basic_istream(rsrc& resource)
+			: __istream_type(&m_buffer)
+			, m_buffer(resource)\
+		{
+			this->init(&m_buffer);
+		}
+		
+		basic_istream(const basic_istream&) = delete;
+
+		basic_istream(basic_istream&& rhs)
+			: __istream_type(std::move(rhs))
+			, m_buffer(std::move(rhs.m_buffer))
+		{
+			__istream_type::set_rdbuf(&m_buffer);
+		}
+
+		basic_istream& operator=(const basic_istream& ) = delete;
+
+		basic_istream& operator=(basic_istream&& rhs)
+		{
+			__istream_type::operator=(std::move(rhs));
+			m_buffer = std::move(rhs.m_buffer);
+			return *this;
+		}
+
+		void swap(basic_istream& rhs)
+		{
+			__istream_type::swap(rhs);
+			m_buffer.swap(rhs.m_buffer);
+		}
+
+		__streambuf_type* rdbuf() const
+		{
+			return const_cast<__streambuf_type*>(&m_buffer);
+		}
+	};
+
+	using istream = basic_istream<char, std::char_traits<char>>;
+}
+
+
+
+// --------------------------------------------------------------------
+
 namespace zeep::http
 {
 


=====================================
lib-json/GNUmakefile.in
=====================================
@@ -6,7 +6,6 @@
 #    (See accompanying file LICENSE_1_0.txt or copy at
 #          http://www.boost.org/LICENSE_1_0.txt)
 
-
 .PHONY: firstTarget
 firstTarget: lib
 
@@ -22,6 +21,7 @@ includedir			= @includedir@
 pkgconfigdir		= $(libdir)/pkgconfig
 
 LIB_NAME			= @PACKAGE_NAME at -json
+LIB_VERSION			= @LZ_LT_VERSION@
 LIB_TARGET			= $(LIB_NAME).la
 STAGE_DIR			= @abs_top_builddir@/lib
 
@@ -38,14 +38,17 @@ GNUmakefile: ../config.status GNUmakefile.in
 
 endif
 
+$(LIB_NAME).pc: $(LIB_NAME).pc.in GNUmakefile
+	cd ..; $(SHELL) ./config.status lib-json/$(LIB_NAME).pc
+
 # libtool stuff
 
 LIBTOOL = $(SHELL) @abs_top_builddir@/libtool
 CXXCOMPILE = $(LIBTOOL) --silent --tag=CXX --mode=compile $(CXX) $(CXXFLAGS)
-CXXLINK = $(LIBTOOL) --silent --tag=CXX --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --silent --tag=CXX --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -version-info $(LIB_VERSION) -o $@
 
 # main build variables
-CXXFLAGS            += -I. -pthread -I ../include/
+CXXFLAGS            += -I. -I ../include/
 WARNINGS            += all no-multichar
 
 # Use the DEBUG flag to build debug versions of the code
@@ -79,44 +82,12 @@ OBJECTS = \
 	$(OBJDIR)/element.lo \
 	$(OBJDIR)/parser.lo
 
-HEADERS = \
-	zeep/value-serializer.hpp \
-	zeep/config.hpp \
-	zeep/exception.hpp \
-	zeep/nvp.hpp \
-	zeep/unicode-support.hpp \
-	zeep/type-traits.hpp \
-	zeep/json/factory.hpp \
-	zeep/json/iterator.hpp \
-	zeep/json/element.hpp \
-	zeep/json/serializer.hpp \
-	zeep/json/to_element.hpp \
-	zeep/json/from_element.hpp \
-	zeep/json/parser.hpp \
-	zeep/json/type_traits.hpp \
-	zeep/json/element_fwd.hpp
-
 $(LIB_TARGET): $(OBJECTS)
 	$(CXXLINK) -rpath $(libdir) $(OBJECTS) $(LIBS)
 	$(LIBTOOL) --mode=install cp $@ $(STAGE_DIR)
 
 .PHONY: lib
-lib: $(LIB_TARGET)
-
-.PHONY: install-lib
-install-lib: lib
-	install -d $(libdir)
-	$(LIBTOOL) --mode=install install $(LIB_TARGET) $(libdir)
-
-.PHONY: install-dev
-install-dev:
-	install -d $(includedir)/zeep/json
-	for f in $(HEADERS); do install ../include/$$f $(includedir)/$$f; done
-	install -d $(pkgconfigdir)
-	install -m 644 $(LIB_NAME).pc $(pkgconfigdir)/$(LIB_NAME).pc
-
-.PHONY: install
-install: install-lib install-dev
+lib: $(LIB_TARGET) $(LIB_NAME).pc
 
 -include $(OBJECTS:%.lo=%.d)
 
@@ -130,7 +101,7 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
 
 .PHONY: clean
 clean:
-	rm -rf $(OBJDIR)/* $(LIB_TARGET) ../$(LIB_NAME)* ../.libs/$(LIB_NAME)* ../lib/$(LIB_NAME)* $(LIB_NAME).pc
+	rm -rf $(OBJDIR)/* $(LIB_TARGET) .libs ../lib/$(LIB_NAME)* $(LIB_NAME).pc
 
 json_PARAMS = 
 
@@ -149,7 +120,7 @@ test/$(1)-test: lib $$($(1)_OBJECTS)
 
 .PHONY: $(1)-test
 $(1)-test: test/$(1)-test
-	cd test; ./$(1)-test $$($(1)_PARAMS)
+	cd test; LD_LIBRARY_PATH=$(STAGE_DIR) ./$(1)-test $$($(1)_PARAMS)
 
 endef
 


=====================================
lib-json/src/parser.cpp
=====================================
@@ -585,7 +585,7 @@ void json_parser::parse_value(json::element& e)
 			break;
 		
 		default:
-			throw std::runtime_error("Syntax eror in json, unexpected token " + describe_token(m_lookahead));
+			throw std::runtime_error("Syntax error in json, unexpected token " + describe_token(m_lookahead));
 	}
 }
 


=====================================
lib-xml/GNUmakefile.in
=====================================
@@ -21,6 +21,7 @@ includedir			= @includedir@
 pkgconfigdir		= $(libdir)/pkgconfig
 
 LIB_NAME			= @PACKAGE_NAME at -xml
+LIB_VERSION			= @LZ_LT_VERSION@
 LIB_TARGET			= $(LIB_NAME).la
 STAGE_DIR			= @abs_top_builddir@/lib
 
@@ -37,14 +38,19 @@ GNUmakefile: ../config.status GNUmakefile.in
 
 endif
 
+
+$(LIB_NAME).pc: $(LIB_NAME).pc.in GNUmakefile
+	cd ..; $(SHELL) ./config.status lib-xml/$(LIB_NAME).pc
+
 # libtool stuff
 
 LIBTOOL = $(SHELL) @abs_top_builddir@/libtool
 CXXCOMPILE = $(LIBTOOL) --silent --tag=CXX --mode=compile $(CXX) $(CXXFLAGS)
-CXXLINK = $(LIBTOOL) --silent --tag=CXX --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --silent --tag=CXX --mode=link $(CXX) $(CXXFLAGS) $(LDFLAGS) -version-info $(LIB_VERSION) -o $@
+LT_EXEC = $(LIBTOOL) --silent --mode=execute
 
 # main build variables
-CXXFLAGS            += -I. -pthread -I ../include/
+CXXFLAGS            += -I. -I ../include/
 WARNINGS            += all no-multichar
 
 # Use the DEBUG flag to build debug versions of the code
@@ -82,43 +88,12 @@ OBJECTS = \
 	$(OBJDIR)/parser.lo \
 	$(OBJDIR)/xpath.lo
 
-HEADERS = \
-	zeep/config.hpp \
-	zeep/value-serializer.hpp \
-	zeep/streambuf.hpp \
-	zeep/exception.hpp \
-	zeep/nvp.hpp \
-	zeep/unicode-support.hpp \
-	zeep/type-traits.hpp \
-	zeep/xml/serialize.hpp \
-	zeep/xml/xpath.hpp \
-	zeep/xml/character-classification.hpp \
-	zeep/xml/doctype.hpp \
-	zeep/xml/node.hpp \
-	zeep/xml/document.hpp \
-	zeep/xml/parser.hpp
-
 $(LIB_TARGET): $(OBJECTS)
 	$(CXXLINK) -rpath $(libdir) $(OBJECTS) $(LIBS)
 	$(LIBTOOL) --mode=install cp $@ $(STAGE_DIR)
 
 .PHONY: lib
-lib: $(LIB_TARGET)
-
-.PHONY: install-lib
-install-lib: lib
-	install -d $(libdir)
-	$(LIBTOOL) --mode=install install $(LIB_TARGET) $(libdir)
-
-.PHONY: install-dev
-install-dev:
-	install -d $(includedir)/zeep/xml
-	for f in $(HEADERS); do install ../include/$$f $(includedir)/$$f; done
-	install -d $(pkgconfigdir)
-	install -m 644 $(LIB_NAME).pc $(pkgconfigdir)/$(LIB_NAME).pc
-
-.PHONY: install
-install: install-lib install-dev
+lib: $(LIB_TARGET) $(LIB_NAME).pc
 
 -include $(OBJECTS:%.lo=%.d)
 
@@ -132,7 +107,7 @@ $(OBJDIR)/%.o: %.cpp | $(OBJDIR)
 
 .PHONY: clean
 clean:
-	rm -rf $(OBJDIR)/* $(LIB_TARGET) ../$(LIB_NAME)* ../.libs/$(LIB_NAME)* ../lib/$(LIB_NAME)* $(LIB_NAME).pc
+	rm -rf $(OBJDIR)/* $(LIB_TARGET) .libs ../lib/$(LIB_NAME)* $(LIB_NAME).pc
 
 QUESTIONABLE_XML_TEST_IDS = \
 	ibm-valid-P28-ibm28v02.xml \
@@ -163,7 +138,7 @@ test/$(1)-test: lib $$($(1)_OBJECTS)
 
 .PHONY: $(1)-test
 $(1)-test: test/$(1)-test
-	cd test; ./$(1)-test $$($(1)_PARAMS)
+	cd test; LD_LIBRARY_PATH=../.libs ./$(1)-test $$($(1)_PARAMS)
 
 endef
 



View it on GitLab: https://salsa.debian.org/med-team/libzeep/-/compare/cd6956555f201e4acdc3f18afa968312cd0f658a...a6848fafbbe054d20e2a835b4cdb5add15d43552

-- 
View it on GitLab: https://salsa.debian.org/med-team/libzeep/-/compare/cd6956555f201e4acdc3f18afa968312cd0f658a...a6848fafbbe054d20e2a835b4cdb5add15d43552
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201112/c91a6965/attachment-0001.html>


More information about the debian-med-commit mailing list