From 592c3a8cb4d7ade829ed98fced0b0990143da58a Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Thu, 30 Nov 2023 15:30:07 +0100 Subject: [PATCH] Ports: Remove termcap termcap has last been updated in 2002, and is relying on a lot of deprecated C99 behavior. All two current users are fine without it, so just remove it completely. --- Ports/AvailablePorts.md | 1 - Ports/imgcat/package.sh | 2 +- .../0001-Remove-an-include-of-err.h.patch | 2 +- ...002-Remove-the-dependency-on-termcap.patch | 22 +++++++++++++++++++ Ports/imgcat/patches/ReadMe.md | 5 +++++ Ports/python3/package.sh | 1 - Ports/termcap/package.sh | 8 ------- 7 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 Ports/imgcat/patches/0002-Remove-the-dependency-on-termcap.patch delete mode 100755 Ports/termcap/package.sh diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 4fc1da47d7..5ca31bd2a2 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -313,7 +313,6 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`tar`](tar/) | GNU tar | 1.35 | https://www.gnu.org/software/tar/ | | [`taskwarrior`](taskwarrior/) | TODO list manager | 2.6.2 | https://taskwarrior.org/ | | [`tcl`](tcl/) | Tcl | 8.6.12 | https://www.tcl-lang.org/ | -| [`termcap`](termcap/) | GNU termcap | 1.3.1 | https://www.gnu.org/software/termutils/ | | [`thesilversearcher`](thesilversearcher/) | The Silver Searcher: A fast code-searching tool | 2.2.0 | https://github.com/ggreer/the_silver_searcher | | [`tig`](tig/) | Tig: text-mode interface for Git | 2.5.8 | https://jonas.github.io/tig/ | | [`timidity`](timidity/) | TiMidity++ | 2.15.0 | http://timidity.sourceforge.net | diff --git a/Ports/imgcat/package.sh b/Ports/imgcat/package.sh index 33499103ab..b671d51f08 100755 --- a/Ports/imgcat/package.sh +++ b/Ports/imgcat/package.sh @@ -3,7 +3,7 @@ port=imgcat version=2.5.1 useconfigure=true installopts=("PREFIX=${SERENITY_INSTALL_ROOT}/usr/local") -depends=("ncurses" "libpng" "libjpeg" "termcap") +depends=("ncurses" "libpng" "libjpeg") files=( "https://github.com/eddieantonio/imgcat/releases/download/v${version}/imgcat-${version}.tar.gz#8faaac392df315b4973bb6927c0eec659e879df6c15ad6f8461073e05b70c537" ) diff --git a/Ports/imgcat/patches/0001-Remove-an-include-of-err.h.patch b/Ports/imgcat/patches/0001-Remove-an-include-of-err.h.patch index f82fa8cc6f..c8730a8eb1 100644 --- a/Ports/imgcat/patches/0001-Remove-an-include-of-err.h.patch +++ b/Ports/imgcat/patches/0001-Remove-an-include-of-err.h.patch @@ -10,7 +10,7 @@ imgcat compiles just fine even when removing it. 1 file changed, 1 deletion(-) diff --git a/src/imgcat.c b/src/imgcat.c -index 26a73d7..89fc05d 100644 +index 26a73d7f359cc9ce30b2ba02a2b1f46617afada5..89fc05d19ae85786d115fee8eb16869e02b51513 100644 --- a/src/imgcat.c +++ b/src/imgcat.c @@ -22,7 +22,6 @@ diff --git a/Ports/imgcat/patches/0002-Remove-the-dependency-on-termcap.patch b/Ports/imgcat/patches/0002-Remove-the-dependency-on-termcap.patch new file mode 100644 index 0000000000..c7da8b7273 --- /dev/null +++ b/Ports/imgcat/patches/0002-Remove-the-dependency-on-termcap.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tim Schumacher +Date: Fri, 8 Dec 2023 23:13:54 +0100 +Subject: [PATCH] Remove the dependency on termcap + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 8bf1951683863566f383c4b1d450f0b8057ab8e6..32a3ea253783c9a3338a77bfa782aefd95d13ca1 100644 +--- a/Makefile ++++ b/Makefile +@@ -49,7 +49,7 @@ OUTPUT_OPTION = -MMD -MP -o $@ + LD = $(CXX) + + # CImg requires pthread, for some reason +-LDLIBS = $(LIBS) -ltermcap -lm -lpthread ++LDLIBS = $(LIBS) -lm -lpthread + + # Get the source files. + SOURCES = $(wildcard src/*.c) $(wildcard src/*.cc) diff --git a/Ports/imgcat/patches/ReadMe.md b/Ports/imgcat/patches/ReadMe.md index 90101188ab..d6cda8aae4 100644 --- a/Ports/imgcat/patches/ReadMe.md +++ b/Ports/imgcat/patches/ReadMe.md @@ -7,3 +7,8 @@ Remove an include of `err.h` `err.h` appears to be BSD-specific, and we don't support it. Luckily, imgcat compiles just fine even when removing it. +## `0002-Remove-the-dependency-on-termcap.patch` + +Remove the dependency on termcap + + diff --git a/Ports/python3/package.sh b/Ports/python3/package.sh index 9392cfd236..662a2a796f 100755 --- a/Ports/python3/package.sh +++ b/Ports/python3/package.sh @@ -26,7 +26,6 @@ depends=( 'openssl' 'readline' 'sqlite' - 'termcap' 'xz' 'zlib' ) diff --git a/Ports/termcap/package.sh b/Ports/termcap/package.sh deleted file mode 100755 index 4b4eee0f30..0000000000 --- a/Ports/termcap/package.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env -S bash ../.port_include.sh -port=termcap -version=1.3.1 -useconfigure=true -configopts=("--prefix=${SERENITY_INSTALL_ROOT}/usr/local") -files=( - "https://ftpmirror.gnu.org/gnu/termcap/termcap-${version}.tar.gz#91a0e22e5387ca4467b5bcb18edf1c51b930262fd466d5fda396dd9d26719100" -)