Author: rhuijben
Date: Wed Feb 26 21:29:22 2014
New Revision: 1572265

URL: http://svn.apache.org/r1572265
Log:
Following up on r1572253, bump serf requirement on Windows.

* build/generator/gen_msvc_dsp.py
* build/generator/gen_vcnet_vcproj.py
  Don't generate serf and zlib projects.

* build/generator/gen_win.py
  Don't create build_zlib.bat
  Stop filtering serf and zlib projects in specific cases.
  
* build/generator/gen_win_dependencies.py
  Remove special is_src support that was only needed for
  this ugly zlib/serf dependency case.
  Bump minimal required serf version.
  
* build/generator/templates/build_zlib.ezt
* build/generator/templates/serf.dsp.ezt
* build/generator/templates/serf.vcproj.ezt
* build/generator/templates/serf.vcxproj.ezt
* build/generator/templates/zlib.dsp.ezt
* build/generator/templates/zlib.vcproj.ezt
* build/generator/templates/zlib.vcxproj.ezt
  Remove unused templates.
  
* build.conf
  Make serf and zlib normal external projects.

Removed:
    subversion/trunk/build/generator/templates/build_zlib.ezt
    subversion/trunk/build/generator/templates/serf.dsp.ezt
    subversion/trunk/build/generator/templates/serf.vcproj.ezt
    subversion/trunk/build/generator/templates/serf.vcxproj.ezt
    subversion/trunk/build/generator/templates/zlib.dsp.ezt
    subversion/trunk/build/generator/templates/zlib.vcproj.ezt
    subversion/trunk/build/generator/templates/zlib.vcxproj.ezt
Modified:
    subversion/trunk/build.conf
    subversion/trunk/build/generator/gen_msvc_dsp.py
    subversion/trunk/build/generator/gen_vcnet_vcproj.py
    subversion/trunk/build/generator/gen_win.py
    subversion/trunk/build/generator/gen_win_dependencies.py

Modified: subversion/trunk/build.conf
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1572265&r1=1572264&r2=1572265&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Wed Feb 26 21:29:22 2014
@@ -1352,7 +1352,6 @@ external-lib = $(SVN_INTL_LIBS)
 [zlib]
 type = lib
 external-lib = $(SVN_ZLIB_LIBS)
-external-project = zlib
 msvc-static = yes
 
 [apr_memcache]
@@ -1362,10 +1361,8 @@ external-lib = $(SVN_APR_MEMCACHE_LIBS)
 [serf]
 type = lib
 external-lib = $(SVN_SERF_LIBS)
-external-project = serf/serf
 libs = apr aprutil openssl xml zlib
 msvc-libs = secur32.lib
-msvc-static = yes
 
 [sqlite]
 type = lib

Modified: subversion/trunk/build/generator/gen_msvc_dsp.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_msvc_dsp.py?rev=1572265&r1=1572264&r2=1572265&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_msvc_dsp.py (original)
+++ subversion/trunk/build/generator/gen_msvc_dsp.py Wed Feb 26 21:29:22 2014
@@ -127,8 +127,6 @@ class Generator(gen_win.WinGeneratorBase
                         (
                           ('project_guid', self.makeguid('svn_locale')),
                         ))
-    self.write_zlib_project_file('zlib.dsp')
-    self.write_serf_project_file('serf.dsp')
     install_targets = self.get_install_targets()
 
     targets = [ ]

Modified: subversion/trunk/build/generator/gen_vcnet_vcproj.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_vcnet_vcproj.py?rev=1572265&r1=1572264&r2=1572265&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_vcnet_vcproj.py (original)
+++ subversion/trunk/build/generator/gen_vcnet_vcproj.py Wed Feb 26 21:29:22 
2014
@@ -171,8 +171,6 @@ class Generator(gen_win.WinGeneratorBase
                         (
                           ('project_guid', self.makeguid('svn_locale')),
                         ))
