Python: add patch to dont create static python library, enable shared library support for host python, add expat-host as an dep., cleanups

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-10-21 21:55:58 +02:00
parent ccecdf9172
commit 0cf027e06e
2 changed files with 54 additions and 4 deletions

View File

@ -3,6 +3,7 @@
. config/options $1
$SCRIPTS/build toolchain
$SCRIPTS/build expat-host
$SCRIPTS/build sqlite
$SCRIPTS/build expat
$SCRIPTS/build openssl
@ -13,13 +14,13 @@ PY_DISABLED_MODULES="readline _curses _curses_panel _tkinter nis gdbm bsddb _cod
cd $PKG_BUILD
mkdir -p .objdir-host
cd .objdir-host
mkdir -p .objdir-host && cd .objdir-host
setup_toolchain host
OPT="$HOST_CFLAGS" \
../configure --prefix=$ROOT/$TOOLCHAIN \
--enable-shared \
--without-cxx-main \
--with-threads \
--enable-unicode=ucs4 \
@ -32,8 +33,7 @@ cp python ./hostpython
cd ..
mkdir -p .objdir-target
cd .objdir-target
mkdir -p .objdir-target && cd .objdir-target
setup_toolchain target

View File

@ -0,0 +1,50 @@
diff -Naur Python-2.6.6/Makefile.pre.in Python-2.6.6.patch/Makefile.pre.in
--- Python-2.6.6/Makefile.pre.in 2010-10-19 22:20:12.198769633 +0200
+++ Python-2.6.6.patch/Makefile.pre.in 2010-10-19 22:22:07.534168230 +0200
@@ -384,7 +384,7 @@
# Build the interpreter
-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
+$(BUILDPYTHON): Modules/python.o $(LDLIBRARY)
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
Modules/python.o \
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
@@ -400,18 +400,6 @@
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
esac
-# Build static library
-# avoid long command lines, same as LIBRARY_OBJS
-$(LIBRARY): $(LIBRARY_OBJS)
- -rm -f $@
- $(AR) cr $@ Modules/getbuildinfo.o
- $(AR) cr $@ $(PARSER_OBJS)
- $(AR) cr $@ $(OBJECT_OBJS)
- $(AR) cr $@ $(PYTHON_OBJS)
- $(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
- $(AR) cr $@ $(MODOBJS)
- $(RANLIB) $@
-
libpython$(VERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
$(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
@@ -947,18 +935,6 @@
else true; \
fi; \
done
- @if test -d $(LIBRARY); then :; else \
- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
- if test "$(SO)" = .dll; then \
- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
- else \
- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
- fi; \
- else \
- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
- fi; \
- fi
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
$(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in