diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2026-03-11 19:11:55 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2026-03-11 19:11:55 +0000 |
| commit | e0894ddc3bd9bce1cb485fe476278c1ef9a2fd07 (patch) | |
| tree | aabda97339f09e1dc8b7a992dd11c6f9d4c94d43 /dev-scheme | |
| parent | bdeed8c00be4ad5d91aea2ffdb466a266ebabf47 (diff) | |
| download | baldeagleos-repo-e0894ddc3bd9bce1cb485fe476278c1ef9a2fd07.tar.gz baldeagleos-repo-e0894ddc3bd9bce1cb485fe476278c1ef9a2fd07.tar.xz baldeagleos-repo-e0894ddc3bd9bce1cb485fe476278c1ef9a2fd07.zip | |
Adding metadata
Diffstat (limited to 'dev-scheme')
| -rw-r--r-- | dev-scheme/scm/Manifest | 1 | ||||
| -rw-r--r-- | dev-scheme/scm/files/scm-5.6.4-QA.patch | 34 | ||||
| -rw-r--r-- | dev-scheme/scm/files/scm-5.6.4-c99.patch | 107 | ||||
| -rw-r--r-- | dev-scheme/scm/files/scm-5.6.4-ncurses.patch | 16 | ||||
| -rw-r--r-- | dev-scheme/scm/files/scm-5.6.4-ported-fixes.patch | 116 | ||||
| -rw-r--r-- | dev-scheme/scm/scm-5.6.4.ebuild | 191 |
6 files changed, 465 insertions, 0 deletions
diff --git a/dev-scheme/scm/Manifest b/dev-scheme/scm/Manifest index c317da931b94..2f2bd4ca7f14 100644 --- a/dev-scheme/scm/Manifest +++ b/dev-scheme/scm/Manifest @@ -1 +1,2 @@ DIST scm-5e6.zip 912968 BLAKE2B c059b49364abd25bb2335ad11f82791b96ac95aa9529b914396d08592e46e5aa5cba178b791fc96e3ea3066670c48bdd728609463bea398300b81d979fb304cb SHA512 897370f043401a7961eb1c2e22c951e2144505a1670e328e2c3eab33d52da83f195b873fb7cf8486f412ae52316cfc437c9f2da1432ade70f82eb0da12c2f852 +DIST scm-5f4.zip 938331 BLAKE2B d703ee9269aa1c536fab2bdc84adc862f184014a31d27700f688fd518b714fe8ec4b597cdd33a51ecdb0a7bd5998184a2c4af5f17c4347939d6c66086f1684e6 SHA512 519b75acb886ef5843068b5b5c6abd1520deac684ac5f96920e6321c6ecc2ca824071f6c23f26746a7922f816a8aabac38ad9126c0dbee903258442482ac83f0 diff --git a/dev-scheme/scm/files/scm-5.6.4-QA.patch b/dev-scheme/scm/files/scm-5.6.4-QA.patch new file mode 100644 index 000000000000..8a1adae5bd14 --- /dev/null +++ b/dev-scheme/scm/files/scm-5.6.4-QA.patch @@ -0,0 +1,34 @@ +Removes stripping, prevents installation of compressed info files +https://bugs.gentoo.org/557322 +--- a/Makefile ++++ b/Makefile +@@ -376,7 +376,6 @@ + udscm4: $(cfiles) $(hfiles) build.scm build udscm4.opt + $(BUILD) -f udscm4.opt -o udscm4 -s $(IMPLPATH) + -rm $(ofiles) scmmain.o +- strip udscm4 + dscm4: udscm4 $(ifiles) require.scm + if [ -f /proc/sys/kernel/randomize_va_space -a\ + "`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\ +@@ -399,7 +398,6 @@ + udscm5: $(cfiles) $(ufiles) $(hfiles) build.scm build udscm5.opt + $(BUILD) -f udscm5.opt -o udscm5 -s $(IMPLPATH) + -rm $(ofiles) scmmain.o +- strip udscm5 + dscm5: udscm5 $(ifiles) require.scm + if [ -f /proc/sys/kernel/randomize_va_space -a\ + "`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\ +@@ -576,12 +574,10 @@ + + install-for-rpm: install-man install-lib install-infoz installdirs + $(INSTALL_PROGRAM) scm scmlit $(DESTDIR)$(bindir) +- -strip $(DESTDIR)$(bindir)scmlit + $(INSTALL_DATA) scm.h scmfig.h scmflags.h $(DESTDIR)$(includedir) + +-install: install-man install-lib install-infoz installdirs ++install: install-man install-lib install-info installdirs + $(INSTALL_PROGRAM) scm scmlit $(DESTDIR)$(bindir) +- -strip $(DESTDIR)$(bindir)scmlit + $(INSTALL_DATA) scm.h scmfig.h scmflags.h $(DESTDIR)$(includedir) + $(DESTDIR)$(bindir)scm -br new-catalog + diff --git a/dev-scheme/scm/files/scm-5.6.4-c99.patch b/dev-scheme/scm/files/scm-5.6.4-c99.patch new file mode 100644 index 000000000000..49ae3057dade --- /dev/null +++ b/dev-scheme/scm/files/scm-5.6.4-c99.patch @@ -0,0 +1,107 @@ +Fixes up to -std=gnu17 +Fixes to signal handler, wrong function types, access to opaque +structs, passing char** to function expecting const char* const* +redeclaration of library functions with wrong signatures +https://bugs.gentoo.org/946129 +https://bugs.gentoo.org/946361 +--- a/scm.c ++++ b/scm.c +@@ -533,7 +533,7 @@ + static void init_sig1(scm_err, signo, handler) + int scm_err; + int signo; +- SIGRETTYPE (*handler)(); ++ SIGRETTYPE (*handler)(int); + { + int i = scm_err - SIGNAL_BASE; + ASRTER(i < NUM_SIGNALS, MAKINUM(i), OUTOFRANGE, "init_sig1"); +@@ -932,7 +932,6 @@ + extern char **environ; /* The Linux man page says this + declaration is necessary. */ + char s_getenv[] = "getenv"; +-char *getenv(); + SCM scm_getenv(nam) + SCM nam; + { +lendwin returns int, it's ignored in the callee of add_final +--- a/crs.c ++++ b/crs.c +@@ -387,5 +387,5 @@ + make_subr(s_mvwin, tc7_subr_3, lmvwin); + make_subr(s_box, tc7_subr_3, lbox); + add_feature("curses"); +- add_final(lendwin); ++ add_final((void (*)(void))lendwin); + } +--- a/scmmain.c ++++ b/scmmain.c +@@ -86,7 +86,8 @@ + const char **argv; + { + char *script_arg = 0; /* location of SCSH style script file or 0. */ +- char *implpath = 0, **nargv; ++ char *implpath = 0; ++ const char **nargv; + int nargc, iverbose = 0, buf0stdin; + SCM retval; + /* added by Dai Inukai 2001-03-21 */ +@@ -115,7 +116,7 @@ + fpspec = fpsetprec(FP_PE); /* IEEE 64 bit FP mantissa*/ + #endif + execpath = 0; /* even when dumped */ +- if ((nargv = script_process_argv(argc, argv))) { /* SCSH style scripts */ ++ if ((nargv = (const char **)script_process_argv(argc, argv))) { /* SCSH style scripts */ + script_arg = argv[2]; /* Save for scm_find_execpath() call */ + nargc = script_count_argv(nargv); + } +--- a/crs.c ++++ b/crs.c +@@ -250,7 +250,7 @@ + if (UNBNDP(arg)) arg = cur_outp; + ASRTER(NIMP(arg) && OPOUTPORTP(arg), arg, ARG1, s_owidth); + if (NIMP(*loc_stdscr)) { +- if (WINP(arg)) return MAKINUM(WIN(arg)->_maxx+1); ++ if (WINP(arg)) return MAKINUM(getmaxx(WIN(arg))+1); + else return MAKINUM(COLS); + } + return MAKINUM(80); +@@ -261,7 +261,7 @@ + if (UNBNDP(arg)) arg = cur_outp; + ASRTER(NIMP(arg) && OPOUTPORTP(arg), arg, ARG1, s_owidth); + if (NIMP(*loc_stdscr)) +- if (WINP(arg)) return MAKINUM(WIN(arg)->_maxy+1); ++ if (WINP(arg)) return MAKINUM(getmaxy(WIN(arg))+1); + else return MAKINUM(LINES); + return MAKINUM(24); + } +--- a/scm.c ++++ b/scm.c +@@ -154,7 +154,7 @@ + /* PROF_SIGNAL appears below because it is the last signal + defined in scm.h and in errmsgs in repl.c */ + static struct { +- int signo; SIGRETTYPE (*osig)(); SIGRETTYPE (*nsig)(); ++ int signo; SIGRETTYPE (*osig)(int); SIGRETTYPE (*nsig)(int); + } sigdesc[PROF_SIGNAL - SIGNAL_BASE + 1]; + + #define NUM_SIGNALS (sizeof(sigdesc)/sizeof(sigdesc[0])) +@@ -478,7 +478,7 @@ + #endif + + #ifdef SIGPIPE +-static SIGRETTYPE (*oldpipe) (); ++static SIGRETTYPE (*oldpipe) (int); + #endif + + int case_sensitize_symbols = 0; /* set to 8 to read case-sensitive symbols */ +--- a/posix.c ++++ b/posix.c +@@ -191,7 +191,7 @@ + ve[ 0] = makfrom0str(entry->gr_name); + ve[ 1] = makfrom0str(entry->gr_passwd); + ve[ 2] = ulong2num((unsigned long)entry->gr_gid); +- ve[ 3] = makfromstrs(-1, entry->gr_mem); ++ ve[ 3] = makfromstrs(-1, (const char * const *)entry->gr_mem); + return ans; + } + SCM l_setgr(arg) diff --git a/dev-scheme/scm/files/scm-5.6.4-ncurses.patch b/dev-scheme/scm/files/scm-5.6.4-ncurses.patch new file mode 100644 index 000000000000..7d9ec878d268 --- /dev/null +++ b/dev-scheme/scm/files/scm-5.6.4-ncurses.patch @@ -0,0 +1,16 @@ +https://bugs.gentoo.org/557322 +This is only way to make this compile with C99 and up: +Force cast one opaque pointer type to another. +--- a/crs.c ++++ b/crs.c +@@ -69,8 +69,8 @@ + bwaddch, + bwaddstr, + bwwrite, +- wrefresh, +- wgetch, ++ (int (*)(FILE *))wrefresh, ++ (int (*)(FILE *))wgetch, + freewindow}; + + SCM mkwindow(win) diff --git a/dev-scheme/scm/files/scm-5.6.4-ported-fixes.patch b/dev-scheme/scm/files/scm-5.6.4-ported-fixes.patch new file mode 100644 index 000000000000..2351e0b6c198 --- /dev/null +++ b/dev-scheme/scm/files/scm-5.6.4-ported-fixes.patch @@ -0,0 +1,116 @@ +Ported standard previous build fixes to new version. +Previous fixes remove stripping and add correct paths to gentoo +programs, made build system respect LDFLAGS. +And weird disablement of va randomization in kernel is also removed +Newly introduced fix to correct ordering of generated include file +https://bugs.gentoo.org/557322 +https://bugs.gentoo.org/883129 +--- a/build.scm ++++ b/build.scm +@@ -550,7 +550,7 @@ + (graphics *unknown* "-I/usr/X11/include -DX11" "-lX11" + "/usr/X11/lib/libX11.sa" () ()) + (editline *unknown* "" "-lreadline" "/usr/lib/libreadline.a" () ()) +- (termcap *unknown* "" "-ltermcap" "/usr/lib/libtermcap.a" () ()) ++ (termcap *unknown* "" "-lncurses" "/usr/lib/libncurses.a" () ()) + (debug *unknown* "-g" "-g" #f () ()) + (socket *unknown* "" "" #f () ()) + (lib *unknown* "" "" #f () ("scmmain.c")) +@@ -576,7 +576,7 @@ + (regex linux "" "" #f () ()) + (graphics linux "-I/usr/include/X11 -DX11" "-L/usr/X11R6/lib -lX11" + "/usr/X11R6/lib/libX11.so" () ()) +- (curses linux "" "-lcurses" "/lib/libncurses.so" () ()) ++ (curses linux "" "-lncurses" "/lib/libncurses.so" () ()) + (nostart linux "" "" #f () ()) + (dump linux "" "" #f ("unexelf.c" "gmalloc.c") ()) + +--- a/Makefile ++++ b/Makefile +@@ -34,7 +34,7 @@ + SCMEXE = ./scm$(EXE) + BUILD = ./build$(BAT) -hsystem + +-TEXI2HTML = /usr/local/bin/texi2html -split -verbose ++TEXI2HTML = /usr/bin/texi2html -split -verbose + TEXI2PDF = texi2pdf + VIEWPDF = evince + MAKEDEV = $(MAKE) -f $(HOME)/makefile.dev +@@ -305,7 +305,7 @@ + + # SCMLIT -- Make this first! + $(SCMLIT): $(ofiles) scmmain.o require.scm Makefile +- $(LD) -o scmlit $(ofiles) scmmain.o $(LIBS) ++ $(LD) $(LDFLAGS) -o scmlit $(ofiles) scmmain.o $(LIBS) + $(MAKE) checklit + scmflags.h: scmflags + scmflags: +Generate header before everything else. +@@ -316,7 +316,8 @@ + echo "#define CAUTIOUS" >> newflags.h + -if (cmp -s newflags.h scmflags.h) then rm newflags.h; \ + else mv newflags.h scmflags.h; fi ++$(cfiles): $(hfiles) scmflags.h + .c.o: + $(CC) -c $(CFLAGS) $< -o $@ + scm.o: scm.c scm.h scmfig.h scmflags.h patchlvl.h + scmmain.o: scmmain.c scm.h scmfig.h scmflags.h patchlvl.h +@@ -378,18 +378,9 @@ + -rm $(ofiles) scmmain.o + strip udscm4 + dscm4: udscm4 $(ifiles) require.scm +- if [ -f /proc/sys/kernel/randomize_va_space -a\ +- "`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\ +- cat /proc/sys/kernel/randomize_va_space > randomize_va_space.tmp;\ +- echo 0 > /proc/sys/kernel/randomize_va_space;\ +- } fi + -rm -f slibcat implcat scm~ + -mv scm scm~ + echo "(quit)" | $(SETARCH) ./udscm4 -no-init-file -o scm +- if [ -f randomize_va_space.tmp ]; then {\ +- cat randomize_va_space.tmp > /proc/sys/kernel/randomize_va_space;\ +- rm randomize_va_space.tmp;\ +- } fi + + # dumpable R5RS interpreter + udscm5.opt: +@@ -401,18 +392,9 @@ + -rm $(ofiles) scmmain.o + strip udscm5 + dscm5: udscm5 $(ifiles) require.scm +- if [ -f /proc/sys/kernel/randomize_va_space -a\ +- "`cat /proc/sys/kernel/randomize_va_space`" != "0" ]; then {\ +- cat /proc/sys/kernel/randomize_va_space > randomize_va_space.tmp;\ +- echo 0 > /proc/sys/kernel/randomize_va_space;\ +- } fi + -rm -f slibcat implcat scm~ + -mv scm scm~ + echo "(quit)" | $(SETARCH) ./udscm5 -no-init-file -r5 -o scm +- if [ -f randomize_va_space.tmp ]; then {\ +- cat randomize_va_space.tmp > /proc/sys/kernel/randomize_va_space;\ +- rm randomize_va_space.tmp;\ +- } fi + $(MAKE) checkmacro + + # R5RS interpreter for debugging with GDB. +@@ -447,7 +429,7 @@ + libscm.a: libscm.opt scm.h scmfig.h + $(BUILD) -t lib -f libscm.opt + libtest: libscm.a libtest.c +- $(LD) -o libtest libtest.c libscm.a -ldl -lm -lc ++ $(LD) $(LDFLAGS) -o libtest libtest.c libscm.a -ldl -lm -lc + ./libtest + + # DLLs for dynamic linking +@@ -558,12 +558,10 @@ + + install-for-rpm: install-man install-lib install-infoz installdirs + $(INSTALL_PROGRAM) scm scmlit $(DESTDIR)$(bindir) +- -strip $(DESTDIR)$(bindir)scmlit + $(INSTALL_DATA) scm.h scmfig.h scmflags.h $(DESTDIR)$(includedir) + + install: install-man install-lib install-infoz installdirs + $(INSTALL_PROGRAM) scm scmlit $(DESTDIR)$(bindir) +- -strip $(DESTDIR)$(bindir)scmlit + $(INSTALL_DATA) scm.h scmfig.h scmflags.h $(DESTDIR)$(includedir) + diff --git a/dev-scheme/scm/scm-5.6.4.ebuild b/dev-scheme/scm/scm-5.6.4.ebuild new file mode 100644 index 000000000000..612a34893704 --- /dev/null +++ b/dev-scheme/scm/scm-5.6.4.ebuild @@ -0,0 +1,191 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Version magic thanks to masterdriverz and UberLord using bash array instead of tr +trarr="0abcdefghi" +MY_PV="$(ver_cut 1)${trarr:$(ver_cut 2):1}$(ver_cut 3)" +MY_P=${PN}-${MY_PV} + +inherit toolchain-funcs flag-o-matic + +DESCRIPTION="SCM is a Scheme implementation from the author of slib" +HOMEPAGE="https://people.csail.mit.edu/jaffer/SCM.html" +SRC_URI="https://groups.csail.mit.edu/mac/ftpdir/scm/${MY_P}.zip" +S=${WORKDIR}/${PN} + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="arrays bignums cautious dynamic-linking engineering-notation gsubr inexact ioext macro ncurses posix readline regex sockets unix" + +BDEPEND="app-arch/unzip" +DEPEND=">=dev-scheme/slib-3.1.5 + dev-util/cproto + ncurses? ( sys-libs/ncurses:0= ) + readline? ( sys-libs/libtermcap-compat )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-ported-fixes.patch + "${FILESDIR}"/${P}-c99.patch + "${FILESDIR}"/${P}-QA.patch + "${FILESDIR}"/${P}-ncurses.patch +) + +src_prepare() { + default + + sed \ + -e "s|\"gcc\"|\"$(tc-getCC)\"|g" \ + -e "s|\"ld\"|\"$(tc-getLD)\"|g" \ + -e "s|\"-shared\"|\"-shared ${LDFLAGS}\"|g" \ + -i ./build.scm || die +} + +src_configure() { + append-cflags -std=gnu17 + ./configure \ + --prefix="${EPREFIX}"/usr \ + --mandir="${EPREFIX}"/usr/share/man \ + --infodir="${EPREFIX}"/usr/share/info \ + --datadir="${EPREFIX}"/usr/share \ + --sysconfdir="${EPREFIX}"/etc \ + --localstatedir="${EPREFIX}"/var/lib \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --docdir="${EPREFIX}"/usr/share/doc/${PF} \ + --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ + || die +} + +src_compile() { + # SLIB is required to build SCM. + local slibpath="${EPREFIX}/usr/share/slib/" + if [ -n "$SCHEME_LIBRARY_PATH" ]; then + einfo "using SLIB $SCHEME_LIBRARY_PATH" + elif [ -d ${slibpath} ]; then + export SCHEME_LIBRARY_PATH=${slibpath} + fi + + einfo "Making scmlit" + emake -j1 CC=$(tc-getCC) scmlit clean + + einfo "Building scm" + local features="" + use arrays && features+="arrays" + use bignums && features+=" bignums" + use cautious && features+=" cautious" + use engineering-notation && features+=" engineering-notation" + use inexact && features+=" inexact" + use macro && features+=" macro" + + ( use readline || + use ncurses || + use regex || + use posix || + use ioext || + use gsubr || + use sockets || + use unix || + use dynamic-linking ) && features+=" dynamic-linking" + + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS} -L${EPREFIX}/$(get_libdir)" \ + -s "${EPREFIX}"/usr/$(get_libdir)/scm \ + -F ${features:="none"} \ + -h system \ + -o scm || die + + einfo "Building DLLs" + if use readline; then + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS}" \ + -h system \ + -F edit-line \ + -t dll || die + fi + if use ncurses ; then + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS}" \ + -F curses \ + -h system \ + -t dll || die + fi + if use regex ; then + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS}" \ + -c rgx.c \ + -h system \ + -t dll || die + fi + if use gsubr ; then + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS}" \ + -c gsubr.c \ + -h system \ + -t dll || die + fi + if use ioext ; then + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS}" \ + -c ioext.c \ + -h system \ + -t dll || die + fi + if use posix; then + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS}" \ + -c posix.c \ + -h system \ + -t dll || die + fi + if use sockets ; then + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS}" \ + -c socket.c \ + -h system \ + -t dll || die + fi + if use unix ; then + ./build \ + --compiler-options="${CFLAGS}" \ + --linker-options="${LDFLAGS}" \ + -c unix.c \ + -h system \ + -t dll || die + fi +} + +src_test() { + emake check +} + +src_install() { + emake -j1 DESTDIR="${D}" man1dir="${EPREFIX}"/usr/share/man/man1/ \ + install + + doinfo scm.info + doinfo hobbit.info +} + +regen_catalog() { + einfo "Regenerating catalog..." + scm -e "(require 'new-catalog)" +} + +pkg_postinst() { + [[ -z ${ROOT} ]] && regen_catalog +} + +pkg_config() { + regen_catalog +} |
