]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/python/python-2.3.4/crosscompile.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / python / python-2.3.4 / crosscompile.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- Python-2.3.3/Makefile.pre.in~crosscompile   2004-01-10 22:16:05.000000000 +0100
7 +++ Python-2.3.3/Makefile.pre.in        2004-01-10 22:16:05.000000000 +0100
8 @@ -159,6 +159,7 @@
9  
10  PYTHON=                python$(EXE)
11  BUILDPYTHON=   python$(BUILDEXE)
12 +HOSTPYTHON=    $(BUILDPYTHON)
13  
14  # === Definitions added by makesetup ===
15  
16 @@ -185,7 +186,7 @@
17  ##########################################################################
18  # Parser
19  PGEN=          Parser/pgen$(EXE)
20 -
21 +HOSTPGEN=      $(PGEN)$(EXE)
22  POBJS=         \
23                 Parser/acceler.o \
24                 Parser/grammar1.o \
25 @@ -314,8 +315,8 @@
26  # Build the shared modules
27  sharedmods: $(BUILDPYTHON)
28         case $$MAKEFLAGS in \
29 -       *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
30 -       *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
31 +       *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
32 +       *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
33         esac
34  
35  # buildno should really depend on something like LIBRARY_SRC
36 @@ -432,7 +433,7 @@
37  
38  
39  $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
40 -               -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
41 +               -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
42  
43  $(PGEN):       $(PGENOBJS)
44                 $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
45 @@ -705,19 +706,19 @@
46         done
47         $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
48         PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
49 -               ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
50 +               $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
51                 -d $(LIBDEST) -f \
52                 -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
53         PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
54 -               ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
55 +               $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
56                 -d $(LIBDEST) -f \
57                 -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
58         PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
59 -               ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
60 +               $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
61                 -d $(LIBDEST)/site-packages -f \
62                 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
63         PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
64 -               ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
65 +               $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
66                 -d $(LIBDEST)/site-packages -f \
67                 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
68  
69 @@ -812,7 +813,7 @@
70  # Install the dynamically loadable modules
71  # This goes into $(exec_prefix)
72  sharedinstall:
73 -       $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
74 +       $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
75                 --prefix=$(prefix) \
76                 --install-scripts=$(BINDIR) \
77                 --install-platlib=$(DESTSHARED) \
78 --- Python-2.3.3/setup.py~crosscompile  2003-10-21 22:01:21.000000000 +0200
79 +++ Python-2.3.3/setup.py       2004-01-10 22:30:12.000000000 +0100
80 @@ -208,6 +208,7 @@
81          except ImportError, why:
82              self.announce('*** WARNING: renaming "%s" since importing it'
83                            ' failed: %s' % (ext.name, why), level=3)
84 +            return
85              assert not self.inplace
86              basename, tail = os.path.splitext(ext_filename)
87              newname = basename + "_failed" + tail
88 @@ -241,8 +242,8 @@
89  
90      def detect_modules(self):
91          # Ensure that /usr/local is always used
92 -        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
93 -        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
94 +        # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
95 +        # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
96  
97          # fink installs lots of goodies in /sw/... - make sure we
98          # check there
99 @@ -264,8 +265,8 @@
100          # lib_dirs and inc_dirs are used to search for files;
101          # if a file is found in one of those directories, it can
102          # be assumed that no additional -I,-L directives are needed.
103 -        lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
104 -        inc_dirs = self.compiler.include_dirs + ['/usr/include']
105 +        lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ]
106 +        inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ]
107          exts = []
108  
109          platform = self.get_platform()