git: 9e3b4d4899f5 - main - print/libharu: pseudo-upgrade to 2.4.0

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Thu, 26 May 2022 20:04:03 UTC
The branch main has been updated by thierry:

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

commit 9e3b4d4899f5872f2587f7c296b6f9634c302479
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-05-25 13:03:20 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-05-26 20:03:58 +0000

    print/libharu: pseudo-upgrade to 2.4.0
    
    Version 2.4.0 is the name given by kitware to version 2.3.0 + 2 patches.
    
    Borrowed from:  pkgsrc
---
 print/libharu/Makefile | 15 +++++++++++++--
 print/libharu/distinfo |  9 +++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/print/libharu/Makefile b/print/libharu/Makefile
index 3cae2cefde40..28ce1068ead3 100644
--- a/print/libharu/Makefile
+++ b/print/libharu/Makefile
@@ -3,18 +3,25 @@
 PORTNAME=	libharu
 DISTVERSIONPREFIX=	RELEASE_
 DISTVERSION=	2_3_0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	print
+DIST_SUBDIR=	${PORTNAME}
+
+# Kitware (vtk) calls this version 2.4.0 with the addition of
+PATCHFILES=	157.diff:-p1 187.diff:-p1
+PATCH_SITES=	https://github.com/libharu/libharu/pull/
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Haru Free PDF Library
 
+LICENSE=	ZLIB
+
 LIB_DEPENDS=	libpng.so:graphics/png
 
 OPTIONS_DEFINE=	EXAMPLES
 
+USES=		cmake
 USE_LDCONFIG=	yes
-USES+=		cmake
 
 USE_GITHUB=	yes
 
@@ -24,6 +31,10 @@ PORTEXAMPLES=	*
 
 EXAMPLES_CMAKE_ON=	-DLIBHPDF_EXAMPLES:BOOL=ON  \
 			-DEXAMPLESDIR:STRING=share/examples/${PORTNAME}
+
+pre-configure:
+	${REINPLACE_CMD} -e 's|RC2|dev|;s|3|4|' ${WRKSRC}/include/hpdf_version.h
+
 post-install:
 	${LN} -s libhpdf.so ${STAGEDIR}${PREFIX}/lib/libhpdf.so.${SOVERSION}
 
diff --git a/print/libharu/distinfo b/print/libharu/distinfo
index 299ce909e515..a6c00c96cf04 100644
--- a/print/libharu/distinfo
+++ b/print/libharu/distinfo
@@ -1,2 +1,7 @@
-SHA256 (libharu-libharu-RELEASE_2_3_0_GH0.tar.gz) = 8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2
-SIZE (libharu-libharu-RELEASE_2_3_0_GH0.tar.gz) = 1396413
+TIMESTAMP = 1653483669
+SHA256 (libharu/libharu-libharu-RELEASE_2_3_0_GH0.tar.gz) = 8f9e68cc5d5f7d53d1bc61a1ed876add1faf4f91070dbc360d8b259f46d9a4d2
+SIZE (libharu/libharu-libharu-RELEASE_2_3_0_GH0.tar.gz) = 1396413
+SHA256 (libharu/157.diff) = c65e567f04d3c0f995eb671ece25cf7f5170d6568d9d709e6f93f98b6a519f1d
+SIZE (libharu/157.diff) = 15274
+SHA256 (libharu/187.diff) = e211ca9a2633a2fccf2cb1dc320cc3d2e9ee99466b304fa6a57755414e89c162
+SIZE (libharu/187.diff) = 2416