Don't "pollute" the library path with /usr/local/lib.
authorCarl Hetherington <cth@carlh.net>
Mon, 29 Apr 2024 20:41:37 +0000 (22:41 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 1 May 2024 08:01:30 +0000 (10:01 +0200)
Sometimes we don't want to use the stuff in there.

cscript
wscript

diff --git a/cscript b/cscript
index dd7f9c44a9581449043195557331df1342edb919..f7a61b4406d29bdc6fadbc88e57dd0b9ab7c7a1e 100644 (file)
--- a/cscript
+++ b/cscript
@@ -788,6 +788,8 @@ def package_rpm(target, cpu, version, options):
 
     make_spec('dcpomatic2.spec', version, target, options, requires)
     cmd = 'rpmbuild --define "_topdir %s" -bb dcpomatic2.spec' % topdir
+    # On Centos 7 we build and install boost ourselves, so we must look for it in the right place
+    target.set('LINKFLAGS', '-L/usr/local/lib')
     target.command(cmd)
     rpms = []
 
diff --git a/wscript b/wscript
index e5164cc52b6303f0b9a2a4ec2e2300159a275f98..3cc5c2f27ad73bd775dde5e6bb95f807c1ff4c4b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -196,7 +196,6 @@ def configure(conf):
                                int main() { std::locale::global (boost::locale::generator().generate ("")); }\n
                                """,
                                msg='Checking for boost locale library',
-                               libpath='/usr/local/lib',
                                lib=['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
                                uselib_store='BOOST_LOCALE')
 
@@ -249,7 +248,7 @@ def configure(conf):
                        mandatory=True,
                        msg='Checking for libicu',
                        okmsg='yes',
-                       libpath=['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'],
+                       libpath=['/usr/lib', '/usr/lib/x86_64-linux-gnu'],
                        lib=['icuio', 'icui18n', 'icudata', 'icuuc'],
                        uselib_store='ICU')
 
@@ -399,7 +398,6 @@ def configure(conf):
                             int main() { struct jpeg_compress_struct compress; jpeg_create_compress (&compress); return 0; }
                             """,
                    msg='Checking for libjpeg',
-                   libpath='/usr/local/lib',
                    lib=['jpeg'],
                    uselib_store='JPEG')
 
@@ -410,7 +408,6 @@ def configure(conf):
                                 int main() { ext4_mount("ext4_fs", "/mp/", false); }\n
                                 """,
                                 msg='Checking for lwext4 library',
-                                libpath='/usr/local/lib',
                                 lib=['lwext4', 'blockdev'],
                                 uselib_store='LWEXT4')
 
@@ -549,7 +546,6 @@ def configure(conf):
                            int main() { boost::thread t; }\n
                            """,
                        msg='Checking for boost threading library',
-                       libpath='/usr/local/lib',
                        lib=[boost_thread, 'boost_system%s' % boost_lib_suffix],
                        uselib_store='BOOST_THREAD')
 
@@ -558,7 +554,6 @@ def configure(conf):
                            int main() { boost::filesystem::copy_file ("a", "b"); }\n
                            """,
                        msg='Checking for boost filesystem library',
-                       libpath='/usr/local/lib',
                        lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
                        uselib_store='BOOST_FILESYSTEM')
 
@@ -567,7 +562,6 @@ def configure(conf):
                            int main() { boost::gregorian::day_clock::local_day(); }\n
                            """,
                        msg='Checking for boost datetime library',
-                       libpath='/usr/local/lib',
                        lib=['boost_date_time%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
                        uselib_store='BOOST_DATETIME')