public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Crypt-OpenSSL-EC/, dev-perl/Crypt-OpenSSL-EC/files/
@ 2025-07-07 22:20 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2025-07-07 22:20 UTC (permalink / raw
  To: gentoo-commits

commit:     f777ed34be0ceac0174729991138eb7167374026
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  7 22:16:53 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul  7 22:16:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f777ed34

dev-perl/Crypt-OpenSSL-EC: EAPI 8, fix build w/ perl-5.42

Closes: https://bugs.gentoo.org/959696
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...1.ebuild => Crypt-OpenSSL-EC-1.320.0-r2.ebuild} | 24 +++----
 .../files/Crypt-OpenSSL-EC-1.320.0-perl-5.42.patch | 80 ++++++++++++++++++++++
 2 files changed, 89 insertions(+), 15 deletions(-)

diff --git a/dev-perl/Crypt-OpenSSL-EC/Crypt-OpenSSL-EC-1.320.0-r1.ebuild b/dev-perl/Crypt-OpenSSL-EC/Crypt-OpenSSL-EC-1.320.0-r2.ebuild
similarity index 52%
rename from dev-perl/Crypt-OpenSSL-EC/Crypt-OpenSSL-EC-1.320.0-r1.ebuild
rename to dev-perl/Crypt-OpenSSL-EC/Crypt-OpenSSL-EC-1.320.0-r2.ebuild
index 41d327b816a2..8d0bbeb5572c 100644
--- a/dev-perl/Crypt-OpenSSL-EC/Crypt-OpenSSL-EC-1.320.0-r1.ebuild
+++ b/dev-perl/Crypt-OpenSSL-EC/Crypt-OpenSSL-EC-1.320.0-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 DIST_AUTHOR=MIKEM
 DIST_VERSION=1.32
@@ -9,23 +9,17 @@ inherit perl-module
 
 DESCRIPTION="Perl extension for OpenSSL EC (Elliptic Curves) library"
 SLOT="0"
+
 KEYWORDS="~amd64 ~x86"
-IUSE="test "
-RESTRICT="!test? ( test )"
 
 RDEPEND="
 	>=dev-perl/Crypt-OpenSSL-Bignum-0.40.0
-	dev-libs/openssl:0=
+	dev-libs/openssl:=
 "
 DEPEND="
-	dev-libs/openssl:0
-"
-BDEPEND="${RDEPEND}
-	virtual/perl-ExtUtils-MakeMaker
+	dev-libs/openssl:=
 "
-src_compile() {
-	mymake=(
-		"OPTIMIZE=${CFLAGS}"
-	)
-	perl-module_src_compile
-}
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.320.0-perl-5.42.patch
+)

diff --git a/dev-perl/Crypt-OpenSSL-EC/files/Crypt-OpenSSL-EC-1.320.0-perl-5.42.patch b/dev-perl/Crypt-OpenSSL-EC/files/Crypt-OpenSSL-EC-1.320.0-perl-5.42.patch
new file mode 100644
index 000000000000..8573c2927b67
--- /dev/null
+++ b/dev-perl/Crypt-OpenSSL-EC/files/Crypt-OpenSSL-EC-1.320.0-perl-5.42.patch
@@ -0,0 +1,80 @@
+https://bugs.gentoo.org/959696
+https://rt.cpan.org/Public/Bug/Display.html?id=164982
+https://rt.cpan.org/Transaction/Display.html?id=3010771
+
+From 9455d2a6542da3c55351d8fb4b08aabb20245c1c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Wed, 7 May 2025 16:30:18 +0200
+Subject: [PATCH] Remove never compiled EC_POINTs_make_affine() and
+ EC_POINTs_mul() prototypes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+After upgrading ExtUtils::ParseXS from 3.51 to 3.57 Crypt-OpenSSL-EC-1.32 fails to build:
+
+    $ make
+    cp lib/Crypt/OpenSSL/EC.pm blib/lib/Crypt/OpenSSL/EC.pm
+    AutoSplitting blib/lib/Crypt/OpenSSL/EC.pm (blib/lib/auto/Crypt/OpenSSL/EC)
+    Running Mkbootstrap for EC ()
+    chmod 644 "EC.bs"
+    "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- EC.bs blib/arch/auto/Crypt/OpenSSL/EC/EC.bs 644
+    "/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp"  -typemap '/usr/share/perl5/ExtUtils/typemap' -typemap '/home/test/fedora/perl-Crypt-OpenSSL-EC/Crypt-OpenSSL-EC-1.32/typemap'  EC.xs > EC.xsc
+    Unparseable XSUB parameter: 'EC_POINT *p[]' in EC.xs, line 354
+    Unparseable XSUB parameter: 'const EC_POINT *p[]' in EC.xs, line 357
+    Unparseable XSUB parameter: 'const BIGNUM *m[]' in EC.xs, line 357
+    make: *** [Makefile:362: EC.c] Error 1
+
+The problematic argument with a pointer to an array type trigger the
+failure. Old ExtUtils::ParseXS parsed them, but the generated code was
+an invalid C code. E.g. This XS:
+
+	int
+	EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *p[], BN_CTX *ctx)
+
+was incorrectly parsed as:
+
+    XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_EC_POINTs_mul)
+    {
+	[...]
+	RETVAL = EC_POINTs_mul(group, r, n, num, const EC_POINT *p[], const BIGNUM *m[], ctx);
+
+That means that ExtUtils::ParseXS never supported arrays of pointers. Now it
+correctly reports na error.
+
+On the other hand, ExtUtils::ParseXS does not understand
+C preprocessor directives and does not ignore code enclosed in "#if 0"
+macro condition.
+
+This patch simply removes the two protypes.
+
+CPAN RT#164982
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ EC.xs | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/EC.xs b/EC.xs
+index d5d01d1..c06b9c3 100644
+--- a/EC.xs
++++ b/EC.xs
+@@ -348,16 +348,6 @@ EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX
+ int 
+ EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
+ 
+-#if 0
+-
+-int 
+-EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *p[], BN_CTX *ctx)
+-
+-int 
+-EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, size_t num, const EC_POINT *p[], const BIGNUM *m[], BN_CTX *ctx)
+-
+-#endif
+-
+ int 
+ EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx)
+ 
+-- 
+2.49.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-07 22:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-07 22:20 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Crypt-OpenSSL-EC/, dev-perl/Crypt-OpenSSL-EC/files/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox