mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
Ports: Update nyancat's patches to use git patches
This commit is contained in:
parent
288818eb29
commit
bb8febffac
Notes:
sideshowbarker
2024-07-17 10:48:21 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/bb8febffac Pull-request: https://github.com/SerenityOS/serenity/pull/14055 Reviewed-by: https://github.com/danners Reviewed-by: https://github.com/timschumi
28
Ports/nyancat/patches/0001-Install-to-usr-local.patch
Normal file
28
Ports/nyancat/patches/0001-Install-to-usr-local.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 7523e59d058e0455bc03d4c3154d18ffa5fdd92a Mon Sep 17 00:00:00 2001
|
||||
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||
Date: Thu, 15 Apr 2021 15:43:18 +0200
|
||||
Subject: [PATCH 1/2] Install to /usr/local
|
||||
|
||||
---
|
||||
Makefile | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 069b06c..34b38d8 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/local/bin
|
||||
+ install src/nyancat ${DESTDIR}/usr/local/bin/${package}
|
||||
+ mkdir -p ${DESTDIR}/usr/local/share/man/man1
|
||||
+ gzip -9 -c < nyancat.1 > ${DESTDIR}/usr/local/share/man/man1/nyancat.1.gz
|
||||
|
||||
.PHONY: FORCE all clean check dist distcheck install
|
||||
--
|
||||
2.36.1
|
||||
|
@ -0,0 +1,25 @@
|
||||
From e59fb37e9eeae4e68244a29d337047d7eb04c3c2 Mon Sep 17 00:00:00 2001
|
||||
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||
Date: Thu, 15 Apr 2021 15:43:18 +0200
|
||||
Subject: [PATCH 2/2] Use %d for time diff printing
|
||||
|
||||
---
|
||||
src/nyancat.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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;
|
||||
--
|
||||
2.36.1
|
||||
|
12
Ports/nyancat/patches/ReadMe.md
Normal file
12
Ports/nyancat/patches/ReadMe.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Patches for nyancat on SerenityOS
|
||||
|
||||
## `0001-Install-to-usr-local.patch`
|
||||
|
||||
Install to /usr/local
|
||||
|
||||
|
||||
## `0002-Use-d-for-time-diff-printing.patch`
|
||||
|
||||
Use %d for time diff printing
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
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/local/bin
|
||||
+ install src/nyancat ${DESTDIR}/usr/local/bin/${package}
|
||||
+ mkdir -p ${DESTDIR}/usr/local/share/man/man1
|
||||
+ gzip -9 -c < nyancat.1 > ${DESTDIR}/usr/local/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;
|
Loading…
Reference in New Issue
Block a user