mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-01 07:27:43 +00:00
- fixup include- and libdirs. Closes #841
- rediff patches against 2.4.2
This commit is contained in:
parent
92139ef20f
commit
6440b9fd17
@ -1,8 +1,7 @@
|
|||||||
Ripped from OpenEmbedded
|
diff -rduNp Python-2.4.2.orig/Makefile.pre.in Python-2.4.2/Makefile.pre.in
|
||||||
|
--- Python-2.4.2.orig/Makefile.pre.in 2005-03-29 01:23:01.000000000 +0200
|
||||||
--- Python-2.4c1/Makefile.pre.in
|
+++ Python-2.4.2/Makefile.pre.in 2007-01-22 19:37:08.000000000 +0100
|
||||||
+++ Python-2.4c1/Makefile.pre.in
|
@@ -162,6 +162,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
|
||||||
@@ -162,6 +162,7 @@
|
|
||||||
|
|
||||||
PYTHON= python$(EXE)
|
PYTHON= python$(EXE)
|
||||||
BUILDPYTHON= python$(BUILDEXE)
|
BUILDPYTHON= python$(BUILDEXE)
|
||||||
@ -10,7 +9,7 @@ Ripped from OpenEmbedded
|
|||||||
|
|
||||||
# === Definitions added by makesetup ===
|
# === Definitions added by makesetup ===
|
||||||
|
|
||||||
@@ -188,7 +189,7 @@
|
@@ -188,7 +189,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Parser
|
# Parser
|
||||||
PGEN= Parser/pgen$(EXE)
|
PGEN= Parser/pgen$(EXE)
|
||||||
@ -19,7 +18,7 @@ Ripped from OpenEmbedded
|
|||||||
POBJS= \
|
POBJS= \
|
||||||
Parser/acceler.o \
|
Parser/acceler.o \
|
||||||
Parser/grammar1.o \
|
Parser/grammar1.o \
|
||||||
@@ -320,8 +321,8 @@
|
@@ -320,8 +321,8 @@ platform: $(BUILDPYTHON)
|
||||||
# Build the shared modules
|
# Build the shared modules
|
||||||
sharedmods: $(BUILDPYTHON)
|
sharedmods: $(BUILDPYTHON)
|
||||||
case $$MAKEFLAGS in \
|
case $$MAKEFLAGS in \
|
||||||
@ -30,7 +29,7 @@ Ripped from OpenEmbedded
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# buildno should really depend on something like LIBRARY_SRC
|
# buildno should really depend on something like LIBRARY_SRC
|
||||||
@@ -442,7 +443,7 @@
|
@@ -442,7 +443,7 @@ Modules/ccpython.o: $(srcdir)/Modules/cc
|
||||||
|
|
||||||
|
|
||||||
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
|
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
|
||||||
@ -39,7 +38,7 @@ Ripped from OpenEmbedded
|
|||||||
|
|
||||||
$(PGEN): $(PGENOBJS)
|
$(PGEN): $(PGENOBJS)
|
||||||
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
|
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
|
||||||
@@ -718,19 +719,19 @@
|
@@ -719,19 +720,19 @@ libinstall: $(BUILDPYTHON) $(srcdir)/Lib
|
||||||
done
|
done
|
||||||
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
|
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
|
||||||
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||||
@ -63,7 +62,7 @@ Ripped from OpenEmbedded
|
|||||||
-d $(LIBDEST)/site-packages -f \
|
-d $(LIBDEST)/site-packages -f \
|
||||||
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||||
|
|
||||||
@@ -825,7 +826,7 @@
|
@@ -826,7 +827,7 @@ libainstall: all
|
||||||
# Install the dynamically loadable modules
|
# Install the dynamically loadable modules
|
||||||
# This goes into $(exec_prefix)
|
# This goes into $(exec_prefix)
|
||||||
sharedinstall:
|
sharedinstall:
|
||||||
@ -72,9 +71,10 @@ Ripped from OpenEmbedded
|
|||||||
--prefix=$(prefix) \
|
--prefix=$(prefix) \
|
||||||
--install-scripts=$(BINDIR) \
|
--install-scripts=$(BINDIR) \
|
||||||
--install-platlib=$(DESTSHARED) \
|
--install-platlib=$(DESTSHARED) \
|
||||||
--- Python-2.4c1/setup.py
|
diff -rduNp Python-2.4.2.orig/setup.py Python-2.4.2/setup.py
|
||||||
+++ Python-2.4c1/setup.py
|
--- Python-2.4.2.orig/setup.py 2005-03-09 23:27:24.000000000 +0100
|
||||||
@@ -206,6 +206,7 @@
|
+++ Python-2.4.2/setup.py 2007-01-22 19:37:08.000000000 +0100
|
||||||
|
@@ -204,6 +204,7 @@ class PyBuildExt(build_ext):
|
||||||
try:
|
try:
|
||||||
imp.load_dynamic(ext.name, ext_filename)
|
imp.load_dynamic(ext.name, ext_filename)
|
||||||
except ImportError, why:
|
except ImportError, why:
|
||||||
@ -82,7 +82,7 @@ Ripped from OpenEmbedded
|
|||||||
self.announce('*** WARNING: renaming "%s" since importing it'
|
self.announce('*** WARNING: renaming "%s" since importing it'
|
||||||
' failed: %s' % (ext.name, why), level=3)
|
' failed: %s' % (ext.name, why), level=3)
|
||||||
assert not self.inplace
|
assert not self.inplace
|
||||||
@@ -239,8 +240,6 @@
|
@@ -239,8 +240,6 @@ class PyBuildExt(build_ext):
|
||||||
|
|
||||||
def detect_modules(self):
|
def detect_modules(self):
|
||||||
# Ensure that /usr/local is always used
|
# Ensure that /usr/local is always used
|
||||||
@ -91,7 +91,7 @@ Ripped from OpenEmbedded
|
|||||||
|
|
||||||
# Add paths to popular package managers on OS X/darwin
|
# Add paths to popular package managers on OS X/darwin
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
@@ -260,12 +260,6 @@
|
@@ -251,12 +250,6 @@ class PyBuildExt(build_ext):
|
||||||
add_dir_to_list(self.compiler.library_dirs, '/opt/local/lib')
|
add_dir_to_list(self.compiler.library_dirs, '/opt/local/lib')
|
||||||
add_dir_to_list(self.compiler.include_dirs, '/opt/local/include')
|
add_dir_to_list(self.compiler.include_dirs, '/opt/local/include')
|
||||||
|
|
44
package/python/python-002-cross-compile.patch
Normal file
44
package/python/python-002-cross-compile.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
diff -rduNp Python-2.4.2-001/setup.py Python-2.4.2/setup.py
|
||||||
|
--- Python-2.4.2-001/setup.py 2007-01-22 19:37:08.000000000 +0100
|
||||||
|
+++ Python-2.4.2/setup.py 2007-01-22 19:41:47.000000000 +0100
|
||||||
|
@@ -20,6 +20,14 @@ disabled_module_list = []
|
||||||
|
def add_dir_to_list(dirlist, dir):
|
||||||
|
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
||||||
|
1) 'dir' is not already in 'dirlist'
|
||||||
|
+ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
|
||||||
|
+except KeyError:
|
||||||
|
+ modules_include_dirs = ['/usr/include']
|
||||||
|
+try:
|
||||||
|
+ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split()
|
||||||
|
+except KeyError:
|
||||||
|
+ modules_lib_dirs = ['/usr/lib']
|
||||||
|
+try:
|
||||||
|
2) 'dir' actually exists, and is a directory."""
|
||||||
|
if dir is not None and os.path.isdir(dir) and dir not in dirlist:
|
||||||
|
dirlist.insert(0, dir)
|
||||||
|
@@ -239,7 +247,10 @@ class PyBuildExt(build_ext):
|
||||||
|
return sys.platform
|
||||||
|
|
||||||
|
def detect_modules(self):
|
||||||
|
- # Ensure that /usr/local is always used
|
||||||
|
+ for dir in modules_include_dirs:
|
||||||
|
+ add_dir_to_list(self.compiler.include_dirs, dir)
|
||||||
|
+ for dir in modules_lib_dirs:
|
||||||
|
+ add_dir_to_list(self.compiler.library_dirs, dir)
|
||||||
|
|
||||||
|
# Add paths to popular package managers on OS X/darwin
|
||||||
|
if sys.platform == "darwin":
|
||||||
|
@@ -258,11 +269,8 @@ class PyBuildExt(build_ext):
|
||||||
|
# lib_dirs and inc_dirs are used to search for files;
|
||||||
|
# if a file is found in one of those directories, it can
|
||||||
|
# be assumed that no additional -I,-L directives are needed.
|
||||||
|
- lib_dirs = self.compiler.library_dirs + [
|
||||||
|
- '/lib64', '/usr/lib64',
|
||||||
|
- '/lib', '/usr/lib',
|
||||||
|
- ]
|
||||||
|
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
|
||||||
|
+ lib_dirs = self.compiler.library_dirs
|
||||||
|
+ inc_dirs = self.compiler.include_dirs
|
||||||
|
exts = []
|
||||||
|
|
||||||
|
platform = self.get_platform()
|
@ -1,6 +1,7 @@
|
|||||||
--- python.old/setup.py 2003-11-01 19:23:48.495647848 +0000
|
diff -rduNp Python-2.4.2-002/setup.py Python-2.4.2/setup.py
|
||||||
+++ python/setup.py 2003-11-01 19:24:16.044459792 +0000
|
--- Python-2.4.2-002/setup.py 2007-01-22 19:41:47.000000000 +0100
|
||||||
@@ -15,7 +15,14 @@
|
+++ Python-2.4.2/setup.py 2007-01-22 19:47:25.000000000 +0100
|
||||||
|
@@ -15,7 +15,14 @@ from distutils.command.install import in
|
||||||
from distutils.command.install_lib import install_lib
|
from distutils.command.install_lib import install_lib
|
||||||
|
|
||||||
# This global variable is used to hold the list of modules to be disabled.
|
# This global variable is used to hold the list of modules to be disabled.
|
||||||
@ -16,15 +17,15 @@
|
|||||||
|
|
||||||
def add_dir_to_list(dirlist, dir):
|
def add_dir_to_list(dirlist, dir):
|
||||||
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
||||||
@@ -240,6 +247,7 @@
|
@@ -247,6 +254,7 @@ class PyBuildExt(build_ext):
|
||||||
return sys.platform
|
return sys.platform
|
||||||
|
|
||||||
def detect_modules(self):
|
def detect_modules(self):
|
||||||
+ global disable_ssl
|
+ global disable_ssl
|
||||||
# Ensure that /usr/local is always used
|
for dir in modules_include_dirs:
|
||||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
add_dir_to_list(self.compiler.include_dirs, dir)
|
||||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
for dir in modules_lib_dirs:
|
||||||
@@ -451,7 +459,8 @@
|
@@ -468,7 +476,8 @@ class PyBuildExt(build_ext):
|
||||||
] )
|
] )
|
||||||
|
|
||||||
if (ssl_incs is not None and
|
if (ssl_incs is not None and
|
@ -1,6 +1,7 @@
|
|||||||
--- Python-2.3.2/Python/import.c 2003-10-08 12:29:03.166032656 +0100
|
diff -rduNp Python-2.4.2-010/Python/import.c Python-2.4.2/Python/import.c
|
||||||
+++ import.c 2003-10-08 12:32:57.423420120 +0100
|
--- Python-2.4.2-010/Python/import.c 2005-09-14 20:15:03.000000000 +0200
|
||||||
@@ -808,8 +808,12 @@
|
+++ Python-2.4.2/Python/import.c 2007-01-22 19:49:18.000000000 +0100
|
||||||
|
@@ -822,8 +822,12 @@ static void
|
||||||
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
|
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
@ -55,6 +55,8 @@ $(PYTHON_DIR)/.configured: $(PYTHON_DIR)/.hostpython
|
|||||||
$(PYTHON_DIR)/$(PYTHON_BINARY): $(PYTHON_DIR)/.configured
|
$(PYTHON_DIR)/$(PYTHON_BINARY): $(PYTHON_DIR)/.configured
|
||||||
export PYTHON_DISABLE_SSL=1
|
export PYTHON_DISABLE_SSL=1
|
||||||
$(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) DESTDIR=$(TARGET_DIR) \
|
$(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) DESTDIR=$(TARGET_DIR) \
|
||||||
|
PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/include \
|
||||||
|
PYTHON_MODULES_LIB=$(STAGING_DIR)/lib \
|
||||||
PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses _curses_panel _tkinter" \
|
PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses _curses_panel _tkinter" \
|
||||||
HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen
|
HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen
|
||||||
|
|
||||||
@ -63,12 +65,15 @@ $(TARGET_DIR)/$(PYTHON_TARGET_BINARY): $(PYTHON_DIR)/$(PYTHON_BINARY)
|
|||||||
LD_LIBRARY_PATH=$(STAGING_DIR)/lib
|
LD_LIBRARY_PATH=$(STAGING_DIR)/lib
|
||||||
$(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) install \
|
$(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) install \
|
||||||
DESTDIR=$(TARGET_DIR) CROSS_COMPILE=yes \
|
DESTDIR=$(TARGET_DIR) CROSS_COMPILE=yes \
|
||||||
|
PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/include \
|
||||||
|
PYTHON_MODULES_LIB=$(STAGING_DIR)/lib \
|
||||||
PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses _curses_panel _tkinter" \
|
PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses _curses_panel _tkinter" \
|
||||||
HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen
|
HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen
|
||||||
rm $(TARGET_DIR)/usr/bin/python?.?
|
rm $(TARGET_DIR)/usr/bin/python?.?
|
||||||
rm $(TARGET_DIR)/usr/bin/idle
|
rm $(TARGET_DIR)/usr/bin/idle
|
||||||
rm $(TARGET_DIR)/usr/bin/pydoc
|
rm $(TARGET_DIR)/usr/bin/pydoc
|
||||||
find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -o -name '*.pyo' -exec rm {} \;
|
-find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -exec rm {} \;
|
||||||
|
-find $(TARGET_DIR)/usr/lib/ -name '*.pyo' -exec rm {} \;
|
||||||
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
|
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
|
||||||
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc \
|
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc \
|
||||||
$(TARGET_DIR)/usr/lib/python*/test
|
$(TARGET_DIR)/usr/lib/python*/test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user