summaryrefslogtreecommitdiff
path: root/app-shells/rc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-11 00:12:38 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-11 00:12:38 +0000
commit0ec1e1dd7867c3dedcbea76c9b6e847d6b388c03 (patch)
tree65f42b72245de9fb9fa9ea30e6221dfff7dda7c5 /app-shells/rc
parent3a81cede4783e464b7485722b2eaac0280dbc570 (diff)
gentoo auto-resync : 11:02:2025 - 00:12:37
Diffstat (limited to 'app-shells/rc')
-rw-r--r--app-shells/rc/Manifest3
-rw-r--r--app-shells/rc/files/rc-1.7.4-C23.patch30
-rw-r--r--app-shells/rc/files/rc-1.7.4-libedit.patch17
-rw-r--r--app-shells/rc/rc-1.7.4-r3.ebuild55
4 files changed, 105 insertions, 0 deletions
diff --git a/app-shells/rc/Manifest b/app-shells/rc/Manifest
index 029cf1b46058..ea71ae6357b5 100644
--- a/app-shells/rc/Manifest
+++ b/app-shells/rc/Manifest
@@ -1,3 +1,6 @@
+AUX rc-1.7.4-C23.patch 801 BLAKE2B 0de29a5b30617687580c0bf77c0a9b3c94b2cabd241dca272fa595f18e634e72784a98868aba7051c526865f6bc11b6aea8c4b4ad3fd0ad1691d29b7673b5545 SHA512 cd0e2b9854552a6b3e1a3d64bb35a33995956c962c8ae4ad6680bbdde1bc2a741295af3a260fc9d573fb6d063bbe5e84ca924be27cb7c41e4b2bba2b8d989ee4
+AUX rc-1.7.4-libedit.patch 545 BLAKE2B f5d650fdd1e61d7cac8eccd31a122271989b0dea0c75449da46af4bc93810d8d608b0ab625ef4c717aa4c9f5672aba5d9a19783831ba663040ffd2198a48dc8a SHA512 cb7347a224960a172409a490ef324dea99c149a262ba980419a90bc7bf75f98ac0629fa8d1d18c8a2643d0f01fef7499a6557355d53919d42d8bd24989b8e8ae
DIST rc-1.7.4.tar.gz 215206 BLAKE2B df01f618cd4d3c5bbf155768ada49c20fe7916e2b999ae13d08487b00c4565c3c4d1d45d16dddef70fe58cf7c405d293832b31dc8a66d8b36b2503675b260db1 SHA512 49e124207b5370b88b8fba0376dda33451451a58bfb85fabfc06ae59eb88fedf38d7aeaaf292e4f380e2c00efc8301ba68d12180923186d1c53ef94f78f7e435
EBUILD rc-1.7.4-r2.ebuild 918 BLAKE2B c03a0faded61c2fbdbf5863ea3115a88a9346aa370e4ff81580db7594b3ebd522cd3003907fb17853126338f16bfd1806eca6a000d631d5b5a2202acfcbb42d0 SHA512 d99c536c0a2011a79b1ec27a42dc2f7ca3391f38aaeb52d0d27b1af58d3a9674d9f2cb749fe790ca1c08f3a90002cf2b77506e5d1799cf2ccb291f1400b78253
+EBUILD rc-1.7.4-r3.ebuild 1059 BLAKE2B 4d9cf82ec2befc0256050d315a6ecfe10f054f5ebac07ec1b07b081e7cb6a84bace8dafcb975989556d032602762c818c861c9517b88abd075b7757d9b9e97d4 SHA512 4203c6fd37e8622e44e5de9643bdbfc66f019e8912923bcf074c3dc994e96d533a5520bcfb27f100b8f0ff844f2821aaceaa050318c9a9aa30b6654182e54890
MISC metadata.xml 168 BLAKE2B 2e0e000b4c3b6ca04c12903fdbe278415c05a822623c52e9aa95cbbf3d50bcb1246b7edbda7d2f6b559af8950c6374e6e0a69b76319964cfe686bf50b0604a57 SHA512 4dcf45d1809e8390a2d8155c8ebfe0dd610203e392aeab0ccd8a10f42cc8532a4925eff32b35e7a6c35598a4efd288229034ec0732299dbd8cfa0acff705fed3
diff --git a/app-shells/rc/files/rc-1.7.4-C23.patch b/app-shells/rc/files/rc-1.7.4-C23.patch
new file mode 100644
index 000000000000..730319135cd8
--- /dev/null
+++ b/app-shells/rc/files/rc-1.7.4-C23.patch
@@ -0,0 +1,30 @@
+just use build-ins when C is modern enough
+and other glibc defines that need enablement
+diff -ru a/rc.h b/rc.h
+--- a/rc.h 2025-01-05 21:16:39.487999355 +0400
++++ b/rc.h 2025-01-05 21:21:13.688559101 +0400
+@@ -44,9 +44,14 @@
+ eError, eBreak, eReturn, eVarstack, eArena, eFifo, eFd
+ } ecodes;
+
++#if __STDC_VERSION__ <= 201710L
+ typedef enum bool {
+ FALSE, TRUE
+ } bool;
++#else
++#define FALSE false
++#define TRUE true
++#endif
+
+ typedef enum redirtype {
+ rFrom, rCreate, rAppend, rHeredoc, rHerestring
+diff -ru a/configure.ac b/configure.ac
+--- a/configure.ac 2025-01-05 21:33:03.952267739 +0400
++++ b/configure.ac 2025-01-05 21:33:20.702194221 +0400
+@@ -1,5 +1,6 @@
+ dnl Our package name, version, ...
+ AC_INIT([rc], [1.7.4])
++AC_USE_SYSTEM_EXTENSIONS
+
+ dnl ... and release date
+ RELDATE=`date -I`
diff --git a/app-shells/rc/files/rc-1.7.4-libedit.patch b/app-shells/rc/files/rc-1.7.4-libedit.patch
new file mode 100644
index 000000000000..14ab77d18069
--- /dev/null
+++ b/app-shells/rc/files/rc-1.7.4-libedit.patch
@@ -0,0 +1,17 @@
+bug https://bugs.gentoo.org/925558
+truncating number of lines from long uint to int and hoping
+for the best, due to API mismatch
+diff -ru a/edit-edit.c b/edit-edit.c
+--- a/edit-edit.c 2025-01-05 20:59:08.759555902 +0400
++++ b/edit-edit.c 2025-01-05 21:01:03.040010129 +0400
+@@ -50,8 +50,8 @@
+
+ oldint = sys_signal(SIGINT, edit_catcher);
+ oldquit = sys_signal(SIGQUIT, edit_catcher);
+-
+- r = el_gets(c->el, count);
++ int trunc_count = *count;
++ r = el_gets(c->el, &trunc_count);
+
+ sys_signal(SIGINT, oldint);
+ sys_signal(SIGQUIT, oldquit);
diff --git a/app-shells/rc/rc-1.7.4-r3.ebuild b/app-shells/rc/rc-1.7.4-r3.ebuild
new file mode 100644
index 000000000000..ad6676be2d7b
--- /dev/null
+++ b/app-shells/rc/rc-1.7.4-r3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A reimplementation of the Plan 9 shell"
+HOMEPAGE="http://static.tobold.org/"
+SRC_URI="http://static.tobold.org/${PN}/${P}.tar.gz"
+
+LICENSE="rc"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libedit readline"
+
+RDEPEND="sys-libs/ncurses:=
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+PATCHES=(
+ "${FILESDIR}"/"${P}"-libedit.patch
+ "${FILESDIR}"/"${P}"-C23.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf="--with-history"
+ use readline && myconf="--with-edit=readline"
+ use libedit && myconf="--with-edit=edit"
+
+ econf "${myconf}"
+}
+
+src_install() {
+ into /usr
+ newbin "${PN}" "${PN}sh"
+ newman "${PN}.1" "${PN}sh.1"
+ einstalldocs
+}
+
+pkg_postinst() {
+ if ! grep -q '^/usr/bin/rcsh$' "${EROOT}"/etc/shells ; then
+ ebegin "Updating /etc/shells"
+ echo "/usr/bin/rcsh" >> "${EROOT}"/etc/shells
+ eend $?
+ fi
+}