summaryrefslogtreecommitdiff
path: root/recipes/tcltk/tcl_8.5.8.bb
blob: 2209ca4948e3f5d3dfa678f88c477426aa08b227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
DESCRIPTION = "Tool Command Language"
LICENSE = "tcl"
SECTION = "devel/tcltk"
HOMEPAGE = "http://tcl.sourceforge.net"

PR = "r6"

SRC_URI = "\
  ${SOURCEFORGE_MIRROR}/tcl/tcl${PV}-src.tar.gz \
  file://confsearch.diff;striplevel=2 \
  file://manpages.diff;striplevel=2 \
  file://non-linux.diff;striplevel=2 \
  file://rpath.diff;striplevel=2 \
  file://tcllibrary.diff;striplevel=2 \
  file://tclpackagepath.diff;striplevel=2 \
  file://tclprivate.diff;striplevel=2 \
"

SRC_URI[md5sum] = "7f123e53b3daaaba2478d3af5a0752e3"
SRC_URI[sha256sum] = "6b090c1024038d0381e1ccfbd6d5c0f0e6ef205269ceb9d28bd7bd7ac5bbf4a7"

S = "${WORKDIR}/tcl${PV}/unix"

inherit autotools binconfig

EXTRA_OECONF = "--enable-threads"

do_compile_prepend() {
	echo > ../compat/fixstrtod.c
	sed -i -e 's:./tclsh :tclsh :g' Makefile
}

BINCONFIG_GLOB = "*Config.sh"

do_install() {
	autotools_do_install
	# Stage a few extra headers to make tk happy
	install -d ${D}${includedir}/tcl-${PV}/generic
	install -m 0644 ../generic/*.h ${D}${includedir}/tcl-${PV}/generic
	install -m 0644 *.h ${D}${includedir}/tcl-${PV}/generic
	install -d ${D}${includedir}/tcl-${PV}/unix
	install -m 0644 *Unix*.h ${D}${includedir}/tcl-${PV}/unix/
	rm -f ${D}${includedir}/regex.h
	ln -sf tclsh8.5 ${D}${bindir}/tclsh
}

SYSROOT_PREPROCESS_FUNCS =+ "tcl_sysroot"

tcl_sysroot() {
	sed -i 's:/usr/include/tcl-private:${STAGING_INCDIR}/tcl-${PV}:' tclConfig.sh
}

PACKAGES =+ "${PN}-lib"
FILES_${PN}-lib = "${libdir}/libtcl8.5.so.*"
FILES_${PN} += "${libdir}/tcl*"
FILES_${PN}-dev += "${libdir}/tclConfig.sh"