summaryrefslogtreecommitdiff
path: root/textproc/code2html
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2025-04-29 20:31:28 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2025-04-29 20:31:28 +0000
commitc6cdeed14b625d3d589c44ab7d0485d1e8422dac (patch)
tree5ef35cf1a9992ca4af7772bd79e86e4a832d9757 /textproc/code2html
parentsecurity/vuxml: Fix navidrome range statement (diff)
textproc/code2html: adopt and improve this useful port
- Undeprecate: the author is aware that there probably are other syntax highlighters around that are faster and more versatile these days, but then, if it works, why look for something else? - Define LICENSE (MIT), do not hardcode GZIP_CMD in sed(1) call - Install available documentation files (subject to DOCS option)
Diffstat (limited to 'textproc/code2html')
-rw-r--r--textproc/code2html/Makefile23
1 files changed, 15 insertions, 8 deletions
diff --git a/textproc/code2html/Makefile b/textproc/code2html/Makefile
index 3ac4ed0fb765..085878ef0ec7 100644
--- a/textproc/code2html/Makefile
+++ b/textproc/code2html/Makefile
@@ -5,12 +5,12 @@ CATEGORIES= textproc
MASTER_SITES= SF \
http://www.palfrader.org/code2html/all/
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Sourcecode to HTML converter
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Source code to HTML converter
WWW= https://www.palfrader.org/code2html/
-DEPRECATED= Obsolete utility, last activity upstream in 2002
-EXPIRATION_DATE=2025-04-30
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
NO_BUILD= yes
USES= perl5 shebangfix
@@ -18,18 +18,25 @@ USE_PERL5= run
SHEBANG_FILES= code2html
PLIST_FILES= bin/code2html share/man/man1/code2html.1.gz
+PORTDOCS= CREDITS ChangeLog README
-do-configure:
+OPTIONS_DEFINE= DOCS
+
+post-patch:
@${REINPLACE_CMD} \
-e 's|/usr/bin/bzip2|${BZIP2_CMD}|' \
- -e 's|/bin/gzip|/usr/bin/gzip|' \
- -e 's|/etc/|${PREFIX}/etc/|' \
+ -e 's|/bin/gzip|${GZIP_CMD:[1]}|' \
+ -e 's|/etc/|${PREFIX}&|' \
${WRKSRC}/code2html
- @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|' \
+ @${REINPLACE_CMD} -e 's|/etc/|${PREFIX}&|' \
${WRKSRC}/code2html.1
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/code2html ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/code2html.1 ${STAGEDIR}${PREFIX}/share/man/man1
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
+
.include <bsd.port.mk>