Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2019 21:59:27 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r517353 - in head/deskutils: . terminal-image-viewer terminal-image-viewer/files
Message-ID:  <201911122159.xACLxRMQ023887@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Tue Nov 12 21:59:27 2019
New Revision: 517353
URL: https://svnweb.freebsd.org/changeset/ports/517353

Log:
  New port: deskutils/terminal-image-viewer: Display images in terminals using RGB ANSI codes & unicode characters

Added:
  head/deskutils/terminal-image-viewer/
  head/deskutils/terminal-image-viewer/Makefile   (contents, props changed)
  head/deskutils/terminal-image-viewer/distinfo   (contents, props changed)
  head/deskutils/terminal-image-viewer/files/
  head/deskutils/terminal-image-viewer/files/patch-Makefile   (contents, props changed)
  head/deskutils/terminal-image-viewer/pkg-descr   (contents, props changed)
Modified:
  head/deskutils/Makefile

Modified: head/deskutils/Makefile
==============================================================================
--- head/deskutils/Makefile	Tue Nov 12 21:38:20 2019	(r517352)
+++ head/deskutils/Makefile	Tue Nov 12 21:59:27 2019	(r517353)
@@ -238,6 +238,7 @@
     SUBDIR += taskwarrior
     SUBDIR += teapot
     SUBDIR += tel
+    SUBDIR += terminal-image-viewer
     SUBDIR += thinkingrock
     SUBDIR += timewarrior
     SUBDIR += tine20

Added: head/deskutils/terminal-image-viewer/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/terminal-image-viewer/Makefile	Tue Nov 12 21:59:27 2019	(r517353)
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+PORTNAME=	terminal-image-viewer
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.0.0-50
+DISTVERSIONSUFFIX=	-g134ca73
+CATEGORIES=	deskutils
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Display images in terminals using RGB ANSI codes & unicode characters
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/../../../LICENSE
+
+USES=		compiler:c++17-lang gmake
+USE_GITHUB=	yes
+GH_ACCOUNT=	stefanhaustein
+GH_PROJECT=	TerminalImageViewer
+
+MAKE_ARGS=	INSTALL_PROGRAM="${INSTALL_PROGRAM}"
+WRKSRC_SUBDIR=	src/main/cpp
+
+PLIST_FILES=	bin/tiv
+
+.if exists(/usr/include/c++/v1) && !exists(/usr/include/c++/v1/filesystem)
+BROKEN=		STL feature 'filesystem' isn't available # '
+.endif
+
+.include <bsd.port.mk>

Added: head/deskutils/terminal-image-viewer/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/terminal-image-viewer/distinfo	Tue Nov 12 21:59:27 2019	(r517353)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1573593050
+SHA256 (stefanhaustein-TerminalImageViewer-v1.0.0-50-g134ca73_GH0.tar.gz) = 9786da18752f373910a40be9c6d520698128c74fd2708e168567f4eaa4d058c5
+SIZE (stefanhaustein-TerminalImageViewer-v1.0.0-50-g134ca73_GH0.tar.gz) = 460148

Added: head/deskutils/terminal-image-viewer/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/terminal-image-viewer/files/patch-Makefile	Tue Nov 12 21:59:27 2019	(r517353)
@@ -0,0 +1,20 @@
+--- Makefile.orig	2019-10-21 19:12:09 UTC
++++ Makefile
+@@ -5,7 +5,7 @@ OBJECTS = tiv.o
+ CXX      ?= g++
+ CXXFLAGS ?= -O2 -fpermissive
+ INSTALL  ?= install
+-INSTALL_PROGRAM ?= $(INSTALL) -D
++INSTALL_PROGRAM ?= $(INSTALL)
+ 
+ # https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables
+ prefix      ?= /usr/local
+@@ -14,7 +14,7 @@ bindir      ?= $(exec_prefix)/bin
+ 
+ override CXXFLAGS += -std=c++17 -Wall -fexceptions
+ override LDFLAGS  += -pthread
+-override LDLIBS   += -lstdc++fs
++#override LDLIBS   += -lstdc++fs
+ 
+ all: $(PROGNAME)
+ 

Added: head/deskutils/terminal-image-viewer/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/deskutils/terminal-image-viewer/pkg-descr	Tue Nov 12 21:59:27 2019	(r517353)
@@ -0,0 +1,17 @@
+Small C++ program to display images in a (modern) terminal using RGB ANSI codes
+and unicode block graphic characters.
+
+There are various similar tools (such as timg) using the unicode half block
+character to display two 24bit pixels per character cell. This program enhances
+the resolution by mapping 4x8 pixel cells to different unicode characters,
+using the following algorithm:
+
+For each 4x8 pixel cell of the (potentially downscaled) image:
+* Find the color channel (R, G or B) that has the biggest range of values for
+  the current cell.
+* Split this range in the middle and create a corresponding bitmap for the cell.
+* Compare the bitmap to the assumed bitmaps for various unicode block graphics
+  characters.
+* Re-calculate the foreground and background colors for the chosen character.
+
+WWW: https://github.com/stefanhaustein/TerminalImageViewer



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911122159.xACLxRMQ023887>