[78521] trunk/dports/python/py26-mapnik

ryandesign at macports.org ryandesign at macports.org
Tue May 10 11:45:05 PDT 2011


Revision: 78521
          http://trac.macports.org/changeset/78521
Author:   ryandesign at macports.org
Date:     2011-05-10 11:45:04 -0700 (Tue, 10 May 2011)
Log Message:
-----------
py26-mapnik: fix build with latest boost; see #28944

Modified Paths:
--------------
    trunk/dports/python/py26-mapnik/Portfile

Added Paths:
-----------
    trunk/dports/python/py26-mapnik/files/patch-boost-filesystem3.diff

Modified: trunk/dports/python/py26-mapnik/Portfile
===================================================================
--- trunk/dports/python/py26-mapnik/Portfile	2011-05-10 18:01:55 UTC (rev 78520)
+++ trunk/dports/python/py26-mapnik/Portfile	2011-05-10 18:45:04 UTC (rev 78521)
@@ -5,7 +5,7 @@
 
 name                 py26-mapnik
 version              0.7.1
-revision             4
+revision             5
 categories           python gis
 
 maintainers          gmail.com:dbsgeo
@@ -54,6 +54,8 @@
                     port:libxml2 \
                     port:python26
 
+patchfiles          patch-boost-filesystem3.diff
+
 set python  "${prefix}/bin/python2.6"
 
 configure.pkg_config ${prefix}/bin/pkg-config

Added: trunk/dports/python/py26-mapnik/files/patch-boost-filesystem3.diff
===================================================================
--- trunk/dports/python/py26-mapnik/files/patch-boost-filesystem3.diff	                        (rev 0)
+++ trunk/dports/python/py26-mapnik/files/patch-boost-filesystem3.diff	2011-05-10 18:45:04 UTC (rev 78521)
@@ -0,0 +1,113 @@
+Index:  src/datasource_cache.cpp
+===================================================================
+--- src/datasource_cache.cpp	2011-03-28 23:58:51.000000000 +0200
++++ src/datasource_cache.cpp	2011-03-28 23:59:21.000000000 +0200
+@@ -40,8 +40,8 @@
+ 
+ namespace mapnik
+ {
+-   using namespace std;
+-   using namespace boost;
++//using namespace std;
++//using namespace boost;
+    
+    bool is_input_plugin (std::string const& filename)
+    {
+@@ -72,7 +72,7 @@
+        }
+ 
+        datasource_ptr ds;
+-       map<string,boost::shared_ptr<PluginInfo> >::iterator itr=plugins_.find(*type);
++       std::map<string,boost::shared_ptr<PluginInfo> >::iterator itr=plugins_.find(*type);
+        if ( itr == plugins_.end() )
+        {
+            throw config_error(string("Could not create datasource. No plugin ") +
+@@ -131,25 +131,34 @@
+       mutex::scoped_lock lock(mapnik::singleton<mapnik::datasource_cache, 
+                               mapnik::CreateStatic>::mutex_);
+ #endif
+-      filesystem::path path(str);
+-      filesystem::directory_iterator end_itr;
++      boost::filesystem::path path(str);
++      boost::filesystem::directory_iterator end_itr;
+  
+ 
+       if (exists(path) && is_directory(path))
+       {
+-         for (filesystem::directory_iterator itr(path);itr!=end_itr;++itr )
++         for (boost::filesystem::directory_iterator itr(path);itr!=end_itr;++itr )
+          {
+ 
+ #if BOOST_VERSION < 103400 
+             if (!is_directory( *itr )  && is_input_plugin(itr->leaf()))      
+ #else
++#if (BOOST_FILESYSTEM_VERSION == 3)      
++            if (!is_directory( *itr )  && is_input_plugin(itr->path().filename().string()))
++#else // v2
+             if (!is_directory( *itr )  && is_input_plugin(itr->path().leaf()))   
+ #endif
+-
++#endif
+             {
+                try 
+                {
+-                  lt_dlhandle module=lt_dlopen(itr->string().c_str());
++
++#if (BOOST_FILESYSTEM_VERSION == 3)   
++                  lt_dlhandle module = lt_dlopen(itr->path().string().c_str());
++#else // v2
++                  lt_dlhandle module = lt_dlopen(itr->string().c_str());
++
++#endif
+                   if (module)
+                   {
+                      datasource_name* ds_name = 
+@@ -164,7 +173,13 @@
+                   }
+                   else
+                   {
+-                     std::clog << "Problem loading plugin library: " << itr->string().c_str() << " (libtool error: " << lt_dlerror() << ")" << std::endl;
++#if (BOOST_FILESYSTEM_VERSION == 3) 
++                        std::clog << "Problem loading plugin library: " << itr->path().string() 
++                                  << " (dlopen failed - plugin likely has an unsatified dependency or incompatible ABI)" << std::endl;
++#else // v2
++                        std::clog << "Problem loading plugin library: " << itr->string() 
++                                  << " (dlopen failed - plugin likely has an unsatified dependency or incompatible ABI)" << std::endl;    
++#endif
+                   }
+                }
+                catch (...) {}
+Index:  src/load_map.cpp
+===================================================================
+--- src/load_map.cpp	2011-03-28 23:58:51.000000000 +0200
++++ src/load_map.cpp	2011-03-28 23:59:13.000000000 +0200
+@@ -526,8 +526,11 @@
+ 
+ 	map.addLayer(lyr);
+ 
+-    } catch (const config_error & ex) {
+-	if ( ! name.empty() ) {
++    } 
++    catch (const config_error & ex) 
++    {
++	if ( ! name.empty() ) 
++	{
+             ex.append_context(string("(encountered during parsing of layer '") + name + "')");
+ 	}
+ 	throw;
+@@ -1589,8 +1592,14 @@
+ {
+     boost::filesystem::path xml_path = filename_;
+     boost::filesystem::path rel_path = *opt_path;
+-    if ( !rel_path.has_root_path() ) {
++    if ( !rel_path.has_root_path() ) 
++    {
++#if (BOOST_FILESYSTEM_VERSION == 3)
++        boost::filesystem::path full = boost::filesystem::absolute(xml_path.branch_path()/rel_path).normalize();
++#else // v2
+ 	boost::filesystem::path full = boost::filesystem::complete(xml_path.branch_path()/rel_path).normalize();
++#endif
++
+ #ifdef MAPNIK_DEBUG
+ 	std::clog << "\nModifying relative paths to be relative to xml...\n";
+ 	std::clog << "original base path: " << *opt_path << "\n";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110510/03f7a082/attachment-0001.html>


More information about the macports-changes mailing list