html2text: upgrade to 2.2.3

While upstream has migrated now to gitlab they still don't propose
proper distfile on gitlab
This commit is contained in:
Baptiste Daroussin 2024-03-05 16:16:50 +01:00
parent 66b8c9ab3b
commit d6bb925744
3 changed files with 8 additions and 70 deletions

View file

@ -1,49 +1,21 @@
PORTNAME= html2text
PORTVERSION= 1.3.2a
PORTREVISION= 2
PORTVERSION= 2.2.3
PORTEPOCH= 1
CATEGORIES= textproc
MASTER_SITES= SUNSITE/apps/www/converters \
http://www.mbayer.de/html2text/downloads/
MASTER_SITES= https://github.com/grobian/${PORTNAME}/releases/download/v${PORTVERSION}/
MAINTAINER= bapt@FreeBSD.org
COMMENT= Converts HTML documents into plain text
WWW= http://www.mbayer.de/html2text/
WWW= https://gitlab.com/grobian/html2text
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
HAS_CONFIGURE= yes
USE_CXXSTD= gnu++98
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
PORTDOCS= CHANGES CREDITS KNOWN_BUGS README TODO
PLIST_FILES= bin/html2text share/man/man1/html2text.1.gz share/man/man5/html2textrc.5.gz
CONFLICTS= py*-html2text py*-html2text2018 # bin/html2text
PORTSCOUT= skipb:0 skipv:1.3.2
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e '/echo=/s/ -e//' ${WRKSRC}/configure
.for fle in Makefile.in libstd/Makefile.in
@${REINPLACE_CMD} -e '/^DEBUG/s/^/#/; \
/^CXXFLAGS/s/=/+=/' ${WRKSRC}/${fle}
.endfor
.for fle in Area.h HTMLControl.h Properties.h format.h
@${REINPLACE_CMD} -e 's/<istream>/<iostream>/' ${WRKSRC}/${fle}
.endfor
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/html2text ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/html2text.1.gz ${STAGEDIR}${PREFIX}/share/man/man1
${INSTALL_MAN} ${WRKSRC}/html2textrc.5.gz ${STAGEDIR}${PREFIX}/share/man/man5
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1601581641
SHA256 (html2text-1.3.2a.tar.gz) = 000b39d5d910b867ff7e087177b470a1e26e2819920dcffd5991c33f6d480392
SIZE (html2text-1.3.2a.tar.gz) = 130088
TIMESTAMP = 1709631292
SHA256 (html2text-2.2.3.tar.gz) = 859133528b3fd893562e41d84bc1ebc1f9166dd281d0fa8e17e7dd26337f5752
SIZE (html2text-2.2.3.tar.gz) = 329841

View file

@ -1,34 +0,0 @@
--- configure.orig 2004-01-12 15:47:18 UTC
+++ configure
@@ -38,8 +38,7 @@ int main(int, char **) {
return 0;
}
EOF
-CXX=unknown;
-for i in "CC" "g++" "cc" "$CC"; do
+for i in "$CXX" "c++"; do
if $i -c $tmp_file.C 2>/dev/null; then
CXX="$i";
break;
@@ -205,12 +204,19 @@ cat <<EOF >$tmp_file.C;
#include <new>
#include <vector>
using namespace std;
-void func() { map<string, string> x; }
+int main(void) {
+ map<string, string> x;
+ return 0;
+}
EOF
-if $CXX -c $tmp_file.C 2>/dev/null; then
+if $CXX $tmp_file.C 2>/dev/null; then
LIBSTDCXX_INCLUDES="";
LIBSTDCXX_LIBS="";
$echo 'works; no need to make "./libstd"';
+elif $CXX $tmp_file.C -lstdc++ 2>/dev/null; then
+ LIBSTDCXX_INCLUDES="";
+ LIBSTDCXX_LIBS="-lstdc++";
+ $echo 'works with libstdc++; no need to make "./libstd"';
else
LIBSTDCXX_INCLUDES='-Ilibstd/include';
LIBSTDCXX_LIBS='libstd/libstd.a';