Ports: Update and fix imgcat

- Update imgcat to 2.5.1 to get rid of prebuilt object files that have
  accidentally been included in the previous release tarball.
- Add a missing dependency on `termcap`.
- Remove an unused include of `err.h`, which we do not support.
- Use actually working settings for installing the built files.
This commit is contained in:
Tim Schumacher 2022-05-08 23:19:55 +02:00 committed by Andreas Kling
parent 749d0eef7f
commit 651560d588
4 changed files with 41 additions and 9 deletions

View file

@ -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 |

View file

@ -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
}

View file

@ -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

View file

@ -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.