$OpenBSD: patch-lib_ldb_wscript,v 1.13 2021/05/12 23:33:24 jca Exp $

1. Force building standalone library (e.g., put headers in appropriate place).

2. Use -Wl,no-undefined as on other platforms.

Index: lib/ldb/wscript
--- lib/ldb/wscript.orig
+++ lib/ldb/wscript
@@ -68,6 +68,7 @@ def configure(conf):
     conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb')
 
     conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
+    conf.env.standalone_ldb = True
 
     if not conf.env.standalone_ldb:
         max_ldb_version = [int(x) for x in VERSION.split(".")]
@@ -151,8 +152,7 @@ def configure(conf):
 
         # we don't want any libraries or modules to rely on runtime
         # resolution of symbols
-        if not sys.platform.startswith("openbsd"):
-            conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
+        conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
 
     # if lmdb support is enabled then we require lmdb
     # is present, build the mdb back end and enable lmdb support in
