~ubuntu-branches/ubuntu/natty/python3.1/natty-security

« back to all changes in this revision

Viewing changes to debian/patches/distutils-link.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-07-06 16:52:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100706165242-2xv4i019r3et6c0j
Tags: 3.1.2+20100706-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.
  - Add debian/patches/overwrite-semaphore-check for Lucid buildds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
2
 
 
3
 
# DP: Don't add standard library dirs to library_dirs and runtime_library_dirs.
4
 
 
5
 
if [ $# -eq 3 -a "$2" = '-d' ]; then
6
 
    pdir="-d $3"
7
 
    dir="$3/"
8
 
elif [ $# -ne 1 ]; then
9
 
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
10
 
    exit 1
11
 
fi
12
 
case "$1" in
13
 
    -patch)
14
 
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
15
 
        #cd ${dir}gcc && autoconf
16
 
        ;;
17
 
    -unpatch)
18
 
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19
 
        #rm ${dir}gcc/configure
20
 
        ;;
21
 
    *)
22
 
        echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
23
 
        exit 1
24
 
esac
25
 
exit 0
26
 
 
27
 
--- Lib/distutils/unixccompiler.py~     2007-08-31 21:38:37.000000000 +0200
28
 
+++ Lib/distutils/unixccompiler.py      2007-08-31 21:42:54.000000000 +0200
29
 
@@ -209,6 +209,13 @@
30
 
                                         runtime_library_dirs)
31
 
         libraries, library_dirs, runtime_library_dirs = fixed_args
32
 
 
33
 
+        # filter out standard library paths, which are not explicitely needed
34
 
+        # for linking
35
 
+        library_dirs = [dir for dir in library_dirs
36
 
+                        if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')]
37
 
+        runtime_library_dirs = [dir for dir in runtime_library_dirs
38
 
+                                if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')]
39
 
+
40
 
         lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs,
41
 
                                    libraries)
42
 
         if not isinstance(output_dir, (basestring, type(None))):