2006-12-19 00:17:57 +01:00
|
|
|
#
|
2011-05-04 13:43:00 +02:00
|
|
|
# spec file for package tcl
|
2006-12-19 00:17:57 +01:00
|
|
|
#
|
2024-02-08 17:46:23 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2006-12-19 00:17:57 +01:00
|
|
|
#
|
2008-09-13 12:21:34 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-12 17:56:51 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:17:57 +01:00
|
|
|
#
|
|
|
|
|
2011-12-21 14:31:14 +01:00
|
|
|
|
2021-11-23 18:12:45 +01:00
|
|
|
%if 0%{!?_rpmmacrodir:1}
|
|
|
|
%define _rpmmacrodir %{_rpmconfigdir}/macros.d
|
|
|
|
%endif
|
|
|
|
|
2006-12-19 00:17:57 +01:00
|
|
|
Name: tcl
|
2019-12-03 14:53:43 +01:00
|
|
|
URL: http://www.tcl.tk
|
2024-02-08 17:46:23 +01:00
|
|
|
Version: 8.6.14
|
2011-12-21 12:20:09 +01:00
|
|
|
Release: 0
|
2024-02-08 17:46:23 +01:00
|
|
|
%define rrc %{nil}rc0
|
2008-04-06 04:00:20 +02:00
|
|
|
%define TCL_MINOR %(echo %version | cut -c1-3)
|
2024-02-08 17:46:23 +01:00
|
|
|
%define itclver 4.2.4
|
2006-12-19 00:17:57 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Summary: The Tcl Programming Language
|
2014-09-06 12:11:32 +02:00
|
|
|
License: TCL
|
2006-12-19 00:17:57 +01:00
|
|
|
Group: Development/Languages/Tcl
|
2017-12-29 21:37:36 +01:00
|
|
|
Provides: itcl = %itclver
|
2017-09-13 13:10:57 +02:00
|
|
|
Provides: tclsh
|
|
|
|
Provides: tclsh%{TCL_MINOR}
|
2017-12-29 21:37:36 +01:00
|
|
|
Obsoletes: itcl < %itclver
|
2022-03-29 14:51:58 +02:00
|
|
|
# Require the extension from the SQLite package instead of shipping
|
|
|
|
# the embedded copy, which might be outdated.
|
|
|
|
Requires: sqlite3-tcl
|
2017-09-13 13:10:57 +02:00
|
|
|
# bug437293
|
2009-01-09 02:04:18 +01:00
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: tcl-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2008-04-06 04:00:20 +02:00
|
|
|
PreReq: /bin/rm
|
2021-01-04 19:35:59 +01:00
|
|
|
Source0: http://prdownloads.sourceforge.net/tcl/%{name}%{version}%{rrc}-src.tar.gz
|
2008-04-06 04:00:20 +02:00
|
|
|
Source1: tcl-rpmlintrc
|
|
|
|
Source2: baselibs.conf
|
2008-04-09 00:53:39 +02:00
|
|
|
Source3: macros.tcl
|
2011-12-21 12:20:09 +01:00
|
|
|
BuildRequires: autoconf
|
2013-06-20 14:20:40 +02:00
|
|
|
BuildRequires: pkg-config
|
2017-08-11 10:06:48 +02:00
|
|
|
BuildRequires: zlib-devel
|
2012-11-26 10:38:42 +01:00
|
|
|
# Required for test suite:
|
|
|
|
BuildRequires: timezone
|
2006-12-19 00:17:57 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Tcl (Tool Command Language) is a very powerful but easy to learn
|
|
|
|
dynamic programming language, suitable for a very wide range of uses,
|
|
|
|
including web and desktop applications, networking, administration,
|
|
|
|
testing and many more. Open source and business-friendly, Tcl is a
|
|
|
|
mature yet evolving language that is truly cross platform, easily
|
|
|
|
deployed and highly extensible.
|
|
|
|
|
|
|
|
For more information on Tcl see http://www.tcl.tk and
|
|
|
|
http://wiki.tcl.tk .
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Header Files and C API Documentation for Tcl
|
2011-12-21 12:20:09 +01:00
|
|
|
Group: Development/Libraries/Tcl
|
2006-12-19 00:17:57 +01:00
|
|
|
Requires: tcl = %version
|
2009-01-09 02:04:18 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: tcl-devel-64bit
|
|
|
|
%endif
|
2017-12-29 21:37:36 +01:00
|
|
|
Obsoletes: itcl-devel < %itclver
|
|
|
|
Provides: itcl-devel = %itclver
|
2009-01-09 02:04:18 +01:00
|
|
|
#
|
2006-12-19 00:17:57 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains header files and documentation needed for writing
|
|
|
|
Tcl extensions in compiled languages like C, C++, etc., or for
|
|
|
|
embedding the Tcl interpreter in programs written in such languages.
|
|
|
|
|
|
|
|
This package is not needed for writing extensions or applications in
|
|
|
|
the Tcl language itself.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %name%version
|
2021-11-09 18:26:43 +01:00
|
|
|
if ! test -d pkgs/itcl%itclver; then
|
2024-02-08 17:46:23 +01:00
|
|
|
: New itcl version: pkgs/itcl* . Please update the %%itclver macro acordingly.
|
2021-11-09 18:26:43 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
2006-12-19 00:17:57 +01:00
|
|
|
|
2022-03-29 14:51:58 +02:00
|
|
|
# The SQLite extension is provided by the sqlite3 package,
|
|
|
|
# so don't build it here.
|
|
|
|
rm -r pkgs/sqlite3.*
|
|
|
|
|
2006-12-19 00:17:57 +01:00
|
|
|
%build
|
2019-07-01 10:41:39 +02:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2021-01-14 13:28:25 +01:00
|
|
|
%define scriptdir %_libdir/tcl
|
|
|
|
export TCL_PACKAGE_PATH="%scriptdir %_datadir/tcl"
|
|
|
|
export TCL_LIBRARY="%scriptdir/tcl%TCL_MINOR"
|
2008-04-06 04:00:20 +02:00
|
|
|
cd unix
|
2011-06-30 18:48:52 +02:00
|
|
|
autoconf
|
2008-04-06 04:00:20 +02:00
|
|
|
%configure \
|
2006-12-19 00:17:57 +01:00
|
|
|
--enable-man-symlinks \
|
2013-06-20 14:20:40 +02:00
|
|
|
--enable-man-compression=gzip \
|
|
|
|
--without-tzdata
|
|
|
|
make %{?_smp_mflags} \
|
2021-01-14 13:28:25 +01:00
|
|
|
PACKAGE_DIR="%scriptdir"
|
2013-06-20 14:20:40 +02:00
|
|
|
|
|
|
|
%check
|
2016-07-26 18:52:12 +02:00
|
|
|
cd unix
|
2008-04-06 04:00:20 +02:00
|
|
|
# Some of the regressioin tests write to $HOME, so better redirect them
|
|
|
|
mkdir home
|
|
|
|
export HOME=$PWD/home
|
2008-04-14 05:10:51 +02:00
|
|
|
# Run the testsuite to gather some data for the profile-based
|
|
|
|
# optimisation and let rpmbuild fail on unexpected test failures.
|
|
|
|
cat > known-failures <<EOF
|
2017-09-25 18:07:28 +02:00
|
|
|
async-4.2
|
|
|
|
async-4.3
|
|
|
|
chan-17.4
|
|
|
|
chan-io-53.9
|
|
|
|
clock-33.5a
|
|
|
|
clock-33.8
|
|
|
|
clock-33.8a
|
|
|
|
event-7.5
|
|
|
|
event-11.4
|
|
|
|
event-12.4
|
|
|
|
exec-19.1
|
2017-12-14 09:49:05 +01:00
|
|
|
http-3.25
|
|
|
|
interp-34.9
|
|
|
|
interp-34.13
|
2017-09-25 18:07:28 +02:00
|
|
|
interp-36.7
|
|
|
|
io-53.9
|
|
|
|
msgcat-14.2
|
|
|
|
socket_inet6-2.13
|
|
|
|
timer-1.1
|
2017-12-14 09:49:05 +01:00
|
|
|
timer-2.1
|
2017-09-25 18:07:28 +02:00
|
|
|
timer-3.2
|
|
|
|
timer-6.4
|
|
|
|
timer-6.5
|
|
|
|
thread-7.24
|
|
|
|
thread-7.25
|
|
|
|
thread-7.28
|
|
|
|
thread-7.29
|
|
|
|
thread-7.30
|
|
|
|
thread-7.31
|
2017-12-14 09:49:05 +01:00
|
|
|
thread-20.9
|
2017-09-25 18:07:28 +02:00
|
|
|
thread-21.16
|
2019-07-22 12:31:05 +02:00
|
|
|
%ifarch riscv64
|
|
|
|
binary-40.3
|
|
|
|
%endif
|
2022-09-26 15:16:27 +02:00
|
|
|
%if 0%{?qemu_user_space_build}
|
2022-09-26 09:05:21 +02:00
|
|
|
socket-14.15
|
|
|
|
thread-16.2
|
|
|
|
%endif
|
2008-04-14 05:10:51 +02:00
|
|
|
EOF
|
2018-03-15 16:04:33 +01:00
|
|
|
%ifnarch s390 s390x
|
2013-06-20 14:20:40 +02:00
|
|
|
make test 2>&1 | tee testresults
|
2017-09-25 18:07:28 +02:00
|
|
|
grep FAILED testresults | grep -Fvwf known-failures && exit 1
|
2009-08-06 17:01:21 +02:00
|
|
|
%endif
|
2018-12-12 17:56:51 +01:00
|
|
|
exit 0
|
2006-12-19 00:17:57 +01:00
|
|
|
|
|
|
|
%install
|
2009-06-19 02:52:13 +02:00
|
|
|
make -C unix install install-private-headers \
|
2021-01-14 13:28:25 +01:00
|
|
|
INSTALL_ROOT=%buildroot
|
2008-04-06 04:00:20 +02:00
|
|
|
rm -f %buildroot%scriptdir/tcl%TCL_MINOR/ldAix
|
|
|
|
ln -sf tclsh%TCL_MINOR %buildroot%_prefix/bin/tclsh
|
2020-11-20 10:15:24 +01:00
|
|
|
ln -sf tclsh.1.gz %buildroot%_mandir/man1/tclsh%TCL_MINOR.1.gz
|
2008-04-06 04:00:20 +02:00
|
|
|
mkdir -p %buildroot%_datadir/tcl
|
2021-05-05 20:48:10 +02:00
|
|
|
install -D %{S:3} -m 644 %buildroot%_rpmmacrodir/macros.tcl
|
2021-11-23 18:14:37 +01:00
|
|
|
|
2021-11-23 18:14:04 +01:00
|
|
|
# The information in TCL_LIBS is not needed for shared libraries
|
|
|
|
# and we don't support static linking.
|
|
|
|
sed -i "/^TCL_LIBS=/s/'.*'$//" %buildroot%_libdir/tclConfig.sh
|
|
|
|
sed -i "/^Libs.private: /s/ .*$//" %buildroot%_libdir/pkgconfig/tcl.pc
|
2021-11-23 18:14:37 +01:00
|
|
|
|
2020-10-12 15:23:47 +02:00
|
|
|
%if "%_lib" == "lib64"
|
2006-12-19 00:17:57 +01:00
|
|
|
%post
|
2008-04-06 04:00:20 +02:00
|
|
|
test -L /usr/lib/tcl%TCL_MINOR && /bin/rm -f /usr/lib/tcl%TCL_MINOR
|
2006-12-19 00:17:57 +01:00
|
|
|
exit 0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,755)
|
2019-12-03 14:53:43 +01:00
|
|
|
%doc README.md changes license.terms ChangeLog*
|
2006-12-19 00:17:57 +01:00
|
|
|
%docdir %_mandir/mann
|
|
|
|
%doc %_mandir/man1/*
|
|
|
|
%doc %_mandir/mann/*
|
|
|
|
%_prefix/bin/*
|
2008-04-06 04:00:20 +02:00
|
|
|
%_libdir/lib*.so
|
|
|
|
%_datadir/tcl
|
|
|
|
%scriptdir
|
2013-06-20 14:20:40 +02:00
|
|
|
%exclude %scriptdir/*/*.a
|
|
|
|
%exclude %scriptdir/*/*Config.sh
|
2008-04-06 04:00:20 +02:00
|
|
|
%exclude %scriptdir/*/tclAppInit.c
|
2021-05-05 20:48:10 +02:00
|
|
|
%_rpmmacrodir/macros.tcl
|
2006-12-19 00:17:57 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %_mandir/man3/*
|
|
|
|
%_includedir/*
|
2008-04-06 04:00:20 +02:00
|
|
|
%scriptdir/*/tclAppInit.c
|
2013-06-20 14:20:40 +02:00
|
|
|
%attr(0644,root,root) %_libdir/*.a
|
|
|
|
%attr(0644,root,root) %scriptdir/*/*.a
|
|
|
|
%scriptdir/*/*Config.sh
|
|
|
|
%_libdir/*Config.sh
|
|
|
|
%_libdir/pkgconfig/*
|
2006-12-19 00:17:57 +01:00
|
|
|
|
2007-06-07 13:16:22 +02:00
|
|
|
%changelog
|