public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/perl-Alien-Build] f44: Support CMake with Alien::cmake4
Date: Fri, 21 Aug 2026 07:52:09 GMT [thread overview]
Message-ID: <178729872909.1.2738909265578792234.rpms-perl-Alien-Build-97e04be53fbd@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/perl-Alien-Build
Branch : f44
Commit : 97e04be53fbdcbee3ca77e40d7a176ac91e32ff3
Author : Petr Písař <ppisar@redhat.com>
Date : 2026-08-21T09:49:42+02:00
Stats : +179/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/perl-Alien-Build/c/97e04be53fbdcbee3ca77e40d7a176ac91e32ff3?branch=f44
Log:
Support CMake with Alien::cmake4
---
diff --git a/Alien-Build-2.84-Replace-Alien-cmake3-with-Alien-cmake4.patch b/Alien-Build-2.84-Replace-Alien-cmake3-with-Alien-cmake4.patch
new file mode 100644
index 0000000..2f8ff8e
--- /dev/null
+++ b/Alien-Build-2.84-Replace-Alien-cmake3-with-Alien-cmake4.patch
@@ -0,0 +1,156 @@
+From 9dde8afffcf086bacc2503b5bd83d925c0009bae Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Mon, 27 Jul 2026 14:10:06 +0200
+Subject: [PATCH] Replace Alien::cmake3 with Alien::cmake4
+
+In order to use system CMake which nowadays is CMake 4, incompatible
+with CMake 3.
+
+Related: https://github.com/PerlAlien/Alien-Build/issues/432
+---
+ corpus/cmake-libpalindrome/CMakeLists.txt | 2 +-
+ dist.ini | 4 ++--
+ lib/Alien/Build/Interpolate/Default.pm | 2 +-
+ lib/Alien/Build/Manual/FAQ.pod | 4 ++--
+ lib/Alien/Build/Plugin/Build/CMake.pm | 6 +++---
+ maint/cip-before-install | 2 --
+ t/00_diag.t | 2 +-
+ t/alien_build_plugin_build_cmake.t | 4 ++--
+ 8 files changed, 12 insertions(+), 14 deletions(-)
+
+diff --git a/corpus/cmake-libpalindrome/CMakeLists.txt b/corpus/cmake-libpalindrome/CMakeLists.txt
+index 09527c3..da2c69a 100644
+--- a/corpus/cmake-libpalindrome/CMakeLists.txt
++++ b/corpus/cmake-libpalindrome/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.0.0)
++cmake_minimum_required (VERSION 3.5.0)
+ project (libpalindrome C)
+ add_subdirectory (libpalindrome)
+ add_subdirectory (palx)
+diff --git a/dist.ini b/dist.ini
+index 2ee981c..76202c2 100644
+--- a/dist.ini
++++ b/dist.ini
+@@ -78,7 +78,7 @@ diag = +Alien::gzip
+ diag = +IO::Socket::SSL
+ diag = +Net::SSLeay
+ diag = +LWP::Protocol::https
+-diag = +Alien::cmake3
++diag = +Alien::cmake4
+ diag = +Readonly
+ diag = +Env::ShellWords
+ diag = +Mojo::DOM58
+@@ -182,7 +182,7 @@ remove = URI::Escape
+ remove = Archive::Tar
+ remove = Archive::Zip
+ remove = Alien::gmake
+-remove = Alien::cmake3
++remove = Alien::cmake4
+ remove = Devel::Hide
+ remove = Net::SSLeay
+ remove = IO::Socket::SSL
+diff --git a/lib/Alien/Build/Interpolate/Default.pm b/lib/Alien/Build/Interpolate/Default.pm
+index eb78ae8..46e5eb5 100644
+--- a/lib/Alien/Build/Interpolate/Default.pm
++++ b/lib/Alien/Build/Interpolate/Default.pm
+@@ -291,7 +291,7 @@ The C Compiler used to build Perl
+ Requires: L<Alien::CMake> 0.07 if cmake is not already in C<PATH>.
+
+ Deprecated: Use the L<Alien::Build::Plugin::Build::CMake> plugin instead (which will replace
+-this helper with one that works with L<Alien::cmake3> that works better).
++this helper with one that works with L<Alien::cmake4> that works better).
+
+ =head2 cp
+
+diff --git a/lib/Alien/Build/Manual/FAQ.pod b/lib/Alien/Build/Manual/FAQ.pod
+index a545dfb..469b5f5 100644
+--- a/lib/Alien/Build/Manual/FAQ.pod
++++ b/lib/Alien/Build/Manual/FAQ.pod
+@@ -138,9 +138,9 @@ MSYS plugin and use a command sequence to do the build like this:
+
+ =head3 CMake
+
+-There is an alien L<Alien::cmake3> that provides C<cmake> 3.x or better (It is preferred to the
++There is an alien L<Alien::cmake4> that provides C<cmake> 4.x or better (It is preferred to the
+ older L<Alien::CMake>). Though it is recommended that you use the C<cmake>
+-(L<Alien::Build::Plugin::Build::CMake>) plugin instead of using L<Alien::cmake3>.
++(L<Alien::Build::Plugin::Build::CMake>) plugin instead of using L<Alien::cmake4>.
+
+ use alienfile;
+
+diff --git a/lib/Alien/Build/Plugin/Build/CMake.pm b/lib/Alien/Build/Plugin/Build/CMake.pm
+index ce7b533..a5c822f 100644
+--- a/lib/Alien/Build/Plugin/Build/CMake.pm
++++ b/lib/Alien/Build/Plugin/Build/CMake.pm
+@@ -42,7 +42,7 @@ sub init
+ $meta->prop->{destdir} = $^O eq 'MSWin32' ? 0 : 1;
+
+ $meta->add_requires('configure' => 'Alien::Build::Plugin::Build::CMake' => '0.99');
+- $meta->add_requires('share' => 'Alien::cmake3' => '0.02');
++ $meta->add_requires('share' => 'Alien::cmake4' => '0');
+
+ if(is_dmake())
+ {
+@@ -70,7 +70,7 @@ sub init
+ }
+ }
+
+- $meta->interpolator->replace_helper('cmake' => sub { require Alien::cmake3; Alien::cmake3->exe });
++ $meta->interpolator->replace_helper('cmake' => sub { require Alien::cmake4; Alien::cmake4->exe });
+ $meta->interpolator->add_helper('cmake_generator' => \&cmake_generator);
+
+ my @args = (
+@@ -179,7 +179,7 @@ Returns true if your Perls C<make> appears to be C<dmake>.
+
+ =head2 cmake
+
+-This plugin replaces the default C<cmake> helper with the one that comes from L<Alien::cmake3>.
++This plugin replaces the default C<cmake> helper with the one that comes from L<Alien::cmake4>.
+
+ =head2 cmake_generator
+
+diff --git a/maint/cip-before-install b/maint/cip-before-install
+index 41417f2..4e6c494 100755
+--- a/maint/cip-before-install
++++ b/maint/cip-before-install
+@@ -21,8 +21,6 @@ fi
+
+ if [ "x$ALIEN_BUILD_INSTALL_EXTRA" == "x1" ]; then
+
+- cip exec env PERL_ALT_INSTALL=OVERWRITE cpanm -n Alt::Alien::cmake3::System
+-
+ cip exec cpanm -n \
+ Test2::Harness \
+ File::Listing \
+diff --git a/t/00_diag.t b/t/00_diag.t
+index 55c296f..c1d5b8d 100755
+--- a/t/00_diag.t
++++ b/t/00_diag.t
+@@ -14,7 +14,7 @@ $modules{$_} = $_ for qw(
+ Acme::Alien::DontPanic
+ Alien::Base::ModuleBuild
+ Alien::Libbz2
+- Alien::cmake3
++ Alien::cmake4
+ Alien::gzip
+ Alien::xz
+ Archive::Tar
+diff --git a/t/alien_build_plugin_build_cmake.t b/t/alien_build_plugin_build_cmake.t
+index dbcee35..75d7236 100755
+--- a/t/alien_build_plugin_build_cmake.t
++++ b/t/alien_build_plugin_build_cmake.t
+@@ -6,8 +6,8 @@ use Test::Alien::Build;
+ use Alien::Build::Plugin::Build::CMake;
+ use Path::Tiny ();
+
+-eval { require Alien::cmake3 };
+-skip_all 'test requires Alien::cmake3' if $@;
++eval { require Alien::cmake4 };
++skip_all 'test requires Alien::cmake4' if $@;
+
+ # To see the actual commands being executed
+ $ENV{VERBOSE} = 1;
+--
+2.55.0
+
diff --git a/perl-Alien-Build.spec b/perl-Alien-Build.spec
index 035bbbe..18eb82f 100644
--- a/perl-Alien-Build.spec
+++ b/perl-Alien-Build.spec
@@ -1,8 +1,9 @@
# Run optional test
%{bcond_without perl_Alien_Build_enables_optional_test}
# Support Alien::cmake3, this works only with cmake < 4,
+# or support Alien::cmake4, this works only with cmake >= 4,
# <https://github.com/PerlAlien/Alien-Build/issues/432>.
-%if 0%{?fedora} < 44
+%if 0%{?fedora} != 44
%{bcond_without perl_Alien_Build_enables_cmake}
%else
%{bcond_with perl_Alien_Build_enables_cmake}
@@ -15,7 +16,7 @@
Name: perl-Alien-Build
Version: 2.84
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Build external dependencies for use in CPAN
# lib/Alien/Build/Plugin/Test/Mock.pm contains Base64-encoded files for tests
# (a bash script, C source file, a gzipped tar archive, Mach-O 64-bit x86_64
@@ -29,6 +30,9 @@ Patch0: Alien-Build-2.83-Remove-redundant-pkgconfig-implementations.patc
# Support only the most common SHA implementation,
# the files are deleted in prep section
Patch1: Alien-Build-2.65-Remove-redundant-SHA-implementations.patch
+# Replace Alien::cmake3 with Alien::cmake4, proposed upstream
+# <https://github.com/PerlAlien/Alien-Build/pull/435>
+Patch2: Alien-Build-2.84-Replace-Alien-cmake3-with-Alien-cmake4.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: make
@@ -50,8 +54,13 @@ BuildRequires: perl(warnings)
# Run-time:
%if %{with perl_Alien_Build_enables_cmake} && !%{defined perl_bootstrap}
# t/alien_build_plugin_build_cmake.t executes gcc via cmake (bug #923024)
+%if 0%{?fedora} < 44
# Build cycle: perl-Alien-cmake3 → perl-Alien-Build
BuildRequires: perl(Alien::cmake3) >= 0.02
+%else
+# Build cycle: perl-Alien-cmake4 → perl-Alien-Build
+BuildRequires: perl(Alien::cmake4)
+%endif
%endif
# Archive::Tar or (tar and bzip2 and gzip and xz)
BuildRequires: perl(Archive::Tar)
@@ -150,8 +159,13 @@ Requires: make
# dependencies.
Requires: perl-Alien-Base = %{?epoch:%{epoch}:}%{version}-%{release}
%if %{with perl_Alien_Build_enables_cmake} && !%{defined perl_bootstrap}
+%if 0%{?fedora} < 44
# Build cycle: perl-Alien-cmake3 → perl-Alien-Build
Requires: perl(Alien::cmake3) >= 0.02
+%else
+# Build cycle: perl-Alien-cmake4 → perl-Alien-Build
+Requires: perl(Alien::cmake4)
+%endif
%endif
# Alien::Build::Plugin::Download::Negotiate defaults to Decode::Mojo instead
# of Decode::HTML
@@ -308,7 +322,10 @@ rm t/alien_build_plugin_pkgconfig_{commandline,makestatic,pp}.t
%patch -p1 -P 1
rm lib/Alien/Build/Plugin/Digest/SHAPP.pm
rm t/alien_build_plugin_digest_shapp.t
-%if !%{with perl_Alien_Build_enables_cmake} && !%{defined perl_bootstrap}
+%if ! (0%{?fedora} < 44)
+%patch -p1 -P 2
+%endif
+%if !%{with perl_Alien_Build_enables_cmake} || %{defined perl_bootstrap}
# Remove CMake support
rm lib/Alien/Build/Plugin/Build/CMake.pm
perl -i -ne 'print $_ unless m{\b\Qlib/Alien/Build/Plugin/Build/CMake.pm\E\b}' Makefile.PL MANIFEST
@@ -460,6 +477,9 @@ make test
%{_libexecdir}/%{name}
%changelog
+* Mon Jul 27 2026 Petr Pisar <ppisar@redhat.com> - 2.84-6
+- Support CMake with Alien::cmake4 (bug #2507309)
+
* Thu Feb 19 2026 Petr Pisar <ppisar@redhat.com> - 2.84-5
- Remove CMake plugin if CMake has version 4 (bug #2440944)
reply other threads:[~2026-08-21 7:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178729872909.1.2738909265578792234.rpms-perl-Alien-Build-97e04be53fbd@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox