aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2020-10-01 19:50:02 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2020-10-01 19:50:02 +0000
commit6a234d25612bd852589057947906da3168b2873d (patch)
tree75d6fe03c9ba7e02bdd6b63be0b04a1094025fe4
parentc0df4ba10870f66750b191e5c357f6eaf5b5871d (diff)
downloadports-6a234d25612bd852589057947906da3168b2873d.tar.gz
ports-6a234d25612bd852589057947906da3168b2873d.zip
MFH: r550869
Revert the upgrade to 2.0.0 it is not backward compatible and break minixmlto in some cases bump portepoch PR: 250028 Reported by: Stefan Ehmann <shoesoft@gmx.net>
Notes
Notes: svn path=/branches/2020Q4/; revision=550870
-rw-r--r--textproc/html2text/Makefile34
-rw-r--r--textproc/html2text/distinfo6
-rw-r--r--textproc/html2text/files/patch-configure34
-rw-r--r--textproc/html2text/pkg-descr2
4 files changed, 65 insertions, 11 deletions
diff --git a/textproc/html2text/Makefile b/textproc/html2text/Makefile
index e80dc5679ddd..625fd3a1b773 100644
--- a/textproc/html2text/Makefile
+++ b/textproc/html2text/Makefile
@@ -2,9 +2,11 @@
# $FreeBSD$
PORTNAME= html2text
-PORTVERSION= 2.0.0
-DISTVERSIONPREFIX= v
+PORTVERSION= 1.3.2a
+PORTEPOCH= 1
CATEGORIES= textproc
+MASTER_SITES= SUNSITE/apps/www/converters \
+ http://www.mbayer.de/html2text/downloads/
MAINTAINER= bapt@FreeBSD.org
COMMENT= Converts HTML documents into plain text
@@ -12,18 +14,36 @@ COMMENT= Converts HTML documents into plain text
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-USE_GITHUB= yes
-GH_ACCOUNT= grobian
-
HAS_CONFIGURE= yes
+PORTDOCS= CHANGES CREDITS KNOWN_BUGS README TODO
PLIST_FILES= bin/html2text man/man1/html2text.1.gz man/man5/html2textrc.5.gz
CONFLICTS= py27-html2text-[0-9]*
+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 ${STAGEDIR}${MANPREFIX}/man/man1
- ${INSTALL_MAN} ${WRKSRC}/html2textrc.5 ${STAGEDIR}${MANPREFIX}/man/man5
+ ${INSTALL_MAN} ${WRKSRC}/html2text.1.gz ${STAGEDIR}${MANPREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/html2textrc.5.gz ${STAGEDIR}${MANPREFIX}/man/man5
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
+.endfor
.include <bsd.port.mk>
diff --git a/textproc/html2text/distinfo b/textproc/html2text/distinfo
index 77ecbdadb682..b46b49a5ceb4 100644
--- a/textproc/html2text/distinfo
+++ b/textproc/html2text/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1601529583
-SHA256 (grobian-html2text-v2.0.0_GH0.tar.gz) = 061125bfac658c6d89fa55e9519d90c5eeb3ba97b2105748ee62f3a3fa2449de
-SIZE (grobian-html2text-v2.0.0_GH0.tar.gz) = 162901
+TIMESTAMP = 1601581641
+SHA256 (html2text-1.3.2a.tar.gz) = 000b39d5d910b867ff7e087177b470a1e26e2819920dcffd5991c33f6d480392
+SIZE (html2text-1.3.2a.tar.gz) = 130088
diff --git a/textproc/html2text/files/patch-configure b/textproc/html2text/files/patch-configure
new file mode 100644
index 000000000000..0775b06e9872
--- /dev/null
+++ b/textproc/html2text/files/patch-configure
@@ -0,0 +1,34 @@
+--- 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';
diff --git a/textproc/html2text/pkg-descr b/textproc/html2text/pkg-descr
index f2dc92ad632b..8278b98c1a20 100644
--- a/textproc/html2text/pkg-descr
+++ b/textproc/html2text/pkg-descr
@@ -11,4 +11,4 @@ accepts also syntactically incorrect input, attempting to interpret it
"reasonably". The rendering is largely customisable through an RC
file.
-WWW: https://github.com/grobian/html2text
+WWW: http://www.mbayer.de/html2text/