New port: x11-fonts/fontpreview

fontpreview is a command-line tool that let's the user to quickly search
for fonts that are installed on their machine and preview them.
The fuzzy search feature is provided by fzf and the preview is generated
with ImageMagick and then displayed using sxiv. This tool is highly
customizable, almost all of the variables in this tool can be changed using
the command-line flags or the environment variables.

WWW: https://github.com/sdushantha/fontpreview
This commit is contained in:
Mateusz Piotrowski 2020-04-19 18:24:30 +00:00
parent aa54510c51
commit 9c5abf76e3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=532142
5 changed files with 66 additions and 0 deletions

View File

@ -101,6 +101,7 @@
SUBDIR += fontconfig
SUBDIR += fontconfig-reference
SUBDIR += fontmatrix
SUBDIR += fontpreview
SUBDIR += fonts-indic
SUBDIR += fonttosfnt
SUBDIR += freefont-ttf

View File

@ -0,0 +1,43 @@
# $FreeBSD$
PORTNAME= fontpreview
DISTVERSION= 1.0.6
CATEGORIES= x11-fonts graphics
MAINTAINER= 0mp@FreeBSD.org
COMMENT= Very customizable and minimal font previewer written in Bash
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= bash:shells/bash \
convert:graphics/ImageMagick7 \
fzf:textproc/fzf \
getopt>0:misc/getopt \
sxiv:graphics/sxiv \
xdotool:x11/xdotool
USES= shebangfix
USE_GITHUB= yes
GH_ACCOUNT= sdushantha
GH_TAGNAME= 24f4f5e7dba3351844950e681c08bd74f3df2d42
SHEBANG_FILES= ${PORTNAME}
NO_ARCH= yes
NO_BUILD= yes
PLIST_FILES= bin/${PORTNAME}
PORTDOCS= README.md extra/
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} 's|%%GETOPT%%|${LOCALBASE}/bin/getopt|' \
${WRKSRC}/${PORTNAME}
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}/extra
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/extra/* ${STAGEDIR}${DOCSDIR}/extra
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1587297479
SHA256 (sdushantha-fontpreview-1.0.6-24f4f5e7dba3351844950e681c08bd74f3df2d42_GH0.tar.gz) = acb7d69d6264127c4d4a80f1b160e761ba50dcc0206fc31469a7b4c593522eb1
SIZE (sdushantha-fontpreview-1.0.6-24f4f5e7dba3351844950e681c08bd74f3df2d42_GH0.tar.gz) = 6285279

View File

@ -0,0 +1,11 @@
--- fontpreview.orig 2020-04-19 12:00:29 UTC
+++ fontpreview
@@ -164,7 +164,7 @@ font=$1
# Parse the arguments
-options=$(getopt -o hi:o: --long position:,size:,version,search-prompt:,font-size:,bg-color:,fg-color:,preview-text:,input:,output:,help -- "$@")
+options=$(%%GETOPT%% -o hi:o: --long position:,size:,version,search-prompt:,font-size:,bg-color:,fg-color:,preview-text:,input:,output:,help -- "$@")
eval set -- "$options"
while true; do

View File

@ -0,0 +1,8 @@
fontpreview is a command-line tool that let's the user to quickly search for
fonts that are installed on their machine and preview them. The fuzzy search
feature is provided by fzf and the preview is generated with ImageMagick and
then displayed using sxiv. This tool is highly customizable, almost all of the
variables in this tool can be changed using the command-line flags or the
environment variables.
WWW: https://github.com/sdushantha/fontpreview