math/p5-Math-GMP: Convert REINPLACE_CMD to patch file

This commit is contained in:
Po-Chuan Hsieh 2025-01-29 00:58:31 +08:00
parent 1954a26c05
commit 44f2e89469
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B
2 changed files with 25 additions and 4 deletions

View file

@ -15,10 +15,6 @@ LIB_DEPENDS= libgmp.so:math/gmp
USES= localbase perl5
USE_PERL5= configure
post-patch:
@${REINPLACE_CMD} -e '/Alien::GMP/d' ${WRKSRC}/META.json ${WRKSRC}/META.yml ${WRKSRC}/Makefile.PL
@${REINPLACE_CMD} -e 's|Alien::Base::Wrapper->mm_args|"LIBS" => ["-lgmp"]|' ${WRKSRC}/Makefile.PL
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Math/GMP/GMP.so

View file

@ -0,0 +1,25 @@
--- Makefile.PL.orig 2022-03-15 09:26:21 UTC
+++ Makefile.PL
@@ -8,13 +8,11 @@ use ExtUtils::MakeMaker;
use 5.010;
use ExtUtils::MakeMaker;
-use Alien::Base::Wrapper qw( Alien::GMP !export );
my %WriteMakefileArgs = (
"ABSTRACT" => "High speed arbitrary size integer math",
"AUTHOR" => "Shlomi Fish <shlomif\@cpan.org>",
"CONFIGURE_REQUIRES" => {
- "Alien::GMP" => "1.08",
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Math-GMP",
@@ -48,7 +46,7 @@ my %WriteMakefileArgs = (
%WriteMakefileArgs = (
%WriteMakefileArgs,
- Alien::Base::Wrapper->mm_args,
+ "LIBS" => ["-lgmp"],
);
my %FallbackPrereqs = (