From 05afdc088e3feaf9cd9cacf6dd6bb2a3de2d8356 Mon Sep 17 00:00:00 2001
From: comio <comio@cassini.homenet.telecomitalia.it>
Date: Sun, 18 Oct 2009 14:35:42 +0200
Subject: [PATCH][v2 NOT TESTED] Add distcc support


Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
---
 Config.in                                          |   28 ++
 include/kernel-defaults.mk                         |   27 ++-
 include/package-defaults.mk                        |   27 ++-
 rules.mk                                           |   11 +
 tools/Makefile                                     |    1 +
 tools/distcc/Makefile                              |   49 ++++
 .../patches/010-distcc-3.0-fix-fortify.patch       |   11 +
 tools/distcc/patches/020-distcc-3.1-python.patch   |  258 ++++++++++++++++++++
 8 files changed, 408 insertions(+), 4 deletions(-)
 create mode 100644 tools/distcc/Makefile
 create mode 100644 tools/distcc/patches/010-distcc-3.0-fix-fortify.patch
 create mode 100644 tools/distcc/patches/020-distcc-3.1-python.patch

diff --git a/Config.in b/Config.in
index ae1ba9f..3fa5bb4 100644
--- a/Config.in
+++ b/Config.in
@@ -276,6 +276,34 @@ config CCACHE
 	help
 		Compiler cache; see http://ccache.samba.org/
 
+config DISTCC
+	bool
+	prompt "Use distcc" if DEVEL && EXTERNAL_TOOLCHAIN
+	default n
+	help
+		Distributed C/C++ compiler; see http://distcc.org
+
+config DISTCC_PUMP
+	bool
+	prompt "Enable 'pump' mode" if !CCACHE && DEVEL
+	default n
+	help
+		"The 'pump' mode accelerates remote compilation with distcc buth it's not compatibile with ccache"
+
+config DISTCC_POTENTIAL_HOSTS
+	string
+	prompt "Distcc servers" if DISTCC && DEVEL
+	default "localhost"
+	help
+		Available Distcc servers in your network.
+
+config JOBS
+	int
+	prompt "Number  of jobs to run simultaneously" if DEVEL
+	default 0
+	help
+		Specifies the  number  of jobs (commands) to run simultaneously. The value 0 means "unspecified".
+
 config EXTERNAL_KERNEL_TREE
 	string
 	prompt "Use external kernel tree" if DEVEL
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index cf3eb31..86e7112 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -16,12 +16,35 @@ ifneq (,$(findstring avr32,$(BOARD)))
   KERNELNAME="uImage"
 endif
 
+ifneq ($(CONFIG_DISTCC_PUMP),)
+	FAST_MAKE=pump $(MAKE)
+else
+	FAST_MAKE=$(MAKE)
+endif
+
 KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
 	CROSS_COMPILE="$(KERNEL_CROSS)" \
 	ARCH="$(LINUX_KARCH)" \
 	KBUILD_HAVE_NLS=no \
 	CONFIG_SHELL="$(BASH)"
 
+ifneq ($(CONFIG_DISTCC),)
+ifneq ($(CONFIG_DISTCC_PUMP),)
+	KERNEL_MAKEOPTS += \
+		DISTCC_POTENTIAL_HOSTS=$(CONFIG_DISTCC_POTENTIAL_HOSTS)
+else
+	KERNEL_MAKEOPTS += \
+		DISTCC_HOSTS=$(CONFIG_DISTCC_POTENTIAL_HOSTS)
+endif
+endif
+
+ifneq ($(CONFIG_JOBS),)
+ifneq ($(CONFIG_JOBS),0)
+  KERNEL_MAKEOPTS += \
+	-j$(CONFIG_JOBS)
+endif
+endif
+
 ifdef CONFIG_STRIP_KERNEL_EXPORTS
   KERNEL_MAKEOPTS += \
 	EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"
@@ -112,14 +135,14 @@ endef
 
 define Kernel/CompileModules/Default
 	rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
-	+$(MAKE) $(KERNEL_MAKEOPTS) modules
+	+$(FAST_MAKE) $(KERNEL_MAKEOPTS) modules
 endef
 
 OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
 
 define Kernel/CompileImage/Default
 	$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),,rm -f $(TARGET_DIR)/init)
