1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/lirc/0007-dont-build-python-module.patch
2020-10-17 03:44:02 +00:00

33 lines
1.4 KiB
Diff

#In the spirit of building a light aport for Alpine this port does not depend on Py3
#Including the patch suggested for embedded use here: https://sourceforge.net/p/lirc/mailman/lirc-list/thread/88ec0311-2049-b262-f67a-d047dc30813b%40gmail.com/#msg36015796
--- a/Makefile.am
+++ b/Makefile.am
@@ -106,6 +106,7 @@ dist_py_pkg_doc_DATA = python-pkg/doc/Doxyfile \
libpython = $(libdir)/python$(PYTHON_VERSION)
pydir = $(libpython)/site-packages/lirc
+if HAVE_PYTHON35
py_LTLIBRARIES = python-pkg/lib/_client.la
python_pkg_lib__client_la_SOURCES = \
python-pkg/lirc/_client.c
@@ -118,6 +119,7 @@ python_pkg_lib__client_la_LDFLAGS = \
$(PYTHON_LIBS)
python_pkg_lib__client_la_LIBADD = \
lib/liblirc_client.la
+endif
pylint: .phony
$(MAKE) -C tools pylint
diff --git a/configure.ac b/configure.ac
index 4882931689ff..dcf9703c3530 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,8 @@ test -z "$PYTHON_LIBS" && \
test -n "$PYTHON_LIBS" || \
AC_MSG_WARN([No python package found (missing devel package?)])
python_version_nodots=$(echo $PYTHON_VERSION | tr -d '.')
-AM_CONDITIONAL(HAVE_PYTHON35, [test $python_version_nodots -ge 35])
+AM_CONDITIONAL(HAVE_PYTHON35, [test -n "$PYTHON_LIBS" && \
+ test $python_version_nodots -ge 35])
CFLAGS="$CFLAGS $PYTHON_CFLAGS"