[packages/libical] - allow building without Berkeley DB

hawk hawk at pld-linux.org
Sun May 24 20:11:34 CEST 2026


commit 1cf8a7b3a136766c85116a013f9b9ff87b80df08
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Sun May 24 20:11:09 2026 +0200

    - allow building without Berkeley DB

 libical.spec | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/libical.spec b/libical.spec
index 23d7891..1ee961e 100644
--- a/libical.spec
+++ b/libical.spec
@@ -6,6 +6,7 @@
 %bcond_without	python2		# CPython 2.x binding
 %bcond_without	python3		# CPython 3.x binding
 %bcond_without	static_libs	# static libraries
+%bcond_without	bdb		# Berkeley DB support
 #
 %if %{without python}
 %undefine	with_python2
@@ -26,8 +27,8 @@ Patch1:		%{name}-python.patch
 Patch2:		%{name}-gtkdocdir.patch
 URL:		https://libical.github.io/libical/
 BuildRequires:	cmake >= 3.5.0
-BuildRequires:	db-devel
-BuildRequires:	db-cxx-devel
+%{?with_bdb:BuildRequires:	db-devel}
+%{?with_bdb:BuildRequires:	db-cxx-devel}
 %{?with_apidocs:BuildRequires:	doxygen}
 BuildRequires:	glib2-devel >= 1:2.38
 BuildRequires:	gobject-introspection-devel >= 0.6.7
@@ -63,7 +64,9 @@ Summary:	libical header files
 Summary(pl.UTF-8):	Pliki nagłówkowe libical
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
+%if %{with bdb}
 %requires_ge db-devel
+%endif
 
 %description devel
 libical header files.
@@ -114,7 +117,9 @@ Group:		Development/Libraries
 Requires:	%{name}-c++ = %{version}-%{release}
 Requires:	%{name}-devel = %{version}-%{release}
 Requires:	libstdc++-devel
+%if %{with bdb}
 %requires_ge db-cxx-devel
+%endif
 
 %description c++-devel
 Header files for libical C++ bindings.
@@ -258,7 +263,8 @@ cd build
 	-DICAL_GLIB=ON \
 	-DICAL_GLIB_VAPI=ON \
 	-DPYTHON_EXECUTABLE=%{__python3} \
-	-DPY_SITEDIR=%{py3_sitedir}
+	-DPY_SITEDIR=%{py3_sitedir} \
+	%{!?with_bdb:-DCMAKE_DISABLE_FIND_PACKAGE_BerkeleyDB=true}
 
 %{__make} -j1
 
@@ -400,7 +406,9 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libical_cxx.so
 %attr(755,root,root) %{_libdir}/libicalss_cxx.so
+%if %{with bdb}
 %{_includedir}/libical/icalbdbset_cxx.h
+%endif
 %{_includedir}/libical/icalparameter_cxx.h
 %{_includedir}/libical/icalproperty_cxx.h
 %{_includedir}/libical/icalvalue_cxx.h
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libical.git/commitdiff/1cf8a7b3a136766c85116a013f9b9ff87b80df08



More information about the pld-cvs-commit mailing list