Files
Arch-R/packages/lang/Python/build
Stephan Raue 66a9b2fe42 Python: cleanup
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2011-11-10 05:05:37 +01:00

84 lines
2.9 KiB
Bash
Executable File

#!/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
PY_DISABLED_MODULES="readline _curses _curses_panel _tkinter nis gdbm bsddb _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk"
# dont use some optimizations because of problems
# this fixes problems with expat (maybe)
LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
strip_lto
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 \
ac_cv_func_chflags_works=no \
ac_cv_func_printf_zd=yes \
OPT="$CFLAGS -fno-strict-aliasing" \
../configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--cache-file=config.cache \
--prefix=/usr \
--sysconfdir=/etc \
--enable-shared \
--with-threads \
--enable-unicode=ucs4 \
--disable-ipv6 \
--disable-profiling \
--without-pydebug \
--without-doc-strings \
--without-tsc \
--without-pymalloc \
--without-fpectl \
--without-wctype-functions \
--without-cxx-main \
--with-system-ffi \
--with-system-expat \
make -j1 CC="$TARGET_CC" \
HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \
HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \
BLDSHARED="$CC -shared" \
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
CROSS_COMPILE="$TARGET_NAME" \
CROSS_COMPILE_TARGET="yes" \
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
PYTHON_MODULES_LIB="$TARGET_LIBDIR" \
make -j1 CC="$TARGET_CC" \
DESTDIR=$SYSROOT_PREFIX \
HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \
HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \
BLDSHARED="$CC -shared" \
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
CROSS_COMPILE="$TARGET_NAME" \
CROSS_COMPILE_TARGET="yes" \
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
PYTHON_MODULES_LIB="$TARGET_LIBDIR" \
install