On Tue, May 21, 2013 at 01:12:51PM +0200, Joris Dobbelsteen wrote:
> Add gSOAP C/C++ Library. Host part includes soapcpp2 and wsdl2h compilers, 
> which
> generate C/C++ code. Target parts contains the static libraries and headers. 
> So
> no target package.
> 
> Given this is my first patch here, comments are welcome.
> 
> Signed-off-by: Joris Dobbelsteen <[email protected]>
> ---
>  patches/gsoap-2.8/autogen.sh                       |   18 ++++++
>  ...cross_compile_use_precompiled_gsoap_tools.patch |   62 
> ++++++++++++++++++++
>  patches/gsoap-2.8/series                           |    1 +
>  rules/gsoap.in                                     |   11 ++++
>  rules/gsoap.make                                   |   59 +++++++++++++++++++
>  rules/host-gsoap.in                                |   11 ++++
>  rules/host-gsoap.make                              |   42 +++++++++++++
>  7 files changed, 204 insertions(+)
>  create mode 100755 patches/gsoap-2.8/autogen.sh
>  create mode 100644 
> patches/gsoap-2.8/cross_compile_use_precompiled_gsoap_tools.patch
>  create mode 100644 patches/gsoap-2.8/series
>  create mode 100644 rules/gsoap.in
>  create mode 100644 rules/gsoap.make
>  create mode 100644 rules/host-gsoap.in
>  create mode 100644 rules/host-gsoap.make
> 
> diff --git a/patches/gsoap-2.8/autogen.sh b/patches/gsoap-2.8/autogen.sh
> new file mode 100755
> index 0000000..df78c38
> --- /dev/null
> +++ b/patches/gsoap-2.8/autogen.sh

This should be a symlink to ../autogen.sh

> @@ -0,0 +1,18 @@
> +#!/bin/bash
> +
> +set -e
> +
> +aclocal $ACLOCAL_FLAGS
> +
> +libtoolize \
> +     --force \
> +     --copy
> +
> +autoreconf \
> +     --force \
> +     --install \
> +     --warnings=cross \
> +     --warnings=syntax \
> +     --warnings=obsolete \
> +     --warnings=unsupported
> +
> diff --git 
> a/patches/gsoap-2.8/cross_compile_use_precompiled_gsoap_tools.patch 
> b/patches/gsoap-2.8/cross_compile_use_precompiled_gsoap_tools.patch
> new file mode 100644
> index 0000000..285f9b1
> --- /dev/null
> +++ b/patches/gsoap-2.8/cross_compile_use_precompiled_gsoap_tools.patch

Canonical patch format please. The best way to do that is:
$ ptxdist --git extract gsoap

The source dir is now a git repository and you can provide a commit
message. Then, in the package source dir:
$ git ptx-patches

This will recreate the patches with proper headers.

> @@ -0,0 +1,62 @@
> +diff -ur gsoap-2.8-orig/configure.in gsoap-2.8/configure.in
> +--- gsoap-2.8-orig/configure.in      2013-05-07 13:24:18.237121878 +0200
> ++++ gsoap-2.8/configure.in   2013-05-07 13:56:28.701158119 +0200
> +@@ -86,6 +86,18 @@
> +         *)              platform=UNKNOWN ;;
> + esac
> + 
> ++if test "$cross_compiling" = yes; then
> ++    # cross-compiling
> ++    SOAP=soapcpp2
> ++    WSDL=wsdl2h

        AC_PATH_PROG([SOAP], [soapcpp2])

etc.

> ++else
> ++    # regular compile
> ++    SOAP="\$(top_srcdir)/gsoap/src/soapcpp2"
> ++    WSDL="\$(top_srcdir)/gsoap/wsdl/wsdl2h"
> ++fi
> ++AC_SUBST(SOAP)
> ++AC_SUBST(WSDL)
> ++
> + AC_SUBST(SAMPLE_EXTRA_LIBS)
> + AC_SUBST(platform)
> + 
> +diff -ur gsoap-2.8-orig/gsoap/samples/autotest/Makefile.am 
> gsoap-2.8/gsoap/samples/autotest/Makefile.am
> +--- gsoap-2.8-orig/gsoap/samples/autotest/Makefile.am        2013-05-07 
> 13:24:18.293121879 +0200
> ++++ gsoap-2.8/gsoap/samples/autotest/Makefile.am     2013-05-07 
> 13:55:31.449157043 +0200
> +@@ -7,8 +7,8 @@
> + 
> + INCLUDES=-I$(top_srcdir)/gsoap -I$(top_srcdir)/gsoap/plugin
> + AM_LDFLAGS=$(INCLUDES) -I$(srcdir) -L$(srcdir)
> +-SOAP=$(top_srcdir)/gsoap/src/soapcpp2
> +-WSDL=$(top_srcdir)/gsoap/wsdl/wsdl2h
> ++#SOAP=$(top_srcdir)/gsoap/src/soapcpp2
> ++#WSDL=$(top_srcdir)/gsoap/wsdl/wsdl2h


