From: Carl Hetherington Date: Sun, 27 Sep 2020 17:35:12 +0000 (+0200) Subject: Adapt for new libdcp (fixing large compiler resource requirements). X-Git-Tag: v2.15.104~81 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=5fc2718c509231ead7304bc9bb18a2c7c83f7c5d Adapt for new libdcp (fixing large compiler resource requirements). Also adjust Linux resource-finding code to juse look for stuff relative to the executable's location. --- diff --git a/cscript b/cscript index 8449f4568..85d464eae 100644 --- a/cscript +++ b/cscript @@ -375,8 +375,8 @@ def dependencies(target, options): (target.platform == 'osx' and target.bits == 64) or (target.platform == 'windows')) else {} - deps.append(('libdcp', 'f3e6907', cpp_lib_options)) - deps.append(('libsub', 'f703fc2', cpp_lib_options)) + deps.append(('libdcp', '627dfd9', cpp_lib_options)) + deps.append(('libsub', 'efea829', cpp_lib_options)) deps.append(('leqm-nrt', 'carl')) deps.append(('rtaudio', 'carl')) # We get our OpenSSL libraries from the environment, but we diff --git a/run/tests b/run/tests index e31a97be0..97eef411f 100755 --- a/run/tests +++ b/run/tests @@ -3,7 +3,6 @@ # e.g. --run_tests=foo export LD_LIBRARY_PATH=build/src/lib:/home/c.hetherington/lib:$LD_LIBRARY_PATH -export DCPOMATIC_LINUX_SHARE_PREFIX=`pwd` if [ "$1" == "--debug" ]; then shift; gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $* diff --git a/src/lib/cross.h b/src/lib/cross.h index 63ae72c01..a53e85a2d 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -55,6 +55,7 @@ extern void maybe_open_console (); #endif extern boost::filesystem::path resources_path (); extern boost::filesystem::path xsd_path (); +extern boost::filesystem::path tags_path (); extern FILE * fopen_boost (boost::filesystem::path, std::string); extern int dcpomatic_fseek (FILE *, int64_t, int); extern void start_batch_converter (); diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index 530dda027..5c1bb7d90 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -101,22 +101,21 @@ cpu_info () boost::filesystem::path resources_path () { - char const * p = getenv ("DCPOMATIC_LINUX_SHARE_PREFIX"); - if (p) { - return boost::filesystem::path(p) / "dcpomatic2"; - } - return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "dcpomatic2"; + return directory_containing_executable().parent_path() / "share" / "dcpomatic2"; } boost::filesystem::path xsd_path () { - char const * p = getenv ("DCPOMATIC_LINUX_SHARE_PREFIX"); - if (p) { - return boost::filesystem::path(p) / "libdcp" / "xsd"; - } - return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "xsd"; + return directory_containing_executable().parent_path() / "share" / "libdcp" / "xsd"; +} + + +boost::filesystem::path +tags_path () +{ + return directory_containing_executable().parent_path() / "share" / "libdcp" / "tags"; } diff --git a/src/lib/util.cc b/src/lib/util.cc index 7c0d1dc4e..ac868c173 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -388,7 +388,7 @@ DCPOMATIC_ENABLE_WARNINGS #endif Pango::init (); - dcp::init (); + dcp::init (tags_path()); #if defined(DCPOMATIC_WINDOWS) || defined(DCPOMATIC_OSX) /* Render something to fontconfig to create its cache */ diff --git a/wscript b/wscript index 00665bbac..1ac069f0b 100644 --- a/wscript +++ b/wscript @@ -198,7 +198,6 @@ def configure(conf): if conf.env.TARGET_LINUX: conf.env.append_value('CXXFLAGS', '-mfpmath=sse') conf.env.append_value('CXXFLAGS', '-DLINUX_LOCALE_PREFIX="%s/share/locale"' % conf.env['INSTALL_PREFIX']) - conf.env.append_value('CXXFLAGS', '-DLINUX_SHARE_PREFIX="%s/share"' % conf.env['INSTALL_PREFIX']) conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_LINUX') conf.env.append_value('CXXFLAGS', ['-Wlogical-op', '-Wcast-align']) conf.check(lib='dl', uselib_store='DL', msg='Checking for library dl')