diff -udbBPr --exclude='*~' /home/moko/openembedded/packages/tcltk/files/tclx-add-soname.patch tcltk/files/tclx-add-soname.patch --- /home/moko/openembedded/packages/tcltk/files/tclx-add-soname.patch 1970-01-01 01:00:00.000000000 +0100 +++ tcltk/files/tclx-add-soname.patch 2008-01-20 11:09:05.000000000 +0100 @@ -0,0 +1,12 @@ +diff -udbBPr --exclude='*~' -ur tclx8.4-orig/tclconfig/tcl.m4 tclx8.4/tclconfig/tcl.m4 +--- tclx8.4-orig/tclconfig/tcl.m4 2005-11-21 19:54:51.000000000 +0100 ++++ tclx8.4/tclconfig/tcl.m4 2008-01-20 11:04:16.000000000 +0100 +@@ -1332,7 +1332,7 @@ + #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + + if test "$have_dl" = yes; then +- SHLIB_LD="${CC} -shared" ++ SHLIB_LD='${CC} -shared -Wl,-soname,${@}' + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" diff -udbBPr --exclude='*~' /home/moko/openembedded/packages/tcltk/README tcltk/README --- /home/moko/openembedded/packages/tcltk/README 1970-01-01 01:00:00.000000000 +0100 +++ tcltk/README 2008-01-20 15:52:26.000000000 +0100 @@ -0,0 +1,44 @@ +---------------------------------------------------------------------------------------- +* tclx: +the "times" test in configure has been removed (helpful to know if the cpu returns a status or the elapsed real time). + +openmoko returns the elapsed real time. + +For another target, does qemu could help to pass this test? + +These lines: + + #------------------------------------------------------------------------- + # Test to see if "times" returns a status or the amount of elapsed real + # time. + #------------------------------------------------------------------------- + + echo "$as_me:$LINENO: checking checking to see what 'times' returns" >&5 +echo $ECHO_N "checking checking to see what 'times' returns... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cross-compiling not supported" >&5 +echo "$as_me: error: cross-compiling not supported" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +main() { + struct tms cpu; + times(&cpu); + sleep(2); + exit ((times(&cpu) > 0) ? 0 : 1); +} + +_ACEOF + +... + + +---------------------------------------------------------------------------------------- diff -udbBPr --exclude='*~' /home/moko/openembedded/packages/tcltk/tcl_8.4.11.bb tcltk/tcl_8.4.11.bb --- /home/moko/openembedded/packages/tcltk/tcl_8.4.11.bb 2007-10-01 23:41:38.000000000 +0200 +++ tcltk/tcl_8.4.11.bb 2008-01-29 16:47:55.000000000 +0100 @@ -2,7 +2,7 @@ LICENSE = "tcl" SECTION = "devel/tcltk" HOMEPAGE = "http://tcl.sourceforge.net" -PR = "r5" +PR = "r6" SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/tcl${PV}-src.tar.gz \ file://tcl-add-soname.patch;patch=1 \ @@ -29,6 +29,7 @@ sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh install -d ${STAGING_BINDIR_CROSS}/ install -m 0755 tclConfig.sh ${STAGING_BINDIR_CROSS} + install -m 0644 tcl.m4 ${STAGING_BINDIR_CROSS} cd .. for dir in compat generic unix do @@ -44,6 +45,24 @@ autotools_do_install oe_libinstall -so libtcl8.4 ${D}${libdir} ln -sf ./tclsh8.4 ${D}${bindir}/tclsh + + for dir in compat generic unix + do + DEST=${D}${includedir}/tcl8.4/$dir + install -d $DEST + install -m 0644 ${WORKDIR}/${PN}${PV}/$dir/*.h $DEST + done + + dir=unix + DEST=${D}${libdir}/tcl8.4 + install -d $DEST + for file in tclConfig.sh tcl.m4 + do + install -m 0644 ${WORKDIR}/${PN}${PV}/$dir/$file $DEST + done } +FILES_${PN}-dev += "${includedir}/tcl8.4/compat ${includedir}/tcl8.4/generic ${includedir}/tcl8.4/unix ${libdir}/tcl8.4/tclConfig.sh ${libdir}/tcl8.4/tcl.m4" + FILES_${PN} += "${libdir}/tcl8.4 ${libdir}/libtcl8.4.so" + Les fichiers binaires /home/moko/openembedded/packages/tcltk/tclx/conftest et tcltk/tclx/conftest sont différents. diff -udbBPr --exclude='*~' /home/moko/openembedded/packages/tcltk/tclx/conftest.c tcltk/tclx/conftest.c --- /home/moko/openembedded/packages/tcltk/tclx/conftest.c 1970-01-01 01:00:00.000000000 +0100 +++ tcltk/tclx/conftest.c 2008-01-29 21:30:06.000000000 +0100 @@ -0,0 +1,9 @@ +#include +#include +#include +main() { + struct tms cpu; + times(&cpu); + sleep(2); + exit ((times(&cpu) > 0) ? 0 : 1); +} diff -udbBPr --exclude='*~' /home/moko/openembedded/packages/tcltk/tclx/fix-configure-tclx.patch tcltk/tclx/fix-configure-tclx.patch --- /home/moko/openembedded/packages/tcltk/tclx/fix-configure-tclx.patch 1970-01-01 01:00:00.000000000 +0100 +++ tcltk/tclx/fix-configure-tclx.patch 2008-01-20 11:20:56.000000000 +0100 @@ -0,0 +1,33 @@ +diff -udbBPr --exclude='*~' -ur tclx8.4/configure tclx8.4-fix-configure/configure +--- tclx8.4/configure 2005-10-08 01:17:50.000000000 +0200 ++++ tclx8.4-fix-configure/configure 2008-01-20 11:18:58.000000000 +0100 +@@ -6999,7 +6999,7 @@ + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then +- system=MP-RAS-`awk '{print }' /etc/.relid'` ++ system=MP-RAS-`awk '{print }' /etc/.relid` + fi + if test "`uname -s`" = "AIX" ; then + system=AIX-`uname -v`.`uname -r` +diff -udbBPr --exclude='*~' -ur tclx8.4/tclconfig/tcl.m4 tclx8.4-fix-configure/tclconfig/tcl.m4 +--- tclx8.4/tclconfig/tcl.m4 2008-01-20 11:04:16.000000000 +0100 ++++ tclx8.4-fix-configure/tclconfig/tcl.m4 2008-01-20 11:16:15.000000000 +0100 +@@ -859,7 +859,7 @@ + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then +- system=MP-RAS-`awk '{print $3}' /etc/.relid'` ++ system=MP-RAS-`awk '{print $3}' /etc/.relid` + fi + if test "`uname -s`" = "AIX" ; then + system=AIX-`uname -v`.`uname -r` +@@ -2302,7 +2302,7 @@ + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then +- system=MP-RAS-`awk '{print $3}' /etc/.relid'` ++ system=MP-RAS-`awk '{print $3}' /etc/.relid` + fi + if test "`uname -s`" = "AIX" ; then + system=AIX-`uname -v`.`uname -r` diff -udbBPr --exclude='*~' /home/moko/openembedded/packages/tcltk/tclx/no-time-test.patch tcltk/tclx/no-time-test.patch --- /home/moko/openembedded/packages/tcltk/tclx/no-time-test.patch 1970-01-01 01:00:00.000000000 +0100 +++ tcltk/tclx/no-time-test.patch 2008-01-20 15:45:59.000000000 +0100 @@ -0,0 +1,119 @@ +diff -udbBPr --exclude='*~' tclx8.4-fix-configure/configure tclx8.4-no-times-test/configure +--- tclx8.4-fix-configure/configure 2008-01-20 11:18:58.000000000 +0100 ++++ tclx8.4-no-times-test/configure 2008-01-20 15:45:28.000000000 +0100 +@@ -11133,63 +11133,63 @@ + + fi + +- #------------------------------------------------------------------------- +- # Test to see if "times" returns a status or the amount of elapsed real +- # time. +- #------------------------------------------------------------------------- ++# #------------------------------------------------------------------------- ++# # Test to see if "times" returns a status or the amount of elapsed real ++# # time. ++# #------------------------------------------------------------------------- + +- echo "$as_me:$LINENO: checking checking to see what 'times' returns" >&5 +-echo $ECHO_N "checking checking to see what 'times' returns... $ECHO_C" >&6 +- if test "$cross_compiling" = yes; then +- { { echo "$as_me:$LINENO: error: cross-compiling not supported" >&5 +-echo "$as_me: error: cross-compiling not supported" >&2;} +- { (exit 1); exit 1; }; } +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++# echo "$as_me:$LINENO: checking checking to see what 'times' returns" >&5 ++# echo $ECHO_N "checking checking to see what 'times' returns... $ECHO_C" >&6 ++# if test "$cross_compiling" = yes; then ++# { { echo "$as_me:$LINENO: error: cross-compiling not supported" >&5 ++# echo "$as_me: error: cross-compiling not supported" >&2;} ++# { (exit 1); exit 1; }; } ++# else ++# cat >conftest.$ac_ext <<_ACEOF ++# /* confdefs.h. */ ++# _ACEOF ++# cat confdefs.h >>conftest.$ac_ext ++# cat >>conftest.$ac_ext <<_ACEOF ++# /* end confdefs.h. */ + +-#include +-#include +-main() { +- struct tms cpu; +- times(&cpu); +- sleep(2); +- exit ((times(&cpu) > 0) ? 0 : 1); +-} ++# #include ++# #include ++# main() { ++# struct tms cpu; ++# times(&cpu); ++# sleep(2); ++# exit ((times(&cpu) > 0) ? 0 : 1); ++# } + +-_ACEOF +-rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- echo "$as_me:$LINENO: result: elapsed real time" >&5 +-echo "${ECHO_T}elapsed real time" >&6 +-else +- echo "$as_me: program exited with status $ac_status" >&5 +-echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++# _ACEOF ++# rm -f conftest$ac_exeext ++# if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++# (eval $ac_link) 2>&5 ++# ac_status=$? ++# echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++# (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++# { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++# (eval $ac_try) 2>&5 ++# ac_status=$? ++# echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++# (exit $ac_status); }; }; then ++# echo "$as_me:$LINENO: result: elapsed real time" >&5 ++# echo "${ECHO_T}elapsed real time" >&6 ++# else ++# echo "$as_me: program exited with status $ac_status" >&5 ++# echo "$as_me: failed program was:" >&5 ++# sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-echo "$as_me:$LINENO: result: a status" >&5 +-echo "${ECHO_T}a status" >&6 +- cat >>confdefs.h <<\_ACEOF +-#define TIMES_RETS_STATUS 1 +-_ACEOF ++# ( exit $ac_status ) ++# echo "$as_me:$LINENO: result: a status" >&5 ++# echo "${ECHO_T}a status" >&6 ++# cat >>confdefs.h <<\_ACEOF ++# #define TIMES_RETS_STATUS 1 ++# _ACEOF + +-fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi ++# fi ++# rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++# fi + + #------------------------------------------------------------------------- + # Check for missing typedefs. diff -udbBPr --exclude='*~' /home/moko/openembedded/packages/tcltk/tclx_8.4.bb tcltk/tclx_8.4.bb --- /home/moko/openembedded/packages/tcltk/tclx_8.4.bb 1970-01-01 01:00:00.000000000 +0100 +++ tcltk/tclx_8.4.bb 2008-01-29 16:49:11.000000000 +0100 @@ -0,0 +1,39 @@ +DESCRIPTION = "Extended Tcl (TclX) - shared library" +LICENSE = "tcl" +SECTION = "devel/tcltk" +#DEPENDS += "qemu-native" +HOMEPAGE = "http://tclx.sourceforge.net" +PR = "r0" + +SRC_URI = "${SOURCEFORGE_MIRROR}/tclx/tclx${PV}.tar.bz2 \ + file://tclx-add-soname.patch \ + file://fix-configure-tclx.patch \ + file://no-time-test.patch" + +S = "${WORKDIR}/tclx${PV}" + +inherit autotools + +EXTRA_OECONF = "--with-tcl=${STAGING_BINDIR_CROSS}" + +do_patch() { + PWD1=$PWD + cd ${WORKDIR}/tclx${PV} + patch -p1 < ${WORKDIR}/tclx-add-soname.patch + patch -p1 < ${WORKDIR}/fix-configure-tclx.patch + patch -p1 < ${WORKDIR}/no-time-test.patch + cd $PWD1 +} + +do_configure () { + gnu-configize + oe_runconf +} + +do_install() { + autotools_do_install + oe_libinstall -so libtclx8.4 ${D}${libdir} +} + +FILES_${PN}-dbg += "${libdir}/tclx8.4/.debug" +FILES_${PN} += "${libdir}/tclx8.4 ${libdir}/libtclx8.4.so"