Source: gsoap Version: 2.8.35-3 Tags: patch User: [email protected] Usertags: rebootstrap
gsoap fails to cross build from source. The immediate cause is that the necessary --host flag is not passed to ./configure. If the package was using dh_auto_configure, debhelper would be taking care of this automatically. After adding that flag, gsoap still fails to build, because it runs soapcpp2 and wsdl2h from the source tree. Fixing this issue is more elaborate. A proper cross build will need those binaries for two architectures, so two builds of gsoap are necessary. Furthermore, the binaries from the native build need to be injected into the cross build. The attached patch fixes all of the mentioned issues and makes cross building gsoap succeed. Please consider applying it. Helmut
diff --minimal -Nru gsoap-2.8.35/debian/changelog gsoap-2.8.35/debian/changelog --- gsoap-2.8.35/debian/changelog 2016-10-03 13:20:15.000000000 +0200 +++ gsoap-2.8.35/debian/changelog 2017-01-10 15:27:51.000000000 +0100 @@ -1,3 +1,12 @@ +gsoap (2.8.35-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Pass --build and --host to configure + + Add a native build pass to obtain a build arch soapcpp2 and wsdl2h + + -- Helmut Grohne <[email protected]> Tue, 10 Jan 2017 15:27:51 +0100 + gsoap (2.8.35-3) unstable; urgency=medium * Force non-parallel make (Closes: #839019) diff --minimal -Nru gsoap-2.8.35/debian/control gsoap-2.8.35/debian/control --- gsoap-2.8.35/debian/control 2016-09-19 11:29:47.000000000 +0200 +++ gsoap-2.8.35/debian/control 2017-01-10 14:16:30.000000000 +0100 @@ -1,7 +1,7 @@ Source: gsoap Priority: optional Maintainer: Mattias Ellert <[email protected]> -Build-Depends: debhelper (>= 5), dh-autoreconf, flex, bison, libssl-dev, zlib1g-dev, doxygen, graphviz +Build-Depends: debhelper (>= 5), dh-autoreconf, flex, bison, libssl-dev, libssl-dev:native, zlib1g-dev, zlib1g-dev:native, doxygen, graphviz Standards-Version: 3.9.8 Section: devel Vcs-Browser: http://svn.nordugrid.org/trac/packaging/browser/debian/gsoap diff --minimal -Nru gsoap-2.8.35/debian/patches/gsoap-cross.patch gsoap-2.8.35/debian/patches/gsoap-cross.patch --- gsoap-2.8.35/debian/patches/gsoap-cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ gsoap-2.8.35/debian/patches/gsoap-cross.patch 2017-01-10 15:17:44.000000000 +0100 @@ -0,0 +1,81 @@ +From: Helmut Grohne <[email protected]> +Subject: allow reusing a preexisting soapcpp2 binary + +Index: gsoap-2.8.35/configure.ac +=================================================================== +--- gsoap-2.8.35.orig/configure.ac ++++ gsoap-2.8.35/configure.ac +@@ -161,11 +161,23 @@ + fi + AC_SUBST(SOAPCPP2_DEBUG) + ++AC_ARG_WITH([soapcpp2], ++ [AS_HELP_STRING([--with-soapcpp2=PATH],[path to an existing soapcpp2 binary])], ++ [SOAP="$withval"], ++ [SOAP='$(top_builddir)/gsoap/src/soapcpp2$(EXEEXT)']) ++AC_SUBST(SOAP) ++ + # set the default soapcpp2 import path + SOAPCPP2_IMPORTPATH="-DSOAPCPP2_IMPORT_PATH=\"\\\"${datadir}/gsoap/import\\\"\"" + #SOAPCPP2_IMPORTPATH="-DSOAPCPP2_IMPORT_PATH=\"\\\"`pwd`/gsoap/import\\\"\"" + AC_SUBST(SOAPCPP2_IMPORTPATH) + ++AC_ARG_WITH([wsdl2h], ++ [AS_HELP_STRING([--with-wsdl2h=PATH],[path to an existing wsdl2h binary])], ++ [WSDL="$withval"], ++ [WSDL='$(top_srcdir)/gsoap/wsdl/wsdl2h$(EXEEXT)']) ++AC_SUBST(WSDL) ++ + # set the default wsdl2h import path + WSDL2H_IMPORTPATH="-DWSDL2H_IMPORT_PATH=\"\\\"${datadir}/gsoap/WS\\\"\"" + #WSDL2H_IMPORTPATH="-DWSDL2H_IMPORT_PATH=\"\\\"`pwd`/gsoap/WS\\\"\"" +Index: gsoap-2.8.35/gsoap/wsdl/Makefile.am +=================================================================== +--- gsoap-2.8.35.orig/gsoap/wsdl/Makefile.am ++++ gsoap-2.8.35/gsoap/wsdl/Makefile.am +@@ -9,7 +9,6 @@ + # AM_LDFLAGS=$(INCLUDES) -I$(srcdir) -L$(srcdir) + AM_LDFLAGS=-L$(srcdir) -I$(top_srcdir)/gsoap -I$(top_srcdir)/gsoap/plugin + AM_CPPFLAGS=-I$(top_srcdir)/gsoap -I$(top_srcdir)/gsoap/plugin +-SOAP=$(top_builddir)/gsoap/src/soapcpp2$(EXEEXT) + SOAP_CPP_LIB=$(top_builddir)/gsoap/$(WSDL2H_SOAP_CPP_LIB) + SOAP_CPP_SRC=wsdlC.cpp + SOAPHEADER=$(srcdir)/wsdl.h +Index: gsoap-2.8.35/gsoap/samples/Makefile.defines +=================================================================== +--- gsoap-2.8.35.orig/gsoap/samples/Makefile.defines ++++ gsoap-2.8.35/gsoap/samples/Makefile.defines +@@ -4,7 +4,6 @@ + AM_CFLAGS=-D$(platform) + AM_CXXFLAGS=-D$(platform) + CPPFLAGS=$(SAMPLE_INCLUDES) -I$(top_srcdir)/gsoap -I$(top_srcdir)/gsoap/plugin +-SOAP=$(top_srcdir)/gsoap/src/soapcpp2 + + SOAP_NS_DEF=ns.nsmap ns.wsdl + +Index: gsoap-2.8.35/gsoap/samples/autotest/Makefile.am +=================================================================== +--- gsoap-2.8.35.orig/gsoap/samples/autotest/Makefile.am ++++ gsoap-2.8.35/gsoap/samples/autotest/Makefile.am +@@ -7,8 +7,6 @@ + + CPPFLAGS=-I$(top_srcdir)/gsoap -I$(top_srcdir)/gsoap/plugin + AM_LDFLAGS=$(CPPFLAGS) -I$(srcdir) -L$(srcdir) +-SOAP=$(top_srcdir)/gsoap/src/soapcpp2$(EXEEXT) +-WSDL=$(top_srcdir)/gsoap/wsdl/wsdl2h$(EXEEXT) + WSDL_FLAGS=-d -P -t $(srcdir)/typemap.dat + SOAP_FLAGS=-SL -T -I$(top_srcdir)/gsoap/import -I$(top_srcdir)/gsoap/custom + WSDLINPUT=$(srcdir)/examples.wsdl +Index: gsoap-2.8.35/gsoap/samples/databinding/Makefile.am +=================================================================== +--- gsoap-2.8.35.orig/gsoap/samples/databinding/Makefile.am ++++ gsoap-2.8.35/gsoap/samples/databinding/Makefile.am +@@ -7,8 +7,6 @@ + + CPPFLAGS=$(SAMPLE_INCLUDES) -I$(top_srcdir)/gsoap -I$(top_srcdir)/gsoap/plugin + AM_LDFLAGS=$(AM_CPPFLAGS) -I$(srcdir) -L$(srcdir) +-SOAP=$(top_srcdir)/gsoap/src/soapcpp2$(EXEEXT) +-WSDL=$(top_srcdir)/gsoap/wsdl/wsdl2h$(EXEEXT) + WSDL_FLAGS=-g -t $(srcdir)/addresstypemap.dat + SOAP_FLAGS=-0 -CS -p address -I$(top_srcdir)/gsoap/import + WSDLINPUT=$(srcdir)/address.xsd diff --minimal -Nru gsoap-2.8.35/debian/patches/series gsoap-2.8.35/debian/patches/series --- gsoap-2.8.35/debian/patches/series 2016-09-26 14:49:01.000000000 +0200 +++ gsoap-2.8.35/debian/patches/series 2017-01-10 14:18:18.000000000 +0100 @@ -10,3 +10,4 @@ # Backport fix from upstream gsoap-backport.patch +gsoap-cross.patch diff --minimal -Nru gsoap-2.8.35/debian/rules gsoap-2.8.35/debian/rules --- gsoap-2.8.35/debian/rules 2016-10-03 13:19:09.000000000 +0200 +++ gsoap-2.8.35/debian/rules 2017-01-10 15:20:09.000000000 +0100 @@ -1,8 +1,7 @@ #!/usr/bin/make -f # -*- makefile -*- -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) - +include /usr/share/dpkg/architecture.mk -include /usr/share/dpkg/buildflags.mk version = 2.8.35 @@ -14,6 +13,11 @@ configure: configure-stamp +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) +CONFIGURE_FLAGS += --with-soapcpp2=$(CURDIR)/build-native/gsoap/src/soapcpp2 +CONFIGURE_FLAGS += --with-wsdl2h=$(CURDIR)/build-native/gsoap/wsdl/wsdl2h +endif + configure-stamp: dh_testdir @@ -23,12 +27,23 @@ dh_autoreconf +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + mkdir build-native + # out of tree builds are broken + cp -a aclocal.m4 configure configure.ac gsoap Makefile.am ylwrap *.in build-native/ + cd build-native && ./configure + $(MAKE) -C build-native +endif + CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' \ CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' ./configure \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ --prefix=/usr \ --libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)' \ --enable-ipv6 \ - --enable-samples + --enable-samples \ + $(CONFIGURE_FLAGS) touch $@ @@ -59,6 +74,7 @@ rm -rf gsoap/doc/*/html rm -f gsoap/doc/*/doxygen_sqlite3.db + rm -rf build-native rm -f build-stamp configure-stamp

