mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-18 08:02:48 +00:00
New port: misc/tdfiglet:
A figlet for TheDraw's TDF ANSI fonts. WWW: https://github.com/tat3r/tdfiglet
This commit is contained in:
parent
8ed159be45
commit
22be83766f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473886
@ -499,6 +499,7 @@
|
||||
SUBDIR += table.el
|
||||
SUBDIR += talkfilters
|
||||
SUBDIR += tcb
|
||||
SUBDIR += tdfiglet
|
||||
SUBDIR += team
|
||||
SUBDIR += telbook
|
||||
SUBDIR += tellico-kde4
|
||||
|
26
misc/tdfiglet/Makefile
Normal file
26
misc/tdfiglet/Makefile
Normal file
@ -0,0 +1,26 @@
|
||||
# Created by: Ryan Steinmetz <zi@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= tdfiglet
|
||||
PORTVERSION= 0.0.0.1
|
||||
CATEGORIES= misc
|
||||
|
||||
MAINTAINER= zi@FreeBSD.org
|
||||
COMMENT= A figlet for TDF ANSI fonts
|
||||
|
||||
USES= gmake
|
||||
ALL_TARGET= default
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= tat3r
|
||||
GH_TAGNAME= b0860ce
|
||||
#GH_TAGNAME= b0860ceca3f8d7fa9e3fa8180a0e491d06494afe
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e "s,fonts,${DATADIR}," ${WRKSRC}/${PORTNAME}.c
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
|
||||
(cd ${WRKSRC}/fonts && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
|
||||
|
||||
.include <bsd.port.mk>
|
3
misc/tdfiglet/distinfo
Normal file
3
misc/tdfiglet/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1530712779
|
||||
SHA256 (tat3r-tdfiglet-0.0.0.1-b0860ce_GH0.tar.gz) = 43df448f82dde15a4b9dcbc586ddfc5820e11b023c953c853a63c1a36bec5d9e
|
||||
SIZE (tat3r-tdfiglet-0.0.0.1-b0860ce_GH0.tar.gz) = 3561588
|
66
misc/tdfiglet/files/patch-tdfiglet.c
Normal file
66
misc/tdfiglet/files/patch-tdfiglet.c
Normal file
@ -0,0 +1,66 @@
|
||||
--- tdfiglet.c.orig 2018-06-27 04:00:22 UTC
|
||||
+++ tdfiglet.c
|
||||
@@ -40,6 +40,14 @@
|
||||
#define ENC_UNICODE 0
|
||||
#define ENC_ANSI 1
|
||||
|
||||
+#ifndef FONT_DIR
|
||||
+#define FONT_DIR "fonts"
|
||||
+#endif /* FONT_DIR */
|
||||
+
|
||||
+#ifndef FONT_EXT
|
||||
+#define FONT_EXT "tdf"
|
||||
+#endif /* FONT_EXT */
|
||||
+
|
||||
typedef struct opt_s {
|
||||
uint8_t justify;
|
||||
uint8_t width;
|
||||
@@ -117,6 +125,10 @@ main(int argc, char *argv[])
|
||||
opt.info = false;
|
||||
opt.encoding = ENC_UNICODE;
|
||||
|
||||
+ if (argc == 1) {
|
||||
+ usage();
|
||||
+ }
|
||||
+
|
||||
while((o = getopt(argc, argv, "w:j:c:e:i")) != -1) {
|
||||
switch (o) {
|
||||
case 'w':
|
||||
@@ -194,7 +206,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
font_t
|
||||
-*loadfont(char *fn) {
|
||||
+*loadfont(char *fn_arg) {
|
||||
|
||||
font_t *font;
|
||||
uint8_t *map = NULL;
|
||||
@@ -202,9 +214,20 @@ font_t
|
||||
struct stat st;
|
||||
size_t len;
|
||||
uint8_t *p;
|
||||
+ char *fn = strdup("");
|
||||
|
||||
const char *magic = "\x13TheDraw FONTS file\x1a";
|
||||
|
||||
+ if (!strchr(fn_arg, '/')) {
|
||||
+ if (strchr(fn_arg, '.')) {
|
||||
+ sprintf(fn, "%s/%s", FONT_DIR, fn_arg);
|
||||
+ } else {
|
||||
+ sprintf(fn, "%s/%s.%s", FONT_DIR, fn_arg, FONT_EXT);
|
||||
+ }
|
||||
+ } else {
|
||||
+ strcpy(fn, fn_arg);
|
||||
+ }
|
||||
+
|
||||
fd = open(fn, O_RDONLY);
|
||||
|
||||
if (opt.info) {
|
||||
@@ -299,6 +322,7 @@ font_t
|
||||
}
|
||||
}
|
||||
|
||||
+ free(fn);
|
||||
return font;
|
||||
}
|
||||
|
3
misc/tdfiglet/pkg-descr
Normal file
3
misc/tdfiglet/pkg-descr
Normal file
@ -0,0 +1,3 @@
|
||||
A figlet for TheDraw's TDF ANSI fonts.
|
||||
|
||||
WWW: https://github.com/tat3r/tdfiglet
|
1199
misc/tdfiglet/pkg-plist
Normal file
1199
misc/tdfiglet/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user