aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2024-01-06 21:09:37 +0000
committerMikhail Teterin <mi@FreeBSD.org>2024-01-06 21:09:37 +0000
commitf1858632125df1acfb81ae32c202e9b32489bdee (patch)
tree206ce9da4adae17db43ad78e2fbbacf95c38af72
parentdadf625e033d4182a614cbd7affc131e5255b5a9 (diff)
downloadports-f1858632125df1acfb81ae32c202e9b32489bdee.tar.gz
ports-f1858632125df1acfb81ae32c202e9b32489bdee.zip
lang/scm: stop patching the unused gmalloc.c
Also add a patch from Debian and (what seems like an improvement) from the upstream's CVS-repository.
-rw-r--r--lang/scm/Makefile3
-rw-r--r--lang/scm/files/patch-add-missing-edit-line-feature22
-rw-r--r--lang/scm/files/patch-cvs25
-rw-r--r--lang/scm/files/patch-warnings11
4 files changed, 50 insertions, 11 deletions
diff --git a/lang/scm/Makefile b/lang/scm/Makefile
index 5a8b882fae9b..3a0555a4054a 100644
--- a/lang/scm/Makefile
+++ b/lang/scm/Makefile
@@ -53,6 +53,8 @@ SCM_MODULES= byte.so bytenumb.so differ.so edline.so gsubr.so \
socket.so unix.so
SCM_MODULES_X11=x.so
+EXTRACT_AFTER_ARGS= --exclude gmalloc.c
+
post-extract:
${LN} -s ${LOCALBASE}/share/slib ${WRKDIR}
@@ -85,7 +87,6 @@ post-patch:
s|editline freebsd "" "|editline freebsd "${LIBEDIT_SUB1}| ; \
s|-lreadline")$$|${LIBEDIT_SUB2} -lreadline")| ; \
s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/build.scm
- @${REINPLACE_CMD} -e 's|__osf__|__FreeBSD__|' ${WRKSRC}/gmalloc.c
@${REINPLACE_CMD} -e 's|gnuregex\.h|gnu/regex.h|g' ${WRKSRC}/rgx.c
@${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|g' \
${WRKSRC}/xgen.scm
diff --git a/lang/scm/files/patch-add-missing-edit-line-feature b/lang/scm/files/patch-add-missing-edit-line-feature
new file mode 100644
index 000000000000..0c3746e53331
--- /dev/null
+++ b/lang/scm/files/patch-add-missing-edit-line-feature
@@ -0,0 +1,22 @@
+Obtained from Debian...
+
+ -mi
+
+Description: Add missing "edit-line" feature
+ Don't know why it was missing.
+Author: astian <astian@elude.in>
+Forwarded: no
+Last-Update: 2018-03-03
+
+--- edline.c
++++ edline.c
+@@ -65,6 +65,9 @@ void init_edline()
+ make_subr(s_def_outport, tc7_subr_0, def_outport);
+ make_subr(s_readline, tc7_subr_1, lreadline);
+ make_subr(s_add_history, tc7_subr_1, ladd_history);
++
++ add_feature("edit-line");
++
+ if (scm_ldprog(s_Iedline))
+ wta(*loc_errobj, "couldn't init", s_Iedline);
+ }
diff --git a/lang/scm/files/patch-cvs b/lang/scm/files/patch-cvs
new file mode 100644
index 000000000000..ab2a4e31b63b
--- /dev/null
+++ b/lang/scm/files/patch-cvs
@@ -0,0 +1,25 @@
+A couple of fixes from upstream's CVS-repository.
+--- sys.c 2017-10-22 19:48:07.000000000 -0400
++++ sys.c 2023-07-21 18:36:30.000000000 -0400
+@@ -1523,5 +1523,5 @@
+ info.name = name;
+ for (isubr = subrs_gra.len; 0 < isubr--;) {
+- if (0==strcmp(((char **)subrs_gra.elts)[isubr], name)) {
++ if (0==strcmp(((subr_info *)subrs_gra.elts)[isubr].name, name)) {
+ scm_warn(s_redefining, (char *)name, UNDEFINED);
+ goto foundit;
+@@ -1650,5 +1650,6 @@
+ estk = scm_estk;
+ #else
+- from[1] = BOOL_F; /* Can't write to parent stack */
++ /* Can't write to parent stack, it is now shared. */
++ SCM_ESTK_PARENT_WRITABLEP(scm_estk) = BOOL_F;
+ estk = must_malloc_cell((long)n*sizeof(SCM),
+ MAKE_LENGTH(n, tc7_vector), s_cont);
+@@ -3166,5 +3188,5 @@
+ (heap_cells - cells_allocated <= scm_ecache_len) || IMP(freelist)) {
+ alloc_some_heap();
+- growth_mon("number of heaps", (long)(hplim_ind/2), "segments", !0);
++ growth_mon(s_numheaps, (long)(hplim_ind/2), "segments", !0);
+ growth_mon(s_heap, heap_cells, s_cells, !0);
+ }
diff --git a/lang/scm/files/patch-warnings b/lang/scm/files/patch-warnings
index a5b615c13bbe..d889f63f3a24 100644
--- a/lang/scm/files/patch-warnings
+++ b/lang/scm/files/patch-warnings
@@ -1643,15 +1643,6 @@
+ ((search = getenv("PATH")) == 0))
search = DEFAULT_PATH;
---- gmalloc.c 2008-01-30 22:44:00.000000000 -0500
-+++ gmalloc.c 2015-01-23 18:55:19.000000000 -0500
-@@ -1622,5 +1622,5 @@
- #endif
- #else
--#ifndef __osf__ /* declared in <unistd.h> */
-+#ifndef __FreeBSD__ /* declared in <unistd.h> */
- #ifndef hpux /* declared in <unistd.h> */
- #ifndef __svr4__ /* declared in <unistd.h> */
--- gsubr.c 2008-01-30 22:32:00.000000000 -0500
+++ gsubr.c 2015-01-23 18:55:19.000000000 -0500
@@ -31,35 +31,7 @@
@@ -5925,7 +5916,7 @@
+ SCM z;
info.name = name;
for (isubr = subrs_gra.len; 0 < isubr--;) {
- if (0==strcmp(((char **)subrs_gra.elts)[isubr], name)) {
+ if (0==strcmp(((subr_info *)subrs_gra.elts)[isubr].name, name)) {
- scm_warn(s_redefining, (char *)name, UNDEFINED);
+ scm_warn(s_redefining, name, UNDEFINED);
goto foundit;