Ports: Added a cmatrix port
This commit is contained in:
parent
5c67b2cb8f
commit
d09cd85b6c
Notes:
sideshowbarker
2024-07-18 20:51:42 +09:00
Author: https://github.com/Baitinq Commit: https://github.com/SerenityOS/serenity/commit/d09cd85b6cb Pull-request: https://github.com/SerenityOS/serenity/pull/6091
4 changed files with 57 additions and 0 deletions
|
@ -13,6 +13,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
|||
| [`c-ray`](c-ray/) | C-Ray | | https://github.com/vkoskiv/c-ray |
|
||||
| [`chester`](chester/) | Chester Gameboy Emulator | | https://github.com/veikkos/chester |
|
||||
| [`cmake`](cmake/) | CMake | 3.19.4 | https://cmake.org/ |
|
||||
| [`cmatrix`](cmatrix/) | cmatrix | | https://github.com/abishekvashok/cmatrix |
|
||||
| [`curl`](curl/) | curl | 7.65.3 | https://curl.se/ |
|
||||
| [`dash`](dash/) | DASH | 0.5.10.2 | http://gondor.apana.org.au/~herbert/dash |
|
||||
| [`diffutils`](diffutils/) | GNU Diffutils | 3.5 | https://www.gnu.org/software/diffutils/ |
|
||||
|
|
16
Ports/cmatrix/package.sh
Executable file
16
Ports/cmatrix/package.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=cmatrix
|
||||
useconfigure=true
|
||||
version=git
|
||||
depends="ncurses"
|
||||
workdir=cmatrix-master
|
||||
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMakeToolchain.txt"
|
||||
files="https://github.com/abishekvashok/cmatrix/archive/refs/heads/master.zip cmatrix.zip"
|
||||
|
||||
configure() {
|
||||
run cmake $configopts
|
||||
}
|
||||
|
||||
install() {
|
||||
run cp cmatrix "${SERENITY_BUILD_DIR}/Root/bin"
|
||||
}
|
27
Ports/cmatrix/patches/fix_cmakelists.patch
Normal file
27
Ports/cmatrix/patches/fix_cmakelists.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a808a98..7b8753a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -5,6 +5,9 @@ cmake_minimum_required(VERSION 2.8)
|
||||
project(CMatrix LANGUAGES C)
|
||||
set(VERSION "2.0")
|
||||
|
||||
+set(CMAKE_INCLUDE_PATH "${SERENITY_BUILD_DIR}/Root/usr/local/include/ncurses")
|
||||
+set(CURSES_NCURSES_LIBRARY "${SERENITY_BUILD_DIR}/Root/usr/local/lib/libncurses.a")
|
||||
+
|
||||
# These are relative to CMAKE_INSTALL_PREFIX
|
||||
# which by default is "/usr/local"
|
||||
set(CONSOLE_FONTS_DIRS "share/consolefonts" "lib/kbd/consolefonts")
|
||||
@@ -49,10 +52,8 @@ if (HAVE_GETOPT_H)
|
||||
add_definitions(-DHAVE_GETOPT_H)
|
||||
endif ()
|
||||
|
||||
-Set(CURSES_NEED_NCURSES TRUE)
|
||||
-find_package(Curses)
|
||||
-include_directories(${CURSES_INCLUDE_DIR})
|
||||
-add_definitions(-DHAVE_NCURSES_H)
|
||||
+find_package(Curses REQUIRED)
|
||||
+include_directories(${CURSES_INCLUDE_PATH})
|
||||
|
||||
add_executable(cmatrix cmatrix.c)
|
||||
|
13
Ports/cmatrix/patches/fix_include_header.patch
Normal file
13
Ports/cmatrix/patches/fix_include_header.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
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
|
Loading…
Add table
Reference in a new issue