summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-12-09 23:59:44 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-12-09 23:59:44 +0000
commitf4674faeaa7b2f0c3b8516f802e414fdf0a44e93 (patch)
tree123933f83c2aae777c8eab2a6a7bfb396ac87cfd
parent7b8e1efb0dd7df800da4c6caae69e26df211305d (diff)
downloadpoky-f4674faeaa7b2f0c3b8516f802e414fdf0a44e93.tar.gz
tcl: Add tcltk from OE.dev but with legacy staging function removed and converted to BBCLASSEXTEND
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/packages/tcltk/tcl/fix-configure.patch44
-rw-r--r--meta/packages/tcltk/tcl/tcl-add-soname.patch72
-rw-r--r--meta/packages/tcltk/tcl_8.4.19.bb47
3 files changed, 163 insertions, 0 deletions
diff --git a/meta/packages/tcltk/tcl/fix-configure.patch b/meta/packages/tcltk/tcl/fix-configure.patch
new file mode 100644
index 0000000000..8b2654bae0
--- /dev/null
+++ b/meta/packages/tcltk/tcl/fix-configure.patch
@@ -0,0 +1,44 @@
1Index: unix/tcl.m4
2===================================================================
3--- tcl8.4.11/unix.orig/tcl.m4
4+++ tcl8.4.11/unix/tcl.m4
5@@ -845,7 +845,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
6 # results, and the version is kept in special file).
7
8 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
9- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
10+ system=MP-RAS-`awk '{print $3}' /etc/.relid`
11 fi
12 if test "`uname -s`" = "AIX" ; then
13 system=AIX-`uname -v`.`uname -r`
14@@ -2250,7 +2250,7 @@ AC_DEFUN(SC_BLOCKING_STYLE, [
15 # results, and the version is kept in special file).
16
17 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
18- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
19+ system=MP-RAS-`awk '{print $3}' /etc/.relid`
20 fi
21 if test "`uname -s`" = "AIX" ; then
22 system=AIX-`uname -v`.`uname -r`
23Index: unix/configure
24===================================================================
25--- tcl8.4.11/unix.orig/configure
26+++ tcl8.4.11/unix/configure
27@@ -2130,7 +2130,7 @@ echo "configure:2121: checking system ve
28 # results, and the version is kept in special file).
29
30 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
31- system=MP-RAS-`awk '{print }' /etc/.relid'`
32+ system=MP-RAS-`awk '{print }' /etc/.relid`
33 fi
34 if test "`uname -s`" = "AIX" ; then
35 system=AIX-`uname -v`.`uname -r`
36@@ -7608,7 +7608,7 @@ echo "configure:7600: checking FIONBIO v
37 # results, and the version is kept in special file).
38
39 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
40- system=MP-RAS-`awk '{print }' /etc/.relid'`
41+ system=MP-RAS-`awk '{print }' /etc/.relid`
42 fi
43 if test "`uname -s`" = "AIX" ; then
44 system=AIX-`uname -v`.`uname -r`
diff --git a/meta/packages/tcltk/tcl/tcl-add-soname.patch b/meta/packages/tcltk/tcl/tcl-add-soname.patch
new file mode 100644
index 0000000000..38762644cd
--- /dev/null
+++ b/meta/packages/tcltk/tcl/tcl-add-soname.patch
@@ -0,0 +1,72 @@
1--- clean/tcl8.4.19/unix/configure 2008-04-17 21:29:49.000000000 +0100
2+++ tcl8.4.19/unix/configure 2009-11-13 11:46:36.000000000 +0000
3@@ -3065,6 +3065,7 @@
4 SHLIB_CFLAGS="-fPIC"
5 SHLIB_LD_LIBS='${LIBS}'
6 SHLIB_SUFFIX=".so"
7+ SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.so.0'
8
9 CFLAGS_OPTIMIZE=-O2
10 # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
11@@ -3072,12 +3073,15 @@
12 # get rid of the warnings.
13 #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
14
15+ # following line added by CW for Debian GNU/Linux
16+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}"
17+
18 if test "$have_dl" = yes; then
19 SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
20 DL_OBJS="tclLoadDl.o"
21 DL_LIBS="-ldl"
22 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
23- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
24+ CC_SEARCH_FLAGS=""
25 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
26 else
27 ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
28@@ -4299,7 +4303,7 @@
29
30 if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
31 LIB_SUFFIX=${SHARED_LIB_SUFFIX}
32- MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
33+ MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS} ; ln -s $(LIB_FILE) `basename $(LIB_FILE) .so.0`\${SHLIB_SUFFIX}'
34 INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
35 else
36 LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
37--- clean/tcl8.4.19/unix/tcl.m4 2008-04-17 21:29:49.000000000 +0100
38+++ tcl8.4.19/unix/tcl.m4 2009-11-13 11:53:57.000000000 +0000
39@@ -1337,6 +1337,7 @@
40 SHLIB_CFLAGS="-fPIC"
41 SHLIB_LD_LIBS='${LIBS}'
42 SHLIB_SUFFIX=".so"
43+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.0'
44
45 CFLAGS_OPTIMIZE=-O2
46 # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
47@@ -1344,12 +1345,15 @@
48 # get rid of the warnings.
49 #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
50
51+ # following line added by CW for Debian GNU/Linux
52+ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0"
53+
54 if test "$have_dl" = yes; then
55 SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
56 DL_OBJS="tclLoadDl.o"
57 DL_LIBS="-ldl"
58 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
59- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
60+ CC_SEARCH_FLAGS=""
61 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
62 else
63 AC_CHECK_HEADER(dld.h, [
64@@ -2117,7 +2121,7 @@
65
66 if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
67 LIB_SUFFIX=${SHARED_LIB_SUFFIX}
68- MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
69+ MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS} ; ln -s $(LIB_FILE) `basename $(LIB_FILE) .so.0`\${SHLIB_SUFFIX}'
70 INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
71 else
72 LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
diff --git a/meta/packages/tcltk/tcl_8.4.19.bb b/meta/packages/tcltk/tcl_8.4.19.bb
new file mode 100644
index 0000000000..33d600bc79
--- /dev/null
+++ b/meta/packages/tcltk/tcl_8.4.19.bb
@@ -0,0 +1,47 @@
1DESCRIPTION = "Tool Command Language"
2LICENSE = "tcl"
3SECTION = "devel/tcltk"
4HOMEPAGE = "http://tcl.sourceforge.net"
5PR = "r3"
6
7SRC_URI = "\
8 ${SOURCEFORGE_MIRROR}/tcl/tcl${PV}-src.tar.gz \
9 file://tcl-add-soname.patch;patch=1;pnum=2"
10
11S = "${WORKDIR}/tcl${PV}/unix"
12
13inherit autotools
14
15EXTRA_OECONF = "--enable-threads"
16
17do_configure() {
18 gnu-configize
19 oe_runconf
20}
21
22do_compile_prepend() {
23 echo > ../compat/fixstrtod.c
24}
25
26do_install() {
27 autotools_do_install
28 oe_libinstall -so libtcl8.4 ${STAGING_LIBDIR}
29 ln -sf ./tclsh8.4 ${D}${bindir}/tclsh
30 sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh
31 sed -i "s,-L${libdir},," tclConfig.sh
32 install -d ${STAGING_BINDIR_CROSS}/
33 install -m 0755 tclConfig.sh ${STAGING_BINDIR_CROSS}
34 cd ..
35 for dir in compat generic unix
36 do
37 install -d ${STAGING_INCDIR}/tcl${PV}/$dir
38 install -m 0644 $dir/*.h ${STAGING_INCDIR}/tcl${PV}/$dir/
39 done
40}
41
42PACKAGES =+ "${PN}-lib"
43FILES_${PN}-lib = "${libdir}/libtcl8.4.so.*"
44FILES_${PN} += "${libdir}/tcl8.4"
45FILES_${PN}-dev += "${libdir}/tclConfig.sh"
46
47BBCLASSEXTEND = "native"