Ports: Update cmatrix's patches to use git patches

Also fixes one of the patches no longer applying.
This commit is contained in:
Ali Mohammad Pur 2022-05-17 20:58:59 +04:30 committed by Ali Mohammad Pur
parent 57a98258aa
commit ff7163e5b8
Notes: sideshowbarker 2024-07-17 10:52:02 +09:00
4 changed files with 54 additions and 14 deletions

View file

@ -1,5 +1,15 @@
From bad2922ad4cbc8c74765d50da61371925b1b80d7 Mon Sep 17 00:00:00 2001
From: Manuel Palenzuela <manuelpalenzuelamerino@gmail.com>
Date: Tue, 20 Apr 2021 18:42:04 +0300
Subject: [PATCH 1/2] Use manual include & library paths for ncurses
Co-Authored-By: Panagiotis Vasilopoulos <hello@alwayslivid.com>
---
CMakeLists.txt | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a808a98..7b8753a 100644
index 6c50d7b..6ce5f9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,9 @@ cmake_minimum_required(VERSION 2.8)
@ -25,3 +35,6 @@ index a808a98..7b8753a 100644
add_executable(cmatrix cmatrix.c)
--
2.36.1

View file

@ -0,0 +1,26 @@
From 444b507fab58b76f52fa54abef855a264e8e9e1a Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Tue, 17 May 2022 20:58:39 +0430
Subject: [PATCH 2/2] Include curses.h from <ncurses> in serenity
Co-Authored-By: Manuel Palenzuela <manuelpalenzuelamerino@gmail.com>
---
cmatrix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmatrix.c b/cmatrix.c
index 7e3fbb9..0d1053f 100644
--- a/cmatrix.c
+++ b/cmatrix.c
@@ -48,7 +48,7 @@
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
-#ifdef _WIN32
+#ifdef _WIN32 || defined(__serenity__)
#include <ncurses/curses.h>
#else
#include <curses.h>
--
2.36.1

View file

@ -0,0 +1,14 @@
# Patches for cmatrix on SerenityOS
## `0001-Use-manual-include-library-paths-for-ncurses.patch`
Use manual include & library paths for ncurses
## `0002-Include-curses.h-from-ncurses-in-serenity.patch`
Include curses.h from <ncurses> in serenity

View file

@ -1,13 +0,0 @@
diff --git a/cmatrix.c b/cmatrix.c
index d1f6b98..26d0648 100644
--- a/cmatrix.c
+++ b/cmatrix.c
@@ -48,7 +48,7 @@
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
-#include <curses.h>
+#include <ncurses/curses.h>
#endif
#ifdef HAVE_SYS_IOCTL_H