summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ports/AvailablePorts.md2
-rwxr-xr-xPorts/imgcat/package.sh13
-rw-r--r--Ports/imgcat/patches/0001-Remove-an-include-of-err.h.patch26
-rw-r--r--Ports/imgcat/patches/ReadMe.md9
4 files changed, 41 insertions, 9 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index 21dc86a939..f1efb44a42 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -78,7 +78,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`harfbuzz`](harfbuzz/) | HarfBuzz | 2.8.1 | https://github.com/harfbuzz/harfbuzz |
| [`hatari`](hatari/) | Atari ST/STE/TT/Falcon emulator | 2.4.0-devel | https://hatari.tuxfamily.org/ |
| [`imagemagick`](imagemagick/) | ImageMagick | 7.1.0-29 | https://imagemagick.org |
-| [`imgcat`](imgcat/) | imgcat | 2.5.0 | https://github.com/eddieantonio/imgcat |
+| [`imgcat`](imgcat/) | imgcat | 2.5.1 | https://github.com/eddieantonio/imgcat |
| [`indent`](indent/) | GNU indent | 2.2.11 | https://www.gnu.org/software/indent/ |
| [`isl`](isl/) | Integer Set Library | 0.24 | https://libisl.sourceforge.io/ |
| [`ja2`](ja2/) | Jagged Alliance 2 Stracciatella | 0.15.x | https://github.com/safarp/ja2-stracciatella/tree/0.15.x |
diff --git a/Ports/imgcat/package.sh b/Ports/imgcat/package.sh
index 1568a9f372..6c0e1829d2 100755
--- a/Ports/imgcat/package.sh
+++ b/Ports/imgcat/package.sh
@@ -1,11 +1,8 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=imgcat
-version=2.5.0
-depends=("ncurses" "libpng" "libjpeg")
-files="https://github.com/eddieantonio/imgcat/releases/download/v${version}/imgcat-${version}.tar.gz imgcat-v${version}.tar.gz 8f18e10464ed1426b29a5b11aee766a43db92be17ba0a17fd127dd9cf9fb544b"
+version=2.5.1
+useconfigure=true
+installopts=("PREFIX=${SERENITY_INSTALL_ROOT}/usr/local")
+depends=("ncurses" "libpng" "libjpeg" "termcap")
+files="https://github.com/eddieantonio/imgcat/releases/download/v${version}/imgcat-${version}.tar.gz imgcat-v${version}.tar.gz 8faaac392df315b4973bb6927c0eec659e879df6c15ad6f8461073e05b70c537"
auth_type=sha256
-
-build() {
- run make \
- production=true
-}
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
new file mode 100644
index 0000000000..e75f498fe1
--- /dev/null
+++ b/Ports/imgcat/patches/0001-Remove-an-include-of-err.h.patch
@@ -0,0 +1,26 @@
+From 6163cab16b54ccc7301a083f9f3f7c7b6d435713 Mon Sep 17 00:00:00 2001
+From: Tim Schumacher <timschumi@gmx.de>
+Date: Sun, 8 May 2022 22:53:34 +0200
+Subject: [PATCH] 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.
+---
+ src/imgcat.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/imgcat.c b/src/imgcat.c
+index 26a73d7..89fc05d 100644
+--- a/src/imgcat.c
++++ b/src/imgcat.c
+@@ -22,7 +22,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <err.h>
+ #include <limits.h>
+
+ #include <getopt.h>
+--
+2.36.1
+
diff --git a/Ports/imgcat/patches/ReadMe.md b/Ports/imgcat/patches/ReadMe.md
new file mode 100644
index 0000000000..90101188ab
--- /dev/null
+++ b/Ports/imgcat/patches/ReadMe.md
@@ -0,0 +1,9 @@
+# Patches for imgcat on SerenityOS
+
+## `0001-Remove-an-include-of-err.h.patch`
+
+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.
+