This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new fc25af7cd interpreters/berry: Patch CRLF upstream source directly
fc25af7cd is described below
commit fc25af7cd7595242d55d07583be723695ba4b945
Author: Frederick Blais <[email protected]>
AuthorDate: Sun Jun 28 12:10:25 2026 -0400
interpreters/berry: Patch CRLF upstream source directly
Berry's downloaded default/berry.c uses CRLF line endings, while the local
NuttX patch was LF. Fresh Linux and CMake builds failed when patch saw the
line-ending mismatch.
Regenerate the local Berry patch against the pinned upstream CRLF source
and apply it directly in both Make and CMake fetch paths. This keeps the
integration working until the Berry-side change is merged upstream and the
pinned commit can be updated.
Signed-off-by: Frederick Blais <[email protected]>
---
interpreters/berry/.gitattributes | 1 +
.../0001-Fix-Berry-default-port-for-NuttX.patch | 78 +++++++++++++++-------
2 files changed, 55 insertions(+), 24 deletions(-)
diff --git a/interpreters/berry/.gitattributes
b/interpreters/berry/.gitattributes
new file mode 100644
index 000000000..0a83e0afa
--- /dev/null
+++ b/interpreters/berry/.gitattributes
@@ -0,0 +1 @@
+0001-Fix-Berry-default-port-for-NuttX.patch whitespace=cr-at-eol,-blank-at-eol
diff --git a/interpreters/berry/0001-Fix-Berry-default-port-for-NuttX.patch
b/interpreters/berry/0001-Fix-Berry-default-port-for-NuttX.patch
index 39fc4972e..5e720d07d 100644
--- a/interpreters/berry/0001-Fix-Berry-default-port-for-NuttX.patch
+++ b/interpreters/berry/0001-Fix-Berry-default-port-for-NuttX.patch
@@ -1,27 +1,57 @@
diff --git a/default/berry.c b/default/berry.c
-index d6ea5d1..bb95fc7 100644
+index 203773f..0df2a99 100644
--- a/default/berry.c
+++ b/default/berry.c
-@@ -22 +22,3 @@
--#if defined(__linux)
-+#if defined(__NuttX__)
-+ #define OS_NAME "NuttX"
-+#elif defined(__linux)
-@@ -103 +105 @@
-- const char *optarg;
-+ const char *optvalue;
-@@ -148 +150 @@
-- opt->optarg = argv[opt->idx++]; /* save the argument */
-+ opt->optvalue = argv[opt->idx++]; /* save the argument */
-@@ -151 +153 @@
-- opt->optarg = NULL;
-+ opt->optvalue = NULL;
-@@ -272 +274 @@
-- opt->modulepath = opt->optarg;
-+ opt->modulepath = opt->optvalue;
-@@ -277 +279 @@
-- opt->src = opt->optarg;
-+ opt->src = opt->optvalue;
-@@ -281 +283 @@
-- opt->dst = opt->optarg;
-+ opt->dst = opt->optvalue;
+@@ -19,7 +19,9 @@
+ #endif
+
+ /* detect operating system name */
+-#if defined(__linux)
++#if defined(__NuttX__)
++ #define OS_NAME "NuttX"
++#elif defined(__linux)
+ #define OS_NAME "Linux"
+ #elif defined(__unix)
+ #define OS_NAME "Unix"
+@@ -98,7 +100,7 @@
+ struct arg_opts {
+ int idx;
+ const char *pattern;
+- const char *optarg;
++ const char *optvalue;
+ const char *errarg;
+ const char *src;
+ const char *dst;
+@@ -143,10 +145,10 @@ static int arg_getopt(struct arg_opts *opt, int argc,
char *argv[])
+ /* the '?' indicates an optional argument after the option */
+ if (++opt->idx < argc && res != NULL
+ && res[1] == '?' && *argv[opt->idx] != '-') {
+- opt->optarg = argv[opt->idx++]; /* save the argument */
++ opt->optvalue = argv[opt->idx++]; /* save the argument */
+ return *res;
+ }
+- opt->optarg = NULL;
++ opt->optvalue = NULL;
+ opt->errarg = arg;
+ return res != NULL ? *res : '?';
+ }
+@@ -267,16 +269,16 @@ static int parse_arg(struct arg_opts *opt, int argc,
char *argv[])
+ case 's': args |= arg_s; break;
+ case 'm':
+ args |= arg_m;
+- opt->modulepath = opt->optarg;
++ opt->modulepath = opt->optvalue;
+ break;
+ case '?': return args | arg_err;
+ case 'c':
+ args |= arg_c;
+- opt->src = opt->optarg;
++ opt->src = opt->optvalue;
+ break;
+ case 'o':
+ args |= arg_o;
+- opt->dst = opt->optarg;
++ opt->dst = opt->optvalue;
+ break;
+ default:
+ break;