git: 9a245d16f59f - main - devel/oniguruma: Switch to release archive, tidy up port, install cmake files

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 30 Apr 2022 19:15:29 UTC
The branch main has been updated by yuri:

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

commit 9a245d16f59f11a4f4afdf754062af57a91e8702
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-04-30 19:14:27 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-04-30 19:14:27 +0000

    devel/oniguruma: Switch to release archive, tidy up port, install cmake files
    
    PR:             263690
---
 devel/oniguruma/Makefile  | 39 ++++++++++++++++-----------------------
 devel/oniguruma/distinfo  |  8 +++++---
 devel/oniguruma/pkg-plist |  4 ++++
 3 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/devel/oniguruma/Makefile b/devel/oniguruma/Makefile
index f8d1ded4d911..9e7b0ca2cc23 100644
--- a/devel/oniguruma/Makefile
+++ b/devel/oniguruma/Makefile
@@ -1,9 +1,14 @@
 # Created by: Akinori MUSHA aka knu <knu@idaemons.org>
 
 PORTNAME=	oniguruma
-DISTVERSIONPREFIX=	v
 DISTVERSION=	6.9.8
+PORTREVISION=	1
 CATEGORIES=	devel textproc
+MASTER_SITES=	https://github.com/kkos/${PORTNAME}/releases/download/v${DISTVERSION}/
+DISTNAME=	onig-${DISTVERSION}
+
+PATCH_SITES=	https://github.com/kkos/oniguruma/commit/
+PATCHFILES=	1f322c45aa365d377e1d7db567bb7087c7c1b38c.patch:-p1
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	Regular expressions library compatible with POSIX/GNU/Perl
@@ -11,33 +16,21 @@ COMMENT=	Regular expressions library compatible with POSIX/GNU/Perl
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=			autoreconf cpe pathfix libtool  # configure provided in the tarball breaks: https://github.com/kkos/oniguruma/issues/73
-USE_GITHUB=		yes
-GH_ACCOUNT=		kkos
-GNU_CONFIGURE=		yes
-CONFIGURE_ARGS=		--disable-static --enable-posix-api=yes
-PATHFIX_MAKEFILEIN=	Makefile.am
-USE_LDCONFIG=		yes
-INSTALL_TARGET=		install-strip
-TEST_WRKSRC=		${WRKSRC}/test
-TEST_TARGET=		test
-CPE_VENDOR=		oniguruma_project
-
-OPTIONS_DEFINE=			STATISTICS DOCS EXAMPLES
-STATISTICS_DESC=		Take matching time statistical data (debug feature)
+USES=		cmake cpe pathfix
+CPE_VENDOR=	oniguruma_project
+USE_LDCONFIG=	yes
 
-STATISTICS_CONFIGURE_WITH=	statistics
+DOCSDIR=	${PREFIX}/share/doc/onig
+EXAMPLESDIR=	${PREFIX}/share/examples/onig
 
 PORTDOCS=	*
 PORTEXAMPLES=	*
 
-post-install-DOCS-on:
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	cd ${WRKSRC} && ${INSTALL_DATA} HISTORY README ${STAGEDIR}${DOCSDIR}
-	cd ${WRKSRC}/doc && ${INSTALL_DATA} * ${STAGEDIR}${DOCSDIR}
+CMAKE_ON=	BUILD_SHARED_LIBS ENABLE_POSIX_API
+
+OPTIONS_DEFINE=	DOCS EXAMPLES
 
-post-install-EXAMPLES-on:
-	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	cd ${WRKSRC}/sample && ${INSTALL_DATA} *.c ${STAGEDIR}${EXAMPLESDIR}
+DOCS_CMAKE_BOOL=	INSTALL_DOCUMENTATION
+EXAMPLES_CMAKE_BOOL==	INSTALL_EXAMPLES
 
 .include <bsd.port.mk>
diff --git a/devel/oniguruma/distinfo b/devel/oniguruma/distinfo
index fcff1569c091..4ccbb6dec2c9 100644
--- a/devel/oniguruma/distinfo
+++ b/devel/oniguruma/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1651255372
-SHA256 (kkos-oniguruma-v6.9.8_GH0.tar.gz) = 26372720bab6733c869a9eb69377f73971138dc5e3eff4a81f5ba8aea5435fb2
-SIZE (kkos-oniguruma-v6.9.8_GH0.tar.gz) = 638737
+TIMESTAMP = 1651339873
+SHA256 (onig-6.9.8.tar.gz) = 28cd62c1464623c7910565fb1ccaaa0104b2fe8b12bcd646e81f73b47535213e
+SIZE (onig-6.9.8.tar.gz) = 944148
+SHA256 (1f322c45aa365d377e1d7db567bb7087c7c1b38c.patch) = 3f2230d7f42606011a69610ea9f5f530de58da0b0ce69ad9a77ae5aca954c73a
+SIZE (1f322c45aa365d377e1d7db567bb7087c7c1b38c.patch) = 981
diff --git a/devel/oniguruma/pkg-plist b/devel/oniguruma/pkg-plist
index 88704965793c..9a15badcaefe 100644
--- a/devel/oniguruma/pkg-plist
+++ b/devel/oniguruma/pkg-plist
@@ -2,6 +2,10 @@ bin/onig-config
 include/oniggnu.h
 include/onigposix.h
 include/oniguruma.h
+lib/cmake/oniguruma/onigurumaConfig.cmake
+lib/cmake/oniguruma/onigurumaConfigVersion.cmake
+lib/cmake/oniguruma/onigurumaTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/oniguruma/onigurumaTargets.cmake
 lib/libonig.so
 lib/libonig.so.5
 lib/libonig.so.5.3.0