just remove the lines

> + WSDL_FLAGS=-P -t $(srcdir)/typemap.dat
> + SOAP_FLAGS=-SL -T -I$(top_srcdir)/gsoap/import
> + WSDLINPUT=$(srcdir)/examples.wsdl
> +diff -ur gsoap-2.8-orig/gsoap/samples/databinding/Makefile.am 
> gsoap-2.8/gsoap/samples/databinding/Makefile.am
> +--- gsoap-2.8-orig/gsoap/samples/databinding/Makefile.am     2013-05-07 
> 13:24:18.293121879 +0200
> ++++ gsoap-2.8/gsoap/samples/databinding/Makefile.am  2013-05-07 
> 13:57:02.633158757 +0200
> +@@ -7,8 +7,8 @@
> + 
> + INCLUDES=-I$(top_srcdir)/gsoap -I$(top_srcdir)/gsoap/plugin
> + AM_LDFLAGS=$(INCLUDES) -I$(srcdir) -L$(srcdir)
> +-SOAP=$(top_srcdir)/gsoap/src/soapcpp2
> +-WSDL=$(top_srcdir)/gsoap/wsdl/wsdl2h
> ++#SOAP=$(top_srcdir)/gsoap/src/soapcpp2
> ++#WSDL=$(top_srcdir)/gsoap/wsdl/wsdl2h

same here

> + WSDL_FLAGS=-g -t $(srcdir)/addresstypemap.dat
> + SOAP_FLAGS=-0 -CS -p address -I$(top_srcdir)/gsoap/import
> + WSDLINPUT=$(srcdir)/address.xsd
> +diff -ur gsoap-2.8-orig/gsoap/wsdl/Makefile.am 
> gsoap-2.8/gsoap/wsdl/Makefile.am
> +--- gsoap-2.8-orig/gsoap/wsdl/Makefile.am    2013-05-07 13:24:18.313121880 
> +0200
> ++++ gsoap-2.8/gsoap/wsdl/Makefile.am 2013-05-07 13:57:18.873159061 +0200
> +@@ -9,7 +9,7 @@
> + # AM_LDFLAGS=$(INCLUDES) -I$(srcdir) -L$(srcdir)
> + AM_LDFLAGS=-L$(srcdir)
> + AM_CPPFLAGS=-I$(top_srcdir)/gsoap
> +-SOAP=$(top_builddir)/gsoap/src/soapcpp2
> ++#SOAP=$(top_builddir)/gsoap/src/soapcpp2

and here

> + SOAP_CPP_LIB=$(top_builddir)/gsoap/$(WSDL2H_SOAP_CPP_LIB)
> + SOAP_CPP_SRC=wsdlC.cpp
> + SOAPHEADER=$(srcdir)/wsdl.h
> diff --git a/patches/gsoap-2.8/series b/patches/gsoap-2.8/series
> new file mode 100644
> index 0000000..d8399c0
> --- /dev/null
> +++ b/patches/gsoap-2.8/series
> @@ -0,0 +1 @@
> +cross_compile_use_precompiled_gsoap_tools.patch
> diff --git a/rules/gsoap.in b/rules/gsoap.in
> new file mode 100644
> index 0000000..7c131d1
> --- /dev/null
> +++ b/rules/gsoap.in
> @@ -0,0 +1,11 @@
> +## SECTION=system_libraries
> +
> +config GSOAP
> +     tristate
> +     select HOST_GSOAP
> +     select HOST_AUTOTOOLS_AUTOCONF
> +     select HOST_AUTOTOOLS_AUTOMAKE

remove these two. They should be automatically added.

