[packages/sqlite3] allow building with any supported tcl version
atler
atler at pld-linux.org
Thu Jun 4 14:21:44 CEST 2026
commit 855b009048b23e02a52ffc3f6bbebd785091eee6
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Jun 4 14:16:29 2026 +0200
allow building with any supported tcl version
sqlite3.spec | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/sqlite3.spec b/sqlite3.spec
index cfcab98..91be03d 100644
--- a/sqlite3.spec
+++ b/sqlite3.spec
@@ -29,8 +29,15 @@
%define vnum 3530100
%define ver %{lua:vn=rpm.expand("%vnum");v="";for i in string.gmatch(string.format("%08d", vn), "..") do v=v.."."..i:gsub("^0", "");end;v=v:gsub("^.",""):gsub("\.0$","");print(v)}
-%define tclver 9.0
+%if %{with tcl}
%define tclmajor %{lua:m=rpm.expand("%tcl_version"):gsub("(%d+).*","%1");print(m)}
+%if "%tclmajor" == "8"
+%define tcllibname libsqlite%{version}
+%else
+%define tcllibname libtcl%{tclmajor}sqlite%{version}
+%endif
+%endif
+
Summary: SQLite3 library
Summary(pl.UTF-8): Biblioteka SQLite3
Name: sqlite3
@@ -51,7 +58,7 @@ BuildRequires: libtool
BuildRequires: rpmbuild(macros) >= 1.527
%{?with_load_extension:BuildRequires: sed >= 4.0}
BuildRequires: tcl
-%{?with_tcl:BuildRequires: tcl-devel >= %{tclver}}
+%{?with_tcl:BuildRequires: tcl-devel >= 8.6}
BuildRequires: unzip
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%{?with_icu:Provides: %{name}(icu) = %{version}}
@@ -339,6 +346,6 @@ rm -rf $RPM_BUILD_ROOT
%files -n tcl-%{name}
%defattr(644,root,root,755)
%dir %{_libdir}/tcl*/sqlite3
-%attr(755,root,root) %{_libdir}/tcl%{tclver}/sqlite3/libtcl%{tclmajor}sqlite%{version}.so
-%{_libdir}/tcl%{tclver}/sqlite3/pkgIndex.tcl
+%attr(755,root,root) %{_libdir}/tcl%{tcl_version}/sqlite3/%{tcllibname}.so
+%{_libdir}/tcl%{tcl_version}/sqlite3/pkgIndex.tcl
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sqlite3.git/commitdiff/bdb3b3974f3c55ba76b47dfa4253367d22b03b19
More information about the pld-cvs-commit
mailing list