Skip to content

Commit cd9924a

Browse files
html2text: Update to 2.4.0
Co-authored-by: Ryan Carsten Schmidt <[email protected]>
1 parent d4aa2d7 commit cd9924a

File tree

2 files changed

+68
-8
lines changed

2 files changed

+68
-8
lines changed

textproc/html2text/Portfile

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
22

33
PortSystem 1.0
4-
PortGroup github 1.0
4+
PortGroup gitlab 1.0
55

6-
github.setup grobian html2text 2.3.0 v
7-
revision 0
8-
checksums rmd160 13ddcaad6475f8be74f992b84050555e95c9b591 \
9-
sha256 8cec23ed1ff43313f2d0e4b434cd39871bc002cad947a40d4a3738d1351921f7 \
10-
size 346044
6+
gitlab.setup grobian html2text 2.4.0 v
7+
set upload_id 8526650dd42218b3493ce7ca0a3eeb1e
8+
revision 1
9+
checksums rmd160 b99bb417faaa8ff38223f1786628780469a73c1d \
10+
sha256 9d0a7174cacbb3f050b60facd8cba6e138944ec5020b16d1cee70cf91a59f132 \
11+
size 385497
1112

1213
categories textproc
1314
maintainers {ryandesign @ryandesign} openmaintainer
@@ -25,11 +26,35 @@ long_description ${name} is a command line utility, written in C++, \
2526
site from which the documents are loaded via the \
2627
Hypertext Transfer Protocol (HTTP).
2728

28-
github.tarball_from releases
29+
master_sites https://gitlab.com/-/project/48313341/uploads/${upload_id}/
2930

30-
depends_lib port:libiconv
31+
# Override "use_bzip2 yes" set by gitlab.setup.
32+
if {[vercmp [macports_version] >= 2.12]} {
33+
#use_gzip yes
34+
use_bzip2 no
35+
} else {
36+
# https://trac.macports.org/ticket/64960
37+
depends_extract-delete \
38+
bin:lbzip2:lbzip2
39+
extract.suffix .tar.gz
40+
extract {
41+
foreach distfile ${distfiles} {
42+
system -W ${workpath} "[findBinary tar ${portutil::autoconf::tar_command}] -xzf [shellescape ${distpath}/${distfile}]"
43+
}
44+
}
45+
}
46+
47+
depends_build bin:bison:bison
48+
49+
depends_lib port:curl \
50+
port:libiconv
51+
52+
patchfiles version.patch
3153

3254
compiler.cxx_standard 2011
3355

56+
# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
57+
configure.checks.implicit_function_declaration.whitelist-append strchr
58+
3459
test.run yes
3560
test.target check
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Fix VERSION expansion in -version and -help.
2+
3+
https://gitlab.com/grobian/html2text/-/issues/69
4+
https://gitlab.com/grobian/html2text/-/commit/5ab68b767ffdf574658e0795db2bfa49971e6a6a
5+
--- html2text.cpp.orig
6+
+++ html2text.cpp
7+
@@ -18,6 +18,10 @@
8+
* GNU General Public License in the file COPYING for more details.
9+
*/
10+
11+
+#ifdef HAVE_CONFIG_H
12+
+# include "config.h"
13+
+#endif
14+
+
15+
#include <iostream>
16+
#include <string.h>
17+
#include <stdlib.h>
18+
@@ -66,7 +68,7 @@ main(int argc, char **argv)
19+
{
20+
if (argc == 2 && !strcmp(argv[1], "-help")) {
21+
std::cout
22+
- << "This is html2text, version " stringify(VERSION) << std::endl
23+
+ << "This is html2text, version " VERSION << std::endl
24+
<< std::endl
25+
<< usage;
26+
exit(0);
27+
@@ -74,7 +76,7 @@ main(int argc, char **argv)
28+
29+
if (argc == 2 && !strcmp(argv[1], "-version")) {
30+
std::cout
31+
- << "This is html2text, version " stringify(VERSION) << std::endl
32+
+ << "This is html2text, version " VERSION << std::endl
33+
<< std::endl
34+
<< "The latest version can be found at "
35+
<< "https://gitlab.com/grobian/html2text" << std::endl

0 commit comments

Comments
 (0)