-	+$(MAKE) $(KERNEL_MAKEOPTS) $(KERNELNAME)
+	+$(FAST_MAKE) $(KERNEL_MAKEOPTS) $(KERNELNAME)
 	$(KERNEL_CROSS)objcopy -O binary $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)
 	$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
 endef
diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index 2b5cb86..e6e2548 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -94,16 +94,39 @@ define Build/Configure/Default
 	)
 endef
 
+ifneq ($(CONFIG_DISTCC_PUMP),)
+	FAST_MAKE=pump $(MAKE)
+else
+	FAST_MAKE=$(MAKE)
+endif
+
 MAKE_VARS = \
 	CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
 	CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
 	LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)"
 
+ifneq ($(CONFIG_DISTCC),)
+ifneq ($(CONFIG_DISTCC_PUMP),)
+	MAKE_VARS += \
+		DISTCC_POTENTIAL_HOSTS="$(CONFIG_DISTCC_POTENTIAL_HOSTS)"
+else
+	MAKE_VARS += \
+		DISTCC_HOSTS="$(CONFIG_DISTCC_POTENTIAL_HOSTS)"
+endif
+endif
+
 MAKE_FLAGS = \
 	$(TARGET_CONFIGURE_OPTS) \
+	$(MAKE_JOBS) \
 	CROSS="$(TARGET_CROSS)" \
 	ARCH="$(ARCH)"
 
+ifneq ($(strip $(CONFIG_JOBS)),)
+ifneq ($(strip $(CONFIG_JOBS)),0)
+	MAKE_FLAGS += -j$(CONFIG_JOBS)
+endif
+endif
+
 MAKE_INSTALL_FLAGS = \
 	$(MAKE_FLAGS) \
 	DESTDIR="$(PKG_INSTALL_DIR)"
@@ -112,14 +135,14 @@ MAKE_PATH = .
 
 define Build/Compile/Default
 	$(MAKE_VARS) \
