kumquat-buildroot/package/uhd/uhd.mk
Gwenhael Goavec-Merou 8736da7cba package/uhd: fix python module detection
$(HOST_DIR)/bin/python symlink is only created when
BR2_PACKAGE_PYTHON3 is set.

When only host-python3 is used this symlink is not present and build fails
with:
-- Python checking for Python version 2.7 or greater
-- Python checking for Python version 2.7 or greater - unknown error
--
-- Python checking for Mako templates 0.4.2 or greater
-- Python checking for Mako templates 0.4.2 or greater - unknown error
--
-- Python checking for requests 2.0 or greater
-- Python checking for requests 2.0 or greater - unknown error
--
-- Python checking for numpy 1.7 or greater
-- Python checking for numpy 1.7 or greater - unknown error
--
-- Configuring LibUHD support...
--   Dependency Boost_FOUND = TRUE
--   Dependency HAVE_PYTHON_PLAT_MIN_VERSION = FALSE
--   Dependency HAVE_PYTHON_MODULE_MAKO = FALSE

This patch set explicitly PYTHON_EXECUTABLE to $(HOST_DIR)/bin/python3

This is a fallout from e9df5b0fc3, which
changed uhd to always use host-python3.

Fixes:
- http://autobuild.buildroot.net/results/35c0b9597c75dade241a3b3786fae30551c48008
- http://autobuild.buildroot.net/results/89069102bf8785ce8a9ec3b4c6fa32749c2e3586

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-04 21:34:28 +01:00

154 lines
3.3 KiB
Makefile

################################################################################
#
# uhd
#
################################################################################
UHD_VERSION = 3.15.0.0
UHD_SITE = $(call github,EttusResearch,uhd,v$(UHD_VERSION))
UHD_LICENSE = GPL-3.0+
UHD_LICENSE_FILES = LICENSE.md host/LICENSE
UHD_SUPPORTS_IN_SOURCE_BUILD = NO
UHD_SUBDIR = host
UHD_INSTALL_STAGING = YES
UHD_DEPENDENCIES = \
boost \
host-python3 \
host-python-mako
UHD_CONF_OPTS = \
-DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \
-DRUNTIME_PYTHON_EXECUTABLE=/usr/bin/python \
-DENABLE_C_API=ON \
-DENABLE_DOXYGEN=OFF \
-DENABLE_DPDK=OFF \
-DENABLE_LIBUHD=ON \
-DENABLE_MANUAL=OFF \
-DENABLE_MAN_PAGES=OFF \
-DENABLE_TESTS=OFF
# As soon as architecture is ARM, uhd will try to use NEON.
# But not all ARM cores have NEON support.
# When CPU support NEON -mfpu=neon must be added to CXX_FLAGS
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
UHD_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -mfpu=neon"
UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=ON
else
UHD_CONF_OPTS += -Dhave_mfpu_neon=0
UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=OFF
endif
ifeq ($(BR2_PACKAGE_ORC),y)
UHD_DEPENDENCIES += orc
endif
ifeq ($(BR2_PACKAGE_UHD_B100),y)
UHD_CONF_OPTS += -DENABLE_B100=ON
else
UHD_CONF_OPTS += -DENABLE_B100=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_B200),y)
UHD_CONF_OPTS += -DENABLE_B200=ON
else
UHD_CONF_OPTS += -DENABLE_B200=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_E300),y)
UHD_CONF_OPTS += -DENABLE_E300=ON
else
UHD_CONF_OPTS += -DENABLE_E300=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_E320),y)
UHD_CONF_OPTS += -DENABLE_E320=ON
else
UHD_CONF_OPTS += -DENABLE_E320=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_EXAMPLES),y)
UHD_CONF_OPTS += -DENABLE_EXAMPLES=ON
else
UHD_CONF_OPTS += -DENABLE_EXAMPLES=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_MPMD),y)
UHD_CONF_OPTS += -DENABLE_MPMD=ON
else
UHD_CONF_OPTS += -DENABLE_MPMD=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_N230),y)
UHD_CONF_OPTS += -DENABLE_N230=ON
else
UHD_CONF_OPTS += -DENABLE_N230=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_N300),y)
UHD_CONF_OPTS += -DENABLE_N300=ON
else
UHD_CONF_OPTS += -DENABLE_N300=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_N320),y)
UHD_CONF_OPTS += -DENABLE_N320=ON
else
UHD_CONF_OPTS += -DENABLE_N320=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_OCTOCLOCK),y)
UHD_CONF_OPTS += -DENABLE_OCTOCLOCK=ON
else
UHD_CONF_OPTS += -DENABLE_OCTOCLOCK=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_RFNOC),y)
UHD_CONF_OPTS += -DENABLE_RFNOC=ON
else
UHD_CONF_OPTS += -DENABLE_RFNOC=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_PYTHON),y)
UHD_DEPENDENCIES += host-python-numpy host-python-requests \
python-numpy python-requests
UHD_CONF_OPTS += -DENABLE_PYTHON_API=ON
else
UHD_CONF_OPTS += -DENABLE_PYTHON_API=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_USB),y)
UHD_DEPENDENCIES += libusb
UHD_CONF_OPTS += -DENABLE_USB=ON
else
UHD_CONF_OPTS += -DENABLE_USB=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_USRP1),y)
UHD_CONF_OPTS += -DENABLE_USRP1=ON
else
UHD_CONF_OPTS += -DENABLE_USRP1=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_USRP2),y)
UHD_CONF_OPTS += -DENABLE_USRP2=ON
else
UHD_CONF_OPTS += -DENABLE_USRP2=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_UTILS),y)
UHD_DEPENDENCIES += python-six
UHD_CONF_OPTS += -DENABLE_UTILS=ON
else
UHD_CONF_OPTS += -DENABLE_UTILS=OFF
endif
ifeq ($(BR2_PACKAGE_UHD_X300),y)
UHD_CONF_OPTS += -DENABLE_X300=ON
else
UHD_CONF_OPTS += -DENABLE_X300=OFF
endif
$(eval $(cmake-package))