mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
various cleanup
This commit is contained in:
parent
a6544dee44
commit
d92ed33682
@ -3,8 +3,6 @@
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
#$SCRIPTS/build readline
|
||||
#$SCRIPTS/build termcap
|
||||
$SCRIPTS/build sqlite
|
||||
$SCRIPTS/build openssl
|
||||
$SCRIPTS/build zlib
|
||||
@ -26,7 +24,6 @@ OPT="$HOST_CFLAGS" \
|
||||
--without-cxx-main \
|
||||
--with-threads \
|
||||
|
||||
#
|
||||
OPT="$HOST_CFLAGS" \
|
||||
make python Parser/pgen
|
||||
|
||||
@ -35,45 +32,8 @@ PYTHON_MODULES_INCLUDE=/usr/include \
|
||||
PYTHON_MODULES_LIB="/lib /lib64 /usr/lib /usr/lib64" \
|
||||
make HOSTPYTHON=./python sharedmods install
|
||||
|
||||
#OPT="$HOST_CFLAGS" \
|
||||
#make HOSTPYTHON=./python \
|
||||
# HOSTPGEN=./Parser/pgen \
|
||||
# install
|
||||
|
||||
# Make python-devel multilib-ready (bug #192747, #139911)
|
||||
#%define _pyconfig32_h pyconfig-32.h
|
||||
#%define _pyconfig64_h pyconfig-64.h
|
||||
|
||||
#%ifarch ppc64 s390x x86_64 ia64 alpha sparc64
|
||||
#%define _pyconfig_h %{_pyconfig64_h}
|
||||
#%else
|
||||
#%define _pyconfig_h %{_pyconfig32_h}
|
||||
#%endif
|
||||
|
||||
#cp $ROOT/$TOOLCHAIN/include/python$PY_BASE_VERSION/pyconfig.h $ROOT/$TOOLCHAIN/include/python$PY_BASE_VERSION/pyconfig-32.h
|
||||
#cp $ROOT/$TOOLCHAIN/include/python$PY_BASE_VERSION/pyconfig.h $ROOT/$TOOLCHAIN/include/python$PY_BASE_VERSION/pyconfig-64.h
|
||||
#rm -rf $ROOT/$TOOLCHAIN/include/python$PY_BASE_VERSION/pyconfig.h
|
||||
#cat > $ROOT/$TOOLCHAIN/include/python$PY_BASE_VERSION/pyconfig.h << EOF
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#include "pyconfig-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
#include "pyconfig-64.h"
|
||||
#else
|
||||
#error "Unknown word size"
|
||||
#endif
|
||||
#EOF
|
||||
|
||||
#ln -sf ../../libpython$PY_BASE_VERSION.so $ROOT/$TOOLCHAIN/lib/python$PY_BASE_VERSION/config/libpython$PY_BASE_VERSION.so
|
||||
|
||||
# Fix for bug 201434: make sure distutils looks at the right pyconfig.h file
|
||||
#sed -i -e "s/'pyconfig.h'/'pyconfig-32.h'/" $ROOT/$TOOLCHAIN/lib/python$PY_BASE_VERSION/distutils/sysconfig.py
|
||||
#sed -i -e "s/'pyconfig.h'/'pyconfig-64.h'/" $ROOT/$TOOLCHAIN/lib/python$PY_BASE_VERSION/distutils/sysconfig.py
|
||||
|
||||
mv Parser/pgen ./hostpgen
|
||||
cp python ./hostpython
|
||||
#mv build hostbuild
|
||||
|
||||
make distclean
|
||||
|
||||
|
@ -1,108 +0,0 @@
|
||||
diff -Naur Python-2.5.2/Makefile.pre.in Python-2.5.2.patch/Makefile.pre.in
|
||||
--- Python-2.5.2/Makefile.pre.in 2007-12-05 21:43:57.000000000 +0100
|
||||
+++ Python-2.5.2.patch/Makefile.pre.in 2008-09-11 09:49:37.000000000 +0200
|
||||
@@ -173,6 +173,7 @@
|
||||
|
||||
PYTHON= python$(EXE)
|
||||
BUILDPYTHON= python$(BUILDEXE)
|
||||
+HOSTPYTHON= $(BUILDPYTHON)
|
||||
|
||||
# === Definitions added by makesetup ===
|
||||
|
||||
@@ -199,6 +200,7 @@
|
||||
##########################################################################
|
||||
# Parser
|
||||
PGEN= Parser/pgen$(EXE)
|
||||
+HOSTPGEN= $(PGEN)$(EXE)
|
||||
|
||||
POBJS= \
|
||||
Parser/acceler.o \
|
||||
@@ -348,8 +350,8 @@
|
||||
# Build the shared modules
|
||||
sharedmods: $(BUILDPYTHON)
|
||||
case $$MAKEFLAGS in \
|
||||
- *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
|
||||
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
+ *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
|
||||
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
esac
|
||||
|
||||
# Build static library
|
||||
@@ -474,7 +476,7 @@
|
||||
|
||||
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
|
||||
-@ mkdir Include
|
||||
- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
||||
+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
||||
|
||||
$(PGEN): $(PGENOBJS)
|
||||
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
|
||||
@@ -894,7 +896,7 @@
|
||||
# Install the dynamically loadable modules
|
||||
# This goes into $(exec_prefix)
|
||||
sharedinstall:
|
||||
- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
|
||||
+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
|
||||
--prefix=$(prefix) \
|
||||
--install-scripts=$(BINDIR) \
|
||||
--install-platlib=$(DESTSHARED) \
|
||||
diff -Naur Python-2.5.2/setup.py Python-2.5.2.patch/setup.py
|
||||
--- Python-2.5.2/setup.py 2008-02-05 00:41:02.000000000 +0100
|
||||
+++ Python-2.5.2.patch/setup.py 2008-09-11 09:56:09.000000000 +0200
|
||||
@@ -209,6 +209,7 @@
|
||||
try:
|
||||
imp.load_dynamic(ext.name, ext_filename)
|
||||
except ImportError, why:
|
||||
+ return
|
||||
self.announce('*** WARNING: renaming "%s" since importing it'
|
||||
' failed: %s' % (ext.name, why), level=3)
|
||||
assert not self.inplace
|
||||
@@ -243,9 +244,18 @@
|
||||
return sys.platform
|
||||
|
||||
def detect_modules(self):
|
||||
- # Ensure that /usr/local is always used
|
||||
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ try:
|
||||
+ 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']
|
||||
+ 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 specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -280,12 +290,6 @@
|
||||
for directory in reversed(options.dirs):
|
||||
add_dir_to_list(dir_list, directory)
|
||||
|
||||
- if os.path.normpath(sys.prefix) != '/usr':
|
||||
- add_dir_to_list(self.compiler.library_dirs,
|
||||
- sysconfig.get_config_var("LIBDIR"))
|
||||
- add_dir_to_list(self.compiler.include_dirs,
|
||||
- sysconfig.get_config_var("INCLUDEDIR"))
|
||||
-
|
||||
try:
|
||||
have_unicode = unicode
|
||||
except NameError:
|
||||
@@ -294,11 +298,8 @@
|
||||
# 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 = []
|
||||
|
||||
config_h = sysconfig.get_config_h_filename()
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user