Skip to content

Commit

Permalink
app-misc/sl-patched: new package, add 3.03
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 committed Jan 13, 2025
1 parent 9caabdf commit 6589b46
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions app-misc/sl-patched/Manifest
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions app-misc/sl-patched/files/fix_compilation.patch
Original file line number Diff line number Diff line change
@@ -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 <stdio.h>
#include <stdlib.h>
#include <strings.h>
+#include <string.h>
#include <time.h>
#ifdef LINUX20
#include <ncurses/curses.h>
@@ -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) {
8 changes: 8 additions & 0 deletions app-misc/sl-patched/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<name>Benjamin Neff</name>
<email>[email protected]</email>
</maintainer>
</pkgmetadata>
49 changes: 49 additions & 0 deletions app-misc/sl-patched/sl-patched-3.03.ebuild
Original file line number Diff line number Diff line change
@@ -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
}

13 changes: 13 additions & 0 deletions metadata/md5-cache/app-misc/sl-patched-3.03
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6589b46

Please sign in to comment.