-    self.write_zlib_project_file('zlib' + self.vcproj_extension)
-    self.write_serf_project_file('serf' + self.vcproj_extension)
 
     install_targets = self.get_install_targets()
 

Modified: subversion/trunk/build/generator/gen_win.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win.py?rev=1572265&r1=1572264&r2=1572265&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win.py (original)
+++ subversion/trunk/build/generator/gen_win.py Wed Feb 26 21:29:22 2014
@@ -114,13 +114,6 @@ class WinGeneratorBase(gen_win_dependenc
     if not os.path.exists(self.projfilesdir):
       os.makedirs(self.projfilesdir)
 
-    # Generate the build_zlib.bat file
-    if self._libraries['zlib'].is_src:
-      data = {'zlib_path': os.path.relpath(self.zlib_path, self.projfilesdir),
-              'zlib_version': self.zlib_version}
-      bat = os.path.join(self.projfilesdir, 'build_zlib.bat')
-      self.write_with_template(bat, 'templates/build_zlib.ezt', data)
-
     # Generate the build_locale.bat file
     if self.enable_nls:
       pofiles = []
@@ -215,9 +208,6 @@ class WinGeneratorBase(gen_win_dependenc
     # Drop the ra_serf target if we don't have serf
     if 'serf' not in self._libraries:
       install_targets = [x for x in install_targets if x.name != 
'libsvn_ra_serf']
-    # Drop the serf target if we don't build serf ourselves
-    if 'serf' not in self._libraries or not self._libraries['serf'].is_src:
-      install_targets = [x for x in install_targets if x.name != 'serf']
 
     # Drop the swig targets if we don't have swig or language support
     install_targets = [x for x in install_targets
@@ -236,11 +226,6 @@ class WinGeneratorBase(gen_win_dependenc
                                              or x.name == '__JAVAHL_TESTS__'
                                              or x.name == 'libsvnjavahl')]
 
-    # If we don't build 'ZLib' ourself, remove this target and all the 
dependencies on it
-    if not self._libraries['zlib'].is_src:
-      install_targets = [x for x in install_targets if x.name != 'zlib']
-      # TODO: Fixup dependencies
-
     # Create DLL targets for libraries
     dll_targets = []
     for target in install_targets:
@@ -591,10 +576,6 @@ class WinGeneratorBase(gen_win_dependenc
     if self.enable_nls and name == '__ALL__':
       depends.extend(self.sections['locale'].get_targets())
 
-    # Make ZLib a dependency of serf if we build the zlib src
-    if name == 'serf' and self._libraries['zlib'].is_src:
-      depends.extend(self.sections['zlib'].get_targets())
-
     # To set the correct build order of the JavaHL targets, the javahl-javah
     # and libsvnjavahl targets are defined with extra dependencies in 
build.conf
     # like this:
@@ -980,67 +961,6 @@ class WinGeneratorBase(gen_win_dependenc
     template.generate(fout, data)
     self.write_file_if_changed(fname, fout.getvalue())
 
-  def write_zlib_project_file(self, name):
-    if not self._libraries['zlib'].is_src:
-      return
-    zlib_path = os.path.abspath(self.zlib_path)
-    zlib_sources = map(lambda x : os.path.relpath(x, self.projfilesdir),
-                       glob.glob(os.path.join(zlib_path, '*.c')) +
-                       glob.glob(os.path.join(zlib_path,
-                                              'contrib/masmx86/*.c')) +
-                       glob.glob(os.path.join(zlib_path,
-                                              'contrib/masmx86/*.asm')))
-    zlib_headers = map(lambda x : os.path.relpath(x, self.projfilesdir),
-                       glob.glob(os.path.join(zlib_path, '*.h')))
-
-    self.move_proj_file(self.projfilesdir, name,
-                        (('zlib_path', os.path.relpath(zlib_path,
-                                                       self.projfilesdir)),
-                         ('zlib_sources', zlib_sources),
-                         ('zlib_headers', zlib_headers),
-                         ('zlib_version', self.zlib_version),
-                         ('project_guid', self.makeguid('zlib')),
-                        ))
-
-  def write_serf_project_file(self, name):
-    if 'serf' not in self._libraries:
-      return
-      
-    serf = self._libraries['serf']
-    
-    if not serf.is_src:
-      return # Using an installed library
-
-    serf_path = os.path.abspath(self.serf_path)
-    serf_sources = map(lambda x : os.path.relpath(x, self.serf_path),
-                       glob.glob(os.path.join(serf_path, '*.c'))
-                       + glob.glob(os.path.join(serf_path, 'auth', '*.c'))
-                       + glob.glob(os.path.join(serf_path, 'buckets',
-                                                   '*.c')))
-    serf_headers = map(lambda x : os.path.relpath(x, self.serf_path),
-                       glob.glob(os.path.join(serf_path, '*.h'))
-                       + glob.glob(os.path.join(serf_path, 'auth', '*.h'))
-                       + glob.glob(os.path.join(serf_path, 'buckets', '*.h')))
-
-    apr_static = self.static_apr and 'APR_STATIC=1' or ''
-    openssl_static = self.static_openssl and 'OPENSSL_STATIC=1' or ''
-    self.move_proj_file(self.serf_path, name,
-                        (('serf_sources', serf_sources),
-                         ('serf_headers', serf_headers),
-                         ('zlib_path', os.path.relpath(self.zlib_path,
-                                                       self.serf_path)),
-                         ('openssl_path', os.path.relpath(self.openssl_path,
-                                                          self.serf_path)),
-                         ('apr_path', os.path.relpath(self.apr_path,
-                                                      self.serf_path)),
-                         ('apr_util_path', os.path.relpath(self.apr_util_path,
-                                                           self.serf_path)),
-                         ('project_guid', self.makeguid('serf')),
-                         ('apr_static', apr_static),
-                         ('openssl_static', openssl_static),
-                         ('serf_lib', serf.lib_name),
-                        ))
-
   def move_proj_file(self, path, name, params=()):
     ### Move our slightly templatized pre-built project files into place --
     ### these projects include zlib, serf, locale, config, etc.

Modified: subversion/trunk/build/generator/gen_win_dependencies.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win_dependencies.py?rev=1572265&r1=1572264&r2=1572265&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win_dependencies.py (original)
+++ subversion/trunk/build/generator/gen_win_dependencies.py Wed Feb 26 
21:29:22 2014
@@ -51,7 +51,7 @@ class SVNCommonLibrary:
   def __init__(self, name, include_dirs, lib_dir, lib_name, version=None,
                debug_lib_dir=None, debug_lib_name=None, dll_dir=None,
                dll_name=None, debug_dll_dir=None, debug_dll_name=None,
-               is_src=False, defines=[], forced_includes=[], extra_bin=[]):
+               defines=[], forced_includes=[], extra_bin=[]):
     self.name = name
     if include_dirs:
       self.include_dirs = include_dirs if isinstance(include_dirs, list) \
@@ -64,7 +64,6 @@ class SVNCommonLibrary:
     self.version = version
     self.dll_dir = dll_dir
     self.dll_name = dll_name
-    self.is_src = is_src
 
     self.forced_includes = forced_includes if not forced_includes \
                                            or isinstance(forced_includes, 
list) \
@@ -692,8 +691,7 @@ class GenDependenciesBase(gen_base.Gener
       # We have an install location
       inc_path = os.path.join(self.zlib_path, 'include')
       lib_path = os.path.join(self.zlib_path, 'lib')
-      is_src = False
-      
+
       # Different build options produce different library names :(
       if os.path.exists(os.path.join(lib_path, 'zlibstatic.lib')):
         # CMake default: zlibstatic.lib (static) and zlib.lib (dll)
@@ -705,17 +703,16 @@ class GenDependenciesBase(gen_base.Gener
     else:
       # We have a source location
       inc_path = lib_path = self.zlib_path
-      is_src = True
       lib_name = 'zlibstat.lib'
       debug_lib_name = 'zlibstatD.lib'
-      
+
     version_file_path = os.path.join(inc_path, 'zlib.h')
-    
+
     if not os.path.exists(version_file_path):
       sys.stderr.write("ERROR: '%s' not found.\n" % version_file_path);
       sys.stderr.write("Use '--with-zlib' option to configure ZLib 
location.\n");
       sys.exit(1)
-      
+
     txt = open(version_file_path).read()
     vermatch = re.search(
                 r'^\s*#define\s+ZLIB_VERSION\s+"(\d+)\.(\d+)\.(\d+)(?:\.\d)?"',
@@ -733,8 +730,7 @@ class GenDependenciesBase(gen_base.Gener
 
     self._libraries['zlib'] = SVNCommonLibrary('zlib', inc_path, lib_path, 
lib_name,
                                                 self.zlib_version,
-                                                debug_lib_name=debug_lib_name,
-                                                is_src=is_src)
+                                                debug_lib_name=debug_lib_name)
 
   def _find_bdb(self, show_warnings):
     "Find the Berkeley DB library and version"
@@ -1177,7 +1173,7 @@ class GenDependenciesBase(gen_base.Gener
   def _find_serf(self, show_warning):
     "Check if serf and its dependencies are available"
 
-    minimal_serf_version = (1, 2, 1)
+    minimal_serf_version = (1, 3, 4)
 
     if not self.serf_path:
       return
@@ -1186,41 +1182,26 @@ class GenDependenciesBase(gen_base.Gener
 
     if os.path.isfile(os.path.join(inc_dir, 'serf.h')):
       # Source layout
-      version = self._get_serf_version(inc_dir)
-
-      if version < (1, 3, 0):
-        lib_dir = os.path.join(self.serf_path, 'Release')
-        debug_lib_dir = os.path.join(self.serf_path, 'Debug')
-        is_src = True
-      else:
-        lib_dir = self.serf_path
-        debug_lib_dir = None
-        inc_dir = self.serf_path
-        is_src = False
+      lib_dir = self.serf_path
+      debug_lib_dir = None
+      inc_dir = self.serf_path
     elif os.path.isfile(os.path.join(self.serf_path, 'include/serf-1/serf.h')):
       # Install layout
       inc_dir = os.path.join(self.serf_path, 'include/serf-1')
-      version = self._get_serf_version(inc_dir)
       lib_dir = os.path.join(self.serf_path, 'lib')
       debug_lib_dir = None
-      is_src = False
     elif os.path.isfile(os.path.join(self.serf_path, 'include/serf-2/serf.h')):
       # Install layout
       inc_dir = os.path.join(self.serf_path, 'include/serf-2')
-      version = self._get_serf_version(inc_dir)
       lib_dir = os.path.join(self.serf_path, 'lib')
       debug_lib_dir = None
-      is_src = False
     else:
       if show_warning:
         print('WARNING: \'serf.h\' not found')
         print("Use '--with-serf' to configure serf location.");
       return
 
-    if is_src and 'openssl' not in self._libraries:
-      if show_warning:
-        print('openssl not found, serf and ra_serf will not be built')
-      return
+    version = self._get_serf_version(inc_dir)
     serf_version = '.'.join(str(v) for v in version)
 
     if version < minimal_serf_version:
@@ -1242,7 +1223,6 @@ class GenDependenciesBase(gen_base.Gener
     self._libraries['serf'] = SVNCommonLibrary('serf', inc_dir, lib_dir,
                                                 lib_name, serf_version,
                                                 debug_lib_dir=debug_lib_dir,
-                                                is_src=is_src,
                                                 defines=defines)
 
   def _find_sasl(self, show_warning):


Reply via email to