package/alsa-lib: smixer-python module supports python3
authorIllia Bitkov <illia.bitkov@mind.be>
Thu, 9 Sep 2021 15:17:39 +0000 (17:17 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 21 Sep 2021 19:01:29 +0000 (21:01 +0200)
Add simple mixer python bindings to build when "Python support for
alsa-lib" is active. smixer-python is the only python module which
exists in alsa-lib. It is compatible with Python2 and Python3.

Signed-off-by: Illia Bitkov <illia.bitkov@mind.be>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/alsa-lib/Config.in
package/alsa-lib/alsa-lib.mk

index f334b66bffeeff41df42701862502339934d4947..4168d1f220605e73558b58f86f695e4c0526696b 100644 (file)
@@ -22,7 +22,7 @@ if BR2_PACKAGE_ALSA_LIB
 
 config BR2_PACKAGE_ALSA_LIB_PYTHON
        bool "Python support for alsa-lib"
-       depends on BR2_PACKAGE_PYTHON
+       depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
        help
          Add python support for alsa-lib.
          Python will be built and libpython will be installed
index c71ad5dd58294aea151c64b9181987cbdcee2839..99c53f9408c850f11e9740e13a3c9d8fc147bb83 100644 (file)
@@ -57,12 +57,22 @@ ALSA_LIB_CONF_OPTS += --disable-old-symbols
 endif
 
 ifeq ($(BR2_PACKAGE_ALSA_LIB_PYTHON),y)
+ALSA_LIB_CONF_OPTS += \
+       --enable-mixer-pymods
+ifeq ($(BR2_PACKAGE_PYTHON),y)
 ALSA_LIB_CONF_OPTS += \
        --with-pythonlibs=-lpython$(PYTHON_VERSION_MAJOR) \
        --with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
 ALSA_LIB_CFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
 ALSA_LIB_DEPENDENCIES = python
 else
+ALSA_LIB_CONF_OPTS += \
+       --with-pythonlibs=-lpython$(PYTHON3_VERSION_MAJOR) \
+       --with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
+ALSA_LIB_CFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
+ALSA_LIB_DEPENDENCIES = python3
+endif
+else
 ALSA_LIB_CONF_OPTS += --disable-python
 endif