From: Ronan Le Martret Date: Wed, 10 Apr 2013 11:07:32 +0000 (+0200) Subject: - modify python pkg. X-Git-Tag: rev_0.4~375 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a8f2bfcab905470b417e06b343eb904867ca79b;p=scm%2Fbb%2Ftizen.git - modify python pkg. --- diff --git a/Tizen_TZ_package/spec2yocto.py b/Tizen_TZ_package/spec2yocto.py index cf2d8a2..822e3fb 100755 --- a/Tizen_TZ_package/spec2yocto.py +++ b/Tizen_TZ_package/spec2yocto.py @@ -268,7 +268,7 @@ class specParser: if pkgName in [ "glibc"]: command += " --define='_sbindir /usr/sbin'" - if pkgName in ["freetype","popt","pcre","which","findutils","tizen-coreutils","python"]: + if pkgName in ["freetype","popt","pcre","which","findutils","tizen-coreutils","python","ncurses"]: oe_runconf2='''oe_runconf2''' command += " --define='%%_configure %s'" % oe_runconf2 @@ -696,8 +696,10 @@ class specParser: if res in ["MIT/X11",'X11/MIT']: res="MIT" - if res in ['LGPLv2, AFLv2']: - res='LGPLv2' + elif res in ['LGPLv2, AFLv2']: + res='LGPLv2' + elif res in ["Apache License, Version 2.0"]: + res='Apache' return res return "" @@ -1045,8 +1047,6 @@ class metaSpec: f.write("SRC_URI = \"\"\n" ) f.write("\n" ) - if self.__package_name not in ["ncurses"]: - f.write("inherit tizenBuildUtils\n\n") f.write("require %s\n" % self.__baseRDependsFile) f.write("require %s\n" % self.__baseDependsFile) diff --git a/meta-tizen-ivi/classes/tizenBuildUtils.bbclass b/meta-tizen-ivi/classes/tizenBuildUtils.bbclass index 1b15d5d..6179248 100644 --- a/meta-tizen-ivi/classes/tizenBuildUtils.bbclass +++ b/meta-tizen-ivi/classes/tizenBuildUtils.bbclass @@ -45,7 +45,9 @@ do_compile_prepend () { echo export STAGING_LIBDIR=${STAGING_LIBDIR} >> ${S}/../temp/Bash_compile echo export STAGING_BASELIBDIR=${STAGING_BASELIBDIR} >> ${S}/../temp/Bash_compile echo export STAGING_INCDIR=${STAGING_INCDIR} >> ${S}/../temp/Bash_compile - + echo export BUILD_SYS=${BUILD_SYS} >> ${S}/../temp/Bash_compile + echo export STAGING_BINDIR_NATIVE=${STAGING_BINDIR_NATIVE} >> ${S}/../temp/Bash_compile + #echo export cross_compiling=yes >> ${S}/../temp/Bash_compile echo find \${S} -iname \"*.Rules\" -exec sed -e \'s,:=,?=,g\' -i {} \\\; >> ${S}/../temp/Bash_compile echo find \${S} -iname \"*.Rules\" -exec sed -e \'s,BUILD_CFLAGS ?=,BUILD_CFLAGS := \$\(BUILD_CFLAGS\),\' -i {} \\\; >> ${S}/../temp/Bash_compile diff --git a/meta-tizen-ivi/recipes-tizen/app-checker/app-checker.inc b/meta-tizen-ivi/recipes-tizen/app-checker/app-checker.inc index 174cbee..406a24f 100644 --- a/meta-tizen-ivi/recipes-tizen/app-checker/app-checker.inc +++ b/meta-tizen-ivi/recipes-tizen/app-checker/app-checker.inc @@ -1,7 +1,7 @@ DESCRIPTION = "App Checker" HOMEPAGE = "http://nohomepage.org" SECTION = "System/Libraries" -LICENSE = "Apache License, Version 2.0" +LICENSE = "Apache" PROVIDES = "" diff --git a/meta-tizen-ivi/recipes-tizen/ncurses/ncurses-extraconf.inc b/meta-tizen-ivi/recipes-tizen/ncurses/ncurses-extraconf.inc index c865ced..d513d99 100644 --- a/meta-tizen-ivi/recipes-tizen/ncurses/ncurses-extraconf.inc +++ b/meta-tizen-ivi/recipes-tizen/ncurses/ncurses-extraconf.inc @@ -3,230 +3,9 @@ inherit autotools binconfig multilib_header SRC_URI += "file://tic-hang.patch \ file://config.cache \ " -EXTRA_AUTORECONF = "-I m4" CONFIG_SITE =+ "${WORKDIR}/config.cache" -# Whether to enable separate widec libraries; must be 'true' or 'false' -# -# TODO: remove this variable when widec is supported in every setup? -ENABLE_WIDEC ?= "false" -# _GNU_SOURCE is required for widec stuff and is detected automatically -# for target objects. But it must be set manually for native and sdk -# builds. -BUILD_CPPFLAGS += "-D_GNU_SOURCE" -# natives don't generally look in base_libdir -base_libdir_class-native = "${libdir}" - -# Display corruption occurs on 64 bit hosts without these settings -# This was derrived from the upstream debian ncurses which uses -# these settings for 32 and 64 bit hosts. -EXCONFIG_ARGS = "" -EXCONFIG_ARGS_virtclass-native = " \ - --disable-lp64 \ - --with-chtype='long' \ - --with-mmask-t='long'" -EXCONFIG_ARGS_virtclass-nativesdk = " \ - --disable-lp64 \ - --with-chtype='long' \ - --with-mmask-t='long'" - -# Fall back to the host termcap / terminfo for -nativesdk and -native -# The reality is a work around for strange problems with things like -# "bitbake -c menuconfig busybox" where it cannot find the terminfo -# because the sstate had a hard coded search path. Until this is fixed -# another way this is deemed good enough. -EX_TERMCAP = "" -EX_TERMCAP_virtclass-native = ":/etc/termcap:/usr/share/misc/termcap" -EX_TERMCAP_virtclass-nativesdk = ":/etc/termcap:/usr/share/misc/termcap" -EX_TERMINFO = "" -EX_TERMINFO_virtclass-native = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" -EX_TERMINFO_virtclass-nativesdk = ":/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo" - -# Helper function for do_configure to allow multiple configurations -# $1 the directory to run configure in -# $@ the arguments to pass to configure -ncurses_configure() { - mkdir -p $1 - cd $1 - shift - oe_runconf \ - --disable-static \ - --without-debug \ - --without-ada \ - --without-gpm \ - --enable-hard-tabs \ - --enable-xmc-glitch \ - --enable-colorfgbg \ - --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap${EX_TERMCAP}' \ - --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo${EX_TERMINFO}' \ - --with-shared \ - --disable-big-core \ - --program-prefix= \ - --with-ticlib \ - --with-termlib=tinfo \ - --enable-sigwinch \ - --enable-pc-files \ - --disable-rpath-hack \ - ${EXCONFIG_ARGS} \ - --with-manpage-format=normal \ - "$@" || return 1 - cd .. -} - -# Override the function from the autotools class; ncurses requires a -# patched autoconf213 to generate the configure script. This autoconf -# is not available so that the shipped script will be used. -do_configure() { - # check does not work with cross-compiling and is generally - # broken because it requires stdin to be pollable (which is - # not the case for /dev/null redirections) - export cf_cv_working_poll=yes - - gnu-configize --force - ncurses_configure "narrowc" || \ - return 1 - ! ${ENABLE_WIDEC} || \ - ncurses_configure "widec" "--enable-widec" "--without-progs" -} - -do_compile() { - oe_runmake -C narrowc libs - oe_runmake -C narrowc/progs - - ! ${ENABLE_WIDEC} || \ - oe_runmake -C widec libs -} - -# set of expected differences between narrowc and widec header -# -# TODO: the NCURSES_CH_T difference can cause real problems :( -_unifdef_cleanup = " \ - -e '\!/\* \$Id: curses.wide,v!,\!/\* \$Id: curses.tail,v!d' \ - -e '/^#define NCURSES_CH_T /d' \ - -e '/^#include /d' \ - -e '\!^/\* .* \*/!d' \ -" - - -do_test[depends] = "unifdef-native:do_populate_sysroot" -do_test[dirs] = "${S}" -do_test() { - ${ENABLE_WIDEC} || return 0 - - # make sure that the narrow and widec header are compatible - # and differ only in minor details. - unifdef -k narrowc/include/curses.h | \ - sed ${_unifdef_cleanup} > curses-narrowc.h - unifdef -k widec/include/curses.h | \ - sed ${_unifdef_cleanup} > curses-widec.h - - diff curses-narrowc.h curses-widec.h -} - -# Split original _install_opts to two parts. -# One is the options to install contents, the other is the parameters \ -# when running command "make install" -_install_opts = "\ - install.libs install.includes install.man \ -" -_install_cfgs = "\ - DESTDIR='${D}' \ - PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ -" - -shell_do_install() { - # Order of installation is important; widec installs a 'curses.h' - # header with more definitions and must be installed last hence. - # Compatibility of these headers will be checked in 'do_test()'. - oe_runmake -C narrowc ${_install_cfgs} ${_install_opts} \ - install.progs - - # The install.data should run after install.libs, otherwise - # there would be a race issue in a very critical conditon, since - # tic will be run by install.data, and tic needs libtinfo.so - # which would be regenerated by install.libs. - oe_runmake -C narrowc ${_install_cfgs} \ - install.data - - - ! ${ENABLE_WIDEC} || \ - oe_runmake -C widec ${_install_cfgs} ${_install_opts} - - cd narrowc - - # include some basic terminfo files - # stolen ;) from gentoo and modified a bit - for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86 - do - local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)" - local basedir="$(basename $(dirname "${termfile}"))" - - if [ -n "${termfile}" ] - then - install -d ${D}${sysconfdir}/terminfo/${basedir} - mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/ - ln -s /etc/terminfo/${basedir}/${x} \ - ${D}${datadir}/terminfo/${basedir}/${x} - fi - done - # i think we can use xterm-color as default xterm - if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ] - then - ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm - fi - - rm -f ${D}${libdir}/terminfo - - # create linker scripts for libcurses.so and libncurses to - # link against -ltinfo when needed. Some builds might break - # else when '-Wl,--no-copy-dt-needed-entries' has been set in - # linker flags. - for i in libncurses libncursesw; do - f=${D}${libdir}/$i.so - test -h $f || continue - rm -f $f - echo '/* GNU ld script */' >$f - echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f - done - - # Make sure that libcurses is linked so that it gets -ltinfo - # also, this should be addressed upstream really. - ln -sf libncurses.so ${D}${libdir}/libcurses.so - - # create libtermcap.so linker script for backward compatibility - f=${D}${libdir}/libtermcap.so - echo '/* GNU ld script */' >$f - echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f - - if [ ! -d "${D}${base_libdir}" ]; then - # Setting base_libdir to libdir as is done in the -native - # case will skip this code - mkdir ${D}${base_libdir} - mv ${D}${libdir}/libncurses.so.* ${D}${base_libdir} - ! ${ENABLE_WIDEC} || \ - mv ${D}${libdir}/libncursesw.so.* ${D}${base_libdir} - - mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir} - rm ${D}${libdir}/libtinfo.so - # We'll turn this into a relative symlink after do_install returns - ln -sf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so - fi - - oe_multilib_header curses.h -} - - - -python do_install () { - bb.build.exec_func("shell_do_install", d) - oe.path.make_relative_symlink(d.expand("${D}${libdir}/libtinfo.so")) -} - -do_package_qa(){ - echo "RLM begining of do_package_qa" - echo "RLM end of do_package_qa" -} diff --git a/meta-tizen-ivi/recipes-tizen/ncurses/ncurses.inc b/meta-tizen-ivi/recipes-tizen/ncurses/ncurses.inc index fd97b02..9eb9a1e 100644 --- a/meta-tizen-ivi/recipes-tizen/ncurses/ncurses.inc +++ b/meta-tizen-ivi/recipes-tizen/ncurses/ncurses.inc @@ -32,6 +32,8 @@ SPECFILES = "packaging/ncurses.spec" SRC_URI = "" +inherit tizenBuildUtils + require ncurses-rdepends.inc require ncurses-depends.inc require ncurses-extraconf.inc diff --git a/meta-tizen-ivi/recipes-tizen/python/python-extraconf.inc b/meta-tizen-ivi/recipes-tizen/python/python-extraconf.inc index a979925..f52ff41 100644 --- a/meta-tizen-ivi/recipes-tizen/python/python-extraconf.inc +++ b/meta-tizen-ivi/recipes-tizen/python/python-extraconf.inc @@ -1,6 +1,6 @@ #inherit multilib_header pythonnative -DEPENDS += "gdbm zlib" +DEPENDS += "gdbm zlib python-native ncurses-native" SRC_URI += "\ file://01-use-proper-tools-for-cross-build.patch \ diff --git a/meta-tizen-ivi/recipes-tizen/python/python/python.spec.patch b/meta-tizen-ivi/recipes-tizen/python/python/python.spec.patch index 4b1fdf6..3fca0f4 100644 --- a/meta-tizen-ivi/recipes-tizen/python/python/python.spec.patch +++ b/meta-tizen-ivi/recipes-tizen/python/python/python.spec.patch @@ -1,22 +1,72 @@ diff --git a/packaging/python.spec b/packaging/python.spec -index 865110b..7341b2f 100644 +index 865110b..13b25c1 100644 --- a/packaging/python.spec +++ b/packaging/python.spec -@@ -100,7 +100,7 @@ rm Demo/scripts/newslist.* +@@ -99,12 +99,16 @@ rm Demo/scripts/newslist.* + %build cp %{S:1001} . export OPT="%{optflags}" - +- -autoreconf -f -i . # Modules/_ctypes/libffi -+autoreconf -Wcross --verbose -f -i . # Modules/_ctypes/libffi ++rm -f ${S}/Makefile.orig ++autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf" # prevent make from trying to rebuild asdl stuff, which requires existing # python installation touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h -@@ -112,7 +112,7 @@ touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h + ++ ++ ++ ++ + %configure \ + --docdir=%{_docdir}/python \ + --enable-ipv6 \ +@@ -112,7 +116,47 @@ touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h --enable-shared \ --enable-unicode=ucs4 -make %{?_smp_mflags} -+%{__make} %{?_smp_mflags} ++cd Lib/plat-linux2 ++include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \ ++ ${S}/Tools/scripts/h2py.py -i '(u_long)' \ ++ ${STAGING_INCDIR}/dlfcn.h \ ++ ${STAGING_INCDIR}/linux/cdrom.h \ ++ ${STAGING_INCDIR}/netinet/in.h \ ++ ${STAGING_INCDIR}/sys/types.h ++sed -e 's,${STAGING_DIR_HOST},,g' -i *.py ++cd - ++ ++sed -i -e s,ccache,'$(CCACHE)', Makefile ++# remove any bogus LD_LIBRARY_PATH ++sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile ++ ++if [ ! -f Makefile.orig ]; then ++ install -m 0644 Makefile Makefile.orig ++fi ++ ++sed -i -e 's,^LDFLAGS=.*,LDFLAGS=-L. -L${STAGING_LIBDIR},g' \ ++ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \ ++ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \ ++ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \ ++ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \ ++ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \ ++ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \ ++ Makefile ++ ++install -m 0644 Makefile Makefile.sysroot ++ ++export CROSS_COMPILE="${TARGET_PREFIX}" ++export PYTHONBUILDDIR="${S}" ++ ++ ++ ++%{__make} HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \ ++ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ ++ STAGING_LIBDIR=${STAGING_LIBDIR} \ ++ STAGING_INCDIR=${STAGING_INCDIR} \ ++ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ ++ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ ++ OPT="${CFLAGS}" %install # replace rest of /usr/local/bin/python or /usr/bin/python2.x with /usr/bin/python