From 6589b46c15941b70990079c449656687dbe2b386 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Mon, 13 Jan 2025 00:43:05 +0100 Subject: [PATCH] app-misc/sl-patched: new package, add 3.03 --- README.md | 4 ++ app-misc/sl-patched/Manifest | 3 ++ .../sl-patched/files/fix_compilation.patch | 22 +++++++++ app-misc/sl-patched/metadata.xml | 8 +++ app-misc/sl-patched/sl-patched-3.03.ebuild | 49 +++++++++++++++++++ metadata/md5-cache/app-misc/sl-patched-3.03 | 13 +++++ 6 files changed, 99 insertions(+) create mode 100644 app-misc/sl-patched/Manifest create mode 100644 app-misc/sl-patched/files/fix_compilation.patch create mode 100644 app-misc/sl-patched/metadata.xml create mode 100644 app-misc/sl-patched/sl-patched-3.03.ebuild create mode 100644 metadata/md5-cache/app-misc/sl-patched-3.03 diff --git a/README.md b/README.md index 25b77da3..a37b34f0 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,10 @@ The following packages are available in this overlay: * app-misc/htmlq * Like jq, but for HTML * https://github.com/mgdm/htmlq +* app-misc/sl-patched + * SL (Steam Locomotive) runs across your terminal when you type "sl" as you meant to type "ls" + * Old patched long version, inspired by https://aur.archlinux.org/packages/sl-patched + * Patch from https://github.com/euank/docker-sl * app-misc/spacer * CLI tool to insert spacers when command output stops * https://github.com/samwho/spacer diff --git a/app-misc/sl-patched/Manifest b/app-misc/sl-patched/Manifest new file mode 100644 index 00000000..f2e9da39 --- /dev/null +++ b/app-misc/sl-patched/Manifest @@ -0,0 +1,3 @@ +DIST sl-3.03.tar 20480 BLAKE2B cc1e6872741a633541f83e89f505ec0f075d1e0f80d5c11fce61ac38e31c76ba78c60d96172319f3b18cbc45d56fcea394c1009b60fdc659196b889e8634a2be SHA512 eb0cc0bc0d6e795e32ed84a6813644b41e81ad6fd7ac51e67ec6c99747acdbc9d102041d3af53c9ba75ba7b1581ab4c6a14fc9db20e1f69a30713aefb17f7737 +DIST sl.en.1.gz 467 BLAKE2B 37b398b0d38f444766a63b8753afa811d53d08b8d9c200459abfa2fbb9f91e072e7ebe5295fa4ca68f4ef7284cc523be452eeaa9cb292ba1a559b8f21081fd1b SHA512 5acfc9818ea0f2d3931a24ae0ed1c82685b38b384bd635122ddfbf5d04199cbc3cbc370fa9be48825440abad972029218285a5486ee820f77ea8ab77a3dec2e6 +DIST sl5-1.patch 36035 BLAKE2B 08572833f4c3d05174d4e7816de907ed37767c591bf45e097df8cf24992113e06474ed62f8e3e87a0975309ee26f8dc1f4b35a3685ad0393773fb2e9868c45d6 SHA512 25321da4fd2359f1e47a6ab939d3ce5dc8a160a6ede4db3e7355d5efcecf686622f3c9e3e941eeeeed504c61cb15b959648d97f70a97f88efe3a2628eaa96038 diff --git a/app-misc/sl-patched/files/fix_compilation.patch b/app-misc/sl-patched/files/fix_compilation.patch new file mode 100644 index 00000000..5b63a844 --- /dev/null +++ b/app-misc/sl-patched/files/fix_compilation.patch @@ -0,0 +1,22 @@ +--- sl.orig/sl.c 2010-08-09 21:36:45.483225339 +0200 ++++ sl/sl.c 2010-08-09 22:01:12.462051982 +0200 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #ifdef LINUX20 + #include +@@ -186,10 +187,7 @@ int main(int argc, char *argv[]) + scrollok(stdscr, FALSE); + DIREC = RTOL; + p = 3 * COLS / 10; +- pp = (char*)malloc((size_t)(COLS + ALL_LENGTH + 10) * (D51HIGHT + 1) * (D51PATTERNS + 1)); +- for (i = 0; i <= (COLS + ALL_LENGTH + 1) * (D51HIGHT + 1) * D51PATTERNS; ++i) { +- pp[i] = (char)NULL; +- } ++ pp = (char *)calloc(1, (size_t)(COLS + ALL_LENGTH + 10) * (D51HIGHT + 1) * (D51PATTERNS + 1)); + + for (j = 0; j < D51PATTERNS; ++j) { + for (i = 0; i <= D51HIGHT; ++i) { diff --git a/app-misc/sl-patched/metadata.xml b/app-misc/sl-patched/metadata.xml new file mode 100644 index 00000000..7580a63d --- /dev/null +++ b/app-misc/sl-patched/metadata.xml @@ -0,0 +1,8 @@ + + + + + Benjamin Neff + gentoo@benjaminneff.ch + + diff --git a/app-misc/sl-patched/sl-patched-3.03.ebuild b/app-misc/sl-patched/sl-patched-3.03.ebuild new file mode 100644 index 00000000..bd44707d --- /dev/null +++ b/app-misc/sl-patched/sl-patched-3.03.ebuild @@ -0,0 +1,49 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_PN=${PN%-*} +SL_PATCH="sl5-1.patch" + +DESCRIPTION="SL (Steam Locomotive); old patched long version" +HOMEPAGE="http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html https://github.com/euank/docker-sl" +SRC_URI=" + http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/sl/${MY_PN}.tar -> ${MY_PN}-${PV}.tar + https://github.com/euank/docker-sl/raw/c605aaacb0078fecc864e5f1726d7bbea2d01623/${SL_PATCH} + https://gentoo.jss.hu/distfiles/sl.en.1.gz +" + +LICENSE="Toyoda" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + sys-libs/ncurses:= + !app-misc/sl +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S="${WORKDIR}/${MY_PN}" + +PATCHES=( + "${DISTDIR}"/${SL_PATCH} + "${FILESDIR}/fix_compilation.patch" +) + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} $($(tc-getPKG_CONFIG) --libs ncurses)" +} + +src_install() { + dobin "${MY_PN}" + newman "${WORKDIR}/sl.en.1" sl.1 + + einstalldocs +} + diff --git a/metadata/md5-cache/app-misc/sl-patched-3.03 b/metadata/md5-cache/app-misc/sl-patched-3.03 new file mode 100644 index 00000000..f67915c7 --- /dev/null +++ b/metadata/md5-cache/app-misc/sl-patched-3.03 @@ -0,0 +1,13 @@ +DEFINED_PHASES=compile install +DEPEND=sys-libs/ncurses:= !app-misc/sl virtual/pkgconfig +DESCRIPTION=SL (Steam Locomotive); old patched long version +EAPI=8 +HOMEPAGE=http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html https://github.com/euank/docker-sl +INHERIT=toolchain-funcs +KEYWORDS=~amd64 +LICENSE=Toyoda +RDEPEND=sys-libs/ncurses:= !app-misc/sl +SLOT=0 +SRC_URI=http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/sl/sl.tar -> sl-3.03.tar https://github.com/euank/docker-sl/raw/c605aaacb0078fecc864e5f1726d7bbea2d01623/sl5-1.patch https://gentoo.jss.hu/distfiles/sl.en.1.gz +_eclasses_=toolchain-funcs 14648d8795f7779e11e1bc7cf08b7536 multilib b2a329026f2e404e9e371097dda47f96 +_md5_=d271939ae8cac5d5c48deb17957ad87e