micropython: update to 1.4.3

- use our {C,LD}FLAGS
- do not strip
- add patch to make sure the binary contains a proper version number
- install license
- misc tweaks

Close #1608.
This commit is contained in:
Alessio Sergi 2015-05-28 15:34:43 +02:00
parent d42edf208d
commit 285ad3ec2b
2 changed files with 50 additions and 9 deletions

View file

@ -0,0 +1,33 @@
diff --git py/makeversionhdr.py py/makeversionhdr.py
index e37496d..7d81ecb 100644
--- py/makeversionhdr.py
+++ py/makeversionhdr.py
@@ -5,26 +5,10 @@ from __future__ import print_function
import sys
import os
import datetime
-import subprocess
def make_version_header(filename):
- # Note: git describe doesn't work if no tag is available
- try:
- git_tag = subprocess.check_output(["git", "describe", "--dirty", "--always"], universal_newlines=True).strip()
- except subprocess.CalledProcessError:
- git_tag = ""
- try:
- git_hash = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"], stderr=subprocess.STDOUT, universal_newlines=True).strip()
- except subprocess.CalledProcessError:
- git_hash = "unknown"
-
- try:
- # Check if there are any modified files.
- subprocess.check_call(["git", "diff", "--no-ext-diff", "--quiet", "--exit-code"], stderr=subprocess.STDOUT)
- # Check if there are any staged files.
- subprocess.check_call(["git", "diff-index", "--cached", "--quiet", "HEAD", "--"], stderr=subprocess.STDOUT)
- except subprocess.CalledProcessError:
- git_hash += "-dirty"
+ git_tag = "v1.4.3"
+ git_hash = "d7b7d5f"
# Try to extract MicroPython version from git tag
if git_tag.startswith("v"):

View file

@ -1,19 +1,27 @@
# Template file for 'micropython'
pkgname=micropython
version=1.3.10
version=1.4.3
revision=1
build_style=gnu-makefile
make_build_args="-C unix"
hostmakedepends="pkg-config python"
build_wrksrc=unix
hostmakedepends="pkg-config python3.4"
makedepends="libffi-devel readline-devel"
short_desc="Python for embedded systems"
short_desc="Implementation of Python 3.x for microcontrollers"
maintainer="necrophcodr <necrophcodr@necrophcodr.me>"
license="MIT"
homepage="http://micropython.org/"
distfiles="http://github.com/micropython/micropython/archive/v${version}.tar.gz"
checksum=42ff1b08cb30f5450285b7b1a1aec4c944ddf3840c4cb36faac51b5e79c8dc5c
checksum=09ac1f38fb881bb1942e1a17cf519f692ed78d732403d96586ae76c9c597fa63
do_install() {
vbin unix/micropython
vbin tools/pip-micropython
pre_configure() {
sed -i 's|-Werror||;/^COPT =/d' Makefile
}
do_build() {
make ${makejobs} V=1 PYTHON=python3.4 \
CC=$CC CFLAGS_EXTRA="$CPPFLAGS $CFLAGS" \
LDFLAGS_EXTRA="$LDFLAGS" STRIP=echo
}
do_install() {
vbin micropython
vbin ../tools/pip-micropython
vlicense ../LICENSE
}