Adapt for new libdcp (fixing large compiler resource requirements).
authorCarl Hetherington <cth@carlh.net>
Sun, 27 Sep 2020 17:35:12 +0000 (19:35 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 27 Sep 2020 17:35:12 +0000 (19:35 +0200)
Also adjust Linux resource-finding code to juse look for stuff
relative to the executable's location.

cscript
run/tests
src/lib/cross.h
src/lib/cross_linux.cc
src/lib/util.cc
wscript

diff --git a/cscript b/cscript
index 8449f45682c6ed58725e0cf70e50fc2f301ab89b..85d464eaeaff874bf8d5d47ae5575c3f45e2cb62 100644 (file)
--- 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
index e31a97be0c042c58939ce688c55f182ba300462a..97eef411f56fe5a2cf9d75b92d0190dfbaafd1f1 100755 (executable)
--- 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 $*
index 63ae72c018dd57ddcf766b1327ee4ecce40b0e43..a53e85a2de3560d5a886c1b8834c099e2d459196 100644 (file)
@@ -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 ();
index 530dda027c854562932ce8492082c9da9e8983b5..5c1bb7d9090772d2968c95b45f77ae0bfdac7897 100644 (file)
@@ -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";
 }
 
 
index 7c0d1dc4e8b820f26888836db6a1e49cec61b76e..ac868c17360068a429de9f5dec93abca4534b49e 100644 (file)
@@ -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 00665bbacfdf7469a3276360bec21c4bb6b3f4ae..1ac069f0b2d4ed80053bf3d2c2e17ad712b66804 100644 (file)
--- 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')