aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2013-01-27 03:12:05 +0800
committereadler <eadler@FreeBSD.org>2013-01-27 03:12:05 +0800
commit9a2f7244812f602107e3a30f53429913434c2dab (patch)
tree1586cd604cbbbb846e07a96013b807433bcb2164 /textproc
parent5c288c31f73cfbbaeca0e1139faf5ac638e874c6 (diff)
downloadfreebsd-ports-gnome-9a2f7244812f602107e3a30f53429913434c2dab.tar.gz
freebsd-ports-gnome-9a2f7244812f602107e3a30f53429913434c2dab.tar.zst
freebsd-ports-gnome-9a2f7244812f602107e3a30f53429913434c2dab.zip
Permit textproc/html2text to be built with clang.
Patch submitted upstream Submitted by: keramida
Diffstat (limited to 'textproc')
-rw-r--r--textproc/html2text/files/patch-configure22
1 files changed, 22 insertions, 0 deletions
diff --git a/textproc/html2text/files/patch-configure b/textproc/html2text/files/patch-configure
index f34e0ac05be0..90d4cb2051e3 100644
--- a/textproc/html2text/files/patch-configure
+++ b/textproc/html2text/files/patch-configure
@@ -10,3 +10,25 @@
if $i -c $tmp_file.C 2>/dev/null; then
CXX="$i";
break;
+@@ -205,12 +205,19 @@
+ #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';