[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Modify "gen-make.py", so it will link against the static version of Berkeley DB

From: Alexander Mueller <XelaRellum_at_web.de>
Date: Wed, 25 Feb 2009 15:49:31 +0100

Right now Subversion will always try to link against the static version
of Berkeley DB. Apr-util can be configured to link against the static
library but finally we end up with an executable that has both the
contents of the static library AND the links against the dll.

So, here is a patch the adds a new option "--enable-berkeley-db-static"
to the generator.

I have created two patches, one for the 1.5.x branch, the other one for
the 1.6.x branch.

Hope you like it. If not, please feeback.

Alex

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1227111

Index: build/generator/gen_win.py
===================================================================
--- build/generator/gen_win.py (Revision 36127)
+++ build/generator/gen_win.py (Arbeitskopie)
@@ -39,6 +39,7 @@
     self.serf_path = None
     self.serf_lib = None
     self.bdb_path = 'db4-win32'
+ self.bdb_static = False
     self.without_neon = False
     self.neon_path = 'neon'
     self.neon_ver = 25005
@@ -69,6 +70,8 @@
     for opt, val in options:
       if opt == '--with-berkeley-db':
         self.bdb_path = val
+ elif opt == '--enable-berkeley-db-static':
+ self.bdb_static = 1
       elif opt == '--with-apr':
         self.apr_path = val
       elif opt == '--with-apr-util':
@@ -144,6 +147,8 @@
     "Find the Berkeley DB library and version"
     for ver in ("47", "46", "45", "44", "43", "42", "41", "40"):
       lib = "libdb" + ver
+ if self.bdb_static:
+ lib += "s"
       path = os.path.join(self.bdb_path, "lib")
       if os.path.exists(os.path.join(path, lib + ".lib")):
         self.bdb_lib = lib
Index: gen-make.py
===================================================================
--- gen-make.py (Revision 36127)
+++ gen-make.py (Arbeitskopie)
@@ -169,6 +169,9 @@
   print " --enable-bdb-in-apr-util"
   print " configure APR-Util to use Berkeley DB"
   print
+ print " --enable-berkeley-db-static"
+ print " link against the static Berkeley DB library"
+ print
   print " --enable-ml"
   print " enable use of ML assembler with zlib"
   print
@@ -220,6 +223,7 @@
                             'enable-nls',
                             'enable-bdb-in-apr-util',
                             'enable-ml',
+ 'enable-berkeley-db-static',
                             'disable-shared',
                             'installed-libs=',
                             'vsnet-version=',

Index: build/generator/gen_win.py
===================================================================
--- build/generator/gen_win.py (Revision 36127)
+++ build/generator/gen_win.py (Arbeitskopie)
@@ -43,6 +43,7 @@
     self.serf_path = None
     self.serf_lib = None
     self.bdb_path = 'db4-win32'
+ self.bdb_static = False
     self.without_neon = False
     self.neon_path = 'neon'
     self.neon_ver = 25005
@@ -76,6 +77,8 @@
     for opt, val in options:
       if opt == '--with-berkeley-db':
         self.bdb_path = val
+ elif opt == '--enable-berkeley-db-static':
+ self.bdb_static = 1
       elif opt == '--with-apr':
         self.apr_path = val
       elif opt == '--with-apr-util':
@@ -153,6 +156,8 @@
     "Find the Berkeley DB library and version"
     for ver in ("47", "46", "45", "44", "43", "42", "41", "40"):
       lib = "libdb" + ver
+ if self.bdb_static:
+ lib += "s"
       path = os.path.join(self.bdb_path, "lib")
       if os.path.exists(os.path.join(path, lib + ".lib")):
         self.bdb_lib = lib
Index: gen-make.py
===================================================================
--- gen-make.py (Revision 36127)
+++ gen-make.py (Arbeitskopie)
@@ -175,6 +175,9 @@
   print(" --enable-bdb-in-apr-util")
   print(" configure APR-Util to use Berkeley DB")
   print("")
+ print " --enable-berkeley-db-static"
+ print " link against the static Berkeley DB library"
+ print("")
   print(" --enable-ml")
   print(" enable use of ML assembler with zlib")
   print("")
@@ -231,6 +234,7 @@
                             'enable-nls',
                             'enable-bdb-in-apr-util',
                             'enable-ml',
+ 'enable-berkeley-db-static',
                             'disable-shared',
                             'installed-libs=',
                             'vsnet-version=',
Received on 2009-02-25 15:50:29 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.