git: 06ba4fcc3b7f - main - databases/p5-Search-Xapian: Convert REINPLACE_CMD to patch file

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sat, 13 Apr 2024 09:32:12 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=06ba4fcc3b7f351ede781fd50ee2792de71e73ec

commit 06ba4fcc3b7f351ede781fd50ee2792de71e73ec
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-04-13 09:28:57 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-04-13 09:31:35 +0000

    databases/p5-Search-Xapian: Convert REINPLACE_CMD to patch file
---
 databases/p5-Search-Xapian/Makefile                |  3 ---
 databases/p5-Search-Xapian/files/patch-Makefile.PL | 11 +++++++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/databases/p5-Search-Xapian/Makefile b/databases/p5-Search-Xapian/Makefile
index 4d64c80a7504..32b473ee1c5a 100644
--- a/databases/p5-Search-Xapian/Makefile
+++ b/databases/p5-Search-Xapian/Makefile
@@ -26,9 +26,6 @@ CONFIGURE_ARGS=	XAPIAN_CONFIG=${LOCALBASE}/bin/xapian-config
 
 CONFLICTS_INSTALL=	p5-Search-Xapian12 # lib/perl5/site_perl/mach/5.32/Search/Xapian.pm
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|^if (defined $$builddir) {|if (0) {|' ${WRKSRC}/Makefile.PL
-
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Search/Xapian/Xapian.so
 
diff --git a/databases/p5-Search-Xapian/files/patch-Makefile.PL b/databases/p5-Search-Xapian/files/patch-Makefile.PL
new file mode 100644
index 000000000000..77d73a77d148
--- /dev/null
+++ b/databases/p5-Search-Xapian/files/patch-Makefile.PL
@@ -0,0 +1,11 @@
+--- Makefile.PL.orig	2020-11-22 06:53:13 UTC
++++ Makefile.PL
+@@ -268,7 +268,7 @@ if (scalar @bad) {
+ 
+ # If we're doing a fake VPATH build, add a stub Makefile which forwards all
+ # invocations (.DEFAULT is a GNU-make-ism).
+-if (defined $builddir) {
++if (0) {
+     open M, '>', "$builddir/Makefile~" or die $!;
+     print M <<"EOF";
+ all .DEFAULT: