kumquat-buildroot/package/canfestival/canfestival.mk
Samuel Martin 241476b5b0 canfestival: fix build failure
Some canfestival python build scripts are not python2 compliant.
So, this patch add a patch allowing to set the python interperter and
set it in the make environment. This pulls a host-python dependency on
canfestival.

This patch has been sent upstream: [1].

Fixes:
  http://autobuild.buildroot.net/results/98d/98dce833dfa8255522af672d4f41c2504c00e64e/

[1] http://sourceforge.net/p/canfestival/mailman/message/32919038/

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-11 15:30:30 +02:00

61 lines
1.8 KiB
Makefile

################################################################################
#
# canfestival
#
################################################################################
# Revision 791:
CANFESTIVAL_VERSION = 7740ac6fdedc
CANFESTIVAL_SOURCE = $(CANFESTIVAL_VERSION).tar.bz2
CANFESTIVAL_SITE = http://dev.automforge.net/CanFestival-3/archive
CANFESTIVAL_LICENSE = LGPLv2.1+
CANFESTIVAL_LICENSE_FILES = COPYING LICENCE
CANFESTIVAL_INSTALL_STAGING = YES
CANFESTIVAL_INSTALLED-y = src drivers
CANFESTIVAL_INSTALLED-$(BR2_PACKAGE_CANFESTIVAL_INSTALL_EXAMPLES) += examples
# Canfestival provides and used some python modules and scripts only compliant
# with python2.
CANFESTIVAL_DEPENDENCIES = host-python
# canfestival uses its own hand-written build-system. Though there is
# a configure script, it does not use the autotools, so, we use the
# generic-package infrastructure.
define CANFESTIVAL_CONFIGURE_CMDS
cd $(@D) && \
$(TARGET_CONFIGURE_OPTS) ./configure \
--target=unix \
--arch=$(BR2_ARCH) \
--timers=unix \
--binutils=$(TARGET_CROSS) \
--cc="$(TARGET_CC)" \
--cxx="$(TARGET_CC)" \
--ld="$(TARGET_CC)" \
--prefix=/usr \
--can=$(BR2_PACKAGE_CANFESTIVAL_DRIVER) \
$(call qstrip,$(BR2_PACKAGE_CANFESTIVAL_ADDITIONAL_OPTIONS))
endef
define CANFESTIVAL_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all \
PYTHON=$(HOST_DIR)/usr/bin/python2
endef
define CANFESTIVAL_INSTALL_TARGET_CMDS
for d in $(CANFESTIVAL_INSTALLED-y) ; do \
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d install \
PYTHON=$(HOST_DIR)/usr/bin/python2 \
DESTDIR=$(TARGET_DIR) || exit 1 ; \
done
endef
define CANFESTIVAL_INSTALL_STAGING_CMDS
for d in $(CANFESTIVAL_INSTALLED-y) ; do \
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$$d install \
PYTHON=$(HOST_DIR)/usr/bin/python2 \
DESTDIR=$(STAGING_DIR) || exit 1 ; \
done
endef
$(eval $(generic-package))