Mon Jan 18 07:54:51 2016 UTC ()
Add micropython-1.5.2, a python 3.4 implementation, to the Packages Collection.
This is the MicroPython project, which aims to put an implementation
of Python 3.x on microcontrollers and small embedded systems.
WARNING: this project is in beta stage and is subject to changes of
the code-base, including project-wide name changes and API changes.
MicroPython implements the entire Python 3.4 syntax (including
exceptions, "with", "yield from", etc.). The following core datatypes
are provided: str (including basic Unicode support), bytes,
bytearray, tuple, list, dict, set, frozenset, array.array,
collections.namedtuple, classes and instances. Builtin modules
include sys, time, and struct. Note that only subset of Python 3.4
functionality is implemented for the data types and modules.
(agc)
diff -r1.425 -r1.426 pkgsrc/lang/Makefile
diff -r0 -r1.1 pkgsrc/lang/micropython/DESCR
diff -r0 -r1.1 pkgsrc/lang/micropython/Makefile
diff -r0 -r1.1 pkgsrc/lang/micropython/PLIST
diff -r0 -r1.1 pkgsrc/lang/micropython/distinfo
diff -r0 -r1.1 pkgsrc/lang/micropython/patches/patch-Makefile
diff -r0 -r1.1 pkgsrc/lang/micropython/patches/patch-mpconfigport.h
--- pkgsrc/lang/Makefile 2015/12/30 15:08:24 1.425
+++ pkgsrc/lang/Makefile 2016/01/18 07:54:50 1.426
| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.425 2015/12/30 15:08:24 taca Exp $ | | 1 | # $NetBSD: Makefile,v 1.426 2016/01/18 07:54:50 agc Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | COMMENT= Programming languages | | 4 | COMMENT= Programming languages |
5 | | | 5 | |
6 | SUBDIR+= Cg-compiler | | 6 | SUBDIR+= Cg-compiler |
7 | SUBDIR+= LuaJIT | | 7 | SUBDIR+= LuaJIT |
8 | SUBDIR+= LuaJIT2 | | 8 | SUBDIR+= LuaJIT2 |
9 | SUBDIR+= STk | | 9 | SUBDIR+= STk |
10 | SUBDIR+= a60 | | 10 | SUBDIR+= a60 |
11 | SUBDIR+= abcl | | 11 | SUBDIR+= abcl |
12 | SUBDIR+= algol68g | | 12 | SUBDIR+= algol68g |
13 | SUBDIR+= asn1c | | 13 | SUBDIR+= asn1c |
14 | SUBDIR+= awka | | 14 | SUBDIR+= awka |
| @@ -111,26 +111,27 @@ SUBDIR+= ksi | | | @@ -111,26 +111,27 @@ SUBDIR+= ksi |
111 | SUBDIR+= libLLVM | | 111 | SUBDIR+= libLLVM |
112 | SUBDIR+= libLLVM34 | | 112 | SUBDIR+= libLLVM34 |
113 | SUBDIR+= librep | | 113 | SUBDIR+= librep |
114 | SUBDIR+= libtcl-nothread | | 114 | SUBDIR+= libtcl-nothread |
115 | SUBDIR+= likepython | | 115 | SUBDIR+= likepython |
116 | #SUBDIR+= lua # only contains Makefile fragments | | 116 | #SUBDIR+= lua # only contains Makefile fragments |
117 | SUBDIR+= lua51 | | 117 | SUBDIR+= lua51 |
118 | SUBDIR+= lua52 | | 118 | SUBDIR+= lua52 |
119 | SUBDIR+= lua53 | | 119 | SUBDIR+= lua53 |
120 | SUBDIR+= lush | | 120 | SUBDIR+= lush |
121 | SUBDIR+= maude | | 121 | SUBDIR+= maude |
122 | SUBDIR+= mawk | | 122 | SUBDIR+= mawk |
123 | SUBDIR+= mercury | | 123 | SUBDIR+= mercury |
| | | 124 | SUBDIR+= micropython |
124 | SUBDIR+= minischeme | | 125 | SUBDIR+= minischeme |
125 | SUBDIR+= mit-scheme-bin | | 126 | SUBDIR+= mit-scheme-bin |
126 | SUBDIR+= mono | | 127 | SUBDIR+= mono |
127 | SUBDIR+= mono-basic | | 128 | SUBDIR+= mono-basic |
128 | SUBDIR+= mono2 | | 129 | SUBDIR+= mono2 |
129 | SUBDIR+= moscow_ml | | 130 | SUBDIR+= moscow_ml |
130 | SUBDIR+= mpd | | 131 | SUBDIR+= mpd |
131 | SUBDIR+= nawk | | 132 | SUBDIR+= nawk |
132 | SUBDIR+= newlisp | | 133 | SUBDIR+= newlisp |
133 | SUBDIR+= newsqueak | | 134 | SUBDIR+= newsqueak |
134 | SUBDIR+= nhc98 | | 135 | SUBDIR+= nhc98 |
135 | SUBDIR+= nodejs | | 136 | SUBDIR+= nodejs |
136 | SUBDIR+= nodejs4 | | 137 | SUBDIR+= nodejs4 |
This is the MicroPython project, which aims to put an implementation
of Python 3.x on microcontrollers and small embedded systems.
WARNING: this project is in beta stage and is subject to changes of
the code-base, including project-wide name changes and API changes.
MicroPython implements the entire Python 3.4 syntax (including
exceptions, "with", "yield from", etc.). The following core datatypes
are provided: str (including basic Unicode support), bytes,
bytearray, tuple, list, dict, set, frozenset, array.array,
collections.namedtuple, classes and instances. Builtin modules
include sys, time, and struct. Note that only subset of Python 3.4
functionality is implemented for the data types and modules.
# $NetBSD: Makefile,v 1.1 2016/01/18 07:54:51 agc Exp $
DISTNAME= micropython-1.5.2
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GITHUB:=micropython/}
GITHUB_TAG= v1.5.2
MAINTAINER= agc@NetBSD.org
HOMEPAGE= https://micropython.org/
COMMENT= Embedded version of python
LICENSE= mit
WRKSRC= ${WRKDIR}/${DISTNAME}/unix
DIST_SUBDIR= ${PKGNAME_NOREV}
USE_TOOLS+= gmake pkg-config
AUTO_MKDIRS= yes
.include "../../devel/libffi/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@comment $NetBSD: PLIST,v 1.1 2016/01/18 07:54:51 agc Exp $
bin/micropython
bin/pip-micropython
$NetBSD: distinfo,v 1.1 2016/01/18 07:54:51 agc Exp $
SHA1 (micropython-1.5.2/micropython-1.5.2.tar.gz) = 493cf36aa722b50b6034efb8de6433dcea546b0f
RMD160 (micropython-1.5.2/micropython-1.5.2.tar.gz) = 0f5c316ecd716734fe8e1dbdf9a360ef6f126b85
SHA512 (micropython-1.5.2/micropython-1.5.2.tar.gz) = 309dcb20a3369ac5bec92a6a5cd8af37d671fc2a8e3b6a36c4c49d1f4730eaaa46dffb2351eb5783de12f045069554c22ee70c0100cf98ab09138ef42594a65a
Size (micropython-1.5.2/micropython-1.5.2.tar.gz) = 6673101 bytes
SHA1 (patch-Makefile) = fd7a3c143cd6c4137782b0ed2e1b361e13910364
SHA1 (patch-mpconfigport.h) = 7cd3b0604f6f7941e5a44d276fd8393ba71b5447
$NetBSD: patch-Makefile,v 1.1 2016/01/18 07:54:51 agc Exp $
Invoke gmake properly
--- Makefile 2016/01/09 21:43:06 1.1
+++ Makefile 2016/01/09 21:51:39
@@ -149,14 +149,13 @@
# install micropython in /usr/local/bin
TARGET = micropython
-PREFIX = $(DESTDIR)/usr/local
-BINDIR = $(PREFIX)/bin
+BINDIR = $(DESTDIR)${PREFIX}/bin
PIPSRC = ../tools/pip-micropython
PIPTARGET = pip-micropython
install: micropython
- install -D $(TARGET) $(BINDIR)/$(TARGET)
- install -D $(PIPSRC) $(BINDIR)/$(PIPTARGET)
+ ${BSD_INSTALL_PROGRAM} $(TARGET) $(BINDIR)/$(TARGET)
+ ${BSD_INSTALL_SCRIPT} $(PIPSRC) $(BINDIR)/$(PIPTARGET)
# uninstall micropython
uninstall:
@@ -196,12 +195,12 @@
../tools/make-frozen.py $(dir $^) > $@
# Select latest upip version available
-UPIP_TARBALL := $(shell ls -1 -v ../tools/micropython-upip-*.tar.gz | tail -n1)
+UPIP_TARBALL := $(shell ls -1 ../tools/micropython-upip-*.tar.gz | tail -n1)
$(BUILD)/frozen_upip/upip.py: $(UPIP_TARBALL)
$(ECHO) "MISC Preparing upip as frozen module"
$(Q)rm -rf $(BUILD)/micropython-upip-*
- $(Q)tar -C $(BUILD) -xz -f $^
+ $(Q)tar -C $(BUILD) -x -z -f $^
$(Q)rm -rf $(dir $@)
$(Q)mkdir -p $(dir $@)
$(Q)cp $(BUILD)/micropython-upip-*/upip*.py $(dir $@)
@@ -224,10 +223,10 @@
cd ../lib/libffi; ./autogen.sh
mkdir -p ../lib/libffi/build_dir; cd ../lib/libffi/build_dir; \
../configure $(CROSS_COMPILE_HOST) --prefix=$$PWD/out CC="$(CC)" CXX="$(CXX)" LD="$(LD)"; \
- make install-exec-recursive; make -C include install-data-am
+ ${MAKE} install-exec-recursive; ${MAKE} -C include install-data-am
axtls:
cd ../lib/axtls; cp config/upyconfig config/.config
- cd ../lib/axtls; make oldconfig -B
- cd ../lib/axtls; make clean
- cd ../lib/axtls; make all CC="$(CC)" LD="$(LD)"
+ cd ../lib/axtls; ${MAKE} oldconfig -B
+ cd ../lib/axtls; ${MAKE} clean
+ cd ../lib/axtls; ${MAKE} all CC="$(CC)" LD="$(LD)"
$NetBSD: patch-mpconfigport.h,v 1.1 2016/01/18 07:54:51 agc Exp $
Generalise for all BSDs
--- mpconfigport.h 2016/01/09 20:30:55 1.1
+++ mpconfigport.h 2016/01/09 20:32:14
@@ -251,7 +251,8 @@
// We need to provide a declaration/definition of alloca()
// unless support for it is disabled.
#if !defined(MICROPY_NO_ALLOCA) || MICROPY_NO_ALLOCA == 0
-#ifdef __FreeBSD__
+#include <sys/param.h>
+#if (defined(BSD) && BSD >= 199506)
#include <stdlib.h>
#else
#include <alloca.h>