diff options
author | rakuco <rakuco@FreeBSD.org> | 2011-09-17 10:49:28 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2011-09-17 10:49:28 +0800 |
commit | b4337dd8ef7031d460cc0d3b3d053e7a3ee1da1c (patch) | |
tree | bdebfb4466c43c433793f0956e44cda47a455420 /print | |
parent | 13899864fa7cdc0206769f8e6597f85d3c841be0 (diff) | |
download | freebsd-ports-gnome-b4337dd8ef7031d460cc0d3b3d053e7a3ee1da1c.tar.gz freebsd-ports-gnome-b4337dd8ef7031d460cc0d3b3d053e7a3ee1da1c.tar.zst freebsd-ports-gnome-b4337dd8ef7031d460cc0d3b3d053e7a3ee1da1c.zip |
Fix build when boost-libs is compiled with a newer (> 4.2 from base) gcc.
LyX originally uses the AC_CHECK_LIB macro to check for boost, however
this macro always calls a C compiler, even to check for a C++ library
such as boost. This made the test program built for this check to
always fail to link when boost was compiled witha recent enough
compiler.
A fix was submitted upstream [1], and this patch needs to be applied
meanwhile.
[1] http://article.gmane.org/gmane.editors.lyx.devel/138405
Reported by: avg
Approved by: avilla (mentor)
Diffstat (limited to 'print')
-rw-r--r-- | print/lyx/files/patch-configure | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/print/lyx/files/patch-configure b/print/lyx/files/patch-configure new file mode 100644 index 000000000000..7bb03559faf7 --- /dev/null +++ b/print/lyx/files/patch-configure @@ -0,0 +1,103 @@ +--- configure.orig 2011-09-12 19:17:15.000000000 -0300 ++++ configure 2011-09-12 19:17:40.000000000 -0300 +@@ -7307,73 +7317,56 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lyx_cv_with_included_boost" >&5 + $as_echo "$lyx_cv_with_included_boost" >&6; } + if test x$lyx_cv_with_included_boost != xyes ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lboost_signals" >&5 +-$as_echo_n "checking for main in -lboost_signals... " >&6; } +-if test "${ac_cv_lib_boost_signals_main+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lboost_signals -lm $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++ ac_ext=cpp ++ac_cpp='$CXXCPP $CPPFLAGS' ++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ++ SAVED_LDFLAGS=$LDFLAGS + ++ LDFLAGS="$SAVED_LDFLAGS -lboost_signals -lm" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <boost/signal.hpp> + int + main () + { +-return main (); ++boost::signal<void ()> s; + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_boost_signals_main=yes +-else +- ac_cv_lib_boost_signals_main=no ++if ac_fn_cxx_try_link "$LINENO"; then : ++ lyx_boost_underscore=yes + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_boost_signals_main" >&5 +-$as_echo "$ac_cv_lib_boost_signals_main" >&6; } +-if test "x$ac_cv_lib_boost_signals_main" = x""yes; then : +- lyx_boost_underscore=yes +-fi +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lboost_signals-mt" >&5 +-$as_echo_n "checking for main in -lboost_signals-mt... " >&6; } +-if test "${ac_cv_lib_boost_signals_mt_main+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lboost_signals-mt -lm $LIBTHREAD $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++ LDFLAGS="$SAVED_LDFLAGS -lboost_signals-mt -lm $LIBTHREAD" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +- ++#include <boost/signal.hpp> + int + main () + { +-return main (); ++boost::signal<void ()> s; + ; + return 0; + } + _ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_boost_signals_mt_main=yes +-else +- ac_cv_lib_boost_signals_mt_main=no ++if ac_fn_cxx_try_link "$LINENO"; then : ++ lyx_boost_underscore_mt=yes + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_boost_signals_mt_main" >&5 +-$as_echo "$ac_cv_lib_boost_signals_mt_main" >&6; } +-if test "x$ac_cv_lib_boost_signals_mt_main" = x""yes; then : +- lyx_boost_underscore_mt=yes +-fi ++ ++ LDFLAGS=$SAVED_LDFLAGS ++ ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ + + if test x$lyx_boost_underscore_mt = xyes ; then + BOOST_MT="-mt" |