forked from Lainports/freebsd-ports
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.
This commit is contained in:
parent
dadf625e03
commit
f185863212
4 changed files with 50 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
22
lang/scm/files/patch-add-missing-edit-line-feature
Normal file
22
lang/scm/files/patch-add-missing-edit-line-feature
Normal file
|
|
@ -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);
|
||||
}
|
||||
25
lang/scm/files/patch-cvs
Normal file
25
lang/scm/files/patch-cvs
Normal file
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue