Blame SOURCES/apr-1.6.3-r1834495.patch

99410a
# ./pullrev.sh 1834495
99410a
http://svn.apache.org/viewvc?view=revision&revision=1834495
99410a
99410a
--- apr-1.6.3/buildconf
99410a
+++ apr-1.6.3/buildconf
99410a
@@ -112,8 +112,10 @@
99410a
 # Remove autoconf 2.5x's cache directory
99410a
 rm -rf autom4te*.cache
99410a
 
99410a
+PYTHON=${PYTHON-`build/PrintPath python3 python2 python`}
99410a
+
99410a
 echo "buildconf: generating 'make' outputs ..."
99410a
-build/gen-build.py $verbose make
99410a
+${PYTHON} build/gen-build.py $verbose make
99410a
 
99410a
 # Create RPM Spec file
99410a
 if [ -f `which cut` ]; then
99410a
--- apr-1.6.3/build/gen-build.py
99410a
+++ apr-1.6.3/build/gen-build.py
99410a
@@ -10,7 +10,10 @@
99410a
 
99410a
 
99410a
 import os
99410a
-import ConfigParser
99410a
+try:
99410a
+  import configparser
99410a
+except ImportError:
99410a
+  import ConfigParser as configparser
99410a
 import getopt
99410a
 import string
99410a
 import glob
99410a
@@ -36,7 +39,7 @@
99410a
 
99410a
 
99410a
 def main():
99410a
-  parser = ConfigParser.ConfigParser()
99410a
+  parser = configparser.ConfigParser()
99410a
   parser.read('build.conf')
99410a
 
99410a
   if parser.has_option('options', 'dsp'):
99410a
@@ -62,7 +65,7 @@
99410a
   # write out the platform-independent files
99410a
   files = get_files(parser.get('options', 'paths'))
99410a
   objects, dirs = write_objects(f, legal_deps, h_deps, files)
99410a
-  f.write('\nOBJECTS_all = %s\n\n' % string.join(objects))
99410a
+  f.write('\nOBJECTS_all = %s\n\n' % " ".join(objects))
99410a
 
99410a
   # for each platform and each subdirectory holding platform-specific files,
99410a
   # write out their compilation rules, and an OBJECT_<subdir>_<plat> symbol.
99410a
@@ -86,11 +89,11 @@
99410a
           inherit_files[-1] = inherit_files[-1][:-2] + '.lo'
99410a
           # replace the \\'s with /'s
99410a
           inherit_line = '/'.join(inherit_files)
99410a
-          if not inherit_parent.has_key(inherit_files[0]):
99410a
+          if inherit_files[0] not in inherit_parent:
99410a
             inherit_parent[inherit_files[0]] = []
99410a
           inherit_parent[inherit_files[0]].append(inherit_line)
99410a
 
99410a
-    for subdir in string.split(parser.get('options', 'platform_dirs')):
99410a
+    for subdir in parser.get('options', 'platform_dirs').split():
99410a
       path = '%s/%s' % (subdir, platform)
99410a
       if not os.path.exists(path):
99410a
         # this subdir doesn't have a subdir for this platform, so we'll
99410a
@@ -106,7 +109,7 @@
99410a
       files = get_files(path + '/*.c')
99410a
       objects, _unused = write_objects(f, legal_deps, h_deps, files)
99410a
 
99410a
-      if inherit_parent.has_key(subdir):
99410a
+      if subdir in inherit_parent:
99410a
         objects = objects + inherit_parent[subdir]
99410a
 
99410a
       symname = 'OBJECTS_%s_%s' % (subdir, platform)
99410a
@@ -114,7 +117,7 @@
99410a
       objects.sort()
99410a
 
99410a
       # and write the symbol for the whole group
99410a
-      f.write('\n%s = %s\n\n' % (symname, string.join(objects)))
99410a
+      f.write('\n%s = %s\n\n' % (symname, " ".join(objects)))
99410a
 
99410a
       # and include that symbol in the group
99410a
       group.append('$(%s)' % symname)
99410a
@@ -122,18 +125,18 @@
99410a
     group.sort()
99410a
 
99410a
     # write out a symbol which contains the necessary files
99410a
-    f.write('OBJECTS_%s = %s\n\n' % (platform, string.join(group)))
99410a
+    f.write('OBJECTS_%s = %s\n\n' % (platform, " ".join(group)))
99410a
 
99410a
-  f.write('HEADERS = $(top_srcdir)/%s\n\n' % string.join(headers, ' $(top_srcdir)/'))
99410a
-  f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' % string.join(dirs.keys()))
99410a
+  f.write('HEADERS = $(top_srcdir)/%s\n\n' % ' $(top_srcdir)/'.join(headers))
99410a
+  f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' % " ".join(dirs.keys()))
99410a
 
99410a
   if parser.has_option('options', 'modules'):
99410a
     modules = parser.get('options', 'modules')
99410a
 
99410a
-    for mod in string.split(modules):
99410a
+    for mod in modules.split():
99410a
       files = get_files(parser.get(mod, 'paths'))
99410a
       objects, _unused = write_objects(f, legal_deps, h_deps, files)
99410a
-      flat_objects = string.join(objects)
99410a
+      flat_objects = " ".join(objects)
99410a
       f.write('OBJECTS_%s = %s\n' % (mod, flat_objects))
99410a
 
99410a
       if parser.has_option(mod, 'target'):
99410a
@@ -153,9 +156,9 @@
99410a
       d = os.path.dirname(d)
99410a
 
99410a
   # Sort so 'foo' is before 'foo/bar'
99410a
-  keys = alldirs.keys()
99410a
+  keys = list(alldirs.keys())
99410a
   keys.sort()
99410a
-  f.write('BUILD_DIRS = %s\n\n' % string.join(keys))
99410a
+  f.write('BUILD_DIRS = %s\n\n' % " ".join(keys))
99410a
 
99410a
   f.write('.make.dirs: $(srcdir)/build-outputs.mk\n' \
99410a
           '\t@for d in $(BUILD_DIRS); do test -d $$d || mkdir $$d; done\n' \
99410a
@@ -177,12 +180,12 @@
99410a
 
99410a
     # what headers does this file include, along with the implied headers
99410a
     deps = extract_deps(file, legal_deps)
99410a
-    for hdr in deps.keys():
99410a
+    for hdr in list(deps.keys()):
99410a
       deps.update(h_deps.get(hdr, {}))
99410a
 
99410a
-    vals = deps.values()
99410a
+    vals = list(deps.values())
99410a
     vals.sort()
99410a
-    f.write('%s: %s .make.dirs %s\n' % (obj, file, string.join(vals)))
99410a
+    f.write('%s: %s .make.dirs %s\n' % (obj, file, " ".join(vals)))
99410a
 
99410a
   objects.sort()
99410a
 
99410a
@@ -210,7 +213,7 @@
99410a
     for hdr, deps in header_deps.items():
99410a
       # print hdr, deps
99410a
       start = len(deps)
99410a
-      for dep in deps.keys():
99410a
+      for dep in list(deps.keys()):
99410a
         deps.update(header_deps.get(dep, {}))
99410a
       if len(deps) != start:
99410a
         altered = 1
99410a
@@ -220,7 +223,7 @@
99410a
 
99410a
 def get_files(patterns):
99410a
   files = [ ]
99410a
-  for pat in string.split(patterns):
99410a
+  for pat in patterns.split():
99410a
     files.extend(map(clean_path, glob.glob(pat)))
99410a
   files.sort()
99410a
   return files
99410a
--- apr-1.6.3/build/buildcheck.sh
99410a
+++ apr-1.6.3/build/buildcheck.sh
99410a
@@ -4,7 +4,7 @@
99410a
 res=0
99410a
 
99410a
 # any python
99410a
-python=`build/PrintPath python`
99410a
+python=${PYTHON-`build/PrintPath python3 python2 python`}
99410a
 if test -z "$python"; then
99410a
   echo "buildconf: python not found."
99410a
   echo "           You need python installed"
99410a
@@ -11,7 +11,7 @@
99410a
   echo "           to build APR from SVN."
99410a
   res=1
99410a
 else
99410a
-  py_version=`python -c 'import sys; print sys.version' 2>&1|sed 's/ .*//;q'`
99410a
+  py_version=`$python -c 'import sys; print(sys.version)' 2>&1|sed 's/ .*//;q'`
99410a
   echo "buildconf: python version $py_version (ok)"
99410a
 fi
99410a