Date: Sat, 7 Jun 2014 11:16:09 +0000 (UTC) From: Marcus von Appen <mva@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r356895 - in head/lang: . micropython micropython/files Message-ID: <201406071116.s57BG9LG060191@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mva Date: Sat Jun 7 11:16:08 2014 New Revision: 356895 URL: http://svnweb.freebsd.org/changeset/ports/356895 QAT: https://qat.redports.org/buildarchive/r356895/ Log: Micro Python is a lean and fast implementation of the Python 3 programming language that is optimised to run on a microcontroller. WWW: http://www.micropython.org Added: head/lang/micropython/ head/lang/micropython/Makefile (contents, props changed) head/lang/micropython/distinfo (contents, props changed) head/lang/micropython/files/ head/lang/micropython/files/patch-builtinimport.c (contents, props changed) head/lang/micropython/files/patch-modtime.c (contents, props changed) head/lang/micropython/files/patch-objfun.c (contents, props changed) head/lang/micropython/files/patch-runtime.c (contents, props changed) head/lang/micropython/pkg-descr (contents, props changed) Modified: head/lang/Makefile Modified: head/lang/Makefile ============================================================================== --- head/lang/Makefile Sat Jun 7 10:16:05 2014 (r356894) +++ head/lang/Makefile Sat Jun 7 11:16:08 2014 (r356895) @@ -154,6 +154,7 @@ SUBDIR += mawk SUBDIR += mdk SUBDIR += metaocaml + SUBDIR += micropython SUBDIR += mit-scheme SUBDIR += mixal SUBDIR += mlton Added: head/lang/micropython/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/micropython/Makefile Sat Jun 7 11:16:08 2014 (r356895) @@ -0,0 +1,45 @@ +# $FreeBSD$ + +PORTNAME= micropython +PORTVERSION= 1.0.1 +CATEGORIES= lang python + +MAINTAINER= mva@FreeBSD.org +COMMENT= Implementation of the Python language for microcontrollers + +LICENSE= MIT + +LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi + +USE_PYTHON_BUILD= yes +USES= gmake shebangfix pkgconfig + +USE_GITHUB= yes +GH_ACCOUNT= micropython +GH_PROJECT= micropython +GH_TAGNAME= v1.0.1 +GH_COMMIT= a56f31d + +PLIST_FILES= bin/micropython + +WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}/unix + +SHEBANG_FILES= ../py/py-version.sh +bash_CMD?= /bin/sh +MAKE_ARGS+= V=1 +MAKE_ENV+= PYTHON=${PYTHON_CMD} + +post-patch: + @${REINPLACE_CMD} -e 's|-Werror||;s|-ldl||' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's|AS =|AS ?=|;s|LD =|LD ?=|; \ + s|CC =|CC ?=|;s|PYTHON =|PYTHON ?=|' \ + ${WRKSRC}/../py/mkenv.mk + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/micropython ${STAGEDIR}${PREFIX}/bin + +regression-test: build + ${RM} ${WRKSRC}/../tests/basics/memoryerror.py + cd ${WRKSRC} && ${MAKE_CMD} test + +.include <bsd.port.mk> Added: head/lang/micropython/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/micropython/distinfo Sat Jun 7 11:16:08 2014 (r356895) @@ -0,0 +1,2 @@ +SHA256 (micropython-1.0.1.tar.gz) = 6fcd4e7987a9691025c24d1b2c2946ff0d7fb912f3869dfcee52143dfbd8a4e2 +SIZE (micropython-1.0.1.tar.gz) = 4693643 Added: head/lang/micropython/files/patch-builtinimport.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/micropython/files/patch-builtinimport.c Sat Jun 7 11:16:08 2014 (r356895) @@ -0,0 +1,14 @@ +--- ../py/builtinimport.c.orig 2014-06-05 06:09:16.000000000 +0200 ++++ ../py/builtinimport.c 2014-06-05 06:09:56.000000000 +0200 +@@ -28,7 +28,11 @@ + #include <stdio.h> + #include <string.h> + #include <assert.h> ++#ifndef __FreeBSD__ + #include <alloca.h> ++#else ++#include <stdlib.h> ++#endif + + #include "mpconfig.h" + #include "nlr.h" Added: head/lang/micropython/files/patch-modtime.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/micropython/files/patch-modtime.c Sat Jun 7 11:16:08 2014 (r356895) @@ -0,0 +1,11 @@ +--- modtime.c.orig 2014-06-05 20:07:38.000000000 +0200 ++++ modtime.c 2014-06-06 07:58:58.000000000 +0200 +@@ -59,6 +59,8 @@ + #define CLOCK_DIV 1000.0 + #elif defined(MP_CLOCKS_PER_SEC) && (MP_CLOCKS_PER_SEC == 1000) // WIN32 + #define CLOCK_DIV 1.0 ++#elif defined(__FreeBSD__) && (MP_CLOCKS_PER_SEC == 128) ++#define CLOCK_DIV (1.0 / 128.0) + #else + #error Unsupported clock() implementation + #endif Added: head/lang/micropython/files/patch-objfun.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/micropython/files/patch-objfun.c Sat Jun 7 11:16:08 2014 (r356895) @@ -0,0 +1,14 @@ +--- ../py/objfun.c.orig 2014-06-04 22:09:47.000000000 +0200 ++++ ../py/objfun.c 2014-06-04 22:10:16.000000000 +0200 +@@ -27,7 +27,11 @@ + #include <stdbool.h> + #include <string.h> + #include <assert.h> ++#ifndef __FreeBSD__ + #include <alloca.h> ++#else ++#include <stdlib.h> ++#endif + + #include "mpconfig.h" + #include "nlr.h" Added: head/lang/micropython/files/patch-runtime.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/micropython/files/patch-runtime.c Sat Jun 7 11:16:08 2014 (r356895) @@ -0,0 +1,14 @@ +--- ../py/runtime.c.orig 2014-06-04 22:05:32.000000000 +0200 ++++ ../py/runtime.c 2014-06-04 22:06:16.000000000 +0200 +@@ -27,7 +27,11 @@ + #include <stdio.h> + #include <string.h> + #include <assert.h> ++#ifndef __FreeBSD__ + #include <alloca.h> ++#else ++#include <stdlib.h> /* alloca() */ ++#endif + + #include "mpconfig.h" + #include "nlr.h" Added: head/lang/micropython/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/micropython/pkg-descr Sat Jun 7 11:16:08 2014 (r356895) @@ -0,0 +1,4 @@ +Micro Python is a lean and fast implementation of the Python 3 programming +language that is optimised to run on a microcontroller. + +WWW: http://www.micropython.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406071116.s57BG9LG060191>