Revision: 96094 https://trac.macports.org/changeset/96094 Author: raphael@macports.org Date: 2012-07-31 11:29:33 -0700 (Tue, 31 Jul 2012) Log Message: ----------- enblend: fix build with boost 1.50.0; closes #35140; maintainer Modified Paths: -------------- trunk/dports/graphics/enblend/Portfile Added Paths: ----------- trunk/dports/graphics/enblend/files/patch-configure.in.diff trunk/dports/graphics/enblend/files/patch-filenameparse.cc.diff Modified: trunk/dports/graphics/enblend/Portfile =================================================================== --- trunk/dports/graphics/enblend/Portfile 2012-07-31 16:53:17 UTC (rev 96093) +++ trunk/dports/graphics/enblend/Portfile 2012-07-31 18:29:33 UTC (rev 96094) @@ -30,7 +30,8 @@ port:openexr \ port:freefont-ttf -patchfiles libpng14.diff src__vigra_impex__Makefile.am.diff +patchfiles libpng14.diff src__vigra_impex__Makefile.am.diff \ + patch-configure.in.diff patch-filenameparse.cc.diff # need to regenerate a Makefile.in after patching Makefile.am above use_autoreconf yes configure.args --mandir=${prefix}/share/man \ Added: trunk/dports/graphics/enblend/files/patch-configure.in.diff =================================================================== --- trunk/dports/graphics/enblend/files/patch-configure.in.diff (rev 0) +++ trunk/dports/graphics/enblend/files/patch-configure.in.diff 2012-07-31 18:29:33 UTC (rev 96094) @@ -0,0 +1,36 @@ +--- configure.in.orig 2012-07-31 16:33:15.000000000 +0200 ++++ configure.in 2012-07-31 16:41:48.000000000 +0200 +@@ -214,7 +214,7 @@ + [AC_MSG_NOTICE([forcing use of Boost "filesystem" library]) + AC_DEFINE(HAVE_BOOST_FILESYSTEM, 1, + [Define if you have boost/filesystem.hpp]) +- EXTRA_LIBS="-lboost_filesystem ${EXTRA_LIBS}"], ++ EXTRA_LIBS="-lboost_filesystem -lboost_system ${EXTRA_LIBS}"], + [AC_CHECK_HEADER(boost/filesystem.hpp, + [], + AC_MSG_NOTICE([Boost "filesystem" header is missing.])) +@@ -231,20 +231,21 @@ + fi + LIBS_ORIG=$LIBS + for x in $candidates; do +- LIBS="$LIBS_ORIG $x" ++ y=`echo $x | sed s/boost_filesystem/boost_system/g` ++ LIBS="$LIBS_ORIG $x $y" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include <string> + #include "boost/filesystem.hpp" + ]], + [[ +-boost::filesystem::basic_path<std::string, boost::filesystem::path_traits> p("foo/bar/baz.oo"); ++boost::filesystem::path p("foo/bar/baz.oo"); + p.branch_path().string(); + p.leaf(); + basename(p); + extension(p); + ]] + )], +- [EXTRA_LIBS="$x ${EXTRA_LIBS}" ++ [EXTRA_LIBS="$x $y ${EXTRA_LIBS}" + found_boost_filesystem_lib=yes + AC_MSG_NOTICE([compiling with Boost's generic filename parsing support.]) + break]) Added: trunk/dports/graphics/enblend/files/patch-filenameparse.cc.diff =================================================================== --- trunk/dports/graphics/enblend/files/patch-filenameparse.cc.diff (rev 0) +++ trunk/dports/graphics/enblend/files/patch-filenameparse.cc.diff 2012-07-31 18:29:33 UTC (rev 96094) @@ -0,0 +1,40 @@ + +diff -r 152ffb1b6463 -r 6b2244bb400b src/filenameparse.cc +--- src/filenameparse.cc Sat Jan 01 15:41:31 2011 +0100 ++++ src/filenameparse.cc Tue May 03 19:16:30 2011 +0200 +@@ -50,7 +50,13 @@ + #ifdef HAVE_BOOST_FILESYSTEM + #include <boost/filesystem.hpp> + ++#if BOOST_FILESYSTEM_VERSION < 3 + typedef boost::filesystem::basic_path<std::string, boost::filesystem::path_traits> basic_path; ++#define GETPATHSTRING(x) x ++#else ++typedef boost::filesystem::path basic_path; ++#define GETPATHSTRING(x) (x).string() ++#endif + #endif + + +@@ -95,7 +101,7 @@ + { + #ifdef HAVE_BOOST_FILESYSTEM + const basic_path path(aFilename); +- return path.leaf(); ++ return GETPATHSTRING(path.leaf()); + #else + const std::string::size_type separator = aFilename.rfind(PATH_SEPARATOR); + return +@@ -179,7 +185,7 @@ + } + else + { +- directories.push_back(*p); ++ directories.push_back(GETPATHSTRING(*p)); + } + } + basic_path result; + + + +