libsoc: add Python bindings support
authorYegor Yefremov <yegorslists@googlemail.com>
Fri, 24 Jun 2016 12:35:10 +0000 (14:35 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 25 Jun 2016 13:35:44 +0000 (15:35 +0200)
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
[Thomas: add --disable-python, use 'else ifeq'.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libsoc/libsoc.mk

index 878616b92eb59ab48d98668ba2348b97a83a29e1..03bef043d96d0c5a377f8b008a9a206e2893a479 100644 (file)
@@ -11,4 +11,16 @@ LIBSOC_LICENSE_FILES = LICENCE
 LIBSOC_AUTORECONF = YES
 LIBSOC_INSTALL_STAGING = YES
 
+# Install Python 2 bindings
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+LIBSOC_DEPENDENCIES += python
+LIBSOC_CONF_OPTS += --enable-python=2
+# Install Python 3 bindings
+else ifeq ($(BR2_PACKAGE_PYTHON3),y)
+LIBSOC_DEPENDENCIES += python3
+LIBSOC_CONF_OPTS += --enable-python=3
+else
+LIBSOC_CONF_OPTS += --disable-python
+endif
+
 $(eval $(autotools-package))