Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102808725
D31855.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D31855.diff
View Options
diff --git a/lang/micropython/Makefile b/lang/micropython/Makefile
--- a/lang/micropython/Makefile
+++ b/lang/micropython/Makefile
@@ -1,48 +1,45 @@
PORTNAME= micropython
-PORTVERSION= 1.5.1
+PORTVERSION= 1.17
DISTVERSIONPREFIX= v
-PORTREVISION= 4
CATEGORIES= lang python
MAINTAINER= python@FreeBSD.org
COMMENT= Implementation of the Python language for microcontrollers
LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
-LIB_DEPENDS= libffi.so:devel/libffi
+BROKEN_armv6= fails to assemble: error: invalid operand for instruction
+BROKEN_armv7= fails to assemble: error: invalid operand for instruction
-USES= gmake pkgconfig python:3.4+,build readline shebangfix
+LIB_DEPENDS= libffi.so:devel/libffi
+USES= gmake pkgconfig python:,build
+USE_GCC= yes
USE_GITHUB= yes
+GH_TUPLE= micropython:axtls:531cab9:axtls \
+ pfalcon:berkeley-db-1.xx:35aaec4:bdb
-PLIST_FILES= bin/micropython
+MAKE_ARGS+= CC=${CC} CPP="${CC} -E" V=1
+MAKE_ENV+= CFLAGS_EXTRA="${CPPFLAGS} ${CFLAGS} -Wno-float-conversion" COPT=""
-BROKEN_armv6= fails to assemble: error: invalid operand for instruction
-BROKEN_armv7= fails to assemble: error: invalid operand for instruction
+# With aarch64 (QEMU) the float_parse and the float_parse_doubleprec tests
+# fail as they give a different output.
+TEST_TARGET= test
-WRKSRC_SUBDIR= unix
+BINARY_ALIAS= python3=${PYTHON_CMD}
-SHEBANG_FILES= ../tools/make-frozen.py
-MAKE_ARGS+= V=1
-MAKE_ENV+= PYTHON=${PYTHON_CMD} CFLAGS_EXTRA="${CPPFLAGS} ${CFLAGS}"
-TEST_TARGET= test
+BUILD_WRKSRC= ${WRKSRC}/ports/unix
+TEST_WRKSRC= ${WRKSRC}/ports/unix
-post-patch:
- @${REINPLACE_CMD} -e 's|-Werror||;/^COPT =/d; \
- s|ls -1 -v|ls -1|' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e 's|re_exec|mp_re_exec|' \
- ${WRKSRC}/../extmod/modure.c
- @${REINPLACE_CMD} -e 's|AS =|AS ?=|;s|LD =|LD ?=|; \
- s|CC =|CC ?=|;s|PYTHON =|PYTHON ?=|' \
- ${WRKSRC}/../py/mkenv.mk
- @${REINPLACE_CMD} -e 's|libc\.so\.6|libc\.so\.7|;' \
- ${WRKSRC}/../tests/unix/ffi_callback.py \
- ${WRKSRC}/../tests/unix/ffi_float.py
+PLIST_FILES= bin/micropython
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/micropython ${STAGEDIR}${PREFIX}/bin
+post-extract:
+ @${RM} -r ${WRKSRC}/lib/axtls ${WRKSRC}/lib/berkeley-db-1.xx
+ @${RLN} ${WRKSRC_axtls} ${WRKSRC}/lib/axtls
+ @${RLN} ${WRKSRC_bdb} ${WRKSRC}/lib/berkeley-db-1.xx
-pre-test:
- @${RM} ${WRKSRC}/../tests/basics/memoryerror.py
+do-install:
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/micropython ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>
diff --git a/lang/micropython/distinfo b/lang/micropython/distinfo
--- a/lang/micropython/distinfo
+++ b/lang/micropython/distinfo
@@ -1,2 +1,7 @@
-SHA256 (micropython-micropython-v1.5.1_GH0.tar.gz) = 95cc34089a1e40a992065ff9c9b67c121674c3bd6136a50882054fcac27485c2
-SIZE (micropython-micropython-v1.5.1_GH0.tar.gz) = 6635550
+TIMESTAMP = 1630664518
+SHA256 (micropython-micropython-v1.17_GH0.tar.gz) = c21dbf8144237b3dbe3847c9ad5264cd0f3104eb078c810b3986004cce8fcd70
+SIZE (micropython-micropython-v1.17_GH0.tar.gz) = 6467563
+SHA256 (micropython-axtls-531cab9_GH0.tar.gz) = cd1b9bf60d34e86e62046dd595ddb34b3960d36f44bf7a31d67e253a5bc24fe1
+SIZE (micropython-axtls-531cab9_GH0.tar.gz) = 1325384
+SHA256 (pfalcon-berkeley-db-1.xx-35aaec4_GH0.tar.gz) = 9c696582ce47557556c7d6a14c96236ae5913124d15a63d3a78b384336d1a817
+SIZE (pfalcon-berkeley-db-1.xx-35aaec4_GH0.tar.gz) = 273515
diff --git a/lang/micropython/files/patch-mpy-cross_Makefile b/lang/micropython/files/patch-mpy-cross_Makefile
new file mode 100644
--- /dev/null
+++ b/lang/micropython/files/patch-mpy-cross_Makefile
@@ -0,0 +1,26 @@
+* Avoid making all warnings into errors
+* Extra optimizations via COPT should be overwritable
+
+--- mpy-cross/Makefile.orig 2021-09-01 14:07:13 UTC
++++ mpy-cross/Makefile
+@@ -17,7 +17,7 @@ INC += -I$(BUILD)
+ INC += -I$(TOP)
+
+ # compiler settings
+-CWARN = -Wall -Werror
++CWARN = -Wall
+ CWARN += -Wextra -Wno-unused-parameter -Wpointer-arith
+ CFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
+ CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables
+@@ -25,9 +25,9 @@ CFLAGS += -fdata-sections -ffunction-sections -fno-asy
+ # Debugging/Optimization
+ ifdef DEBUG
+ CFLAGS += -g
+-COPT = -O0
++COPT ?= -O0
+ else
+-COPT = -Os #-DNDEBUG
++COPT ?= -Os #-DNDEBUG
+ endif
+
+ # On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.
diff --git a/lang/micropython/files/patch-ports_unix_Makefile b/lang/micropython/files/patch-ports_unix_Makefile
new file mode 100644
--- /dev/null
+++ b/lang/micropython/files/patch-ports_unix_Makefile
@@ -0,0 +1,13 @@
+* Avoid making warnings into errors
+
+--- ports/unix/Makefile.orig 2021-09-04 05:19:26 UTC
++++ ports/unix/Makefile
+@@ -38,7 +38,7 @@ INC += -I$(TOP)
+ INC += -I$(BUILD)
+
+ # compiler settings
+-CWARN = -Wall -Werror
++CWARN = -Wall
+ CWARN += -Wextra -Wno-unused-parameter -Wpointer-arith -Wdouble-promotion -Wfloat-conversion
+ CFLAGS += $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) -I$(VARIANT_DIR) $(CFLAGS_EXTRA)
+
diff --git a/lang/micropython/files/patch-tests_unix_ffi__callback.py b/lang/micropython/files/patch-tests_unix_ffi__callback.py
new file mode 100644
--- /dev/null
+++ b/lang/micropython/files/patch-tests_unix_ffi__callback.py
@@ -0,0 +1,13 @@
+Required to let pass the test "ffi_callback" successfully
+
+--- tests/unix/ffi_callback.py.orig 2021-09-04 05:46:01 UTC
++++ tests/unix/ffi_callback.py
+@@ -16,7 +16,7 @@ def ffi_open(names):
+ raise err
+
+
+-libc = ffi_open(("libc.so", "libc.so.0", "libc.so.6", "libc.dylib"))
++libc = ffi_open(("libc.so", "libc.so.0", "libc.so.7", "libc.dylib"))
+
+ qsort = libc.func("v", "qsort", "piip")
+
diff --git a/lang/micropython/files/patch-tests_unix_ffi__float.py b/lang/micropython/files/patch-tests_unix_ffi__float.py
new file mode 100644
--- /dev/null
+++ b/lang/micropython/files/patch-tests_unix_ffi__float.py
@@ -0,0 +1,13 @@
+Required to let pass the test "ffi_float" successfully
+
+--- tests/unix/ffi_float.py.orig 2021-09-04 05:47:22 UTC
++++ tests/unix/ffi_float.py
+@@ -17,7 +17,7 @@ def ffi_open(names):
+ raise err
+
+
+-libc = ffi_open(("libc.so", "libc.so.0", "libc.so.6", "libc.dylib"))
++libc = ffi_open(("libc.so", "libc.so.0", "libc.so.7", "libc.dylib"))
+
+ try:
+ strtof = libc.func("f", "strtof", "sp")
diff --git a/lang/micropython/pkg-descr b/lang/micropython/pkg-descr
--- a/lang/micropython/pkg-descr
+++ b/lang/micropython/pkg-descr
@@ -1,4 +1,6 @@
-Micro Python is a lean and fast implementation of the Python 3 programming
-language that is optimised to run on a microcontroller.
+Micro Python is a lean and efficient implementation of the Python 3
+programming language that includes a small subset of the Python
+standard library and is optimised to run on microcontrollers and in
+constrained environments.
WWW: https://www.micropython.org/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 11:24 AM (21 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14696654
Default Alt Text
D31855.diff (6 KB)
Attached To
Mode
D31855: lang/micropython: Update to 1.17
Attached
Detach File
Event Timeline
Log In to Comment