Update version and make support for Java, Python 2 and Python 3 code
generation selectable so that it doesn't pull in too many dependencies,
but target packages can still select it if needed.

Based on a patch by Niklas Reisser.

Cc: Niklas Reisser <niklas.reis...@de.bosch.com>
Signed-off-by: Roland Hieber <r...@pengutronix.de>
---
 v1 -> v2:
   - also make HOST_PYTHON dependency conditional.
   - no change in the other patches, so not resending them.


 rules/host-swig.in   | 17 ++++++++++++++++-
 rules/host-swig.make | 10 +++++-----
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/rules/host-swig.in b/rules/host-swig.in
index 24075d429e50..56a23fccefad 100644
--- a/rules/host-swig.in
+++ b/rules/host-swig.in
@@ -5,4 +5,19 @@ config HOST_SWIG
        default y if ALLYES
        select HOST_ZLIB
        select HOST_LIBPCRE
-       select HOST_PYTHON
+       select HOST_PYTHON      if HOST_SWIG_PYTHON_SUPPORT
+       select HOST_PYTHON3     if HOST_SWIG_PYTHON3_SUPPORT
+       select HOST_SYSTEM_JDK  if HOST_SWIG_JAVA_SUPPORT
+
+if HOST_SWIG
+
+config HOST_SWIG_JAVA_SUPPORT
+       bool
+
+config HOST_SWIG_PYTHON_SUPPORT
+       bool
+
+config HOST_SWIG_PYTHON3_SUPPORT
+       bool
+
+endif
diff --git a/rules/host-swig.make b/rules/host-swig.make
index d15496999cab..7dc685e9e622 100644
--- a/rules/host-swig.make
+++ b/rules/host-swig.make
@@ -14,8 +14,8 @@ HOST_PACKAGES-$(PTXCONF_HOST_SWIG) += host-swig
 #
 # Paths and names
 #
-HOST_SWIG_VERSION      := 2.0.9
-HOST_SWIG_MD5          := 54d534b14a70badc226129159412ea85
+HOST_SWIG_VERSION      := 3.0.8
+HOST_SWIG_MD5          := c96a1d5ecb13d38604d7e92148c73c97
 HOST_SWIG              := swig-$(HOST_SWIG_VERSION)
 HOST_SWIG_SUFFIX       := tar.gz
 HOST_SWIG_URL          := $(call ptx/mirror, SF, 
swig/$(HOST_SWIG).$(HOST_SWIG_SUFFIX))
@@ -38,11 +38,11 @@ HOST_SWIG_CONF_OPT = \
        --without-boost \
        --without-x \
        --without-tcl \
-       --with-python=$(CROSS_PYTHON) \
-       --without-python3 \
+       $(call ptx/ifdef, PTXCONF_HOST_SWIG_PYTHON_SUPPORT, 
--with-python=$(CROSS_PYTHON), --without-python) \
+       $(call ptx/ifdef, PTXCONF_HOST_SWIG_PYTHON3_SUPPORT, 
--with-python=$(CROSS_PYTHON3), --without-python3) \
        --without-perl5 \
        --without-octave \
-       --without-java \
+       $(call ptx/ifdef, PTXCONF_HOST_SWIG_JAVA_SUPPORT, 
--with-java=$(PTXCONF_SETUP_JAVA_SDK), --without-java) \
        --without-gcj \
        --without-android \
        --without-guile \
-- 
2.23.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to