> +     prompt "gsoap"
> +     help
> +       High-performance C/C++ SOAP library
> +
> diff --git a/rules/gsoap.make b/rules/gsoap.make
> new file mode 100644
> index 0000000..0138f71
> --- /dev/null
> +++ b/rules/gsoap.make
> @@ -0,0 +1,59 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2013 by Joris Dobbelsteen <[email protected]>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_GSOAP) += gsoap
> +
> +#
> +# Paths and names
> +#
> +GSOAP_VERSION        := 2.8.12
> +GSOAP_MD5       := 5700d26fc6fe3073d038349e19c3640d

use tabs to indent.

> +GSOAP                := gsoap-2.8
> +GSOAP_SUFFIX := zip
> +GSOAP_URL            := 
> $(PTXCONF_SETUP_SFMIRROR)/gsoap2/gsoap_${GSOAP_VERSION}.$(GSOAP_SUFFIX)
> +GSOAP_SOURCE := $(SRCDIR)/gsoap_${GSOAP_VERSION}.$(GSOAP_SUFFIX)
> +GSOAP_DIR            := $(BUILDDIR)/${GSOAP}
> +GSOAP_LICENSE        := GPLv2/propriatary
> +GSOAP_MAKE_PAR := NO
> +
> +# 
> ----------------------------------------------------------------------------
> +# Get
> +# 
> ----------------------------------------------------------------------------
> +
> +$(GSOAP_SOURCE):
> +     @$(call targetinfo)
> +     @$(call get, GSOAP)

remove this stage

> +
> +# 
> ----------------------------------------------------------------------------
> +# Prepare
> +# 
> ----------------------------------------------------------------------------
> +
> +#GSOAP_CONF_ENV      := $(CROSS_ENV)

remove

> +
> +#
> +# autoconf
> +#
> +GSOAP_CONF_TOOL      := autoconf
> +GSOAP_CONF_OPT       := \

break

        $(CROSS_AUTOCONF_USR) \
> +     --disable-samples

no other options available?

> +
> +# 
> ----------------------------------------------------------------------------
> +# Target-Install
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/gsoap.targetinstall:
> +     @$(call targetinfo)
> +#    It only contains static libraries, nothing for the target...

by default or always?

> +     @$(call touch)
> +
> +# vim: syntax=make
> diff --git a/rules/host-gsoap.in b/rules/host-gsoap.in
> new file mode 100644
> index 0000000..c143bde
> --- /dev/null
> +++ b/rules/host-gsoap.in
> @@ -0,0 +1,11 @@
> +## SECTION=hosttools_noprompt
> +
> +config HOST_GSOAP
> +     tristate
> +     prompt "gsoap"

noprompt means no prompt :-)

> +     select HOST_AUTOTOOLS_AUTOCONF
> +     select HOST_AUTOTOOLS_AUTOMAKE

same here.

> +     help
> +       Builds the soapcpp2 and wsdl2h tools to generate gsoap stub
> +       and skeleton C/C++ files.

no need for help here.

> +
> diff --git a/rules/host-gsoap.make b/rules/host-gsoap.make
> new file mode 100644
> index 0000000..c3c3a9c
> --- /dev/null
> +++ b/rules/host-gsoap.make
> @@ -0,0 +1,42 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2011 by Joris Dobbelsteen <[email protected]>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +HOST_PACKAGES-$(PTXCONF_HOST_GSOAP) += host-gsoap

newline

> +HOST_GSOAP_MAKE_PAR := NO
> +
> +# 
> ----------------------------------------------------------------------------
> +# Prepare
> +# 
> ----------------------------------------------------------------------------
> +
> +HOST_GSOAP_CONF_ENV  := $(HOST_ENV)

remove

> +
> +#
> +# autoconf
> +#
> +HOST_GSOAP_CONF_TOOL := autoconf
> +HOST_GSOAP_CONF_OPT  := \

break

        $(HOST_AUTOCONF) \
> +     --disable-samples
> +
> +# 
> ----------------------------------------------------------------------------
> +# Install
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/host-gsoap.install:
> +     @$(call targetinfo)
> +     @install -D -m 755 ${HOST_GSOAP_DIR}/gsoap/src/soapcpp2 \
> +             ${HOST_GSOAP_PKGDIR}/bin/soapcpp2
> +     @install -D -m 755 ${HOST_GSOAP_DIR}/gsoap/wsdl/wsdl2h \
> +             ${HOST_GSOAP_PKGDIR}/bin/wsdl2h
> +     @$(call touch)

are these not installed with "make install"?

Michael

> +
> +# vim: syntax=make
> -- 
> 1.7.10.4
> 
> 
> 
> -- 
> ptxdist mailing list
> [email protected]
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
[email protected]

Reply via email to