aboutsummaryrefslogtreecommitdiff
path: root/graphics/timg
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2017-03-21 02:12:49 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2017-03-21 02:12:49 +0000
commit2a16b98a6a9ac7759615ec1928e270fd64597694 (patch)
treed9c0afd11162c90924e58b1698bafff7f9d0f9e1 /graphics/timg
parenta0dd44f83902a0655070208ae6278040b6d9ad1e (diff)
downloadports-2a16b98a6a9ac7759615ec1928e270fd64597694.tar.gz
ports-2a16b98a6a9ac7759615ec1928e270fd64597694.zip
Add timg 0.9.5, terminal Image Viewer.
PR: 217963 Submitted by: udvzsolt@gmail.com
Notes
Notes: svn path=/head/; revision=436563
Diffstat (limited to 'graphics/timg')
-rw-r--r--graphics/timg/Makefile27
-rw-r--r--graphics/timg/distinfo3
-rw-r--r--graphics/timg/files/patch-Makefile20
-rw-r--r--graphics/timg/files/patch-timg.cc28
-rw-r--r--graphics/timg/pkg-descr11
5 files changed, 89 insertions, 0 deletions
diff --git a/graphics/timg/Makefile b/graphics/timg/Makefile
new file mode 100644
index 000000000000..d0f5a519999f
--- /dev/null
+++ b/graphics/timg/Makefile
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+PORTNAME= timg
+PORTVERSION= 0.9.5
+DISTVERSIONPREFIX= v
+CATEGORIES= graphics
+
+MAINTAINER= udvzsolt@gmail.com
+COMMENT= Terminal Image Viewer
+
+LICENSE= GPLv2
+
+LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick
+
+USE_GITHUB= yes
+GH_ACCOUNT= hzeller
+
+USES= gmake
+ALL_TARGET= ${PORTNAME}
+WRKSRC_SUBDIR= src
+
+PLIST_FILES= bin/timg
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/graphics/timg/distinfo b/graphics/timg/distinfo
new file mode 100644
index 000000000000..14dbfd7dbd8d
--- /dev/null
+++ b/graphics/timg/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1489942207
+SHA256 (hzeller-timg-v0.9.5_GH0.tar.gz) = 285f51e95bed3d477b585db2998ef10b32c230d64d8015748e45f9a6e013ce48
+SIZE (hzeller-timg-v0.9.5_GH0.tar.gz) = 91623
diff --git a/graphics/timg/files/patch-Makefile b/graphics/timg/files/patch-Makefile
new file mode 100644
index 000000000000..112357e754b8
--- /dev/null
+++ b/graphics/timg/files/patch-Makefile
@@ -0,0 +1,20 @@
+--- Makefile.orig 2016-06-27 04:44:39 UTC
++++ Makefile
+@@ -1,6 +1,6 @@
+ CXXFLAGS=-Wall -O3 -fPIC
+-MAGICK_CXXFLAGS=`GraphicsMagick++-config --cppflags --cxxflags`
+-MAGICK_LDFLAGS=`GraphicsMagick++-config --ldflags --libs`
++MAGICK_CXXFLAGS=`Magick++-config --cppflags --cxxflags`
++MAGICK_LDFLAGS=`Magick++-config --ldflags --libs`
+ PREFIX?=/usr/local
+
+ timg : timg.o terminal-canvas.o
+@@ -10,7 +10,7 @@ timg.o: timg.cc
+ $(CXX) $(MAGICK_CXXFLAGS) $(CXXFLAGS) -c -o $@ $^
+
+ install: timg
+- install $^ $(PREFIX)/bin
++ install $^ $(DESTDIR)$(PREFIX)/bin
+
+ clean:
+ rm -f timg terminal-canvas.o timg.o
diff --git a/graphics/timg/files/patch-timg.cc b/graphics/timg/files/patch-timg.cc
new file mode 100644
index 000000000000..efe754682a3f
--- /dev/null
+++ b/graphics/timg/files/patch-timg.cc
@@ -0,0 +1,28 @@
+--- timg.cc.orig 2016-06-27 04:44:39 UTC
++++ timg.cc
+@@ -66,9 +66,9 @@ void CopyToCanvas(const Magick::Image &i
+ if (c.alphaQuantum() >= 255)
+ continue;
+ result->SetPixel(x, y,
+- ScaleQuantumToChar(c.redQuantum()),
+- ScaleQuantumToChar(c.greenQuantum()),
+- ScaleQuantumToChar(c.blueQuantum()));
++ MagickCore::ScaleQuantumToChar(c.redQuantum()),
++ MagickCore::ScaleQuantumToChar(c.greenQuantum()),
++ MagickCore::ScaleQuantumToChar(c.blueQuantum()));
+ }
+ }
+ }
+@@ -222,9 +222,9 @@ void DisplayScrolling(const Magick::Imag
+ if (src.alphaQuantum() >= 255)
+ continue;
+ RGBCol &dest = fast_image[y * img_width + x];
+- dest.r = ScaleQuantumToChar(src.redQuantum());
+- dest.g = ScaleQuantumToChar(src.greenQuantum());
+- dest.b = ScaleQuantumToChar(src.blueQuantum());
++ dest.r = MagickCore::ScaleQuantumToChar(src.redQuantum());
++ dest.g = MagickCore::ScaleQuantumToChar(src.greenQuantum());
++ dest.b = MagickCore::ScaleQuantumToChar(src.blueQuantum());
+ }
+ }
+
diff --git a/graphics/timg/pkg-descr b/graphics/timg/pkg-descr
new file mode 100644
index 000000000000..cbe247267956
--- /dev/null
+++ b/graphics/timg/pkg-descr
@@ -0,0 +1,11 @@
+timg - Terminal Image Viewer
+
+A viewer that uses 24-Bit color capabilities and unicode
+character blocks to display images in the terminal.
+Displays regular images, plays animated gifs or allows to
+scroll static images.
+
+Very useful for if you want to have a quick visual check
+without starting a bulky image viewer or in an SSH session.
+
+WWW: https://github.com/hzeller/timg