Hi,

[[[
Drop BDB warnings in gen-make, if building without BDB-support.

* build/generator/gen_win.py
  (__init__): Remove BDB-warning, if optional 'db' library not found in
              self._libraries

* build/generator/gen_win_dependencies.py
(parse_options): initialize self.bdb_path to None (instead of 'db4-win32') (_find_bdb): introduce local variable to determine bdb_path taking either a
               specified path (via --with-berkeley-db) or attempting the
               default path ('db4-win32')
Only issue the warning, if failing to locate the BDB path AND
               the user having explicitly specified the bdb-path.
]]]

Reasoning: BDB support is deprecated and it feels kinda wrong to state that a deprecated/optional dependency is missing/skipped, when building subversion. I kept the old detection behavior (defaulting to db4-win32) however, so if a user put the bdb-sources in the default path it would find and use them like with the previous versions (not sure whether u want that changed or not given the fact that BDB is deprecated).

Regards,
Stefan
Index: gen_win.py
===================================================================
--- gen_win.py  (revision 1691970)
+++ gen_win.py  (working copy)
@@ -90,9 +90,6 @@
       printed.append(lib.name)
       print('Found %s %s' % (lib.name, lib.version))
 
-    if 'db' not in self._libraries:
-      print('BDB not found, BDB fs will not be built')
-
     #Make some files for the installer so that we don't need to
     #require sed or some other command to do it
     ### GJS: don't do this right now
Index: gen_win_dependencies.py
===================================================================
--- gen_win_dependencies.py     (revision 1691970)
+++ gen_win_dependencies.py     (working copy)
@@ -136,7 +136,7 @@
     self.apr_util_path = 'apr-util'
     self.apr_iconv_path = 'apr-iconv'
     self.serf_path = None
-    self.bdb_path = 'db4-win32'
+    self.bdb_path = None
     self.httpd_path = None
     self.libintl_path = None
     self.zlib_path = 'zlib'
@@ -747,11 +747,18 @@
 
     # Default to not found
     self.bdb_lib = None
+    
+    # try default path to detect BDB support, unless different path is
+    # specified so to keep pre 1.10-behavior for BDB detection on Windows
+    bdb_path = 'db4-win32'
 
-    inc_path = os.path.join(self.bdb_path, 'include')
+    if self.bdb_path:
+      bdb_path = self.bdb_path
+    
+    inc_path = os.path.join(bdb_path, 'include')
     db_h_path = os.path.join(inc_path, 'db.h')
 
-    if not self.bdb_path or not os.path.isfile(db_h_path):
+    if not os.path.isfile(db_h_path):
       if show_warnings and self.bdb_path:
         print('WARNING: \'%s\' not found' % (db_h_path,))
         print("Use '--with-berkeley-db' to configure BDB location.");
@@ -781,7 +788,7 @@
        ):
       return
 
-    lib_dir = os.path.join(self.bdb_path, 'lib')
+    lib_dir = os.path.join(bdb_path, 'lib')
     lib_name = 'libdb%s.lib' % (versuffix,)
 
     if not os.path.exists(os.path.join(lib_dir, lib_name)):
@@ -792,7 +799,7 @@
     if not os.path.isfile(os.path.join(lib_dir, debug_lib_name)):
       debug_lib_name = None
 
-    dll_dir = os.path.join(self.bdb_path, 'bin')
+    dll_dir = os.path.join(bdb_path, 'bin')
 
     # Are there binaries we should copy for testing?
     dll_name = os.path.splitext(lib_name)[0] + '.dll'

Reply via email to