From ee6490dab81199b8dca378285819d919707729ea Mon Sep 17 00:00:00 2001 From: Felix Palmen Date: Sun, 11 Feb 2024 11:17:34 +0100 Subject: [PATCH] converters/dos2ansi: Add new port A tool to convert MS-DOS/ANSI.SYS text files to modern terminals. --- converters/Makefile | 1 + converters/dos2ansi/Makefile | 53 +++++++++++++++++++++++++++++++++++ converters/dos2ansi/distinfo | 3 ++ converters/dos2ansi/pkg-descr | 7 +++++ converters/dos2ansi/pkg-plist | 12 ++++++++ 5 files changed, 76 insertions(+) create mode 100644 converters/dos2ansi/Makefile create mode 100644 converters/dos2ansi/distinfo create mode 100644 converters/dos2ansi/pkg-descr create mode 100644 converters/dos2ansi/pkg-plist diff --git a/converters/Makefile b/converters/Makefile index 5c769f0ea3f6..bf76af850bac 100644 --- a/converters/Makefile +++ b/converters/Makefile @@ -20,6 +20,7 @@ SUBDIR += cmios9 SUBDIR += cocot SUBDIR += convmv + SUBDIR += dos2ansi SUBDIR += dos2unix SUBDIR += dosunix SUBDIR += drg2sbg diff --git a/converters/dos2ansi/Makefile b/converters/dos2ansi/Makefile new file mode 100644 index 000000000000..94c28f139c41 --- /dev/null +++ b/converters/dos2ansi/Makefile @@ -0,0 +1,53 @@ +PORTNAME= dos2ansi +DISTVERSION= 2.0 +CATEGORIES= converters +MASTER_SITES= ${WWW}/releases/download/v${DISTVERSION}/ + +MAINTAINER= zirias@FreeBSD.org +COMMENT= Converter for old MS-DOS/ANSI.SYS text files +WWW= https://github.com/Zirias/dos2ansi + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +FLAVORS= x11 nox11 +FLAVOR?= x11 +nox11_OPTIONS_EXCLUDE= BITMAP SCALABLE +nox11_PKGNAMESUFFIX= -nox11 +x11_OPTIONS_SLAVE= SHOWANSI +x11_RUN_DEPENDS= xterm:x11/xterm + +USES= compiler:c11 gmake tar:xz +MAKEFILE= GNUmakefile +ALL_TARGET= strip +CONFLICTS_INSTALL= ${PORTNAME} ${PORTNAME}-nox11 + +OPTIONS_DEFINE= DOCS HTML MANPAGES NCURSES SHOWANSI +OPTIONS_DEFAULT= MANPAGES NCURSES BITMAP SCALABLE +OPTIONS_GROUP= FONTS +OPTIONS_GROUP_FONTS= BITMAP SCALABLE +OPTIONS_EXCLUDE= ${${FLAVOR}_OPTIONS_EXCLUDE} +OPTIONS_SLAVE= ${${FLAVOR}_OPTIONS_SLAVE} +OPTIONS_SUB= yes +BITMAP_DESC= Add bitmap fonts from x11-fonts/ibmfonts +HTML_DESC= Build and install HTML manpages +NCURSES_DESC= Build with terminfo-based color output +SCALABLE_DESC= Add scalable fonts from x11-fonts/oldschool-pc-fonts +SHOWANSI_DESC= Install showansi script + +BITMAP_RUN_DEPENDS= ibmfonts>0:x11-fonts/ibmfonts + +HTML_MAKE_ENV= WITH_HTML=1 + +MANPAGES_MAKE_ENV_OFF= WITH_MAN=0 + +NCURSES_USES= ncurses +NCURSES_MAKE_ENV= INCLUDES=-I${NCURSESINC} +NCURSES_MAKE_ENV_OFF= WITH_CURSES=0 +NCURSES_LDFLAGS= -Wl,--as-needed + +SCALABLE_RUN_DEPENDS= oldschool-pc-fonts>0:x11-fonts/oldschool-pc-fonts + +SHOWANSI_MAKE_ENV_OFF= WITH_SHOWANSI=0 + +.include diff --git a/converters/dos2ansi/distinfo b/converters/dos2ansi/distinfo new file mode 100644 index 000000000000..065593fd5ed3 --- /dev/null +++ b/converters/dos2ansi/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1710187093 +SHA256 (dos2ansi-2.0.tar.xz) = a34979621f932fae36b3bfc77ddad26c172e6d05bc68aae865cb3eaf663db70c +SIZE (dos2ansi-2.0.tar.xz) = 74408 diff --git a/converters/dos2ansi/pkg-descr b/converters/dos2ansi/pkg-descr new file mode 100644 index 000000000000..8ad90e775f99 --- /dev/null +++ b/converters/dos2ansi/pkg-descr @@ -0,0 +1,7 @@ +A tool to convert MS-DOS/ANSI.SYS text files to modern terminals. + +This tool converts MS-DOS text files using ANSI.SYS escape sequences to a +format a modern terminal can display. The output will use a Unicode encoding +of characters and only ANSI SGR escape sequences to set basic foreground and +background colors, intensity and blinking attribute. The input is expected to +use CP-437 or one of the other supported DOS codepages. diff --git a/converters/dos2ansi/pkg-plist b/converters/dos2ansi/pkg-plist new file mode 100644 index 000000000000..06de02aca585 --- /dev/null +++ b/converters/dos2ansi/pkg-plist @@ -0,0 +1,12 @@ +bin/dos2ansi +%%SHOWANSI%%bin/showansi +%%SHOWANSI%%@sample %%ETCDIR%%/showansirc.sample +%%MANPAGES%%share/man/man1/dos2ansi.1.gz +%%MANPAGES%%%%SHOWANSI%%share/man/man1/showansi.1.gz +@comment %%DOCSDIR%%/LICENSE.txt +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%HTML%%%%DOCSDIR%%/html/dos2ansi.1.html +%%HTML%%%%SHOWANSI%%%%DOCSDIR%%/html/showansi.1.html +%%SHOWANSI%%%%DATADIR%%/showansi/fonts.bitmap +%%SHOWANSI%%%%DATADIR%%/showansi/fonts.mixed +%%SHOWANSI%%%%DATADIR%%/showansi/fonts.scalable -- 2.43.2