git: a6f12135041b - main - databases/tarantool-c: Convert REINPLACE_CMD to patch files

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 28 Feb 2022 12:50:53 UTC
The branch main has been updated by sunpoet:

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

commit a6f12135041bc79af8a831d4f4d3d946ed1c27bc
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-02-28 09:32:56 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-02-28 12:45:58 +0000

    databases/tarantool-c: Convert REINPLACE_CMD to patch files
---
 databases/tarantool-c/Makefile                            |  4 ----
 databases/tarantool-c/files/patch-CMakeLists.txt          | 11 +++++++++++
 databases/tarantool-c/files/patch-cmake-FindMsgPuck.cmake | 11 +++++++++++
 databases/tarantool-c/files/patch-include_tp.h            | 11 +++++++++++
 databases/tarantool-c/files/patch-test-plain_test.c       | 11 +++++++++++
 5 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/databases/tarantool-c/Makefile b/databases/tarantool-c/Makefile
index b799bbf42e3e..958f9432a0e7 100644
--- a/databases/tarantool-c/Makefile
+++ b/databases/tarantool-c/Makefile
@@ -19,8 +19,4 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	tarantool
 GH_TAGNAME=	2aa7937
 
-post-patch:
-	@${GREP} -lr 'msgpuck/msgpuck.h' ${WRKSRC}/ | ${XARGS} ${REINPLACE_CMD} -e 's|msgpuck/msgpuck.h|msgpuck.h|'
-	@${REINPLACE_CMD} -e 's|libmsgpuck.a|libmsgpuck.so|' ${WRKSRC}/cmake/FindMsgPuck.cmake
-
 .include <bsd.port.mk>
diff --git a/databases/tarantool-c/files/patch-CMakeLists.txt b/databases/tarantool-c/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..5ab36717da11
--- /dev/null
+++ b/databases/tarantool-c/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2021-11-26 15:16:51 UTC
++++ CMakeLists.txt
+@@ -46,7 +46,7 @@ if (NOT ENABLE_BUNDLED_MSGPUCK)
+     set (MSGPUCK_REQUIRED ON)
+     include (cmake/FindMsgPuck.cmake)
+     include_directories(${MSGPUCK_INCLUDE_DIR})
+-elseif (NOT EXISTS "${PROJECT_SOURCE_DIR}/third_party/msgpuck/msgpuck.h")
++elseif (NOT EXISTS "${PROJECT_SOURCE_DIR}/third_party/msgpuck.h")
+     message(FATAL_ERROR "Could not find msgpuck development files")
+ else (NOT ENABLE_BUNDLED_MSGPUCK)
+     set (MSGPUCK_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/third_party")
diff --git a/databases/tarantool-c/files/patch-cmake-FindMsgPuck.cmake b/databases/tarantool-c/files/patch-cmake-FindMsgPuck.cmake
new file mode 100644
index 000000000000..640053688282
--- /dev/null
+++ b/databases/tarantool-c/files/patch-cmake-FindMsgPuck.cmake
@@ -0,0 +1,11 @@
+--- cmake/FindMsgPuck.cmake.orig	2021-11-26 15:16:51 UTC
++++ cmake/FindMsgPuck.cmake
+@@ -7,7 +7,7 @@
+ #
+ 
+ find_path(MSGPUCK_INCLUDE_DIR msgpuck.h PATH_SUFFIXES msgpuck)
+-find_library(MSGPUCK_LIBRARY NAMES libmsgpuck.a)
++find_library(MSGPUCK_LIBRARY NAMES libmsgpuck.so)
+ 
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(MsgPuck
diff --git a/databases/tarantool-c/files/patch-include_tp.h b/databases/tarantool-c/files/patch-include_tp.h
new file mode 100644
index 000000000000..e12cea2444e4
--- /dev/null
+++ b/databases/tarantool-c/files/patch-include_tp.h
@@ -0,0 +1,11 @@
+--- include/tp.h.orig	2021-11-26 15:16:51 UTC
++++ include/tp.h
+@@ -6,7 +6,7 @@
+ #include <assert.h>
+ #include <stdarg.h>
+ 
+-#include <msgpuck/msgpuck.h>
++#include <msgpuck.h>
+ #include <sha1.h>
+ #include <base64.h>
+ 
diff --git a/databases/tarantool-c/files/patch-test-plain_test.c b/databases/tarantool-c/files/patch-test-plain_test.c
new file mode 100644
index 000000000000..0264a64711b0
--- /dev/null
+++ b/databases/tarantool-c/files/patch-test-plain_test.c
@@ -0,0 +1,11 @@
+--- test/plain_test.c.orig	2021-11-26 15:16:51 UTC
++++ test/plain_test.c
+@@ -8,7 +8,7 @@
+ 
+ #include <sys/uio.h>
+ 
+-#include <msgpuck/msgpuck.h>
++#include <msgpuck.h>
+ 
+ #include <tarantool/tnt_net.h>
+