--- Begin Message ---
Source: aqsis
Version: 1.6.0-3
Severity: important
Tags: patch
Hi,
Since a while ago, libboost*-dev packages point to 1.46 which has had some
functions deprecated esp. in the Filesystem module([1]). This broke a number
of packages including aqsis. The package has been tested to build with the
new boost 1.46 and it fails (log:[2]).
This patch includes an #ifdef to check for either version, it has been
checked to build fine on armhf with boost 1.46 fine. In case you want to
dismiss support for the older versions entirely, you could just dismiss the
#ifdefs, or I could prepare a new patch if you like.
Regards
Konstantinos
[1]: http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/deprecated.html
[2]:
http://buildd.debian-ports.org/status/fetch.php?pkg=aqsis&arch=armhf&ver=1.6.0-3%2Bb1&stamp=1303337752
-- System Information:
Debian Release: squeeze/sid
Architecture: armhf (armv7l)
Kernel: Linux 2.6.31.14-efikamx (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -ruN aqsis-1.6.0/libs/core/api/ri.cpp aqsis-1.6.0.new//libs/core/api/ri.cpp
--- aqsis-1.6.0/libs/core/api/ri.cpp 2009-10-11 12:34:29.000000000 +0000
+++ aqsis-1.6.0.new//libs/core/api/ri.cpp 2011-04-28 13:25:44.077299235 +0000
@@ -488,12 +488,20 @@
// Read in the system configuration file.
boost::filesystem::path systemRcPath = rootPath / AQSIS_XSTR(AQSIS_MAIN_CONFIG_NAME);
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
std::ifstream rcFile(systemRcPath.file_string().c_str(), std::ios::binary);
+#else
+ std::ifstream rcFile(systemRcPath.string().c_str(), std::ios::binary);
+#endif
if(rcFile)
{
Aqsis::log() << info
<< "Reading system config \"" << systemRcPath << "\"\n";
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
QGetRenderContext()->parseRibStream(rcFile, systemRcPath.file_string());
+#else
+ QGetRenderContext()->parseRibStream(rcFile, systemRcPath.string());
+#endif
rcFile.close();
}
else
@@ -508,22 +516,37 @@
boost::filesystem::path homeRcPath = homePath;
homeRcPath /= ".aqsisrc";
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
std::ifstream rcFile(homeRcPath.file_string().c_str(), std::ios::binary);
+#else
+ std::ifstream rcFile(homeRcPath.string().c_str(), std::ios::binary);
+#endif
if(rcFile)
{
Aqsis::log() << info << "Reading user config \"" << homeRcPath << "\"\n";
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
QGetRenderContext()->parseRibStream(rcFile, homeRcPath.file_string());
+#else
+ QGetRenderContext()->parseRibStream(rcFile, homeRcPath.string());
+#endif
}
else
{
boost::filesystem::path homeRcPath2 = homePath;
homeRcPath2 /= "_aqsisrc";
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
std::ifstream rcFile(homeRcPath2.file_string().c_str(), std::ios::binary);
+#else
+ std::ifstream rcFile(homeRcPath2.string().c_str(), std::ios::binary);
+#endif
if(rcFile)
{
Aqsis::log() << info << "Reading user config \"" << homeRcPath2 << "\"\n";
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
QGetRenderContext()->parseRibStream(rcFile, homeRcPath2.file_string());
+#else
+#endif
}
else
{
diff -ruN aqsis-1.6.0/libs/core/ddmanager/ddmanager.cpp aqsis-1.6.0.new//libs/core/ddmanager/ddmanager.cpp
--- aqsis-1.6.0/libs/core/ddmanager/ddmanager.cpp 2009-10-11 12:34:29.000000000 +0000
+++ aqsis-1.6.0.new//libs/core/ddmanager/ddmanager.cpp 2011-04-28 13:45:31.417298360 +0000
@@ -349,7 +349,11 @@
}
// Load the dynamic object and locate the relevant symbols.
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
CqString strDriverPathAndFile = displayPath.file_string();
+#else
+ CqString strDriverPathAndFile = displayPath.string();
+#endif
m_DriverHandle = dspyPlugin.SimpleDLOpen( &strDriverPathAndFile );
if ( m_DriverHandle != NULL )
{
diff -ruN aqsis-1.6.0/libs/core/geometry/blobby.cpp aqsis-1.6.0.new//libs/core/geometry/blobby.cpp
--- aqsis-1.6.0/libs/core/geometry/blobby.cpp 2009-10-11 12:34:29.000000000 +0000
+++ aqsis-1.6.0.new//libs/core/geometry/blobby.cpp 2011-04-28 14:04:39.277297729 +0000
@@ -391,8 +391,13 @@
+ SHARED_LIBRARY_SUFFIX;
try
{
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
CqString fullName = QGetRenderContext()->poptCurrent()
->findRiFile(dboName, "procedural").file_string();
+#else
+ CqString fullName = QGetRenderContext()->poptCurrent()
+ ->findRiFile(dboName, "procedural").string();
+#endif
DBO_handle = DBO.SimpleDLOpen(&fullName);
}
catch(XqInvalidFile& /*e*/)
diff -ruN aqsis-1.6.0/libs/core/geometry/procedural.cpp aqsis-1.6.0.new//libs/core/geometry/procedural.cpp
--- aqsis-1.6.0/libs/core/geometry/procedural.cpp 2009-10-11 12:34:29.000000000 +0000
+++ aqsis-1.6.0.new//libs/core/geometry/procedural.cpp 2011-04-28 14:24:21.107299359 +0000
@@ -155,7 +155,11 @@
+ CqString ("\" in current searchpath");
return;
}
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
CqString strRealName = dsoPath.file_string();
+#else
+ CqString strRealName = dsoPath.string();
+#endif
void *handle = DLOpen( &strRealName );
if ( ( m_ppvfcts = ( void * ( * ) ( char * ) ) DLSym(handle, &strConver) ) == NULL )
@@ -314,8 +318,14 @@
if(argv.empty())
AQSIS_THROW_XQERROR(XqValidation, EqE_BadToken, "program name not present");
// Attempt to find the program in the procedural path
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
std::string progName = QGetRenderContext()->poptCurrent()
->findRiFileNothrow(argv[0], "procedural").file_string();
+#else
+ std::string progName = QGetRenderContext()->poptCurrent()
+ ->findRiFileNothrow(argv[0], "procedural").string();
+#endif
+
if(progName.empty())
{
progName = argv[0];
diff -ruN aqsis-1.6.0/libs/core/renderer.cpp aqsis-1.6.0.new//libs/core/renderer.cpp
--- aqsis-1.6.0/libs/core/renderer.cpp 2009-10-11 12:34:29.000000000 +0000
+++ aqsis-1.6.0.new//libs/core/renderer.cpp 2011-04-28 13:18:16.577297610 +0000
@@ -1194,9 +1194,15 @@
boost::filesystem::ifstream shaderFile(shaderPath);
if(shaderFile)
{
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
Aqsis::log() << info << "Loading shader \"" << strName
<< "\" from file \"" << shaderPath.file_string()
<< "\"" << std::endl;
+#else
+ Aqsis::log() << info << "Loading shader \"" << strName
+ << "\" from file \"" << shaderPath.string()
+ << "\"" << std::endl;
+#endif
std::string dsoPath;
const CqString* poptDSOPath = QGetRenderContext()->poptCurrent()
diff -ruN aqsis-1.6.0/libs/core/texturing_old/texturemap_old.cpp aqsis-1.6.0.new//libs/core/texturing_old/texturemap_old.cpp
--- aqsis-1.6.0/libs/core/texturing_old/texturemap_old.cpp 2009-10-11 12:34:29.000000000 +0000
+++ aqsis-1.6.0.new//libs/core/texturing_old/texturemap_old.cpp 2011-04-28 14:38:17.847298357 +0000
@@ -578,7 +578,11 @@
}
// Now open it as a tiff file.
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
m_pImage = TIFFOpen( imagePath.file_string().c_str(), "r" );
+#else
+ m_pImage = TIFFOpen( imagePath.string().c_str(), "r" );
+#endif
}
if ( m_pImage )
@@ -1090,7 +1094,11 @@
Aqsis::log() << error << "Cannot open texture file \"" << m_strName.c_str() << "\"" << std::endl;
return ;
}
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
m_pImage = TIFFOpen(imagePath.file_string().c_str(), "r" );
+#else
+ m_pImage = TIFFOpen(imagePath.string().c_str(), "r" );
+#endif
if ( m_pImage )
{
diff -ruN aqsis-1.6.0/libs/shadervm/dsoshadeops.cpp aqsis-1.6.0.new//libs/shadervm/dsoshadeops.cpp
--- aqsis-1.6.0/libs/shadervm/dsoshadeops.cpp 2009-10-11 12:34:32.000000000 +0000
+++ aqsis-1.6.0.new//libs/shadervm/dsoshadeops.cpp 2011-04-28 12:47:49.787298229 +0000
@@ -100,14 +100,23 @@
{
// If the path points to a directory, we add each library in the
// named directory to the list of DSO candidates.
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
std::vector<std::string> files = Glob(
((*path)/"*" SHARED_LIBRARY_SUFFIX).file_string() );
+#else
+ std::vector<std::string> files = Glob(
+ ((*path)/"*" SHARED_LIBRARY_SUFFIX).string() );
+#endif
m_DSOPathList.insert(m_DSOPathList.end(), files.begin(), files.end());
}
else
{
// else add the file itself.
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
m_DSOPathList.push_back(path->file_string());
+#else
+ m_DSOPathList.push_back(path->string());
+#endif
}
}
catch(boost::filesystem::filesystem_error& /*e*/)
diff -ruN aqsis-1.6.0/libs/tex/io/exrinputfile.cpp aqsis-1.6.0.new//libs/tex/io/exrinputfile.cpp
--- aqsis-1.6.0/libs/tex/io/exrinputfile.cpp 2009-10-11 12:34:32.000000000 +0000
+++ aqsis-1.6.0.new//libs/tex/io/exrinputfile.cpp 2011-04-28 12:43:50.647298858 +0000
@@ -163,7 +163,12 @@
{
try
{
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
m_exrFile.reset(new Imf::InputFile(fileName.file_string().c_str()));
+#else
+ m_exrFile.reset(new Imf::InputFile(fileName.string().c_str()));
+#endif
+
}
catch(Iex::BaseExc &e)
{
diff -ruN aqsis-1.6.0/libs/tex/io/magicnumber.cpp aqsis-1.6.0.new//libs/tex/io/magicnumber.cpp
--- aqsis-1.6.0/libs/tex/io/magicnumber.cpp 2009-10-11 12:34:32.000000000 +0000
+++ aqsis-1.6.0.new//libs/tex/io/magicnumber.cpp 2011-04-28 12:37:25.557297985 +0000
@@ -59,7 +59,11 @@
EqImageFileType guessFileType(const boostfs::path& fileName)
{
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
std::ifstream inFile(fileName.file_string().c_str());
+#else
+ std::ifstream inFile(fileName.string().c_str());
+#endif
if(!inFile)
{
AQSIS_THROW_XQERROR(XqInvalidFile, EqE_NoFile, "Cannot open file \""
diff -ruN aqsis-1.6.0/libs/tex/io/tiffdirhandle.cpp aqsis-1.6.0.new//libs/tex/io/tiffdirhandle.cpp
--- aqsis-1.6.0/libs/tex/io/tiffdirhandle.cpp 2009-10-11 12:34:32.000000000 +0000
+++ aqsis-1.6.0.new//libs/tex/io/tiffdirhandle.cpp 2011-04-28 12:39:12.027297985 +0000
@@ -727,7 +727,11 @@
CqTiffFileHandle::CqTiffFileHandle(const boostfs::path& fileName, const char* openMode)
: m_fileName(fileName),
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
m_tiffPtr(TIFFOpen(fileName.file_string().c_str(), openMode), safeTiffClose),
+#else
+ m_tiffPtr(TIFFOpen(fileName.string().c_str(), openMode), safeTiffClose),
+#endif
m_isInputFile(openMode[0] == 'r'),
m_currDir(0)
{
diff -ruN aqsis-1.6.0/libs/tex/io/zinputfile.cpp aqsis-1.6.0.new//libs/tex/io/zinputfile.cpp
--- aqsis-1.6.0/libs/tex/io/zinputfile.cpp 2009-10-11 12:34:32.000000000 +0000
+++ aqsis-1.6.0.new//libs/tex/io/zinputfile.cpp 2011-04-28 12:42:47.897297231 +0000
@@ -41,7 +41,11 @@
CqZInputFile::CqZInputFile(const boostfs::path& fileName)
: m_header(),
m_fileName(fileName),
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
m_fileStream(fileName.file_string().c_str(), std::ios::in | std::ios::binary),
+#else
+ m_fileStream(fileName.string().c_str(), std::ios::in | std::ios::binary),
+#endif
m_dataBegin(0)
{
if(!m_fileStream.is_open())
diff -ruN aqsis-1.6.0/libs/tex/maketexture/maketexture.cpp aqsis-1.6.0.new//libs/tex/maketexture/maketexture.cpp
--- aqsis-1.6.0/libs/tex/maketexture/maketexture.cpp 2009-10-11 12:34:32.000000000 +0000
+++ aqsis-1.6.0.new//libs/tex/maketexture/maketexture.cpp 2011-04-28 12:45:26.397298732 +0000
@@ -335,8 +335,13 @@
{
inFileRealName = inFileName.string() + ".tif";
TqInt bakeRes = static_cast<TqInt>(paramList.find<TqFloat>("bake", 256));
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
bakeToTiff(inFileName.file_string().c_str(),
inFileRealName.file_string().c_str(), bakeRes);
+#else
+ bakeToTiff(inFileName.string().c_str(),
+ inFileRealName.string().c_str(), bakeRes);
+#endif
}
// Open the input file
diff -ruN aqsis-1.6.0/tools/piqsl/displayserverimage.cpp aqsis-1.6.0.new//tools/piqsl/displayserverimage.cpp
--- aqsis-1.6.0/tools/piqsl/displayserverimage.cpp 2009-10-11 12:34:32.000000000 +0000
+++ aqsis-1.6.0.new//tools/piqsl/displayserverimage.cpp 2011-04-28 14:48:24.617297110 +0000
@@ -98,8 +98,13 @@
++index;
}
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
setFilename(uniquePath.file_string());
saveToFile(uniquePath.file_string());
+#else
+ setFilename(uniquePath.string());
+ saveToFile(uniquePath.string());
+#endif
}
diff -ruN aqsis-1.6.0/tools/piqsl/piqslmainwindow.cpp aqsis-1.6.0.new//tools/piqsl/piqslmainwindow.cpp
--- aqsis-1.6.0/tools/piqsl/piqslmainwindow.cpp 2009-10-11 12:34:32.000000000 +0000
+++ aqsis-1.6.0.new//tools/piqsl/piqslmainwindow.cpp 2011-04-28 14:51:52.347299482 +0000
@@ -186,7 +186,11 @@
char* filename = fl_file_chooser("Load Image", "All Supported Files (*.{tif,tiff,exr,env,tx,tex,shad,zfile,sm})\tTIFF Files (*.{tif,tiff})\tOpenEXR Files (*.exr)\tTeqser Files (*.{env,tx,tex})\tShadow Files (*.{shad,zfile,sm})", "");
if(filename)
{
+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
std::string name = boost::filesystem::path(filename).leaf();
+#else
+ std::string name = boost::filesystem::path(filename).filename().string();
+#endif
loadImageToCurrentBook(name, filename);
updateImageList();
}
--- End Message ---