summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-06 20:34:21 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-06 20:34:21 +0200
commitdb48dfcaaf48581531a0557a1c133acf27d84342 (patch)
tree73f063ecb7b652d6b9bcccaede3f65cb496ca703 /Ports
parentbc2bd1e64a70869592aeb6867133da162a2092d6 (diff)
downloadserenity-db48dfcaaf48581531a0557a1c133acf27d84342.zip
Ports: Add "nyancat" port :^)
This is a cute little program for testing out your terminal's color support, and it also works pretty well as a general stress test.
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/nyancat/nyancat.sh16
-rw-r--r--Ports/nyancat/serenity-changes.patch29
2 files changed, 45 insertions, 0 deletions
diff --git a/Ports/nyancat/nyancat.sh b/Ports/nyancat/nyancat.sh
new file mode 100755
index 0000000000..d0af68ec88
--- /dev/null
+++ b/Ports/nyancat/nyancat.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+PORT_DIR=nyancat
+fetch() {
+ run_fetch_git "https://github.com/klange/nyancat.git"
+ run_patch serenity-changes.patch -p1
+}
+configure() {
+ echo
+}
+build() {
+ run_make
+}
+install() {
+ run_make_install DESTDIR="$SERENITY_ROOT"/Root
+}
+. ../.port_include.sh
diff --git a/Ports/nyancat/serenity-changes.patch b/Ports/nyancat/serenity-changes.patch
new file mode 100644
index 0000000000..0a54a900eb
--- /dev/null
+++ b/Ports/nyancat/serenity-changes.patch
@@ -0,0 +1,29 @@
+diff --git a/Makefile b/Makefile
+index 1dd50ef..e435044 100644
+--- a/Makefile
++++ b/Makefile
+@@ -33,7 +33,9 @@ distcheck: $(distdir).tar.gz
+ @echo "*** Package $(distdir).tar.gz is ready for distribution."
+
+ install: all
+- install src/nyancat /usr/bin/${package}
+- gzip -9 -c < nyancat.1 > /usr/share/man/man1/nyancat.1.gz
++ mkdir -p ${DESTDIR}/usr/bin
++ install src/nyancat ${DESTDIR}/usr/bin/${package}
++ mkdir -p ${DESTDIR}/usr/share/man/man1
++ gzip -9 -c < nyancat.1 > ${DESTDIR}/usr/share/man/man1/nyancat.1.gz
+
+ .PHONY: FORCE all clean check dist distcheck install
+diff --git a/src/nyancat.c b/src/nyancat.c
+index 537225c..f2965c1 100644
+--- a/src/nyancat.c
++++ b/src/nyancat.c
+@@ -901,7 +901,7 @@ int main(int argc, char ** argv) {
+ * The \033[0m prevents the Apple ][ from flipping everything, but
+ * makes the whole nyancat less bright on the vt220
+ */
+- printf("\033[1;37mYou have nyaned for %0.0f seconds!\033[J\033[0m", diff);
++ printf("\033[1;37mYou have nyaned for %d seconds!\033[J\033[0m", (int)diff);
+ }
+ /* Reset the last color so that the escape sequences rewrite */
+ last = 0;