Skip to content

Commit

Permalink
misc/img2xterm: update ImageMagick dependency
Browse files Browse the repository at this point in the history
 * Update dependency from old ImageMagick-6 to current
 * Various minor changes to make portlint happy
 * Submitter becomes maintainer (already maintainer of sysutils/modules)

PR:		276266
Reported by:	laurent.chardon@gmail.com
  • Loading branch information
LaurentChardon authored and fernape committed Jan 14, 2024
1 parent cb0e21a commit ceb72bf
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions misc/img2xterm/Makefile
@@ -1,19 +1,19 @@
PORTNAME= img2xterm
PORTVERSION= 1.0.0
DISTVERSIONPREFIX= v
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= misc

MAINTAINER= ports@FreeBSD.org
MAINTAINER= laurent.chardon@gmail.com
COMMENT= Display images on 256 color xterms
WWW= https://github.com/kfei/img2xterm

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

USES= gmake magick ncurses
USE_GITHUB= yes
GH_ACCOUNT= kfei
USES= gmake magick:6 ncurses
PLIST_FILES= bin/img2xterm

.include <bsd.port.pre.mk>
Expand Down
22 changes: 0 additions & 22 deletions misc/img2xterm/files/patch-Makefile

This file was deleted.

20 changes: 20 additions & 0 deletions misc/img2xterm/files/patch-img2xterm.c
@@ -0,0 +1,20 @@
--- img2xterm.c.orig 2024-01-11 14:08:58 UTC
+++ img2xterm.c
@@ -7,7 +7,7 @@
#include <sys/ioctl.h>
#include <limits.h>
#include <math.h>
-#include <wand/MagickWand.h>
+#include <MagickWand/MagickWand.h>
#include <unistd.h>

#ifndef NO_CURSES
@@ -288,7 +288,7 @@ void xtermfit(MagickWand* wand)
int scaled_width = (int)floor(rs > ri ? wi * hs / hi : ws);
int scaled_height = (int)floor(rs > ri ? hs : hi * ws / wi);

- MagickResizeImage(wand, scaled_width, scaled_height, LanczosFilter, 1);
+ MagickResizeImage(wand, scaled_width, scaled_height, LanczosFilter);
}

void usage(int ret, const char* binname)
4 changes: 3 additions & 1 deletion misc/img2xterm/pkg-descr
@@ -1 +1,3 @@
Display images in terminal
img2xterm is a program that can display bitmap images on 256-colour terminals
by converting them into Unicode block characters and xterm compatible control
sequences.

0 comments on commit ceb72bf

Please sign in to comment.