pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libzeep: Make it easy to create SOAP servers



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Fri Nov 2 14:54:19 2018 -0500
Changeset:	a06a5d5ede521851ea43b2839e8beeab8227c75b

Modified Files:
	Makefile
Added Files:
	libzeep/DESCR
	libzeep/Makefile
	libzeep/PLIST
	libzeep/buildlink3.mk
	libzeep/distinfo
	libzeep/patches/patch-makefile
	libzeep/patches/patch-src_preforked-http-server.cpp

Log Message:
libzeep: Make it easy to create SOAP servers

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a06a5d5ede521851ea43b2839e8beeab8227c75b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |   1 +
 libzeep/DESCR                                      |   7 ++
 libzeep/Makefile                                   |  33 ++++++
 libzeep/PLIST                                      |  30 +++++
 libzeep/buildlink3.mk                              |  13 +++
 libzeep/distinfo                                   |   8 ++
 libzeep/patches/patch-makefile                     | 123 +++++++++++++++++++++
 .../patches/patch-src_preforked-http-server.cpp    |  33 ++++++
 8 files changed, 248 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index ab6cc11624..f431629258 100644
--- a/Makefile
+++ b/Makefile
@@ -1941,6 +1941,7 @@ SUBDIR+=	libwbxml2-patched
 SUBDIR+=	libwebsockets
 SUBDIR+=	libxc
 SUBDIR+=	libxdiff
+SUBDIR+=	libzeep
 SUBDIR+=	libzn-poly
 SUBDIR+=	libzrtp
 SUBDIR+=	lidia
