diff options
-rw-r--r-- | misc/tdfiglet/Makefile | 6 | ||||
-rw-r--r-- | misc/tdfiglet/distinfo | 6 | ||||
-rw-r--r-- | misc/tdfiglet/files/patch-tdfiglet.c | 66 |
3 files changed, 5 insertions, 73 deletions
diff --git a/misc/tdfiglet/Makefile b/misc/tdfiglet/Makefile index 1a262dec34dc..edfc5b6b016b 100644 --- a/misc/tdfiglet/Makefile +++ b/misc/tdfiglet/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= tdfiglet -PORTVERSION= 0.0.0.1 +PORTVERSION= 0.3 CATEGORIES= misc MAINTAINER= zi@FreeBSD.org @@ -13,11 +13,9 @@ 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 + @${REINPLACE_CMD} -Ee "s,^(FONTDIR := ).*,\1${DATADIR}," ${WRKSRC}/Makefile do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin diff --git a/misc/tdfiglet/distinfo b/misc/tdfiglet/distinfo index 683ecad9c177..99af7c6210f7 100644 --- a/misc/tdfiglet/distinfo +++ b/misc/tdfiglet/distinfo @@ -1,3 +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 +TIMESTAMP = 1531615835 +SHA256 (tat3r-tdfiglet-0.3_GH0.tar.gz) = 9c2855d38a1b4bd102e6f45fdc1c4f74f3ccda0c01626893a2dfe7a23f312b9b +SIZE (tat3r-tdfiglet-0.3_GH0.tar.gz) = 3562256 diff --git a/misc/tdfiglet/files/patch-tdfiglet.c b/misc/tdfiglet/files/patch-tdfiglet.c deleted file mode 100644 index cb4e5a3378b6..000000000000 --- a/misc/tdfiglet/files/patch-tdfiglet.c +++ /dev/null @@ -1,66 +0,0 @@ ---- 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; - } - |