File ffidl.spec of Package ffidl

Summary: Extension for Calling C Libraries from Tcl
Name: ffidl
Version: 0.9
Release: 1
License: BSD-3-Clause
Group: Development/Libraries/Tcl
BuildRequires: autoconf
BuildRequires: tcl-devel >= 8.6
BuildRequires: libffi-devel
Requires: tcl >= 8.6
URL: https://prs-de.github.io/ffidl/
Source0: https://github.com/prs-de/ffidl/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: ffidl.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
Ffidl allows you to define Tcl/Tk extensions with pure Tcl wrappers
calling any shared library installed on your system, including the Tcl
and Tk core libraries.

%prep
%setup -q -n %name-%version
%patch0

%build
autoconf
./configure \
%ifarch x86_64
	--enable-64bit \
%endif
	--with-tcl=%_libdir \
	--libdir=%tcl_archdir \
	--with-libffi \
	--enable-libffi-static=no \
	--enable-stubs \
	--enable-callbacks
make
find -name '*.tcl' |
     xargs sed -i 's,/usr/local/bin/tclsh8.2,/usr/bin/tclsh,'

%check
make test

%install
%makeinstall

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README.txt doc/* license.terms demos
%tcl_archdir/*


%changelog
* Sat Feb 24 2024 Danilo Chang <ray2501@gmail.com> - 0.9
- Update ffidl.patch for source file changed
- Update to 0.9

* Mon Aug  3 2009 Reinhard Max <max@suse.de> - 0.6-1
- Fix path to tclsh in demo scripts
- Move "make test" to %check section

* Tue Jul 22 2008 Reinhard Max <max@suse.de> - 
- Initial build.


openSUSE Build Service is sponsored by