Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2009 07:29:22 +0300 (MSK)
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        mi@aldan.algebra.com
Subject:   ports/133044: [PATCH] print/lyx: prepare for upcoming boost 1.37.0
Message-ID:  <20090325042922.7EC7B10883C@hades.panopticon>
Resent-Message-ID: <200903250440.n2P4e4Pb031162@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         133044
>Category:       ports
>Synopsis:       [PATCH] print/lyx: prepare for upcoming boost 1.37.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 25 04:40:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Mar 21 18:50:30 MSK 2009
>Description:
Prepare for upcoming boost 1.37.0.

This patch:
- Contains changes to src/support/fs_extras.C required due to changes in boost
- Removes single broken test (convert 1.1 to string which may return 1.10000000001)

This patch probably breaks the port with current boost, so this is to be committed with boost update

Added file(s):
- files/patch-src-support-fs_extras.C
- files/patch-src-support-tests-convert.C
- files/patch-src-support-tests-regfiles-convert

Port maintainer (mi@aldan.algebra.com) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- lyx-1.4.5.1_1.patch begins here ---
Index: files/patch-boost-134
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/print/lyx/files/patch-boost-134,v
retrieving revision 1.1
diff -u -u -r1.1 patch-boost-134
--- files/patch-boost-134	6 Jul 2007 20:29:55 -0000	1.1
+++ files/patch-boost-134	23 Mar 2009 15:01:48 -0000
@@ -7,84 +7,6 @@
 +#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 @@
Index: files/patch-src-support-fs_extras.C
===================================================================
RCS file: files/patch-src-support-fs_extras.C
diff -N files/patch-src-support-fs_extras.C
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-src-support-fs_extras.C	23 Mar 2009 16:16:38 -0000
@@ -0,0 +1,62 @@
+--- src/support/fs_extras.C.orig	2005-05-07 18:31:16.000000000 +0400
++++ src/support/fs_extras.C	2009-03-23 18:01:11.000000000 +0300
+@@ -93,13 +93,15 @@
+ {
+ 
+ #ifdef BOOST_POSIX
++#include <boost/version.hpp>
+ 	int const infile = ::open(source.string().c_str(), O_RDONLY);
+         if (infile == -1) {
+ 		boost::throw_exception(
+-			filesystem_error(
++			basic_filesystem_error<path>(
+ 				"boost::filesystem::copy_file",
+ 				source, target,
+-				fs::detail::system_error_code()));
++				boost::system::error_code(errno, boost::system::get_system_category()))
++			);
+ 	}
+ 
+         struct stat source_stat;
+@@ -107,10 +109,11 @@
+         if (ret == -1) {
+                 ::close(infile);
+ 		boost::throw_exception(
+-			filesystem_error(
++			basic_filesystem_error<path>(
+ 				"boost::filesystem::copy_file",
+ 				source, target,
+-				fs::detail::system_error_code()));
++				boost::system::error_code(errno, boost::system::get_system_category()))
++			);
+         }
+ 
+         int const flags = O_WRONLY | O_CREAT | (noclobber ? O_EXCL : O_TRUNC);
+@@ -119,10 +122,11 @@
+         if (outfile == -1) {
+                 ::close(infile);
+ 		boost::throw_exception(
+-			filesystem_error(
++			basic_filesystem_error<path>(
+ 				"boost::filesystem::copy_file",
+ 				source, target,
+-				fs::detail::system_error_code()));
++				boost::system::error_code(errno, boost::system::get_system_category()))
++			);	
+         }
+ 
+         std::size_t const buf_sz = 32768;
+@@ -149,10 +153,11 @@
+ 
+         if (in == -1 || out == -1)
+ 		boost::throw_exception(
+-			filesystem_error(
++			basic_filesystem_error<path>(
+ 				"boost::filesystem::copy_file",
+ 				source, target,
+-				fs::detail::system_error_code()));
++				boost::system::error_code(errno, boost::system::get_system_category()))
++			);	
+ #endif
+ #ifdef BOOST_WINDOWS
+ 	if (::CopyFile(source.string().c_str(), target.string().c_str(), noclobber) == 0) {
Index: files/patch-src-support-tests-convert.C
===================================================================
RCS file: files/patch-src-support-tests-convert.C
diff -N files/patch-src-support-tests-convert.C
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-src-support-tests-convert.C	25 Mar 2009 03:33:54 -0000
@@ -0,0 +1,12 @@
+--- src/support/tests/convert.C.orig	2005-01-28 00:05:44.000000000 +0300
++++ src/support/tests/convert.C	2009-03-25 06:33:54.000000000 +0300
+@@ -74,8 +74,7 @@
+ 	     << convert<string>(false) << '\n'
+ 
+ 	     << convert<string>('a') << '\n'
+-	     << convert<string>(1.0) << '\n'
+-	     << convert<string>(1.1) << endl;
++	     << convert<string>(1.0) << endl;
+ }
+ 
+ int main()
Index: files/patch-src-support-tests-regfiles-convert
===================================================================
RCS file: files/patch-src-support-tests-regfiles-convert
diff -N files/patch-src-support-tests-regfiles-convert
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-src-support-tests-regfiles-convert	25 Mar 2009 03:34:11 -0000
@@ -0,0 +1,7 @@
+--- src/support/tests/regfiles/convert.orig	2005-01-28 00:05:44.000000000 +0300
++++ src/support/tests/regfiles/convert	2009-03-25 06:34:11.000000000 +0300
+@@ -46,4 +46,3 @@
+ false
+ a
+ 1
+-1.1
--- lyx-1.4.5.1_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090325042922.7EC7B10883C>