From 6686ae02cc504d727dcaebf12fcea1dfcc84de48 Mon Sep 17 00:00:00 2001 From: Mikhail Teterin Date: Fri, 6 Jul 2007 20:29:55 +0000 Subject: Add a patch to ensure we compile against the new Boost-1.34, while maintaining compatibility with Boost-1.33. Also, when compiling against 1.34, be sure to remove the `-fno-exceptions' flag, because the new Boost throws in a few places... Notified by: pav --- print/lyx-devel/Makefile | 8 +++ print/lyx-devel/files/patch-boost-134 | 100 ++++++++++++++++++++++++++++++++++ print/lyx/Makefile | 8 +++ print/lyx/files/patch-boost-134 | 100 ++++++++++++++++++++++++++++++++++ print/lyx14/Makefile | 8 +++ print/lyx14/files/patch-boost-134 | 100 ++++++++++++++++++++++++++++++++++ print/lyx15/Makefile | 8 +++ print/lyx15/files/patch-boost-134 | 100 ++++++++++++++++++++++++++++++++++ print/lyx16/Makefile | 8 +++ print/lyx16/files/patch-boost-134 | 100 ++++++++++++++++++++++++++++++++++ 10 files changed, 540 insertions(+) create mode 100644 print/lyx-devel/files/patch-boost-134 create mode 100644 print/lyx/files/patch-boost-134 create mode 100644 print/lyx14/files/patch-boost-134 create mode 100644 print/lyx15/files/patch-boost-134 create mode 100644 print/lyx16/files/patch-boost-134 (limited to 'print') diff --git a/print/lyx-devel/Makefile b/print/lyx-devel/Makefile index 1191f2b22ac5..58f21a1a621f 100644 --- a/print/lyx-devel/Makefile +++ b/print/lyx-devel/Makefile @@ -55,6 +55,14 @@ post-patch: ${REINPLACE_CMD} -e 's,/bin/bash,/bin/sh,' \ ${WRKSRC}/src/support/tests/test_* +pre-configure: + # If the installed Boost is 1.34 or later, we must compile + # with exceptions enabled: + ${AWK} '/#define BOOST_VERSION / {exit($$NF >= 103400)}' \ + ${LOCALBASE}/include/boost/version.hpp || \ + ${REINPLACE_CMD} -e 's,\(AM_CXXFLAGS="\)-fno-exceptions,\1,' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} + post-configure: # Removing explicit linking with -lc ${REINPLACE_CMD} -e 's,-lc ,,' ${WRKSRC}/*/Makefile diff --git a/print/lyx-devel/files/patch-boost-134 b/print/lyx-devel/files/patch-boost-134 new file mode 100644 index 000000000000..9d962c0af94a --- /dev/null +++ b/print/lyx-devel/files/patch-boost-134 @@ -0,0 +1,100 @@ +--- src/support/path.h Mon Oct 6 11:43:21 2003 ++++ src/support/path.h Fri Jul 6 14:23:38 2007 +@@ -55,5 +55,5 @@ + // we add this macro: + /// +-#ifndef PATH_C ++#if 0 + #define Path(x) unnamed_Path; + #endif +--- src/support/fs_extras.C Sat May 7 10:31:16 2005 ++++ src/support/fs_extras.C Fri Jul 6 14:39:58 2007 +@@ -94,11 +94,20 @@ + + #ifdef BOOST_POSIX ++#include + int const infile = ::open(source.string().c_str(), O_RDONLY); + if (infile == -1) { + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -108,8 +117,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -120,8 +137,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -150,8 +175,16 @@ + if (in == -1 || out == -1) + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + #endif + #ifdef BOOST_WINDOWS +--- src/client/client.C Wed Apr 12 05:37:33 2006 ++++ src/client/client.C Fri Jul 6 15:47:26 2007 +@@ -94,5 +94,10 @@ + for (; beg != end; ++beg) { + if (prefixIs(beg->leaf(), "lyx_tmpdir" + pid)) { ++#include ++#if BOOST_VERSION < 103400 + fs::path lyxsocket = *beg / "lyxsocket"; ++#else ++ fs::path lyxsocket = beg->path() / "lyxsocket"; ++#endif + if (fs::exists(lyxsocket)) { + dirlist.push_back(lyxsocket); diff --git a/print/lyx/Makefile b/print/lyx/Makefile index 1191f2b22ac5..58f21a1a621f 100644 --- a/print/lyx/Makefile +++ b/print/lyx/Makefile @@ -55,6 +55,14 @@ post-patch: ${REINPLACE_CMD} -e 's,/bin/bash,/bin/sh,' \ ${WRKSRC}/src/support/tests/test_* +pre-configure: + # If the installed Boost is 1.34 or later, we must compile + # with exceptions enabled: + ${AWK} '/#define BOOST_VERSION / {exit($$NF >= 103400)}' \ + ${LOCALBASE}/include/boost/version.hpp || \ + ${REINPLACE_CMD} -e 's,\(AM_CXXFLAGS="\)-fno-exceptions,\1,' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} + post-configure: # Removing explicit linking with -lc ${REINPLACE_CMD} -e 's,-lc ,,' ${WRKSRC}/*/Makefile diff --git a/print/lyx/files/patch-boost-134 b/print/lyx/files/patch-boost-134 new file mode 100644 index 000000000000..9d962c0af94a --- /dev/null +++ b/print/lyx/files/patch-boost-134 @@ -0,0 +1,100 @@ +--- src/support/path.h Mon Oct 6 11:43:21 2003 ++++ src/support/path.h Fri Jul 6 14:23:38 2007 +@@ -55,5 +55,5 @@ + // we add this macro: + /// +-#ifndef PATH_C ++#if 0 + #define Path(x) unnamed_Path; + #endif +--- src/support/fs_extras.C Sat May 7 10:31:16 2005 ++++ src/support/fs_extras.C Fri Jul 6 14:39:58 2007 +@@ -94,11 +94,20 @@ + + #ifdef BOOST_POSIX ++#include + int const infile = ::open(source.string().c_str(), O_RDONLY); + if (infile == -1) { + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -108,8 +117,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -120,8 +137,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -150,8 +175,16 @@ + if (in == -1 || out == -1) + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + #endif + #ifdef BOOST_WINDOWS +--- src/client/client.C Wed Apr 12 05:37:33 2006 ++++ src/client/client.C Fri Jul 6 15:47:26 2007 +@@ -94,5 +94,10 @@ + for (; beg != end; ++beg) { + if (prefixIs(beg->leaf(), "lyx_tmpdir" + pid)) { ++#include ++#if BOOST_VERSION < 103400 + fs::path lyxsocket = *beg / "lyxsocket"; ++#else ++ fs::path lyxsocket = beg->path() / "lyxsocket"; ++#endif + if (fs::exists(lyxsocket)) { + dirlist.push_back(lyxsocket); diff --git a/print/lyx14/Makefile b/print/lyx14/Makefile index 1191f2b22ac5..58f21a1a621f 100644 --- a/print/lyx14/Makefile +++ b/print/lyx14/Makefile @@ -55,6 +55,14 @@ post-patch: ${REINPLACE_CMD} -e 's,/bin/bash,/bin/sh,' \ ${WRKSRC}/src/support/tests/test_* +pre-configure: + # If the installed Boost is 1.34 or later, we must compile + # with exceptions enabled: + ${AWK} '/#define BOOST_VERSION / {exit($$NF >= 103400)}' \ + ${LOCALBASE}/include/boost/version.hpp || \ + ${REINPLACE_CMD} -e 's,\(AM_CXXFLAGS="\)-fno-exceptions,\1,' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} + post-configure: # Removing explicit linking with -lc ${REINPLACE_CMD} -e 's,-lc ,,' ${WRKSRC}/*/Makefile diff --git a/print/lyx14/files/patch-boost-134 b/print/lyx14/files/patch-boost-134 new file mode 100644 index 000000000000..9d962c0af94a --- /dev/null +++ b/print/lyx14/files/patch-boost-134 @@ -0,0 +1,100 @@ +--- src/support/path.h Mon Oct 6 11:43:21 2003 ++++ src/support/path.h Fri Jul 6 14:23:38 2007 +@@ -55,5 +55,5 @@ + // we add this macro: + /// +-#ifndef PATH_C ++#if 0 + #define Path(x) unnamed_Path; + #endif +--- src/support/fs_extras.C Sat May 7 10:31:16 2005 ++++ src/support/fs_extras.C Fri Jul 6 14:39:58 2007 +@@ -94,11 +94,20 @@ + + #ifdef BOOST_POSIX ++#include + int const infile = ::open(source.string().c_str(), O_RDONLY); + if (infile == -1) { + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -108,8 +117,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -120,8 +137,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -150,8 +175,16 @@ + if (in == -1 || out == -1) + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + #endif + #ifdef BOOST_WINDOWS +--- src/client/client.C Wed Apr 12 05:37:33 2006 ++++ src/client/client.C Fri Jul 6 15:47:26 2007 +@@ -94,5 +94,10 @@ + for (; beg != end; ++beg) { + if (prefixIs(beg->leaf(), "lyx_tmpdir" + pid)) { ++#include ++#if BOOST_VERSION < 103400 + fs::path lyxsocket = *beg / "lyxsocket"; ++#else ++ fs::path lyxsocket = beg->path() / "lyxsocket"; ++#endif + if (fs::exists(lyxsocket)) { + dirlist.push_back(lyxsocket); diff --git a/print/lyx15/Makefile b/print/lyx15/Makefile index 1191f2b22ac5..58f21a1a621f 100644 --- a/print/lyx15/Makefile +++ b/print/lyx15/Makefile @@ -55,6 +55,14 @@ post-patch: ${REINPLACE_CMD} -e 's,/bin/bash,/bin/sh,' \ ${WRKSRC}/src/support/tests/test_* +pre-configure: + # If the installed Boost is 1.34 or later, we must compile + # with exceptions enabled: + ${AWK} '/#define BOOST_VERSION / {exit($$NF >= 103400)}' \ + ${LOCALBASE}/include/boost/version.hpp || \ + ${REINPLACE_CMD} -e 's,\(AM_CXXFLAGS="\)-fno-exceptions,\1,' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} + post-configure: # Removing explicit linking with -lc ${REINPLACE_CMD} -e 's,-lc ,,' ${WRKSRC}/*/Makefile diff --git a/print/lyx15/files/patch-boost-134 b/print/lyx15/files/patch-boost-134 new file mode 100644 index 000000000000..9d962c0af94a --- /dev/null +++ b/print/lyx15/files/patch-boost-134 @@ -0,0 +1,100 @@ +--- src/support/path.h Mon Oct 6 11:43:21 2003 ++++ src/support/path.h Fri Jul 6 14:23:38 2007 +@@ -55,5 +55,5 @@ + // we add this macro: + /// +-#ifndef PATH_C ++#if 0 + #define Path(x) unnamed_Path; + #endif +--- src/support/fs_extras.C Sat May 7 10:31:16 2005 ++++ src/support/fs_extras.C Fri Jul 6 14:39:58 2007 +@@ -94,11 +94,20 @@ + + #ifdef BOOST_POSIX ++#include + int const infile = ::open(source.string().c_str(), O_RDONLY); + if (infile == -1) { + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -108,8 +117,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -120,8 +137,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -150,8 +175,16 @@ + if (in == -1 || out == -1) + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + #endif + #ifdef BOOST_WINDOWS +--- src/client/client.C Wed Apr 12 05:37:33 2006 ++++ src/client/client.C Fri Jul 6 15:47:26 2007 +@@ -94,5 +94,10 @@ + for (; beg != end; ++beg) { + if (prefixIs(beg->leaf(), "lyx_tmpdir" + pid)) { ++#include ++#if BOOST_VERSION < 103400 + fs::path lyxsocket = *beg / "lyxsocket"; ++#else ++ fs::path lyxsocket = beg->path() / "lyxsocket"; ++#endif + if (fs::exists(lyxsocket)) { + dirlist.push_back(lyxsocket); diff --git a/print/lyx16/Makefile b/print/lyx16/Makefile index 1191f2b22ac5..58f21a1a621f 100644 --- a/print/lyx16/Makefile +++ b/print/lyx16/Makefile @@ -55,6 +55,14 @@ post-patch: ${REINPLACE_CMD} -e 's,/bin/bash,/bin/sh,' \ ${WRKSRC}/src/support/tests/test_* +pre-configure: + # If the installed Boost is 1.34 or later, we must compile + # with exceptions enabled: + ${AWK} '/#define BOOST_VERSION / {exit($$NF >= 103400)}' \ + ${LOCALBASE}/include/boost/version.hpp || \ + ${REINPLACE_CMD} -e 's,\(AM_CXXFLAGS="\)-fno-exceptions,\1,' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} + post-configure: # Removing explicit linking with -lc ${REINPLACE_CMD} -e 's,-lc ,,' ${WRKSRC}/*/Makefile diff --git a/print/lyx16/files/patch-boost-134 b/print/lyx16/files/patch-boost-134 new file mode 100644 index 000000000000..9d962c0af94a --- /dev/null +++ b/print/lyx16/files/patch-boost-134 @@ -0,0 +1,100 @@ +--- src/support/path.h Mon Oct 6 11:43:21 2003 ++++ src/support/path.h Fri Jul 6 14:23:38 2007 +@@ -55,5 +55,5 @@ + // we add this macro: + /// +-#ifndef PATH_C ++#if 0 + #define Path(x) unnamed_Path; + #endif +--- src/support/fs_extras.C Sat May 7 10:31:16 2005 ++++ src/support/fs_extras.C Fri Jul 6 14:39:58 2007 +@@ -94,11 +94,20 @@ + + #ifdef BOOST_POSIX ++#include + int const infile = ::open(source.string().c_str(), O_RDONLY); + if (infile == -1) { + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -108,8 +117,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -120,8 +137,16 @@ + ::close(infile); + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + } + +@@ -150,8 +175,16 @@ + if (in == -1 || out == -1) + boost::throw_exception( ++#if BOOST_VERSION < 103400 + filesystem_error( + "boost::filesystem::copy_file", + source, target, +- fs::detail::system_error_code())); ++ fs::detail::system_error_code()) ++#else ++ filesystem_path_error( ++ "boost::filesystem::copy_file", ++ source, target, ++ fs::lookup_errno(errno)) ++#endif ++ ); + #endif + #ifdef BOOST_WINDOWS +--- src/client/client.C Wed Apr 12 05:37:33 2006 ++++ src/client/client.C Fri Jul 6 15:47:26 2007 +@@ -94,5 +94,10 @@ + for (; beg != end; ++beg) { + if (prefixIs(beg->leaf(), "lyx_tmpdir" + pid)) { ++#include ++#if BOOST_VERSION < 103400 + fs::path lyxsocket = *beg / "lyxsocket"; ++#else ++ fs::path lyxsocket = beg->path() / "lyxsocket"; ++#endif + if (fs::exists(lyxsocket)) { + dirlist.push_back(lyxsocket); -- cgit v1.2.3