xref: /OK3568_Linux_fs/buildroot/package/tcl/tcl.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# tcl
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunTCL_VERSION_MAJOR = 8.6
8*4882a593SmuzhiyunTCL_VERSION = $(TCL_VERSION_MAJOR).9
9*4882a593SmuzhiyunTCL_SOURCE = tcl$(TCL_VERSION)-src.tar.gz
10*4882a593SmuzhiyunTCL_SITE = http://downloads.sourceforge.net/project/tcl/Tcl/$(TCL_VERSION)
11*4882a593SmuzhiyunTCL_LICENSE = TCL
12*4882a593SmuzhiyunTCL_LICENSE_FILES = license.terms
13*4882a593SmuzhiyunTCL_CPE_ID_VENDOR = tcl
14*4882a593SmuzhiyunTCL_SUBDIR = unix
15*4882a593SmuzhiyunTCL_INSTALL_STAGING = YES
16*4882a593SmuzhiyunTCL_AUTORECONF = YES
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunTCL_CONF_OPTS = \
19*4882a593Smuzhiyun	--disable-symbols \
20*4882a593Smuzhiyun	--disable-langinfo \
21*4882a593Smuzhiyun	--disable-framework
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunHOST_TCL_CONF_OPTS = \
24*4882a593Smuzhiyun	--disable-symbols \
25*4882a593Smuzhiyun	--disable-langinfo \
26*4882a593Smuzhiyun	--disable-framework
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun# I haven't found a good way to force pkgs to not build
29*4882a593Smuzhiyun# or configure without just removing the entire pkg directory.
30*4882a593Smuzhiyundefine HOST_TCL_REMOVE_PACKAGES
31*4882a593Smuzhiyun	rm -fr $(@D)/pkgs/sqlite3* $(@D)/pkgs/tdbc*
32*4882a593Smuzhiyunendef
33*4882a593SmuzhiyunHOST_TCL_PRE_CONFIGURE_HOOKS += HOST_TCL_REMOVE_PACKAGES
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun# We remove the bundled sqlite as we prefer to not use bundled stuff at all.
36*4882a593Smuzhiyundefine TCL_REMOVE_PACKAGES
37*4882a593Smuzhiyun	rm -fr $(@D)/pkgs/sqlite3* \
38*4882a593Smuzhiyun		$(if $(BR2_PACKAGE_MYSQL),,$(@D)/pkgs/tdbcmysql*) \
39*4882a593Smuzhiyun		$(@D)/pkgs/tdbcodbc* \
40*4882a593Smuzhiyun		$(if $(BR2_PACKAGE_POSTGRESQL),,$(@D)/pkgs/tdbcpostgres*) \
41*4882a593Smuzhiyun		$(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbcsqlite3*)
42*4882a593Smuzhiyunendef
43*4882a593SmuzhiyunTCL_PRE_CONFIGURE_HOOKS += TCL_REMOVE_PACKAGES
44*4882a593Smuzhiyun
45*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_TCL_DEL_ENCODINGS),y)
46*4882a593Smuzhiyundefine TCL_REMOVE_ENCODINGS
47*4882a593Smuzhiyun	rm -rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*
48*4882a593Smuzhiyunendef
49*4882a593SmuzhiyunTCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_ENCODINGS
50*4882a593Smuzhiyunendif
51*4882a593Smuzhiyun
52*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_TCL_SHLIB_ONLY),y)
53*4882a593Smuzhiyundefine TCL_REMOVE_TCLSH
54*4882a593Smuzhiyun	rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR)
55*4882a593Smuzhiyunendef
56*4882a593SmuzhiyunTCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_TCLSH
57*4882a593Smuzhiyunelse
58*4882a593Smuzhiyundefine TCL_SYMLINK_TCLSH
59*4882a593Smuzhiyun	ln -sf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh
60*4882a593Smuzhiyunendef
61*4882a593SmuzhiyunTCL_POST_INSTALL_TARGET_HOOKS += TCL_SYMLINK_TCLSH
62*4882a593Smuzhiyunendif
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun# Until someone needs it, we don't handle locale installation.  tcl has
65*4882a593Smuzhiyun# a complicated method of translating LANG-style locale names into its internal
66*4882a593Smuzhiyun# .msg name which makes it difficult to save the correct locales per the
67*4882a593Smuzhiyun# configured whitelist.
68*4882a593Smuzhiyundefine TCL_REMOVE_EXTRA
69*4882a593Smuzhiyun	rm -fr $(TARGET_DIR)/usr/lib/tclConfig.sh \
70*4882a593Smuzhiyun		$(TARGET_DIR)/usr/lib/tclooConfig.sh \
71*4882a593Smuzhiyun		$(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/tclAppInit.c \
72*4882a593Smuzhiyun		$(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/msgs
73*4882a593Smuzhiyunendef
74*4882a593SmuzhiyunTCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_EXTRA
75*4882a593Smuzhiyun
76*4882a593SmuzhiyunTCL_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite) \
77*4882a593Smuzhiyun	$(if $(BR2_PACKAGE_MYSQL),mysql) \
78*4882a593Smuzhiyun	$(if $(BR2_PACKAGE_POSTGRESQL),postgresql)
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun$(eval $(autotools-package))
81*4882a593Smuzhiyun$(eval $(host-autotools-package))
82