Hello!

Boost-1.34 is not only released now, it is also _required_ for the upcoming
LyX-1.5.0. Unfortunately, the current release of LyX (1.4.4) fails to build
against it.

I'm attaching the patch I plan to add to FreeBSD's print/lyx port to make the
source compatible with both Boost-1.33.1 and 1.34.

In addition, the `-fno-exceptions' has to be removed from configure, if
Boost-1.34 is detected.

You may wish to release a 1.4.5 or 1.4.4.1. Even if 1.5.0 is _ready_, it has
too many invasive changes (such as removal of many front-ends) to be
immediately adopted...

Thanks. Yours,

        -mi

P.S. Boost people should really be ashamed of themselves for introducing API
incompatibilities like this -- especially, in a _minor_ number release...
--- 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 <boost/version.hpp>
 	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 <boost/version.hpp>
+#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);

Reply via email to