From: Michael Tokarev <mjt@tls.msk.ru>
Subject: force tdb to be standalone
Date: Tue, 26 Nov 2024 17:28:51 +0300
Forwarded: not-needed

Upstream ships contents of lib/tdb/ as a separate
source of tdb.  Since we build samba anyway, there's
no need to have separate tdb source package, it's
enough to build it during samba build.

Always build tdb as stand-alone library
(instead of being samba-private if in a subdir).

When building as a sub-library within samba,
where libreplace is a private library, libtdb.so
will have rpath pointing to the private samba
dir.  Since tdb actually does not use anything
from libreplace, just remove the dependency.

diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index 812e5987daf..23d90ebcc47 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -79,5 +79,5 @@ def configure(conf):
     conf.RECURSE('lib/replace')
 
-    conf.env.standalone_tdb = conf.IN_LAUNCH_DIR()
+    conf.env.standalone_tdb = conf.IN_LAUNCH_DIR() or True
     conf.env.building_tdb = True
 
@@ -124,4 +124,4 @@ def build(bld):
 
-        tdb_deps = 'replace'
+        tdb_deps = '' # 'replace'
 
         if bld.CONFIG_SET('USE_TDB_MUTEX_LOCKING'):
