2015-09-17 01:29:58 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# micropython
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2020-01-18 14:10:12 +01:00
|
|
|
MICROPYTHON_VERSION = 1.12
|
package: remove 'v' prefix from github-fetched packages
On Github, a large number of projects name their tag vXYZ (i.e v3.0,
v0.1, etc.). In some packages we do:
<pkg>_VERSION = v0.3
<pkg>_SITE = $(call github foo,bar,$(<pkg>_VERSION))
And in some other packages we do:
<pkg>_VERSION = 0.3
<pkg>_SITE = $(call github foo,bar,v$(<pkg>_VERSION))
I.e in one case we consider the version to be v0.3, in the other case
we consider 0.3 to be the version.
The problem with v0.3 is that when used in conjunction with
release-monitoring.org, it doesn't work very well, because
release-monitoring.org has the concept of "version prefix" and using
that they drop the "v" prefix for the version.
Therefore, a number of packages in Buildroot have a version that
doesn't match with release-monitoring.org because Buildroot has 'v0.3'
and release-monitoring.org has '0.3'.
Since really the version number of 0.3, is makes sense to update our
packages to drop this 'v'.
This commit only addresses the (common) case of github packages where
the prefix is simply 'v'. Other cases will be handled by separate
commits. Also, there are a few cases that couldn't be handled
mechanically that aren't covered by this commit.
Signed-off-by: Victor Huesca <victor.huesca@bootlin.com>
[Arnout: don't change flatbuffers, json-for-modern-cpp, libpagekite,
python-scapy3k, softether]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-12 08:42:06 +02:00
|
|
|
MICROPYTHON_SITE = $(call github,micropython,micropython,v$(MICROPYTHON_VERSION))
|
2015-09-17 01:29:58 +02:00
|
|
|
MICROPYTHON_LICENSE = MIT
|
|
|
|
MICROPYTHON_LICENSE_FILES = LICENSE
|
2019-10-20 10:28:08 +02:00
|
|
|
MICROPYTHON_DEPENDENCIES = host-pkgconf libffi $(BR2_PYTHON3_HOST_DEPENDENCY)
|
2015-09-17 01:29:58 +02:00
|
|
|
|
2019-10-17 18:52:07 +02:00
|
|
|
# Set GIT_DIR so package won't use buildroot's version number
|
|
|
|
MICROPYTHON_MAKE_ENV = \
|
|
|
|
$(TARGET_MAKE_ENV) \
|
|
|
|
GIT_DIR=.
|
|
|
|
|
2015-09-17 01:29:58 +02:00
|
|
|
# Use fallback implementation for exception handling on architectures that don't
|
|
|
|
# have explicit support.
|
2015-09-24 01:43:49 +02:00
|
|
|
ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)
|
2015-09-17 01:29:58 +02:00
|
|
|
MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
|
|
|
|
endif
|
|
|
|
|
2016-08-25 13:01:03 +02:00
|
|
|
# When building from a tarball we don't have some of the dependencies that are in
|
|
|
|
# the git repository as submodules
|
|
|
|
MICROPYTHON_MAKE_OPTS = MICROPY_PY_BTREE=0
|
|
|
|
MICROPYTHON_MAKE_OPTS += MICROPY_PY_USSL=0
|
|
|
|
|
2015-09-17 01:29:58 +02:00
|
|
|
define MICROPYTHON_BUILD_CMDS
|
2019-10-17 18:52:07 +02:00
|
|
|
$(MICROPYTHON_MAKE_ENV) $(MAKE) -C $(@D)/mpy-cross
|
|
|
|
$(MICROPYTHON_MAKE_ENV) $(MAKE) -C $(@D)/ports/unix \
|
2016-08-25 13:01:03 +02:00
|
|
|
$(MICROPYTHON_MAKE_OPTS) \
|
2015-09-17 01:29:58 +02:00
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define MICROPYTHON_INSTALL_TARGET_CMDS
|
2019-10-17 18:52:07 +02:00
|
|
|
$(MICROPYTHON_MAKE_ENV) $(MAKE) -C $(@D)/ports/unix \
|
2016-08-25 13:01:03 +02:00
|
|
|
$(MICROPYTHON_MAKE_OPTS) \
|
2017-01-24 11:14:21 +01:00
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) \
|
2015-09-17 01:29:58 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) \
|
|
|
|
PREFIX=$(TARGET_DIR)/usr \
|
|
|
|
install
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|