pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/micropython
Module Name: pkgsrc
Committed By: hauke
Date: Wed Nov 29 15:13:32 UTC 2017
Modified Files:
pkgsrc/lang/micropython: DESCR Makefile PLIST distinfo
pkgsrc/lang/micropython/patches: patch-unix_Makefile
patch-unix_mpconfigport.h
Added Files:
pkgsrc/lang/micropython/patches: patch-lib_utils_printf.c
patch-mpy-cross_mpconfigport.h patch-py_mkenv.mk
patch-unix_mpthreadport.c
Removed Files:
pkgsrc/lang/micropython/patches: patch-py_obj.h
Log Message:
Update lang/micropython to v1.9.2.
Changes are many, but upstream does not maintain a changelog.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/micropython/DESCR \
pkgsrc/lang/micropython/PLIST
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/micropython/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/micropython/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/micropython/patches/patch-lib_utils_printf.c \
pkgsrc/lang/micropython/patches/patch-mpy-cross_mpconfigport.h \
pkgsrc/lang/micropython/patches/patch-py_mkenv.mk \
pkgsrc/lang/micropython/patches/patch-unix_mpthreadport.c
cvs rdiff -u -r1.1 -r0 pkgsrc/lang/micropython/patches/patch-py_obj.h
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/micropython/patches/patch-unix_Makefile \
pkgsrc/lang/micropython/patches/patch-unix_mpconfigport.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/micropython/DESCR
diff -u pkgsrc/lang/micropython/DESCR:1.1 pkgsrc/lang/micropython/DESCR:1.2
--- pkgsrc/lang/micropython/DESCR:1.1 Mon Jan 18 07:54:51 2016
+++ pkgsrc/lang/micropython/DESCR Wed Nov 29 15:13:31 2017
@@ -11,3 +11,5 @@ bytearray, tuple, list, dict, set, froze
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.
+
+Documentation is at <http://docs.micropython.org/en/latest/>.
Index: pkgsrc/lang/micropython/PLIST
diff -u pkgsrc/lang/micropython/PLIST:1.1 pkgsrc/lang/micropython/PLIST:1.2
--- pkgsrc/lang/micropython/PLIST:1.1 Mon Jan 18 07:54:51 2016
+++ pkgsrc/lang/micropython/PLIST Wed Nov 29 15:13:31 2017
@@ -1,3 +1,7 @@
-@comment $NetBSD: PLIST,v 1.1 2016/01/18 07:54:51 agc Exp $
+@comment $NetBSD: PLIST,v 1.2 2017/11/29 15:13:31 hauke Exp $
bin/micropython
-bin/pip-micropython
+@pkgdir share/examples/micropython/unix
+@pkgdir share/examples/micropython/network
+@pkgdir share/examples/micropython/hwapi
+@pkgdir share/examples/micropython/embedding
+@pkgdir share/examples/micropython/SDdatalogger
Index: pkgsrc/lang/micropython/Makefile
diff -u pkgsrc/lang/micropython/Makefile:1.2 pkgsrc/lang/micropython/Makefile:1.3
--- pkgsrc/lang/micropython/Makefile:1.2 Tue Mar 22 19:01:17 2016
+++ pkgsrc/lang/micropython/Makefile Wed Nov 29 15:13:31 2017
@@ -1,27 +1,42 @@
-# $NetBSD: Makefile,v 1.2 2016/03/22 19:01:17 joerg Exp $
+# $NetBSD: Makefile,v 1.3 2017/11/29 15:13:31 hauke Exp $
-DISTNAME= micropython-1.5.2
+DISTNAME= micropython-1.9.2
CATEGORIES= lang
-MASTER_SITES= ${MASTER_SITE_GITHUB:=micropython/}
-GITHUB_TAG= v1.5.2
+MASTER_SITES= http://micropython.org/resources/source/
+EXTRACT_SUFX= .tar.xz
MAINTAINER= agc%NetBSD.org@localhost
HOMEPAGE= https://micropython.org/
-COMMENT= Embedded version of python
+COMMENT= Embedded version of python 3
LICENSE= mit
DIST_SUBDIR= ${PKGNAME_NOREV}
BUILD_DIRS= unix
-USE_TOOLS+= gmake pkg-config
+USE_TOOLS+= pax gmake pkg-config
AUTO_MKDIRS= yes
-MAKE_FLAGS+= PYTHON=${PYTHONBIN}
+PYTHON_VERSIONS_INCOMPATIBLE= 27
+PYTHON_FOR_BUILD_ONLY= yes
+
+MAKE_ENV+= PYTHON=${PYTHONBIN:Q}
+MAKE_ENV+= MICROPY_CPYTHON3=${PYTHONBIN:Q}
REPLACE_PYTHON+= tools/make-frozen.py
+REPLACE_PYTHON+= tests/run-tests
-PYTHON_FOR_BUILD_ONLY= yes
+pre-configure:
+ cd ${WRKSRC}/lib/axtls && ${GMAKE} clean
+
+pre-build:
+ cd ${WRKSRC}/unix && ${GMAKE} axtls
+
+do-test:
+ cd ${WRKSRC}/unix && env ${MAKE_ENV} ${GMAKE} test
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/unix/micropython ${DESTDIR}${PREFIX}/bin
.include "../../devel/libffi/buildlink3.mk"
.include "../../lang/python/application.mk"
Index: pkgsrc/lang/micropython/distinfo
diff -u pkgsrc/lang/micropython/distinfo:1.3 pkgsrc/lang/micropython/distinfo:1.4
--- pkgsrc/lang/micropython/distinfo:1.3 Fri Mar 25 21:11:16 2016
+++ pkgsrc/lang/micropython/distinfo Wed Nov 29 15:13:31 2017
@@ -1,9 +1,12 @@
-$NetBSD: distinfo,v 1.3 2016/03/25 21:11:16 joerg Exp $
+$NetBSD: distinfo,v 1.4 2017/11/29 15:13:31 hauke 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-py_obj.h) = f148e1e88ef6347c93fca5d367b36be805267f74
-SHA1 (patch-unix_Makefile) = e40d7413ec1140e6a408b82708f1749b3cb879bb
-SHA1 (patch-unix_mpconfigport.h) = a93806f5db48cc61096a899ea3558afc46468ff1
+SHA1 (micropython-1.9.2/micropython-1.9.2.tar.xz) = c14b2e7ebaefe86e60f4b11cf738947cf8204fba
+RMD160 (micropython-1.9.2/micropython-1.9.2.tar.xz) = 9c22131546c3e49bfa28b5f71994b20ee819d094
+SHA512 (micropython-1.9.2/micropython-1.9.2.tar.xz) = 67d070d47c19a100d164f9b4e4ec7eba10cf5ee49089f5f4d6a8338a9d72d6cffa41c2f6de73c8b169ba8011961b8ef197241fa5bea6813f77f65ef4cf2f4e4b
+Size (micropython-1.9.2/micropython-1.9.2.tar.xz) = 6699860 bytes
+SHA1 (patch-lib_utils_printf.c) = 6c152cd10a5fb0091d1149a0a50b202df6a6e931
+SHA1 (patch-mpy-cross_mpconfigport.h) = 78cf0865c60bf8fbbecb318e4f0597662076459e
+SHA1 (patch-py_mkenv.mk) = ff844cd4bcb6f9a2a27e02a62a066b4b70899c88
+SHA1 (patch-unix_Makefile) = 51a636af55719e454f1464aa7c1c06c0808de56a
+SHA1 (patch-unix_mpconfigport.h) = 544c0217ffcc8755adbb8c63a4b325af9b7ff8a2
+SHA1 (patch-unix_mpthreadport.c) = 5a021a4b1b7426ea7bae302870a04008381ee9c7
Index: pkgsrc/lang/micropython/patches/patch-unix_Makefile
diff -u pkgsrc/lang/micropython/patches/patch-unix_Makefile:1.1 pkgsrc/lang/micropython/patches/patch-unix_Makefile:1.2
--- pkgsrc/lang/micropython/patches/patch-unix_Makefile:1.1 Tue Mar 22 19:01:17 2016
+++ pkgsrc/lang/micropython/patches/patch-unix_Makefile Wed Nov 29 15:13:32 2017
@@ -1,54 +1,31 @@
-$NetBSD: patch-unix_Makefile,v 1.1 2016/03/22 19:01:17 joerg Exp $
+$NetBSD: patch-unix_Makefile,v 1.2 2017/11/29 15:13:32 hauke Exp $
-Invoke gmake properly
+cpp(1) only accepts one file for input, we want cc -E here.
---- unix/Makefile.orig 2015-12-31 14:43:19.000000000 +0000
+Set up for pkgsrc install
+
+--- unix/Makefile.orig 2017-08-23 01:50:11.000000000 +0000
+++ unix/Makefile
-@@ -149,14 +149,13 @@ test: $(PROG) ../tests/run-tests
+@@ -73,6 +73,7 @@ LDFLAGS_ARCH = -Wl,-map,$@.map -Wl,-dead
+ else
+ # Use gcc syntax for map file
+ LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sections
++CPP = $(CC) -E
+ endif
+ LDFLAGS = $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA)
+
+@@ -193,12 +194,10 @@ test: $(PROG) $(TOP)/tests/run-tests
# 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
++BINDIR = $(DESTDIR)$(PREFIX)/bin
install: micropython
-- install -D $(TARGET) $(BINDIR)/$(TARGET)
-- install -D $(PIPSRC) $(BINDIR)/$(PIPTARGET)
+- install -d $(BINDIR)
+- install $(TARGET) $(BINDIR)/$(TARGET)
+ ${BSD_INSTALL_PROGRAM} $(TARGET) $(BINDIR)/$(TARGET)
-+ ${BSD_INSTALL_SCRIPT} $(PIPSRC) $(BINDIR)/$(PIPTARGET)
# uninstall micropython
uninstall:
-@@ -196,12 +195,12 @@ $(BUILD)/_frozen_upip.c: $(BUILD)/frozen
- ../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 @@ libffi:
- 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)"
Index: pkgsrc/lang/micropython/patches/patch-unix_mpconfigport.h
diff -u pkgsrc/lang/micropython/patches/patch-unix_mpconfigport.h:1.1 pkgsrc/lang/micropython/patches/patch-unix_mpconfigport.h:1.2
--- pkgsrc/lang/micropython/patches/patch-unix_mpconfigport.h:1.1 Tue Mar 22 19:01:17 2016
+++ pkgsrc/lang/micropython/patches/patch-unix_mpconfigport.h Wed Nov 29 15:13:32 2017
@@ -1,16 +1,16 @@
-$NetBSD: patch-unix_mpconfigport.h,v 1.1 2016/03/22 19:01:17 joerg Exp $
+$NetBSD: patch-unix_mpconfigport.h,v 1.2 2017/11/29 15:13:32 hauke Exp $
-Generalise for all BSDs
+Modern *BSDs heclare alloca() in <stdlib.h>
---- unix/mpconfigport.h.orig 2015-12-31 14:43:19.000000000 +0000
+--- unix/mpconfigport.h.orig 2017-08-23 01:50:11.000000000 +0000
+++ unix/mpconfigport.h
-@@ -261,7 +261,8 @@ void mp_hal_dupterm_tx_strn(const char *
+@@ -291,7 +291,8 @@ void mp_unix_mark_exec(void);
// 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)
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#include <stdlib.h>
#else
#include <alloca.h>
Added files:
Index: pkgsrc/lang/micropython/patches/patch-lib_utils_printf.c
diff -u /dev/null pkgsrc/lang/micropython/patches/patch-lib_utils_printf.c:1.1
--- /dev/null Wed Nov 29 15:13:32 2017
+++ pkgsrc/lang/micropython/patches/patch-lib_utils_printf.c Wed Nov 29 15:13:32 2017
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_utils_printf.c,v 1.1 2017/11/29 15:13:32 hauke Exp $
+
+Undefine macro names we intend to implement as functions
+
+--- lib/utils/printf.c.orig 2017-08-23 01:50:10.000000000 +0000
++++ lib/utils/printf.c
+@@ -40,6 +40,10 @@
+ #endif
+
+ #undef putchar // Some stdlibs have a #define for putchar
++
++#undef snprintf
++#undef vsnprintf
++
+ int printf(const char *fmt, ...);
+ int vprintf(const char *fmt, va_list ap);
+ int putchar(int c);
Index: pkgsrc/lang/micropython/patches/patch-mpy-cross_mpconfigport.h
diff -u /dev/null pkgsrc/lang/micropython/patches/patch-mpy-cross_mpconfigport.h:1.1
--- /dev/null Wed Nov 29 15:13:32 2017
+++ pkgsrc/lang/micropython/patches/patch-mpy-cross_mpconfigport.h Wed Nov 29 15:13:32 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-mpy-cross_mpconfigport.h,v 1.1 2017/11/29 15:13:32 hauke Exp $
+
+Modern *BSDs heclare alloca() in <stdlib.h>
+
+--- mpy-cross/mpconfigport.h.orig 2017-08-23 01:50:10.000000000 +0000
++++ mpy-cross/mpconfigport.h
+@@ -115,7 +115,7 @@ typedef long mp_off_t;
+ #endif
+
+ // We need to provide a declaration/definition of alloca()
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ #include <stdlib.h>
+ #elif defined( _WIN32 )
+ #include <malloc.h>
Index: pkgsrc/lang/micropython/patches/patch-py_mkenv.mk
diff -u /dev/null pkgsrc/lang/micropython/patches/patch-py_mkenv.mk:1.1
--- /dev/null Wed Nov 29 15:13:32 2017
+++ pkgsrc/lang/micropython/patches/patch-py_mkenv.mk Wed Nov 29 15:13:32 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-py_mkenv.mk,v 1.1 2017/11/29 15:13:32 hauke Exp $
+
+Set the Python's name in pkg Makefile
+
+--- py/mkenv.mk.orig 2017-11-01 00:19:56.000000000 +0000
++++ py/mkenv.mk
+@@ -42,7 +42,7 @@ ECHO = @echo
+ CP = cp
+ MKDIR = mkdir
+ SED = sed
+-PYTHON = python
++PYTHON ?= python
+
+ AS = $(CROSS_COMPILE)as
+ CC = $(CROSS_COMPILE)gcc
Index: pkgsrc/lang/micropython/patches/patch-unix_mpthreadport.c
diff -u /dev/null pkgsrc/lang/micropython/patches/patch-unix_mpthreadport.c:1.1
--- /dev/null Wed Nov 29 15:13:32 2017
+++ pkgsrc/lang/micropython/patches/patch-unix_mpthreadport.c Wed Nov 29 15:13:32 2017
@@ -0,0 +1,21 @@
+$NetBSD: patch-unix_mpthreadport.c,v 1.1 2017/11/29 15:13:32 hauke Exp $
+
+NetBSD does not (yet) #define PTHREAD_STACK_MIN
+
+--- unix/mpthreadport.c.orig 2017-08-23 01:50:11.000000000 +0000
++++ unix/mpthreadport.c
+@@ -140,11 +140,13 @@ void mp_thread_create(void *(*entry)(voi
+ *stack_size = 8192 * BYTES_PER_WORD;
+ }
+
++#ifdef PTHREAD_STACK_MIN /* NetBSD */
+ // minimum stack size is set by pthreads
+ if (*stack_size < PTHREAD_STACK_MIN) {
+ *stack_size = PTHREAD_STACK_MIN;
+ }
+-
++#endif /* PTHREAD_STACK_MIN */
++
+ // set thread attributes
+ pthread_attr_t attr;
+ int ret = pthread_attr_init(&attr);
Home |
Main Index |
Thread Index |
Old Index