-	$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
+	$(FAST_MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
 		$(MAKE_FLAGS) \
 		$(1);
 endef
 
 define Build/Install/Default
 	$(MAKE_VARS) \
-	$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
+	$(FAST_MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
 		$(MAKE_INSTALL_FLAGS) \
 		$(1) install;
 endef
diff --git a/rules.mk b/rules.mk
index 20cb85e..485ffbb 100644
--- a/rules.mk
+++ b/rules.mk
@@ -148,6 +148,17 @@ INSTALL_DIR:=install -d -m0755
 INSTALL_DATA:=install -m0644
 INSTALL_CONF:=install -m0600
 
+ifneq ($(CONFIG_DISTCC),)
+  # FIXME: move this variable to a better location
+ifneq ($(CONFIG_DISTCC_PUMP),y)
+  export DISTCC_HOSTS=$(CONFIG_DISTCC_POTENTIAL_HOSTS)
+else
+  export DISTCC_POTENTIAL_HOSTS=$(CONFIG_DISTCC_POTENTIAL_HOSTS)
+endif
+  TARGET_CC:= distcc $(TARGET_CC)
+  TARGET_CXX:= distcc $(TARGET_CXX)
+endif
+
 ifneq ($(CONFIG_CCACHE),)
   # FIXME: move this variable to a better location
   export CCACHE_DIR=$(STAGING_DIR)/ccache
diff --git a/tools/Makefile b/tools/Makefile
index 0d91b1f..1018ad6 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -16,6 +16,7 @@ tools-y += sstrip ipkg-utils genext2fs squashfs squashfs4 mtd-utils lzma-old mki
 tools-y += firmware-utils patch-cmdline quilt yaffs2
 
 tools-$(CONFIG_CCACHE) += ccache
+tools-$(CONFIG_DISTCC) += distcc
 tools-$(CONFIG_powerpc) += dtc
 tools-dep += lzma
 
diff --git a/tools/distcc/Makefile b/tools/distcc/Makefile
new file mode 100644
index 0000000..daf31c4
--- /dev/null
+++ b/tools/distcc/Makefile
@@ -0,0 +1,49 @@
+# 
+# Copyright (C) 2009 Industrie Dial Face S.p.A.
+# Copyright (C) 2009  OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/target.mk
+
+PKG_NAME:=distcc
+PKG_VERSION:=3.1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://distcc.googlecode.com/files/
+PKG_MD5SUM:=2f6be779869648f2d211ebf09f694715
+PKG_CAT:=zcat
+
+include $(INCLUDE_DIR)/host-build.mk
+
+ifneq ($(strip $(shell which distcc >/dev/null && echo found)),found)
+  HOST_CONFIGURE_ARGS += --disable-Werror
+
+  define Host/Compile
+	$(MAKE) CC="$(HOSTCC)" -C $(HOST_BUILD_DIR)
+  endef
+
+  define Host/Install
+	$(MAKE) -C $(HOST_BUILD_DIR) install
+  endef
+
+  define Host/Clean
+	-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
+	$(call Host/Clean/Default)
+  endef
+else
+  define Host/Prepare
+  endef
+  define Host/Configure
+  endef
+  define Host/Compile
+  endef
+  define Host/Install
+  endef
+  define Host/Clean
+  endef
+endif
+
+$(eval $(call HostBuild))
diff --git a/tools/distcc/patches/010-distcc-3.0-fix-fortify.patch b/tools/distcc/patches/010-distcc-3.0-fix-fortify.patch
new file mode 100644
index 0000000..8edc330
--- /dev/null
+++ b/tools/distcc/patches/010-distcc-3.0-fix-fortify.patch
@@ -0,0 +1,11 @@
+diff -ru a/src/snprintf.h b/src/snprintf.h
+--- a/src/snprintf.h	2008-08-06 15:52:06.000000000 -0500
++++ b/src/snprintf.h	2009-01-04 15:19:22.000000000 -0600
+@@ -7,6 +7,7 @@
+  */
+ 
+ #include <stdarg.h>
++#include "config.h"
+ 
+ #ifdef __GNUC__
+ /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
diff --git a/tools/distcc/patches/020-distcc-3.1-python.patch b/tools/distcc/patches/020-distcc-3.1-python.patch
new file mode 100644
index 0000000..733357a
--- /dev/null
+++ b/tools/distcc/patches/020-distcc-3.1-python.patch
@@ -0,0 +1,258 @@
+diff -Naur distcc-3.1.orig/bench/statistics.py distcc-3.1/bench/statistics.py
+--- distcc-3.1.orig/bench/statistics.py	2008-12-03 06:50:21.000000000 +0900
++++ distcc-3.1/bench/statistics.py	2009-03-17 01:29:26.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python2.2
++#! /usr/bin/env python
+ 
+ # benchmark -- automated system for testing distcc correctness
+ # and performance on various source trees.
+diff -Naur distcc-3.1.orig/configure distcc-3.1/configure
+--- distcc-3.1.orig/configure	2008-12-03 06:50:34.000000000 +0900
++++ distcc-3.1/configure	2009-03-17 01:31:09.000000000 +0900
+@@ -3629,7 +3629,7 @@
+ #
+ # NB: Cannot use AC_CONFIG_LIBOBJ_DIR here, because it's not present
+ # in autoconf 2.53.
+-for ac_prog in python2.5 python-2.5 python2.4 python-2.4 python
++for ac_prog in python
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+diff -Naur distcc-3.1.orig/configure.ac distcc-3.1/configure.ac
+--- distcc-3.1.orig/configure.ac	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/configure.ac	2009-03-17 01:29:04.000000000 +0900
+@@ -243,7 +243,7 @@
+ #
+ # NB: Cannot use AC_CONFIG_LIBOBJ_DIR here, because it's not present
+ # in autoconf 2.53.
+-AC_PATH_PROGS(PYTHON, [python2.5 python-2.5 python2.4 python-2.4 python])
++AC_PATH_PROGS(PYTHON, [python])
+ AC_ARG_VAR(PYTHON, [Python interpreter])
+ # Python 1 doesn't even support -V
+ if ! "$PYTHON" -V 2>&1 | grep "^Python" >/dev/null; then
+diff -Naur distcc-3.1.orig/include_server/basics.py distcc-3.1/include_server/basics.py
+--- distcc-3.1.orig/include_server/basics.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/basics.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ #
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/basics_test.py distcc-3.1/include_server/basics_test.py
+--- distcc-3.1.orig/include_server/basics_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/basics_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/c_extensions_test.py distcc-3.1/include_server/c_extensions_test.py
+--- distcc-3.1.orig/include_server/c_extensions_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/c_extensions_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/cache_basics.py distcc-3.1/include_server/cache_basics.py
+--- distcc-3.1.orig/include_server/cache_basics.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/cache_basics.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/compiler_defaults.py distcc-3.1/include_server/compiler_defaults.py
+--- distcc-3.1.orig/include_server/compiler_defaults.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/compiler_defaults.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/compress_files.py distcc-3.1/include_server/compress_files.py
+--- distcc-3.1.orig/include_server/compress_files.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/compress_files.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_analyzer.py distcc-3.1/include_server/include_analyzer.py
+--- distcc-3.1.orig/include_server/include_analyzer.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_analyzer.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_analyzer_memoizing_node.py distcc-3.1/include_server/include_analyzer_memoizing_node.py
+--- distcc-3.1.orig/include_server/include_analyzer_memoizing_node.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_analyzer_memoizing_node.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_analyzer_memoizing_node_test.py distcc-3.1/include_server/include_analyzer_memoizing_node_test.py
+--- distcc-3.1.orig/include_server/include_analyzer_memoizing_node_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_analyzer_memoizing_node_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4 
++#! /usr/bin/python 
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_analyzer_test.py distcc-3.1/include_server/include_analyzer_test.py
+--- distcc-3.1.orig/include_server/include_analyzer_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_analyzer_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_server.py distcc-3.1/include_server/include_server.py
+--- distcc-3.1.orig/include_server/include_server.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_server.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_server_test.py distcc-3.1/include_server/include_server_test.py
+--- distcc-3.1.orig/include_server/include_server_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_server_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/macro_eval.py distcc-3.1/include_server/macro_eval.py
+--- distcc-3.1.orig/include_server/macro_eval.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/macro_eval.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/macro_eval_test.py distcc-3.1/include_server/macro_eval_test.py
+--- distcc-3.1.orig/include_server/macro_eval_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/macro_eval_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/mirror_path.py distcc-3.1/include_server/mirror_path.py
+--- distcc-3.1.orig/include_server/mirror_path.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/mirror_path.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/mirror_path_test.py distcc-3.1/include_server/mirror_path_test.py
+--- distcc-3.1.orig/include_server/mirror_path_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/mirror_path_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/parse_command.py distcc-3.1/include_server/parse_command.py
+--- distcc-3.1.orig/include_server/parse_command.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/parse_command.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4 
++#! /usr/bin/python 
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/parse_command_test.py distcc-3.1/include_server/parse_command_test.py
+--- distcc-3.1.orig/include_server/parse_command_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/parse_command_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/parse_file.py distcc-3.1/include_server/parse_file.py
+--- distcc-3.1.orig/include_server/parse_file.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/parse_file.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/parse_file_test.py distcc-3.1/include_server/parse_file_test.py
+--- distcc-3.1.orig/include_server/parse_file_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/parse_file_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/run.py distcc-3.1/include_server/run.py
+--- distcc-3.1.orig/include_server/run.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/run.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4 
++#! /usr/bin/python 
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/setup.py distcc-3.1/include_server/setup.py
+--- distcc-3.1.orig/include_server/setup.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/setup.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/statistics.py distcc-3.1/include_server/statistics.py
+--- distcc-3.1.orig/include_server/statistics.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/statistics.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4 
++#! /usr/bin/python 
+ #
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/test/onetest.py distcc-3.1/test/onetest.py
+--- distcc-3.1.orig/test/onetest.py	2008-12-03 06:50:22.000000000 +0900
++++ distcc-3.1/test/onetest.py	2009-03-17 01:29:44.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ #
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/test/testdistcc.py distcc-3.1/test/testdistcc.py
+--- distcc-3.1.orig/test/testdistcc.py	2008-12-03 06:50:22.000000000 +0900
++++ distcc-3.1/test/testdistcc.py	2009-03-17 01:29:36.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python2.2
++#! /usr/bin/env python
+ 
+ # Copyright (C) 2002, 2003, 2004 by Martin Pool <mbp@samba.org>
+ # Copyright 2007 Google Inc.
-- 
1.6.5

