File: setup.dpatch

package info (click to toggle)
python2.2 2.2.3dfsg-2sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 36,920 kB
  • ctags: 69,127
  • sloc: ansic: 219,839; python: 203,969; sh: 9,690; makefile: 3,468; perl: 3,454; lisp: 3,248; xml: 2,262; cpp: 106; sed: 2
file content (56 lines) | stat: -rw-r--r-- 1,845 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /bin/sh -e

# DP: Don't include /usr/local in search flags

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
	echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
        exit 1
esac
exit 0

--- setup.py~	2002-08-22 11:41:06.000000000 +0200
+++ setup.py	2002-08-22 11:48:20.000000000 +0200
@@ -198,10 +198,11 @@
 
     def detect_modules(self):
         # Ensure that /usr/local is always used
-        if '/usr/local/lib' not in self.compiler.library_dirs:
-            self.compiler.library_dirs.insert(0, '/usr/local/lib')
-        if '/usr/local/include' not in self.compiler.include_dirs:
-            self.compiler.include_dirs.insert(0, '/usr/local/include' )
+        # commented out on Debian
+        #if '/usr/local/lib' not in self.compiler.library_dirs:
+        #    self.compiler.library_dirs.insert(0, '/usr/local/lib')
+        #if '/usr/local/include' not in self.compiler.include_dirs:
+        #    self.compiler.include_dirs.insert(0, '/usr/local/include' )
 
         try:
             have_unicode = unicode
@@ -412,7 +412,9 @@
         # Berkeley DB 3.x.)
 
         dblib = []
-        if self.compiler.find_library_file(lib_dirs, 'db-3.2'):
+        if self.compiler.find_library_file(lib_dirs, 'db'):
+            dblib = ['db']
+        elif self.compiler.find_library_file(lib_dirs, 'db-3.2'):
             dblib = ['db-3.2']
         elif self.compiler.find_library_file(lib_dirs, 'db-3.1'):
             dblib = ['db-3.1']