%bcond_without wcheck %{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}} %global major_ver 9.0.0 %global prerelease pre-alpha %global prerelease_version %(c=%{prerelease}; echo ${c/-/}) Summary: Extensions for Tcl and Tk Name: tclx Version: %{major_ver}%{?prerelease:~%{prerelease_version}} Release: 1%{?dist} # Automatically converted from old format: BSD - review is highly recommended. License: BSD-2-Clause URL: http://tclx.sourceforge.net/ Source: https://github.com/tcltk-depot/%{name}/archive/refs/tags/v%{major_ver}-pre-alpha.tar.gz Requires: tcl%{?_isa} Requires: tk%{?_isa} BuildRequires: make BuildRequires: gcc # Tcl 9.0 isn't supported: https://sourceforge.net/p/tclx/bugs/85/ BuildRequires: tcl-devel BuildRequires: tk-devel Patch: tclx-%{major_ver}-varinit.patch Patch: tclx-%{major_ver}-man.patch Patch: tclx-%{major_ver}-configure-c99.patch %description Extended Tcl (TclX) is a set of extensions to the Tcl programming language. Extended Tcl is oriented towards system programming tasks and large application development. TclX provides additional interfaces to the operating system, and adds many new programming constructs, text manipulation and debugging tools. %package devel Summary: Extended Tcl development files Requires: tclx = %{version}-%{release} %description devel This package contains the tclx development files needed for building applications embedding tclx. %prep %autosetup -p1 -n tclx-%{major_ver}%{?prerelease:-%{prerelease}} # patch2 touches tcl.m4 %build # https://sourceforge.net/p/tclx/bugs/86/ export CFLAGS="%{build_cflags} -std=gnu17" %configure \ --enable-tk=YES \ --with-tclconfig=%{_libdir} \ --with-tkconfig=%{_libdir} \ --with-tclinclude=%{_includedir} \ --with-tkinclude=%{_includedir} \ --enable-gcc \ --disable-threads \ --enable-64bit \ --libdir=%{tcl_sitearch} %make_build %check # run "make test" by default %if %{without wcheck} make test %endif %install %make_install mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/ echo '%{_libdir}/tcl%{tcl_version}/%{name}%{major_ver}' > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %files %doc ChangeLog %{_libdir}/tcl9.0/tclx9.0/ %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %exclude %{_mandir}/man3/CmdWrite.* %exclude %{_mandir}/man3/Handles.* %exclude %{_mandir}/man3/TclXInit.3* %exclude %{_mandir}/man3/Keylist.3* %{_mandir}/mann/* %{_mandir}/man3/* %files devel %{_includedir}/* %{_mandir}/man3/TclXInit.3* %{_mandir}/man3/Keylist.3* %changelog * Thu Aug 28 2025 Pappy Packager - 9.0.0~prealpha-1-1 - New version - migrated to SPDX license * Wed Apr 16 2025 Jaroslav Å karvada - 8.4.0-50 - Fixed requirements Resolves: rhbz#2360181