2000e1da2d
- cross-build fix: use %__cc macro OBS-URL: https://build.opensuse.org/request/show/86661 OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=44
175 lines
4.6 KiB
RPMSpec
175 lines
4.6 KiB
RPMSpec
#
|
|
# spec file for package tcl
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: tcl
|
|
Url: http://www.tcl.tk
|
|
Version: 8.5.10
|
|
Release: 1
|
|
%define TCL_MINOR %(echo %version | cut -c1-3)
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Summary: The Tcl Programming Language
|
|
License: BSD3c(or similar)
|
|
Group: Development/Languages/Tcl
|
|
AutoReqProv: on
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: tcl-64bit
|
|
%endif
|
|
#
|
|
Provides: tclsh tclsh%{TCL_MINOR}
|
|
PreReq: /bin/rm
|
|
Source0: %name%{version}-src.tar.bz2
|
|
Source1: tcl-rpmlintrc
|
|
Source2: baselibs.conf
|
|
Source3: macros.tcl
|
|
Patch0: tcl.patch
|
|
Patch1: tcl-unload.patch
|
|
Patch2: tcl-stack.patch
|
|
|
|
%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 .
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
The Tcl Core Team <tcl-core@lists.sourceforge.net>
|
|
|
|
%package devel
|
|
Group: Development/Libraries/Tcl
|
|
License: BSD3c(or similar)
|
|
Summary: Header Files and C API Documentation for Tcl
|
|
Requires: tcl = %version
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: tcl-devel-64bit
|
|
%endif
|
|
#
|
|
|
|
%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.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
The Tcl Core Team <tcl-core@lists.sourceforge.net>
|
|
|
|
%prep
|
|
%setup -q -n %name%version
|
|
%patch0
|
|
%patch1
|
|
%patch2
|
|
|
|
%build
|
|
cd unix
|
|
autoconf
|
|
%configure \
|
|
--enable-man-symlinks \
|
|
--enable-man-compression=gzip
|
|
%define scriptdir %_libdir/tcl
|
|
MAKE='make %{?jobs:-j%jobs}
|
|
TCL_LIBRARY="%scriptdir/tcl%TCL_MINOR"
|
|
TCL_PACKAGE_PATH="%_libdir/tcl %_datadir/tcl"
|
|
%ifnarch hppa
|
|
CFLAGS="%optflags $PFLAGS"
|
|
%else
|
|
CFLAGS="%optflags $PFLAGS -DTCL_NO_STACK_CHECK=1"
|
|
%endif
|
|
LDFLAGS_OPTIMIZE="%optflags $PFLAGS"
|
|
SHLIB_LD="%__cc -shared %optflags $PFLAGS"'
|
|
# Build with instrumentation for profiling
|
|
PFLAGS="%{?cflags_profile_generate}"
|
|
eval $MAKE
|
|
# Some of the regressioin tests write to $HOME, so better redirect them
|
|
mkdir home
|
|
export HOME=$PWD/home
|
|
# Run the testsuite to gather some data for the profile-based
|
|
# optimisation and let rpmbuild fail on unexpected test failures.
|
|
cat > known-failures <<EOF
|
|
httpold-4.12
|
|
mathop-25.14
|
|
EOF
|
|
%ifnarch %arm
|
|
eval $MAKE test 2>&1 | tee testresults
|
|
grep FAILED testresults | grep -Fqvwf known-failures && exit 1
|
|
%endif
|
|
# If we don't do profile based optimisation, we are done at this point.
|
|
if test -n "$PFLAGS"; then
|
|
# Rebuild and use the profiling results
|
|
make clean
|
|
PFLAGS="%cflags_profile_feedback"
|
|
eval $MAKE
|
|
fi
|
|
|
|
%install
|
|
make -C unix install install-private-headers \
|
|
INSTALL_ROOT=%buildroot \
|
|
TCL_LIBRARY="%scriptdir/tcl%TCL_MINOR"
|
|
rm -f %buildroot%scriptdir/tcl%TCL_MINOR/ldAix
|
|
ln -sf tclsh%TCL_MINOR %buildroot%_prefix/bin/tclsh
|
|
mkdir -p %buildroot%_datadir/tcl
|
|
install -D %{S:3} -m 644 %buildroot/etc/rpm/macros.tcl
|
|
|
|
%clean
|
|
rm -rf %buildroot
|
|
%if %_lib == lib64
|
|
|
|
%post
|
|
test -L /usr/lib/tcl%TCL_MINOR && /bin/rm -f /usr/lib/tcl%TCL_MINOR
|
|
exit 0
|
|
%endif
|
|
|
|
%files
|
|
%defattr(-,root,root,755)
|
|
%doc README changes license.terms ChangeLog*
|
|
%docdir %_mandir/mann
|
|
%doc %_mandir/man1/*
|
|
%doc %_mandir/mann/*
|
|
%_prefix/bin/*
|
|
%_libdir/lib*.so
|
|
%_datadir/tcl
|
|
%scriptdir
|
|
%exclude %scriptdir/*/tclAppInit.c
|
|
%config /etc/rpm/macros.tcl
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc %_mandir/man3/*
|
|
%_includedir/*
|
|
%scriptdir/*/tclAppInit.c
|
|
%_libdir/*.a
|
|
%_libdir/tclConfig.sh
|
|
|
|
%changelog
|