git: 3e0e341fb573 - main - graphics/podofo: Convert REINPLACE_CMD to patch file

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 01 Nov 2021 13:45:29 UTC
The branch main has been updated by sunpoet:

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

commit 3e0e341fb5736b41ce7ca773c6f2e77ca5029fea
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-11-01 13:23:57 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-11-01 13:41:24 +0000

    graphics/podofo: Convert REINPLACE_CMD to patch file
---
 graphics/podofo/Makefile                              | 4 ----
 graphics/podofo/files/patch-src-podofo-CMakeLists.txt | 9 +++++++++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/graphics/podofo/Makefile b/graphics/podofo/Makefile
index 84922505e433..e9e4b050e1dd 100644
--- a/graphics/podofo/Makefile
+++ b/graphics/podofo/Makefile
@@ -42,8 +42,4 @@ PNG_LIB_DEPENDS=	libpng.so:graphics/png
 TIFF_CMAKE_BOOL=	WANT_TIFF
 TIFF_LIB_DEPENDS=	libtiff.so:graphics/tiff
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|$${LIBDIRNAME}/pkgconfig|${PREFIX}/libdata/pkgconfig|' ${WRKSRC}/src/podofo/CMakeLists.txt
-	@${REINPLACE_CMD} -e '/^Libs: / s|-@PODOFO_VERSION_MAJOR@||' ${WRKSRC}/src/podofo/libpodofo.pc.in
-
 .include <bsd.port.mk>
diff --git a/graphics/podofo/files/patch-src-podofo-CMakeLists.txt b/graphics/podofo/files/patch-src-podofo-CMakeLists.txt
index 305f5cdf6821..8302365d68ee 100644
--- a/graphics/podofo/files/patch-src-podofo-CMakeLists.txt
+++ b/graphics/podofo/files/patch-src-podofo-CMakeLists.txt
@@ -22,3 +22,12 @@
          CLEAN_DIRECT_OUTPUT 1
          OUTPUT_NAME "podofo"
          COMPILE_FLAGS "-DBUILDING_PODOFO"
+@@ -320,7 +320,7 @@ IF(PODOFO_BUILD_SHARED)
+           @ONLY)
+         INSTALL(
+           FILES "${PoDoFo_BINARY_DIR}/libpodofo.pc"
+-          DESTINATION "${LIBDIRNAME}/pkgconfig")
++          DESTINATION "${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig")
+       ELSE(PKG_CONFIG_FOUND)
+         MESSAGE("Pkg-config not found. No pkg-config file will be created.")
+       ENDIF(PKG_CONFIG_FOUND)