From 57d6bed6141838329b1039ab52c66cc98273af91 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 11 Mar 2014 09:14:07 +0000 Subject: Build fixes for OS X 10.5. --- src/mxf_asset.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mxf_asset.h b/src/mxf_asset.h index 7a645b7c..4eafdcba 100644 --- a/src/mxf_asset.h +++ b/src/mxf_asset.h @@ -30,6 +30,10 @@ namespace ASDCP { class AESDecContext; } +/* Undefine some stuff that the OS X 10.5 SDK defines */ +#undef Key +#undef set_key + namespace libdcp { -- cgit v1.2.3 From 6e72e1d36f23a4236c4677f22792a6a4590943a3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 15 Mar 2014 17:49:40 +0000 Subject: Clean up OS X build slightly. Better error on failure of xmlSecDSigCtxSign. --- src/asset.cc | 13 +++++++------ src/asset.h | 2 +- src/picture_asset.h | 2 +- src/signer.cc | 6 ++++-- src/stereo_picture_frame.h | 2 +- wscript | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/asset.cc b/src/asset.cc index d51b78fd..4ad29dde 100644 --- a/src/asset.cc +++ b/src/asset.cc @@ -33,8 +33,9 @@ #include "metadata.h" #include "compose.hpp" -using namespace std; -using namespace boost; +using std::string; +using boost::shared_ptr; +using boost::lexical_cast; using namespace libdcp; Asset::Asset (boost::filesystem::path directory, boost::filesystem::path file_name) @@ -58,7 +59,7 @@ Asset::write_to_pkl (xmlpp::Node* node, bool interop) const asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid); asset->add_child("AnnotationText")->add_child_text (_file_name.string ()); asset->add_child("Hash")->add_child_text (digest ()); - asset->add_child("Size")->add_child_text (lexical_cast (filesystem::file_size(path()))); + asset->add_child("Size")->add_child_text (lexical_cast (boost::filesystem::file_size(path()))); if (interop) { asset->add_child("Type")->add_child_text (String::compose ("application/x-smpte-mxf;asdcpKind=%1", asdcp_kind ())); } else { @@ -76,13 +77,13 @@ Asset::write_to_assetmap (xmlpp::Node* node) const chunk->add_child("Path")->add_child_text (_file_name.string ()); chunk->add_child("VolumeIndex")->add_child_text ("1"); chunk->add_child("Offset")->add_child_text ("0"); - chunk->add_child("Length")->add_child_text (lexical_cast (filesystem::file_size(path()))); + chunk->add_child("Length")->add_child_text (lexical_cast (boost::filesystem::file_size(path()))); } -filesystem::path +boost::filesystem::path Asset::path () const { - filesystem::path p; + boost::filesystem::path p; p /= _directory; p /= _file_name; return p; diff --git a/src/asset.h b/src/asset.h index 773e3d48..6db8e5c2 100644 --- a/src/asset.h +++ b/src/asset.h @@ -32,7 +32,7 @@ #include "types.h" namespace ASDCP { - class WriterInfo; + struct WriterInfo; } namespace xmlpp { diff --git a/src/picture_asset.h b/src/picture_asset.h index c09808e2..b404abd2 100644 --- a/src/picture_asset.h +++ b/src/picture_asset.h @@ -31,7 +31,7 @@ namespace ASDCP { namespace JP2K { - class PictureDescriptor; + struct PictureDescriptor; } } diff --git a/src/signer.cc b/src/signer.cc index 63da8d8e..11cf5eb8 100644 --- a/src/signer.cc +++ b/src/signer.cc @@ -25,6 +25,7 @@ #include #include "signer.h" #include "exceptions.h" +#include "compose.hpp" using std::string; using std::list; @@ -107,8 +108,9 @@ Signer::add_signature_value (xmlpp::Node* parent, string ns) const throw MiscError ("could not set key name"); } - if (xmlSecDSigCtxSign (signature_context, parent->cobj ()) < 0) { - throw MiscError ("could not sign"); + int const r = xmlSecDSigCtxSign (signature_context, parent->cobj ()); + if (r < 0) { + throw MiscError (String::compose ("could not sign (%1)", r)); } xmlSecDSigCtxDestroy (signature_context); diff --git a/src/stereo_picture_frame.h b/src/stereo_picture_frame.h index ab99ceac..878f6ab4 100644 --- a/src/stereo_picture_frame.h +++ b/src/stereo_picture_frame.h @@ -24,7 +24,7 @@ namespace ASDCP { namespace JP2K { - class SFrameBuffer; + struct SFrameBuffer; } class AESDecContext; } diff --git a/wscript b/wscript index b0295084..3f7da877 100644 --- a/wscript +++ b/wscript @@ -27,7 +27,7 @@ def configure(conf): conf.env.append_value('CXXFLAGS', '-DLIBDCP_POSIX') if not conf.options.osx: - conf.env.append_value('CXXFLAGS', ['-Wno-unused-result']) + conf.env.append_value('CXXFLAGS', ['-Wno-unused-result', '-Wno-unused-parameter']) conf.check_cfg(package = 'openssl', args = '--cflags --libs', uselib_store = 'OPENSSL', mandatory = True) conf.check_cfg(package = 'libxml++-2.6', args = '--cflags --libs', uselib_store = 'LIBXML++', mandatory = True) -- cgit v1.2.3