summaryrefslogtreecommitdiff
path: root/sci-mathematics/spin
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /sci-mathematics/spin
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'sci-mathematics/spin')
-rw-r--r--sci-mathematics/spin/Manifest1
-rw-r--r--sci-mathematics/spin/files/spin-6.5.2-makefile.patch11
-rw-r--r--sci-mathematics/spin/files/spin-6.5.2-nesting_limit.patch55
-rw-r--r--sci-mathematics/spin/metadata.xml8
-rw-r--r--sci-mathematics/spin/spin-6.5.2-r1.ebuild55
5 files changed, 130 insertions, 0 deletions
diff --git a/sci-mathematics/spin/Manifest b/sci-mathematics/spin/Manifest
new file mode 100644
index 000000000000..66e08a82b3ea
--- /dev/null
+++ b/sci-mathematics/spin/Manifest
@@ -0,0 +1 @@
+DIST spin-6.5.2.tar.gz 6084903 BLAKE2B a075043c55609de5860c3a428d356a9618a4062667e06d92797e1fb87cb4c805ac90ac580c7d9dfac1d5be1dda4c7f9c9f72927826b921c23710a858adb3eb4d SHA512 ff1d378076995fa5a8b66dd31d19d8bad6296b968183180251d267c926c20775edda927a31f466199e01231f6233c3a5166fd51ec44b02d570070e857d8ba7f9
diff --git a/sci-mathematics/spin/files/spin-6.5.2-makefile.patch b/sci-mathematics/spin/files/spin-6.5.2-makefile.patch
new file mode 100644
index 000000000000..545f6d10f973
--- /dev/null
+++ b/sci-mathematics/spin/files/spin-6.5.2-makefile.patch
@@ -0,0 +1,11 @@
+--- a/makefile
++++ b/makefile
+@@ -36,7 +36,7 @@
+ tl_mem.o tl_rewrt.o tl_cache.o
+
+ spin: makefile $(SPIN_OS) $(TL_OS) spin.o
+- $(CC) $(CFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS) $(LDFLAGS)
+
+ install: spin
+ $(INSTALL) spin $(DESTDIR)/bin/spin
diff --git a/sci-mathematics/spin/files/spin-6.5.2-nesting_limit.patch b/sci-mathematics/spin/files/spin-6.5.2-nesting_limit.patch
new file mode 100644
index 000000000000..c73152e8485c
--- /dev/null
+++ b/sci-mathematics/spin/files/spin-6.5.2-nesting_limit.patch
@@ -0,0 +1,55 @@
+Backported upstream changes to address CVE-2021-46168.
+
+From 62cf91c944ea457c218528e9021443a0cbe05758 Mon Sep 17 00:00:00 2001
+From: nimble-code <gerard.holzmann@gmail.com>
+Date: Sun, 2 Jan 2022 11:26:40 -0800
+Subject: [PATCH] fix
+
+--- a/sched.c
++++ b/sched.c
+@@ -18,7 +18,7 @@ extern int lineno, nr_errs, dumptab, xspin, jumpsteps, columns;
+ extern int u_sync, Elcnt, interactive, TstOnly, cutoff;
+ extern short has_enabled, has_priority, has_code, replay;
+ extern int limited_vis, product, nclaims, old_priority_rules;
+-extern int old_scope_rules, scope_seq[128], scope_level, has_stdin;
++extern int old_scope_rules, scope_seq[256], scope_level, has_stdin;
+
+ extern int pc_highest(Lextok *n);
+ extern void putpostlude(void);
+--- a/spinlex.c
++++ b/spinlex.c
+@@ -51,7 +51,7 @@ extern int implied_semis, ltl_mode, in_seq, par_cnt;
+
+ short has_stack = 0;
+ int lineno = 1;
+-int scope_seq[128], scope_level = 0;
++int scope_seq[256], scope_level = 0;
+ char CurScope[MAXSCOPESZ];
+ char yytext[2048];
+ FILE *yyin, *yyout;
+From 9ecb1af6d174532f3a77acae3a1d424fe7345a3e Mon Sep 17 00:00:00 2001
+From: nimble-code <gerard.holzmann@gmail.com>
+Date: Sat, 15 Jan 2022 10:39:38 -0800
+Subject: [PATCH] nesting limit
+
+--- a/spinlex.c
++++ b/spinlex.c
+@@ -1704,8 +1704,16 @@ lex(void)
+ case '|': c = follow('|', OR, '|'); break;
+ case ';': c = SEMI; break;
+ case '.': c = follow('.', DOTDOT, '.'); break;
+- case '{': scope_seq[scope_level++]++; set_cur_scope(); break;
+- case '}': scope_level--; set_cur_scope(); break;
++ case '{':
++ assert(scope_level < sizeof(scope_seq)-1);
++ scope_seq[scope_level++]++;
++ set_cur_scope();
++ break;
++ case '}':
++ assert(scope_level > 0);
++ scope_level--;
++ set_cur_scope();
++ break;
+ default : break;
+ }
+ ValToken(0, c)
diff --git a/sci-mathematics/spin/metadata.xml b/sci-mathematics/spin/metadata.xml
new file mode 100644
index 000000000000..d0b5000c130a
--- /dev/null
+++ b/sci-mathematics/spin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:spinroot:spin</remote-id>
+ </upstream>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/sci-mathematics/spin/spin-6.5.2-r1.ebuild b/sci-mathematics/spin/spin-6.5.2-r1.ebuild
new file mode 100644
index 000000000000..89ec50ed73ec
--- /dev/null
+++ b/sci-mathematics/spin/spin-6.5.2-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop toolchain-funcs
+
+MY_PN="${PN^}"
+MY_PV="version-${PV}"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="An efficient logic-model checker for the verification of multi-threaded code"
+HOMEPAGE="https://spinroot.com/ https://github.com/nimble-code/Spin"
+SRC_URI="https://github.com/nimble-code/${MY_PN}/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="doc examples graphviz tk"
+
+RDEPEND="sys-devel/gcc
+ tk? (
+ dev-lang/tk
+ graphviz? ( media-gfx/graphviz )
+ )"
+BDEPEND="app-alternatives/yacc"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.5.2-makefile.patch
+ "${FILESDIR}"/${PN}-6.5.2-nesting_limit.patch
+)
+
+S="${WORKDIR}"/${MY_P}/Src
+
+src_compile() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc ../Man/README.md
+ doman ../Man/${PN}.1
+
+ use doc && dodoc ../Doc/*
+ if use examples; then
+ docinto examples
+ dodoc -r ../Examples/*
+ fi
+
+ if use tk; then
+ newbin ../optional_gui/i${PN}.tcl i${PN}
+ make_desktop_entry ispin
+ fi
+}