aboutsummaryrefslogtreecommitdiffstats
path: root/lang/pm3-base
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2001-09-09 09:31:20 +0800
committerjdp <jdp@FreeBSD.org>2001-09-09 09:31:20 +0800
commite0ac717597617d383fc23c7ab72d379f46f9d86d (patch)
tree31c919796b0133f7b8a0f26c622448e44a9cdd62 /lang/pm3-base
parenta3b17f3f3a5740000001049b9c7671e87341f73c (diff)
downloadfreebsd-ports-gnome-e0ac717597617d383fc23c7ab72d379f46f9d86d.tar.gz
freebsd-ports-gnome-e0ac717597617d383fc23c7ab72d379f46f9d86d.tar.zst
freebsd-ports-gnome-e0ac717597617d383fc23c7ab72d379f46f9d86d.zip
Fix a bug which (among other things) caused the installation of some
M3 packages to fail if "." was at the beginning of $PATH.
Diffstat (limited to 'lang/pm3-base')
-rw-r--r--lang/pm3-base/files/patch-ea38
-rw-r--r--lang/pm3-base/files/patch-eb38
2 files changed, 76 insertions, 0 deletions
diff --git a/lang/pm3-base/files/patch-ea b/lang/pm3-base/files/patch-ea
new file mode 100644
index 000000000000..98daf0ed8dfc
--- /dev/null
+++ b/lang/pm3-base/files/patch-ea
@@ -0,0 +1,38 @@
+--- language/modula3/m3compiler/m3ship/src/Main.m3.orig Mon Jun 7 10:11:49 1999
++++ language/modula3/m3compiler/m3ship/src/Main.m3 Sat Sep 8 14:46:14 2001
+@@ -303,9 +303,10 @@
+ m3_template := Env.Get("M3_TEMPLATE_DIR");
+ path : TEXT;
+ subpath : TEXT;
+- nextsep : INTEGER := 0;
+- prevsep : INTEGER := 0;
++ nextsep : INTEGER;
++ prevsep : INTEGER := -1;
+ sep : CHAR;
++ filename : TEXT;
+ BEGIN
+ IF m3_template # NIL THEN
+ template_dir := m3_template;
+@@ -322,13 +323,17 @@
+ REPEAT
+ nextsep := Text.FindChar(path, sep, prevsep + 1);
+ IF nextsep # -1 THEN
+- subpath := Text.Sub(path, prevsep, nextsep - prevsep - 1);
++ subpath := Text.Sub(path, prevsep + 1, nextsep - prevsep - 1);
+ ELSE
+- subpath := Text.Sub(path, prevsep);
++ subpath := Text.Sub(path, prevsep + 1);
+ END;
+- IF M3File.IsReadable(subpath & template) THEN
+- template_dir := subpath;
+- RETURN;
++ IF Text.Length(subpath) > 0 THEN
++ filename := subpath & SL & template;
++ IF M3File.IsReadable(filename) AND
++ NOT M3File.IsDirectory(filename) THEN
++ template_dir := subpath;
++ RETURN;
++ END;
+ END;
+ prevsep := nextsep;
+ UNTIL prevsep = -1;
diff --git a/lang/pm3-base/files/patch-eb b/lang/pm3-base/files/patch-eb
new file mode 100644
index 000000000000..e06a6cab9c6c
--- /dev/null
+++ b/lang/pm3-base/files/patch-eb
@@ -0,0 +1,38 @@
+--- language/modula3/m3compiler/m3where/src/Main.m3.orig Mon Jun 7 10:12:38 1999
++++ language/modula3/m3compiler/m3where/src/Main.m3 Sat Sep 8 14:48:05 2001
+@@ -302,9 +302,10 @@
+ m3_template := Env.Get("M3_TEMPLATE_DIR");
+ path : TEXT;
+ subpath : TEXT;
+- nextsep : INTEGER := 0;
+- prevsep : INTEGER := 0;
++ nextsep : INTEGER;
++ prevsep : INTEGER := -1;
+ sep : CHAR;
++ filename : TEXT;
+ BEGIN
+ IF m3_template # NIL THEN
+ template_dir := m3_template;
+@@ -321,13 +322,17 @@
+ REPEAT
+ nextsep := Text.FindChar(path, sep, prevsep + 1);
+ IF nextsep # -1 THEN
+- subpath := Text.Sub(path, prevsep, nextsep - prevsep - 1);
++ subpath := Text.Sub(path, prevsep + 1, nextsep - prevsep - 1);
+ ELSE
+- subpath := Text.Sub(path, prevsep);
++ subpath := Text.Sub(path, prevsep + 1);
+ END;
+- IF M3File.IsReadable(subpath & template) THEN
+- template_dir := subpath;
+- RETURN;
++ IF Text.Length(subpath) > 0 THEN
++ filename := subpath & SL & template;
++ IF M3File.IsReadable(filename) AND
++ NOT M3File.IsDirectory(filename) THEN
++ template_dir := subpath;
++ RETURN;
++ END;
+ END;
+ prevsep := nextsep;
+ UNTIL prevsep = -1;