Blob Blame Raw
%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
%{!?tcl_sitelib: %define tcl_sitelib %{_datadir}/tcl%{tcl_version}}

Summary: BLT widget extension to Tcl/Tk scripting language development
Name: blt
Version: 2.4
Release: 22%{?dist}

License: MIT
Group: Development/Libraries
Patch2: blt2.4-tk8.5.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%__id_u -n)

Provides: tk-blt = %{version}-%{release}
BuildRequires: tk-devel >= 8.4.7

Requires: tk >= 8.4.7
Requires: tcl(abi) = 8.5

BLT is a very powerful extension to Tk. It adds plotting widgets
(graph, barchart and stripchart), hierarchy tree and table, tab
notebook, table geometry manager, vector, background program
execution, busy utility, eps canvas item, drag and drop facility,
bitmap command and miscellaneous commands.
Note: this version is stubs enabled and therefore should be compatible
with Tcl/Tk versions after and including 8.3.1.

%package devel
Summary:        Development package for BLT
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description devel
BLT is an extension to the Tk toolkiy. BLT's most useful feature is the
provision of more widgets for Tk, but it also provides more geometry managers
and miscellaneous other commands. Note that you won't need to any patching
of the Tcl or Tk source file to use BLT, but you will need to have Tcl/Tk
installed in order to use BLT.

This package provides headers needed to build packages based on BLT.

%setup -q -n %{name}%{version}z
%patch0 -p1
%patch1 -p1
%patch2 -p1

%configure --with-tcl=%{_libdir} --with-tk=%{_libdir}
cd src/shared
%__make SHLIB_LD_FLAGS=-shared # no _smp_mflags; race conditions.

mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{tcl_sitearch}/%{name}%{version}
mkdir -p $RPM_BUILD_ROOT%{tcl_sitelib}/%{name}%{version}

install -m 755 -p src/shared/ $RPM_BUILD_ROOT%{_libdir}
install -m 755 -p src/shared/ $RPM_BUILD_ROOT%{_libdir}
install -m 644 -p library/*.{pro,tcl,xbm} library/tclIndex $RPM_BUILD_ROOT%{tcl_sitelib}/%{name}%{version}
install -m 644 -p src/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}
echo 'package ifneeded BLT 2.4 "if {[llength [info commands tk]] > 0} {load [file join "%{_libdir}"]} else {load [file join "%{_libdir}"] BLT}"' > $RPM_BUILD_ROOT%{tcl_sitearch}/%{name}%{version}/pkgIndex.tcl
cp -p -r library/dd_protocols $RPM_BUILD_ROOT%{tcl_sitelib}/%{name}%{version}
rm -f html/


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files devel

* Mon Jan 07 2008 Sergio Pascual <sergiopr at> 2.4-22
- Debug files in debug package (bug #427681)

* Sat Jan 05 2008 Sergio Pascual <sergiopr at> 2.4-21
- Libraries moved to %%libdir, file in not needed
- Tcl files moved to %%tcl_sitelib

* Fri Jan 04 2008 Sergio Pascual <sergiopr at> 2.4-20
- Rebuilt for tk 8.5 (added patch)
- Following PackagingDrafts/Tcl

* Thu Nov 15 2007 Sergio Pascual <sergiopr at> 2.4-19
- Renaming the file in /etc/ to %%name

* Mon Nov 05 2007 Sergio Pascual <sergiopr at> 2.4-18
- Providing file in /etc/ (bug #333081)

* Mon Oct 22 2007 Marek Mahut <mmahut> 2.4-17
- Providing devel package as per request in BZ#249812

* Thu Feb 8 2007 Jean-Luc Fontaine <> 2.4-15.z
- require tk < 8.5

* Mon Aug 28 2006 Jean-Luc Fontaine <> 2.4-14.z
- added dist tag
- rebuild for Fedora Extras 6

* Tue Feb 28 2006 Jean-Luc Fontaine <> 2.4-13.z
- rebuild for Fedora Extras 5

* Thu Nov 10 2005 Jean-Luc Fontaine <> 2.4-12.z
- only require tk and tk-devel for building

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]>
- rebuilt

* Fri Nov 5 2004 Jean-Luc Fontaine <> 0:2.4-10.z
- added patch to allow building on 64 bit architectures
- use %%libdir instead of %%prefix in configure for the same reason

* Tue Nov 16 2003 Jean-Luc Fontaine <> 0:2.4-0.fdr.9.z
- in build requirements, work around tcl-devel and tk-devel packages non
  existence in RH 8.0 and 9

* Wed Nov 7 2003 Ville Skyttä <ville.skytta at> 0:2.4-0.fdr.8.z
- disabled %%_smp_mflags in make stage
- escaped percent characters in change log

* Tue Nov 5 2003 Jean-Luc Fontaine <> 0:2.4-0.fdr.7.z
- in installation stage, removed some leftover copies in parent
  directory which left dirt in BUILD directory

* Tue Nov 4 2003 Jean-Luc Fontaine <> 0:2.4-0.fdr.6.z
- changed release tag from 0.fdr.0.X.z to 0.fdr.X.z as this is a post
- use "" instead of
  "" to make URLs directly downloadable
- removed AutoReqProv
- used "%%setup -q -n ..." to remove unnecessary cd's.
- no longer override $RPM_OPT_FLAGS
- used %%_prefix instead of %%_usr
- added -p argument to install and cp to preserve timestamps
- replaced %%__cp and %%__install by cp and install
- fixed URL to point to sourceforge project page as homepage is empty
- no longer use RPM_OPT_FLAGS in CFLAGS as make argument as %%configure
  already handles it

* Tue Nov 1 2003 Jean-Luc Fontaine <> 0:2.4-0.fdr.5.z
- removed RCS line
- set Epoch to 0 and removed it from Release
- used a full macroless URL to the source tarball and patches
- removed Packager (not used in Fedora)
- used rm instead of %%__rm macro
- used SMP flags in make stage

* Tue Oct 22 2003 Jean-Luc Fontaine <> 0:2.4-0.fdr.4.z
- checked with rpmlint and improved accordingly.