mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Python: split to host and target package, update dependencies
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
772bc3051e
commit
55a3ed8910
@ -26,7 +26,7 @@ PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.boost.org/"
|
||||
PKG_URL="$SOURCEFORGE_SRC/boost/boost/1.45.0/${PKG_NAME}_${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS="zlib bzip2"
|
||||
PKG_BUILD_DEPENDS="toolchain boost-jam Python zlib bzip2"
|
||||
PKG_BUILD_DEPENDS="toolchain boost-jam Python-host zlib bzip2"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="devel"
|
||||
PKG_SHORTDESC="boost: Peer-reviewed STL style libraries for C++"
|
||||
|
@ -26,7 +26,7 @@ PKG_LICENSE="LGPL"
|
||||
PKG_SITE="http://www.gtk.org/"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="ccache libffi-host zlib-host"
|
||||
PKG_BUILD_DEPENDS="ccache libffi-host zlib-host Python-host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="devel"
|
||||
PKG_SHORTDESC="glib-host: C support library"
|
||||
|
@ -26,7 +26,7 @@ PKG_LICENSE="LGPL"
|
||||
PKG_SITE="http://www.gtk.org/"
|
||||
PKG_URL="http://ftp.gnome.org/pub/gnome/sources/glib/2.31/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="zlib libiconv libffi pcre"
|
||||
PKG_BUILD_DEPENDS="toolchain zlib libiconv libffi pcre glib-host gtk-doc"
|
||||
PKG_BUILD_DEPENDS="toolchain zlib libiconv libffi pcre glib-host gtk-doc Python-host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="devel"
|
||||
PKG_SHORTDESC="glib: C support library"
|
||||
|
@ -26,7 +26,7 @@ PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.mesa3d.org/"
|
||||
PKG_URL="ftp://ftp.freedesktop.org/pub/mesa/$PKG_VERSION/MesaLib-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="libXdamage libdrm expat libXext libXfixes libXxf86vm libxcb libX11"
|
||||
PKG_BUILD_DEPENDS="toolchain Python makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11"
|
||||
PKG_BUILD_DEPENDS="toolchain Python-host makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="graphics"
|
||||
PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API"
|
||||
|
@ -26,7 +26,7 @@ PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.mesa3d.org/"
|
||||
PKG_URL="http://cgit.freedesktop.org/mesa/mesa/snapshot/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="libXdamage libdrm expat libXext libXfixes libXxf86vm libxcb libX11"
|
||||
PKG_BUILD_DEPENDS="toolchain Python makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11"
|
||||
PKG_BUILD_DEPENDS="toolchain Python-host makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="graphics"
|
||||
PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API"
|
||||
|
68
packages/lang/Python-host/build
Executable file
68
packages/lang/Python-host/build
Executable file
@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
|
||||
$SCRIPTS/unpack Python
|
||||
|
||||
setup_toolchain host
|
||||
|
||||
PY_DISABLED_MODULES="readline _curses _curses_panel _tkinter nis gdbm bsddb _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk"
|
||||
|
||||
cd $BUILD/Python-*
|
||||
mkdir -p .objdir-host && cd .objdir-host
|
||||
|
||||
OPT="$HOST_CFLAGS" \
|
||||
LDFLAGS="$LDFLAGS -lexpat" \
|
||||
../configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
--cache-file=config.cache \
|
||||
--enable-shared \
|
||||
--without-cxx-main \
|
||||
--with-threads \
|
||||
--enable-unicode=ucs4 \
|
||||
--with-system-expat \
|
||||
|
||||
make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$HOST_LIBDIR" \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
|
||||
make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$HOST_LIBDIR" \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
install
|
||||
|
||||
cp Parser/pgen ./hostpgen
|
||||
cp python ./hostpython
|
||||
|
||||
# symlink python binary to python2 (needed for Mesa)
|
||||
ln -sf python $ROOT/$TOOLCHAIN/bin/python2
|
||||
|
||||
# replace python-config to make sure python uses $SYSROOT_PREFIX
|
||||
mkdir -p $ROOT/$TOOLCHAIN/bin
|
||||
rm -rf $ROOT/$TOOLCHAIN/bin/python*-config
|
||||
|
||||
sed -e "s:%PREFIX%:$SYSROOT_PREFIX/usr:g" -e "s:%CFLAGS%:$TARGET_CFLAGS:g" \
|
||||
$ROOT/$PKG_DIR/scripts/python-config > $ROOT/$TOOLCHAIN/bin/python2.7-config
|
||||
chmod +x $ROOT/$TOOLCHAIN/bin/python2.7-config
|
||||
ln -s python2.7-config $ROOT/$TOOLCHAIN/bin/python-config
|
36
packages/lang/Python-host/meta
Normal file
36
packages/lang/Python-host/meta
Normal file
@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Python-host"
|
||||
PKG_VERSION=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.python.org/"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS="zlib-host expat-host"
|
||||
PKG_BUILD_DEPENDS="ccache zlib-host expat-host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="lang"
|
||||
PKG_SHORTDESC="python: The Python programming language"
|
||||
PKG_LONGDESC="Python is an interpreted object-oriented programming language, and is often compared with Tcl, Perl, Java or Scheme."
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
@ -24,51 +24,15 @@
|
||||
|
||||
PY_DISABLED_MODULES="readline _curses _curses_panel _tkinter nis gdbm bsddb _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk"
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
mkdir -p .objdir-host && cd .objdir-host
|
||||
|
||||
setup_toolchain host
|
||||
|
||||
OPT="$HOST_CFLAGS" \
|
||||
LDFLAGS="$LDFLAGS -lexpat" \
|
||||
../configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
--cache-file=config.cache \
|
||||
--enable-shared \
|
||||
--without-cxx-main \
|
||||
--with-threads \
|
||||
--enable-unicode=ucs4 \
|
||||
--with-system-expat \
|
||||
|
||||
make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$HOST_LIBDIR"
|
||||
|
||||
make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$HOST_LIBDIR" \
|
||||
install
|
||||
|
||||
# symlink python binary to python2 (needed for Mesa)
|
||||
ln -sf python $ROOT/$TOOLCHAIN/bin/python2
|
||||
|
||||
cp Parser/pgen ./hostpgen
|
||||
cp python ./hostpython
|
||||
|
||||
cd ..
|
||||
|
||||
mkdir -p .objdir-target && cd .objdir-target
|
||||
|
||||
setup_toolchain target
|
||||
|
||||
# dont use some optimizations because of problems
|
||||
# this fixes problems with expat (maybe)
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
|
||||
|
||||
strip_lto
|
||||
|
||||
#LDFLAGS="$LDFLAGS -lexpat -lffi" \
|
||||
#LDFLAGS="$LDFLAGS -lffi" \
|
||||
cd $PKG_BUILD
|
||||
mkdir -p .objdir-target && cd .objdir-target
|
||||
|
||||
ac_cv_file_dev_ptc=no \
|
||||
ac_cv_file_dev_ptmx=yes \
|
||||
ac_cv_func_lchflags_works=no \
|
||||
@ -118,12 +82,3 @@ make -j1 CC="$TARGET_CC" \
|
||||
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$TARGET_LIBDIR" \
|
||||
install
|
||||
|
||||
# replace python-config to make sure python uses $SYSROOT_PREFIX
|
||||
mkdir -p $ROOT/$TOOLCHAIN/bin
|
||||
rm -rf $ROOT/$TOOLCHAIN/bin/python*-config
|
||||
|
||||
sed -e "s:%PREFIX%:$SYSROOT_PREFIX/usr:g" -e "s:%CFLAGS%:$TARGET_CFLAGS:g" \
|
||||
$ROOT/$PKG_DIR/scripts/python-config > $ROOT/$TOOLCHAIN/bin/python2.7-config
|
||||
chmod +x $ROOT/$TOOLCHAIN/bin/python2.7-config
|
||||
ln -s python2.7-config $ROOT/$TOOLCHAIN/bin/python-config
|
||||
|
@ -25,8 +25,8 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.python.org/"
|
||||
PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="zlib openssl libffi file"
|
||||
PKG_BUILD_DEPENDS="toolchain expat-host sqlite expat zlib-host zlib openssl libffi"
|
||||
PKG_DEPENDS="sqlite expat zlib openssl libffi file"
|
||||
PKG_BUILD_DEPENDS="toolchain sqlite expat zlib openssl libffi"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="lang"
|
||||
PKG_SHORTDESC="python: The Python programming language"
|
||||
|
@ -26,7 +26,7 @@ PKG_LICENSE="MIT"
|
||||
PKG_SITE="http://xmlsoft.org"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain zlib-host Python"
|
||||
PKG_BUILD_DEPENDS="toolchain zlib-host Python-host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="textproc"
|
||||
PKG_SHORTDESC="libxml: XML parser library for Gnome"
|
||||
|
@ -26,7 +26,7 @@ PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://xcb.freedesktop.org"
|
||||
PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="libXau"
|
||||
PKG_BUILD_DEPENDS="toolchain util-macros Python xcb-proto libpthread-stubs libXau"
|
||||
PKG_BUILD_DEPENDS="toolchain util-macros Python-host xcb-proto libpthread-stubs libXau"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="x11/lib"
|
||||
PKG_SHORTDESC="libxcb: X C-language Bindings library"
|
||||
|
@ -26,7 +26,7 @@ PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.X.org"
|
||||
PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain util-macros Python"
|
||||
PKG_BUILD_DEPENDS="toolchain util-macros Python-host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="x11/proto"
|
||||
PKG_SHORTDESC="xcb-proto: X C-language Bindings protocol headers"
|
||||
|
Loading…
x
Reference in New Issue
Block a user