pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/micropython Adjust default package path for pkgsr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/51f99a822065
branches:  trunk
changeset: 372239:51f99a822065
user:      hauke <hauke%pkgsrc.org@localhost>
date:      Thu Nov 30 14:41:30 2017 +0000

description:
Adjust default package path for pkgsrc build.

diffstat:

 lang/micropython/Makefile                  |  10 ++++++++--
 lang/micropython/distinfo                  |   3 ++-
 lang/micropython/patches/patch-unix_main.c |  15 +++++++++++++++
 3 files changed, 25 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r 3520b9d9ae53 -r 51f99a822065 lang/micropython/Makefile
--- a/lang/micropython/Makefile Thu Nov 30 11:17:11 2017 +0000
+++ b/lang/micropython/Makefile Thu Nov 30 14:41:30 2017 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2017/11/29 16:34:40 hauke Exp $
+# $NetBSD: Makefile,v 1.5 2017/11/30 14:41:30 hauke Exp $
 
 DISTNAME=      micropython-1.9.2
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    lang
 MASTER_SITES=  http://micropython.org/resources/source/
 EXTRACT_SUFX=  .tar.xz
@@ -27,6 +27,12 @@
 REPLACE_PYTHON+=       tools/make-frozen.py
 REPLACE_PYTHON+=       tests/run-tests
 
+SUBST_CLASSES+=                 fix-paths
+SUBST_STAGE.fix-paths=          pre-configure
+SUBST_MESSAGE.fix-paths=        Fixing absolute paths.
+SUBST_FILES.fix-paths=          unix/main.c
+SUBST_SED.fix-paths=            -e 's,%PREFIX%,${PREFIX},g'
+
 pre-configure:
        cd ${WRKSRC}/lib/axtls && ${GMAKE} clean
 
diff -r 3520b9d9ae53 -r 51f99a822065 lang/micropython/distinfo
--- a/lang/micropython/distinfo Thu Nov 30 11:17:11 2017 +0000
+++ b/lang/micropython/distinfo Thu Nov 30 14:41:30 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2017/11/29 16:34:40 hauke Exp $
+$NetBSD: distinfo,v 1.6 2017/11/30 14:41:30 hauke Exp $
 
 SHA1 (micropython-1.9.2/micropython-1.9.2.tar.xz) = c14b2e7ebaefe86e60f4b11cf738947cf8204fba
 RMD160 (micropython-1.9.2/micropython-1.9.2.tar.xz) = 9c22131546c3e49bfa28b5f71994b20ee819d094
@@ -8,5 +8,6 @@
 SHA1 (patch-mpy-cross_mpconfigport.h) = 78cf0865c60bf8fbbecb318e4f0597662076459e
 SHA1 (patch-py_mkenv.mk) = ff844cd4bcb6f9a2a27e02a62a066b4b70899c88
 SHA1 (patch-unix_Makefile) = 459483caf54b9180f67bd07bbfa7fcf6088de1cc
+SHA1 (patch-unix_main.c) = 8c199a25aaf5bef34a86754b1e492554903dad5b
 SHA1 (patch-unix_mpconfigport.h) = 544c0217ffcc8755adbb8c63a4b325af9b7ff8a2
 SHA1 (patch-unix_mpthreadport.c) = 5a021a4b1b7426ea7bae302870a04008381ee9c7
diff -r 3520b9d9ae53 -r 51f99a822065 lang/micropython/patches/patch-unix_main.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/micropython/patches/patch-unix_main.c        Thu Nov 30 14:41:30 2017 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-unix_main.c,v 1.1 2017/11/30 14:41:30 hauke Exp $
+
+Adjust default package path.
+
+--- unix/main.c.orig   2017-08-23 01:50:11.000000000 +0000
++++ unix/main.c
+@@ -450,7 +450,7 @@ MP_NOINLINE int main_(int argc, char **a
+         #ifdef MICROPY_PY_SYS_PATH_DEFAULT
+         path = MICROPY_PY_SYS_PATH_DEFAULT;
+         #else
+-        path = "~/.micropython/lib:/usr/lib/micropython";
++        path = "~/.micropython/lib:%PREFIX%/lib/micropython";
+         #endif
+     }
+     size_t path_num = 1; // [0] is for current dir (or base dir of the script)



Home | Main Index | Thread Index | Old Index