From b9590734ca733e1b86393d66032afa3716ae92c4 Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Sat, 26 Jan 2013 19:12:05 +0000 Subject: [PATCH] Permit textproc/html2text to be built with clang. Patch submitted upstream Submitted by: keramida --- textproc/html2text/files/patch-configure | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 + #include + using namespace std; +-void func() { map x; } ++int main(void) { ++ map 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';