aboutsummaryrefslogtreecommitdiffstats
path: root/mcgoron/guix/patches
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-08-14 19:57:38 -0400
committerGravatar Peter McGoron 2025-08-14 19:57:38 -0400
commit485c0179af8069df808a1359c1112101119722c9 (patch)
treebc890b6f2e48450d6b643aadfaf8d98b3ed5448a /mcgoron/guix/patches
parentwrapper-based module loading for foment (diff)
working path append wrapper, add r6rs
Diffstat (limited to 'mcgoron/guix/patches')
-rw-r--r--mcgoron/guix/patches/COPYING15
-rw-r--r--mcgoron/guix/patches/chibi-scheme-0.11-library-path.patch21
-rw-r--r--mcgoron/guix/patches/foment-0.4.1-library-path.patch126
-rw-r--r--mcgoron/guix/patches/sagittarius-scheme-0.9.13-library-path.patch23
4 files changed, 0 insertions, 185 deletions
diff --git a/mcgoron/guix/patches/COPYING b/mcgoron/guix/patches/COPYING
deleted file mode 100644
index e389742..0000000
--- a/mcgoron/guix/patches/COPYING
+++ /dev/null
@@ -1,15 +0,0 @@
-The source code to all patches is licensed under the zero-clause BSD license:
-
-Copyright © 2025 Peter McGoron
-
-Permission to use, copy, modify, and/or distribute this software for
-any purpose with or without fee is hereby granted.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/mcgoron/guix/patches/chibi-scheme-0.11-library-path.patch b/mcgoron/guix/patches/chibi-scheme-0.11-library-path.patch
deleted file mode 100644
index 309681b..0000000
--- a/mcgoron/guix/patches/chibi-scheme-0.11-library-path.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/eval.c b/eval.c
-index 8a7f0de2..41239fa4 100644
---- a/eval.c
-+++ b/eval.c
-@@ -509,9 +509,16 @@ void sexp_init_eval_context_globals (sexp ctx) {
- sexp_init_eval_context_bytecodes(ctx);
- #endif
- sexp_global(ctx, SEXP_G_MODULE_PATH) = SEXP_NULL;
-+
-+
-+ user_path = getenv("R7RS_LIBRARY_PATH");
-+ if (user_path)
-+ sexp_add_path(ctx, user_path);
-+
- user_path = getenv(SEXP_MODULE_PATH_VAR);
- if (!user_path) user_path = sexp_default_user_module_path;
- sexp_add_path(ctx, user_path);
-+
- no_sys_path = getenv(SEXP_NO_SYSTEM_PATH_VAR);
- if (!no_sys_path || strcmp(no_sys_path, "0")==0)
- sexp_add_path(ctx, sexp_default_module_path);
diff --git a/mcgoron/guix/patches/foment-0.4.1-library-path.patch b/mcgoron/guix/patches/foment-0.4.1-library-path.patch
deleted file mode 100644
index 72312d7..0000000
--- a/mcgoron/guix/patches/foment-0.4.1-library-path.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-diff --git a/src/foment.cpp b/src/foment.cpp
-index bafb058..7535a03 100644
---- a/src/foment.cpp
-+++ b/src/foment.cpp
-@@ -1402,6 +1402,57 @@ FObjectType ObjectTypes[] =
- {FreeTag, "free", 0, 0}
- };
-
-+void PrependPath(const char *EnvarName)
-+{
-+ FObject lp = Assoc(MakeStringC(EnvarName), EnvironmentVariables);
-+ if (PairP(lp))
-+ {
-+ FAssert(StringP(First(lp)));
-+
-+ lp = Rest(lp);
-+
-+ ulong_t strt = 0;
-+ ulong_t idx = 0;
-+ FObject InsertionPoint = LibraryPath;
-+ while (InsertionPoint != EmptyListObject &&
-+ Rest(InsertionPoint) != EmptyListObject) {
-+ InsertionPoint = Rest(InsertionPoint);
-+ }
-+
-+ while (idx < StringLength(lp))
-+ {
-+ if (AsString(lp)->String[idx] == PathSep)
-+ {
-+ if (idx > strt) {
-+ FObject str = MakeString(AsString(lp)->String + strt, idx - strt);
-+ if (InsertionPoint == EmptyListObject) {
-+ InsertionPoint = List(str);
-+ } else {
-+ SetRest(InsertionPoint, List(str));
-+ InsertionPoint = Rest(InsertionPoint);
-+ }
-+ }
-+
-+ idx += 1;
-+ strt = idx;
-+ }
-+
-+ idx += 1;
-+ }
-+
-+ if (idx > strt) {
-+ FObject str = MakeString(AsString(lp)->String + strt, idx - strt);
-+
-+ if (InsertionPoint == EmptyListObject) {
-+ InsertionPoint = List(str);
-+ } else {
-+ SetRest(InsertionPoint, List(str));
-+ InsertionPoint = Rest(InsertionPoint);
-+ }
-+ }
-+ }
-+}
-+
- long_t SetupFoment(FThreadState * ts)
- {
- #ifdef FOMENT_WINDOWS
-@@ -1548,35 +1599,6 @@ long_t SetupFoment(FThreadState * ts)
-
- GetEnvironmentVariables();
-
-- FObject lp = Assoc(MakeStringC("FOMENT_LIBPATH"), EnvironmentVariables);
-- if (PairP(lp))
-- {
-- FAssert(StringP(First(lp)));
--
-- lp = Rest(lp);
--
-- ulong_t strt = 0;
-- ulong_t idx = 0;
-- while (idx < StringLength(lp))
-- {
-- if (AsString(lp)->String[idx] == PathSep)
-- {
-- if (idx > strt)
-- LibraryPath = MakePair(
-- MakeString(AsString(lp)->String + strt, idx - strt), LibraryPath);
--
-- idx += 1;
-- strt = idx;
-- }
--
-- idx += 1;
-- }
--
-- if (idx > strt)
-- LibraryPath = MakePair(
-- MakeString(AsString(lp)->String + strt, idx - strt), LibraryPath);
-- }
--
- LibraryExtensions = List(MakeStringC("sld"), MakeStringC("scm"));
-
- if (CheckHeapFlag)
-diff --git a/src/foment.hpp b/src/foment.hpp
-index 745d5e4..22df578 100644
---- a/src/foment.hpp
-+++ b/src/foment.hpp
-@@ -1904,4 +1904,8 @@ inline long_t PathChP(FCh ch)
- }
- #endif // FOMENT_WINDOWS
-
-+// Misc
-+
-+void PrependPath(const char *EnvarName);
-+
- #endif // __FOMENT_HPP__
-diff --git a/src/main.cpp b/src/main.cpp
-index f333d47..da6ebd5 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -873,7 +873,10 @@ int main(int argc, FChS * argv[])
- AddToLibraryPath(argv[pdx]);
- else if (RunMode == InteractiveMode)
- LibraryPath = ReverseListModify(MakePair(MakeStringC("."), LibraryPath));
-+
- LibraryPathOptions();
-+ PrependPath("FOMENT_LIBPATH");
-+ PrependPath("R7RS_LIBRARY_PATH");
-
- if (ShowVersion != 0)
- {
diff --git a/mcgoron/guix/patches/sagittarius-scheme-0.9.13-library-path.patch b/mcgoron/guix/patches/sagittarius-scheme-0.9.13-library-path.patch
deleted file mode 100644
index b47d17e..0000000
--- a/mcgoron/guix/patches/sagittarius-scheme-0.9.13-library-path.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/src/os/posix/system.c b/src/os/posix/system.c
-index 474891c5..9bb991ce 100644
---- a/src/os/posix/system.c
-+++ b/src/os/posix/system.c
-@@ -131,12 +131,17 @@ SgObject Sg_GetLastErrorMessage()
-
- SgObject Sg_GetDefaultLoadPath()
- {
-- SgObject env = Sg_Getenv(UC("SAGITTARIUS_LOADPATH"));
-+ SgObject env = Sg_Getenv(UC("R7RS_LIBRARY_PATH"));
- SgObject h = SG_NIL, t = SG_NIL;
- if (!SG_FALSEP(env) && SG_STRING_SIZE(env) != 0) {
- SG_APPEND(h, t, Sg_StringSplitChar(SG_STRING(env), ':'));
- }
-
-+ env = Sg_Getenv(UC("SAGITTARIUS_LOADPATH"));
-+ if (!SG_FALSEP(env) && SG_STRING_SIZE(env) != 0) {
-+ SG_APPEND(h, t, Sg_StringSplitChar(SG_STRING(env), ':'));
-+ }
-+
- SG_APPEND1(h, t, Sg_SitelibPath());
- SG_APPEND1(h, t, SG_MAKE_STRING(SAGITTARIUS_SHARE_SITE_LIB_PATH));
- SG_APPEND1(h, t, SG_MAKE_STRING(SAGITTARIUS_SHARE_LIB_PATH));