commit:     6c563802f898cd9f9490bdd072720d619a05244f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 17 19:40:15 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Oct 17 19:50:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c563802

dev-libs/libical: python3_14, fix CMake <3.10 warning

Tests passed.

Closes: https://bugs.gentoo.org/964491
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../libical-3.0.20-cmake-minreqver-3.20.patch      |  68 ++++++++++++
 dev-libs/libical/libical-3.0.20-r2.ebuild          | 115 +++++++++++++++++++++
 2 files changed, 183 insertions(+)

diff --git a/dev-libs/libical/files/libical-3.0.20-cmake-minreqver-3.20.patch 
b/dev-libs/libical/files/libical-3.0.20-cmake-minreqver-3.20.patch
new file mode 100644
index 000000000000..27c91eba2ad0
--- /dev/null
+++ b/dev-libs/libical/files/libical-3.0.20-cmake-minreqver-3.20.patch
@@ -0,0 +1,68 @@
+From 63eefc63eb3637dfd246509b28a67e1a6f1fd158 Mon Sep 17 00:00:00 2001
+From: Allen Winter <[email protected]>
+Date: Thu, 19 Sep 2024 11:20:10 -0400
+Subject: [PATCH 1/2] Require CMake version 3.20 or higher
+
+CMake v3.20 adds the cmake_path() commands
+
+(cherry picked from commit 49149c02007a19ed143423724041ee02440add96)
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3c61570e..0cc03472 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -88,7 +88,7 @@
+ #  Build with the thread sanitizer (requires gcc or clang)
+ #
+ 
+-cmake_minimum_required(VERSION 3.5.0) #first line, to shutup a cygwin warning
++cmake_minimum_required(VERSION 3.20.0)
+ project(libical C) #CXX is optional for the bindings
+ 
+ cmake_policy(SET CMP0003 NEW)
+-- 
+2.51.0
+
+
+From 9ea2ab20c3caffe782b7852777de4c25c9c20521 Mon Sep 17 00:00:00 2001
+From: Yegor Yefremov <[email protected]>
+Date: Mon, 5 May 2025 16:04:15 +0200
+Subject: [PATCH 2/2] CMakeLists.txt: clean up policies
+
+All these policies are already enabled due to the following call:
+
+cmake_minimum_required(VERSION 3.20.0)
+
+(cherry picked from commit bd8c3d384f4fb6528f28da8681f39dbb6ca14118)
+---
+ CMakeLists.txt | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0cc03472..80178fb9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -91,17 +91,6 @@
+ cmake_minimum_required(VERSION 3.20.0)
+ project(libical C) #CXX is optional for the bindings
+ 
+-cmake_policy(SET CMP0003 NEW)
+-if(POLICY CMP0042)
+-  cmake_policy(SET CMP0042 NEW)
+-endif()
+-if(POLICY CMP0054)
+-  cmake_policy(SET CMP0054 NEW)
+-endif()
+-if(POLICY CMP0074)
+-  cmake_policy(SET CMP0074 NEW) #don't warn about ICU_ROOT envvar
+-endif()
+-
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+ list(APPEND CMAKE_MODULE_PATH 
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Kitware/modules")
+ 
+-- 
+2.51.0
+

diff --git a/dev-libs/libical/libical-3.0.20-r2.ebuild 
b/dev-libs/libical/libical-3.0.20-r2.ebuild
new file mode 100644
index 000000000000..d5e7165baa50
--- /dev/null
+++ b/dev-libs/libical/libical-3.0.20-r2.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..14} )
+VALA_USE_DEPEND="vapigen"
+inherit cmake python-any-r1 vala
+
+DESCRIPTION="Implementation of basic iCAL protocols"
+HOMEPAGE="https://github.com/libical/libical";
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz";
+
+LICENSE="|| ( MPL-2.0 LGPL-2.1 )"
+SLOT="0/3"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc 
x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc examples +glib +introspection static-libs test vala"
+
+REQUIRED_USE="introspection? ( glib ) vala? ( introspection )"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       dev-libs/icu:=
+       glib? (
+               dev-libs/glib:2
+               dev-libs/libxml2:2=
+       )
+"
+RDEPEND="${DEPEND}
+       sys-libs/timezone-data
+"
+BDEPEND="
+       dev-lang/perl
+       virtual/pkgconfig
+       doc? (
+               app-text/doxygen[dot]
+               glib? ( dev-util/gtk-doc )
+       )
+       introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2 )
+       test? (
+               ${PYTHON_DEPS}
+               glib? ( $(python_gen_any_dep 
'dev-python/pygobject:3[${PYTHON_USEDEP}]') )
+       )
+       vala? ( $(vala_depend) )
+"
+
+DOCS=(
+       AUTHORS README.md ReleaseNotes.txt TEST THANKS TODO
+       doc/{AddingOrModifyingComponents.txt,UsingLibical.md}
+)
+
+PATCHES=(
+       "${FILESDIR}/${PN}-3.0.11-pkgconfig-libdir.patch"
+       "${FILESDIR}/${P}-cmake-minreqver-3.20.patch" # bug 964491
+)
+
+python_check_deps() {
+       python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+       cmake_src_prepare
+       use vala && vala_setup
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DCMAKE_DISABLE_FIND_PACKAGE_BerkeleyDB=ON
+               -DICAL_BUILD_DOCS=$(usex doc)
+               -DLIBICAL_BUILD_EXAMPLES=$(use examples)
+               -DICAL_GLIB=$(usex glib)
+               -DGOBJECT_INTROSPECTION=$(usex introspection)
+               -DSHARED_ONLY=$(usex !static-libs)
+               -DLIBICAL_BUILD_TESTING=$(usex test)
+               -DICAL_GLIB_VAPI=$(usex vala)
+       )
+       if use vala; then
+               mycmakeargs+=(
+                       -DVALAC="${VALAC}"
+                       -DVAPIGEN="${VAPIGEN}"
+               )
+       fi
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+
+       if use doc; then
+               cmake_src_compile docs
+
+               HTML_DOCS=( "${BUILD_DIR}"/apidocs/html/. )
+       fi
+}
+
+src_test() {
+       local myctestargs=(
+               -E "(icalrecurtest|icalrecurtest-r)" # bug 660282
+       )
+
+       cmake_src_test
+}
+
+src_install() {
+       cmake_src_install
+
+       if use examples; then
+               rm examples/CMakeLists.txt || die
+               dodoc -r examples
+       fi
+}

Reply via email to