diff --git a/libzeep/DESCR b/libzeep/DESCR
new file mode 100644
index 0000000000..e3adbbaa43
--- /dev/null
+++ b/libzeep/DESCR
@@ -0,0 +1,7 @@
+Libzeep was developed to make it easy to create SOAP servers. And since working
+with SOAP means working with XML and no decent C++ XML library existed on my
+radar I've created a full XML library as well.
+The XML part of libzeep consists of a validating parser, a DOM(-like) node
+implementation, an XPath search engine and a XML writer/formatter. The
+validation works based on DOCTYPE definitions, XML schema support will be added
+in a later release.
diff --git a/libzeep/Makefile b/libzeep/Makefile
new file mode 100644
index 0000000000..3fa861ebe5
--- /dev/null
+++ b/libzeep/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD$
+#
+###########################################################
+#                  Generated by fbsd2pkg                  #
+#              Fri Nov  2 14:10:45 CDT 2018               #
+###########################################################
+
+###########################################################
+# Unconverted and partially converted FreeBSD port syntax:
+
+DISTNAME=	libzeep-${PV}
+CATEGORIES=	www
+MASTER_SITES=	${MASTER_SITE_GITHUB:=mhekkel/}
+GITHUB_PROJECT=	libzeep
+GITHUB_TAG=	v${PV}
+
+MAINTAINER=	bacon%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/mhekkel/libzeep
+COMMENT=	Make it easy to create SOAP servers
+LICENSE=	boost-license
+
+USE_LANGUAGES=	c++
+USE_TOOLS+=	gmake
+MAKE_FILE=	makefile
+MAKE_ENV+=	BOOST=${PREFIX}
+BUILD_TARGET=	lib
+CXXFLAGS+=	-Wno-unknown-pragmas
+
+PV=		3.0.3
+
+.include "../../devel/boost-jam/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/libzeep/PLIST b/libzeep/PLIST
new file mode 100644
index 0000000000..fa0b24dbff
--- /dev/null
+++ b/libzeep/PLIST
@@ -0,0 +1,30 @@
+@comment $NetBSD$
+include/zeep/config.hpp
+include/zeep/dispatcher.hpp
+include/zeep/envelope.hpp
+include/zeep/exception.hpp
+include/zeep/http/connection.hpp
+include/zeep/http/header.hpp
+include/zeep/http/md5.hpp
+include/zeep/http/message_parser.hpp
+include/zeep/http/preforked-server.hpp
+include/zeep/http/reply.hpp
+include/zeep/http/request.hpp
+include/zeep/http/request_handler.hpp
+include/zeep/http/server.hpp
+include/zeep/http/webapp.hpp
+include/zeep/http/webapp/el.hpp
+include/zeep/server.hpp
+include/zeep/xml/doctype.hpp
+include/zeep/xml/document.hpp
+include/zeep/xml/node.hpp
+include/zeep/xml/parser.hpp
+include/zeep/xml/serialize.hpp
+include/zeep/xml/unicode_support.hpp
+include/zeep/xml/writer.hpp
+include/zeep/xml/xpath.hpp
+lib/libzeep.a
+lib/libzeep.so
+lib/libzeep.so.3.0
+lib/libzeep.so.${PKGVERSION}
+man/man3/libzeep.3
diff --git a/libzeep/buildlink3.mk b/libzeep/buildlink3.mk
new file mode 100644
index 0000000000..bdc834c200
--- /dev/null
+++ b/libzeep/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	libzeep
+
+.if !defined(LIBZEEP_BUILDLINK3_MK)
+LIBZEEP_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libzeep+=	libzeep>=3.0.3
+BUILDLINK_PKGSRCDIR.libzeep?=	../../wip/libzeep
+
+.endif	# LIBZEEP_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-libzeep
diff --git a/libzeep/distinfo b/libzeep/distinfo
new file mode 100644
index 0000000000..76a279dbbb
--- /dev/null
+++ b/libzeep/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (libzeep-3.0.3.tar.gz) = 3599984075c29ecdd814c46105f12e10079defc9
+RMD160 (libzeep-3.0.3.tar.gz) = 1e7cdac244280225ec0122996fbc6af874dd6a68
+SHA512 (libzeep-3.0.3.tar.gz) = a544fe2af293323de17f91fe89741a7a14480bcc7c4a351816394e7d2f23d5206dabda69864fe70fb61b4ca58d9ef2033a25da4635871e1d3e08f7391633fd7e
+Size (libzeep-3.0.3.tar.gz) = 973481 bytes
+SHA1 (patch-makefile) = bbad894e78fb91f2bed59179c1ec558faa337f2b
+SHA1 (patch-src_preforked-http-server.cpp) = 4502237331d860ae71d0001f28cc5e6fa3ac3902
diff --git a/libzeep/patches/patch-makefile b/libzeep/patches/patch-makefile
new file mode 100644
index 0000000000..e867a0f3a2
--- /dev/null
+++ b/libzeep/patches/patch-makefile
@@ -0,0 +1,123 @@
+$NetBSD$
+
+# Add destdir support, use CXXFLAGS
+
+--- makefile.orig	2016-01-15 07:56:19.000000000 +0000
++++ makefile
+@@ -18,6 +18,7 @@ LIBDIR              ?= $(PREFIX)/lib
+ INCDIR              ?= $(PREFIX)/include
+ MANDIR              ?= $(PREFIX)/man/man3
+ DOCDIR              ?= $(PREFIX)/share/libzeep
++DESTDIR             ?=
+ 
+ BOOST_LIBS          = system thread filesystem regex math_c99 random
+ BOOST_LIBS          := $(BOOST_LIBS:%=boost_%$(BOOST_LIB_SUFFIX))
+@@ -32,11 +33,11 @@ SO_NAME             = libzeep.so.$(VERSI
+ LIB_NAME            = $(SO_NAME).$(VERSION_MINOR)
+ 
+ CXX                 ?= c++
+-#CFLAGS              += -O2 $(BOOST_INC_DIR:%=-I%) -I. -fPIC -pthread -std=c++11 -stdlib=libc++
+-CFLAGS              += -O2 $(BOOST_INC_DIR:%=-I%) -I. -fPIC -pthread -std=c++11 
+-#CFLAGS             += -g $(BOOST_INC_DIR:%=-I%) -I. -fPIC -pthread -shared # -std=c++0x
+-CFLAGS              += -Wall
+-CFLAGS              += -g
++#CXXFLAGS            += -O2 $(BOOST_INC_DIR:%=-I%) -I. -fPIC -pthread -std=c++11 -stdlib=libc++
++CXXFLAGS            += -O2 $(BOOST_INC_DIR:%=-I%) -I. -fPIC -pthread -std=c++11 
++#CXXFLAGS           += -g $(BOOST_INC_DIR:%=-I%) -I. -fPIC -pthread -shared # -std=c++0x
++CXXFLAGS            += -Wall
++CXXFLAGS            += -g
+ LD                  ?= ld
+ 
+ VPATH += src
+@@ -81,45 +82,42 @@ zeep-test: obj/zeep-test.o libzeep.a
+ 	$(CXX) $(BOOST_INC_DIR:%=-I%) -o $@ -I. $^ $(LDFLAGS) -lboost_date_time -lboost_regex
+ 
+ install-libs: libzeep.so
+-	install -d $(LIBDIR)
+-	install $(LIB_NAME) $(LIBDIR)/$(LIB_NAME)
+-	ln -Tfs $(LIB_NAME) $(LIBDIR)/$(SO_NAME)
+-	strip --strip-unneeded $(LIBDIR)/$(LIB_NAME)
++	install -d $(DESTDIR)$(LIBDIR)
++	install $(LIB_NAME) $(DESTDIR)$(LIBDIR)/$(LIB_NAME)
++	(cd $(DESTDIR)$(LIBDIR) && ln -fs $(LIB_NAME) $(SO_NAME))
++	strip --strip-unneeded $(DESTDIR)$(LIBDIR)/$(LIB_NAME)
+ 
+ install-dev: doc
+-	install -d $(MANDIR) $(LIBDIR) $(INCDIR)/zeep/xml $(INCDIR)/zeep/http $(INCDIR)/zeep/http/webapp
++	install -d $(DESTDIR)$(MANDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR)/zeep/xml $(DESTDIR)$(INCDIR)/zeep/http $(DESTDIR)$(INCDIR)/zeep/http/webapp
+ 
+-	install zeep/config.hpp $(INCDIR)/zeep/config.hpp
+-	install zeep/dispatcher.hpp $(INCDIR)/zeep/dispatcher.hpp
+-	install zeep/envelope.hpp $(INCDIR)/zeep/envelope.hpp
+-	install zeep/exception.hpp $(INCDIR)/zeep/exception.hpp
+-	install zeep/http/connection.hpp $(INCDIR)/zeep/http/connection.hpp
+-	install zeep/http/header.hpp $(INCDIR)/zeep/http/header.hpp
+-	install zeep/http/md5.hpp $(INCDIR)/zeep/http/md5.hpp
+-	install zeep/http/message_parser.hpp $(INCDIR)/zeep/http/message_parser.hpp
+-	install zeep/http/preforked-server.hpp $(INCDIR)/zeep/http/preforked-server.hpp
+-	install zeep/http/reply.hpp $(INCDIR)/zeep/http/reply.hpp
+-	install zeep/http/request.hpp $(INCDIR)/zeep/http/request.hpp
+-	install zeep/http/request_handler.hpp $(INCDIR)/zeep/http/request_handler.hpp
+-	install zeep/http/server.hpp $(INCDIR)/zeep/http/server.hpp
+-	install zeep/http/webapp.hpp $(INCDIR)/zeep/http/webapp.hpp
+-	install zeep/http/webapp/el.hpp $(INCDIR)/zeep/http/webapp/el.hpp
+-	install zeep/server.hpp $(INCDIR)/zeep/server.hpp
+-	install zeep/xml/doctype.hpp $(INCDIR)/zeep/xml/doctype.hpp
+-	install zeep/xml/document.hpp $(INCDIR)/zeep/xml/document.hpp
+-	install zeep/xml/node.hpp $(INCDIR)/zeep/xml/node.hpp
+-	install zeep/xml/parser.hpp $(INCDIR)/zeep/xml/parser.hpp
+-	install zeep/xml/serialize.hpp $(INCDIR)/zeep/xml/serialize.hpp
+-	install zeep/xml/unicode_support.hpp $(INCDIR)/zeep/xml/unicode_support.hpp
+-	install zeep/xml/writer.hpp $(INCDIR)/zeep/xml/writer.hpp
+-	install zeep/xml/xpath.hpp $(INCDIR)/zeep/xml/xpath.hpp
+-	install doc/libzeep.3 $(MANDIR)/libzeep.3
+-	for d in . images libzeep zeep zeep/http zeep/http/preforked_server_base zeep/http/el \
+-		zeep/http/el/object zeep/xml zeep/xml/doctype zeep/xml/container zeep/xml/element \
+-		index; do install -d $(DOCDIR)/$$d; install doc/html/$$d/*.* $(DOCDIR)/$$d; done;
+-	install ./libzeep.a $(LIBDIR)/libzeep.a
+-	strip -SX $(LIBDIR)/libzeep.a
+-	ln -Tfs $(LIB_NAME) $(LIBDIR)/libzeep.so
++	install zeep/config.hpp $(DESTDIR)$(INCDIR)/zeep/config.hpp
++	install zeep/dispatcher.hpp $(DESTDIR)$(INCDIR)/zeep/dispatcher.hpp
++	install zeep/envelope.hpp $(DESTDIR)$(INCDIR)/zeep/envelope.hpp
++	install zeep/exception.hpp $(DESTDIR)$(INCDIR)/zeep/exception.hpp
++	install zeep/http/connection.hpp $(DESTDIR)$(INCDIR)/zeep/http/connection.hpp
++	install zeep/http/header.hpp $(DESTDIR)$(INCDIR)/zeep/http/header.hpp
++	install zeep/http/md5.hpp $(DESTDIR)$(INCDIR)/zeep/http/md5.hpp
++	install zeep/http/message_parser.hpp $(DESTDIR)$(INCDIR)/zeep/http/message_parser.hpp
++	install zeep/http/preforked-server.hpp $(DESTDIR)$(INCDIR)/zeep/http/preforked-server.hpp
++	install zeep/http/reply.hpp $(DESTDIR)$(INCDIR)/zeep/http/reply.hpp
++	install zeep/http/request.hpp $(DESTDIR)$(INCDIR)/zeep/http/request.hpp
++	install zeep/http/request_handler.hpp $(DESTDIR)$(INCDIR)/zeep/http/request_handler.hpp
++	install zeep/http/server.hpp $(DESTDIR)$(INCDIR)/zeep/http/server.hpp
++	install zeep/http/webapp.hpp $(DESTDIR)$(INCDIR)/zeep/http/webapp.hpp
++	install zeep/http/webapp/el.hpp $(DESTDIR)$(INCDIR)/zeep/http/webapp/el.hpp
++	install zeep/server.hpp $(DESTDIR)$(INCDIR)/zeep/server.hpp
++	install zeep/xml/doctype.hpp $(DESTDIR)$(INCDIR)/zeep/xml/doctype.hpp
++	install zeep/xml/document.hpp $(DESTDIR)$(INCDIR)/zeep/xml/document.hpp
++	install zeep/xml/node.hpp $(DESTDIR)$(INCDIR)/zeep/xml/node.hpp
++	install zeep/xml/parser.hpp $(DESTDIR)$(INCDIR)/zeep/xml/parser.hpp
++	install zeep/xml/serialize.hpp $(DESTDIR)$(INCDIR)/zeep/xml/serialize.hpp
++	install zeep/xml/unicode_support.hpp $(DESTDIR)$(INCDIR)/zeep/xml/unicode_support.hpp
++	install zeep/xml/writer.hpp $(DESTDIR)$(INCDIR)/zeep/xml/writer.hpp
++	install zeep/xml/xpath.hpp $(DESTDIR)$(INCDIR)/zeep/xml/xpath.hpp
++	install doc/libzeep.3 $(DESTDIR)$(MANDIR)/libzeep.3
++	install ./libzeep.a $(DESTDIR)$(LIBDIR)/libzeep.a
++	strip -SX $(DESTDIR)$(LIBDIR)/libzeep.a
++	(cd $(DESTDIR)$(LIBDIR) && ln -fs $(LIB_NAME) libzeep.so)
+ 
+ install: install-libs install-dev
+ 
+@@ -133,10 +131,10 @@ dist: lib
+ 	cp $(DIST_NAME).tgz ../ppa/libzeep_$(VERSION).orig.tar.gz
+ 
+ doc: FORCE
+-	cd doc; bjam
++	# cd doc; bjam
+ 
+ obj/%.o: %.cpp | obj
+-	$(CXX) -MD -c -o $@ $< $(CFLAGS)
++	$(CXX) -MD -c -o $@ $< $(CXXFLAGS)
+ 
+ obj:
+ 	mkdir -p obj
diff --git a/libzeep/patches/patch-src_preforked-http-server.cpp b/libzeep/patches/patch-src_preforked-http-server.cpp
new file mode 100644
index 0000000000..40e08e6c90
--- /dev/null
+++ b/libzeep/patches/patch-src_preforked-http-server.cpp
@@ -0,0 +1,33 @@
+$NetBSD$
+
+# Support latest boost API
+
+--- src/preforked-http-server.cpp.orig	2018-07-24 13:59:15 UTC
++++ src/preforked-http-server.cpp
+@@ -206,7 +206,7 @@ void preforked_server::start()
+ 
+ bool preforked_server::read_socket_from_parent(int fd_socket, boost::asio::ip::tcp::socket& socket)
+ {
+-	typedef boost::asio::ip::tcp::socket::native_type native_type;
++	typedef boost::asio::ip::tcp::socket::native_handle_type native_type;
+ 
+ #if __APPLE__
+ 	// macos is special...
+@@ -270,7 +270,7 @@ bool preforked_server::read_socket_from_
+ 
+ void preforked_server::write_socket_to_worker(int fd_socket, boost::asio::ip::tcp::socket& socket)
+ {
+-	typedef boost::asio::ip::tcp::socket::native_type native_type;
++	typedef boost::asio::ip::tcp::socket::native_handle_type native_type;
+ 	
+ 	struct msghdr msg;
+ 	union {
+@@ -293,7 +293,7 @@ void preforked_server::write_socket_to_w
+ 	*(reinterpret_cast<native_type*>(CMSG_DATA(cmptr))) = socket.native();
+ 	*/
+ 	native_type *fdptr = reinterpret_cast<native_type*>(CMSG_DATA(cmptr));
+-	*fdptr = socket.native();
++	*fdptr = socket.native_handle();
+ 	
+ 	msg.msg_name = nullptr;
+ 	msg.msg_namelen = 0;


Home | Main Index | Thread Index | Old Index