Opened 15 years ago

Closed 15 years ago

#22631 closed defect (fixed)

Boost 1.41 iostreams has broken header

Reported by: dbsgeo@… Owned by: nox@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc:
Port: boost

Description

upstream let a bug slip through which prevents the compilation of py26-mapnik.

Would it be possible to include the patch from https://svn.boost.org/trac/boost/ticket/3010 to the macports 1.41 boost port?

I took a crack at patching but I'm not quite sure how to clean up the git based patch to work with macports:

Index: dports/devel/boost/files/boost_iostrems_missing_include_guard.patch
===================================================================
--- dports/devel/boost/files/boost_iostrems_missing_include_guard.patch	(revision 0)
+++ dports/devel/boost/files/boost_iostrems_missing_include_guard.patch	(revision 0)
@@ -0,0 +1,20 @@
+diff --git a/boost/iostreams/device/mapped_file.hpp b/boost/iostreams/device/mapped_file.hpp
+index aae9dab..be656ef 100644
+--- a/boost/iostreams/device/mapped_file.hpp
++++ b/boost/iostreams/device/mapped_file.hpp
+@@ -4,6 +4,9 @@
+ // Distributed under the Boost Software License, Version 1.0. (See accompanying
+ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+ 
++#ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
++#define BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
++
+ #if defined(_MSC_VER) && (_MSC_VER >= 1020)
+ # pragma once
+ #endif
+@@ -591,3 +594,5 @@ operator^=(mapped_file::mapmode& a, mapped_file::mapmode b)
+ } } // End namespaces iostreams, boost.
+ 
+ #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
++
++#endif // #ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
Index: dports/devel/boost/Portfile
===================================================================
--- dports/devel/boost/Portfile	(revision 60726)
+++ dports/devel/boost/Portfile	(working copy)
@@ -25,6 +25,7 @@
                     rmd160  a604ef5a6f6f5bf50be59206c8534258ab431aea
 
 patchfiles      patch-libs-random-random_device.cpp.diff \
+                boost_iostrems_missing_include_guard.patch
 
 post-extract {
     file mkdir ${worksrcpath}/libs/random/build

the above results in:

--->  Applying patches to boost
Error: Target org.macports.patch returned: shell command " cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_devel_boost/work/boost_1_41_0" && /usr/bin/patch -p0 < '/opt/mports/trunk/dports/devel/boost/files/boost_iostrems_missing_include_guard.patch'" returned error 1
Command output: can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/boost/iostreams/device/mapped_file.hpp b/boost/iostreams/device/mapped_file.hpp
|index aae9dab..be656ef 100644
|--- a/boost/iostreams/device/mapped_file.hpp
|+++ b/boost/iostreams/device/mapped_file.hpp
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
2 out of 2 hunks ignored

Error: Status 1 encountered during processing.

Change History (5)

comment:1 Changed 15 years ago by dbsgeo@…

seems odd that this was missed, so I went and confirmed that allow it was applied to boost trunk before the 1.41 release, it did not make it into the release:

https://svn.boost.org/trac/boost/browser/tags/release/Boost_1_41_0/boost/iostreams/device/mapped_file.hpp

comment:2 Changed 15 years ago by dbsgeo@…

allow/although

comment:3 Changed 15 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to nox@…

comment:4 Changed 15 years ago by dbsgeo@…

Okay, I recreated the patch and this now works:

Index: dports/devel/boost/files/boost_iostreams_missing_include_guard.diff
===================================================================
--- dports/devel/boost/files/boost_iostreams_missing_include_guard.diff	(revision 0)
+++ dports/devel/boost/files/boost_iostreams_missing_include_guard.diff	(revision 0)
@@ -0,0 +1,18 @@
+--- boost/iostreams/device/mapped_file.hpp	2009-11-22 11:32:31.000000000 -0800
++++ boost/iostreams/device/mapped_file.hpp	2009-11-22 11:24:25.000000000 -0800
+@@ -4,6 +4,9 @@
+ // Distributed under the Boost Software License, Version 1.0. (See accompanying
+ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+ 
++#ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
++#define BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
++
+ #if defined(_MSC_VER) && (_MSC_VER >= 1020)
+ # pragma once
+ #endif
+@@ -591,3 +594,5 @@
+ } } // End namespaces iostreams, boost.
+ 
+ #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
++
++#endif // #ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
Index: dports/devel/boost/Portfile
===================================================================
--- dports/devel/boost/Portfile	(revision 60763)
+++ dports/devel/boost/Portfile	(working copy)
@@ -24,7 +24,8 @@
                     sha1    31134e28866b90c39ca4a903c263e036bb25550c \
                     rmd160  a604ef5a6f6f5bf50be59206c8534258ab431aea
 
-patchfiles      patch-libs-random-random_device.cpp.diff
+patchfiles      patch-libs-random-random_device.cpp.diff \
+                    boost_iostreams_missing_include_guard.diff 
 
 post-extract {
     file mkdir ${worksrcpath}/libs/random/build

comment:5 Changed 15 years ago by nox@…

Resolution: fixed
Status: newclosed

Include guards repaired in r60830

Note: See TracTickets for help on using tickets.