git: 6807da9775b6 - main - textproc/cg3: Housekeeping

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Mon, 04 Apr 2022 18:08:50 UTC
The branch main has been updated by bofh:

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

commit 6807da9775b6ee4e91aac93e927997dd5afa7f24
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-04-04 18:06:08 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-04-04 18:08:41 +0000

    textproc/cg3: Housekeeping
    
    - Use GitHub distribution [1]
    - Add pathfix [1]
    - Add perl5
    - Add some shebangfiles
    - Optionize OPTIMIZED_CFLAGS [1]
    
    Reported by:    diizzy
---
 textproc/cg3/Makefile | 18 +++++++++++++-----
 textproc/cg3/distinfo |  6 +++---
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/textproc/cg3/Makefile b/textproc/cg3/Makefile
index a01741a5cf9d..161740d23c63 100644
--- a/textproc/cg3/Makefile
+++ b/textproc/cg3/Makefile
@@ -1,7 +1,8 @@
 PORTNAME=	cg3
-PORTVERSION=	1.3.6
-DISTVERSIONPREFIX=	v
+DISTVERSION=	1.3.6
+PORTREVISION=	1
 CATEGORIES=	textproc
+MASTER_SITES=	https://github.com/GrammarSoft/${PORTNAME}/releases/download/v${DISTVERSION}/
 
 MAINTAINER=	bofh@FreeBSD.org
 COMMENT=	Tools for the Constraint Grammar formalism
@@ -12,13 +13,20 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libboost_date_time.so:devel/boost-libs \
 		libicuuc.so:devel/icu
 
-USES=		cmake
-USE_GITHUB=	yes
-GH_ACCOUNT=	GrammarSoft
+USES=		cmake pathfix perl5 shebangfix tar:bz2
 USE_LDCONFIG=	yes
 
+SHEBANG_FILES=	scripts/cg-sort scripts/cg-strictify scripts/cg-untrace \
+		scripts/cg3-autobin.pl.in
+
+OPTIONS_DEFINE=	OPTIMIZED_CFLAGS
+
 post-patch:
 	@${REINPLACE_CMD} -e '/D_POSIX_C_SOURCE/d' \
 		${WRKSRC}/CMakeLists.txt
 
+post-patch-OPTIMIZED_CFLAGS-off:
+	@${REINPLACE_CMD} -e 's| -O3||g' \
+		${WRKSRC}/CMakeLists.txt
+
 .include <bsd.port.mk>
diff --git a/textproc/cg3/distinfo b/textproc/cg3/distinfo
index 5b68d4320693..907f9e4515d6 100644
--- a/textproc/cg3/distinfo
+++ b/textproc/cg3/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1648840020
-SHA256 (GrammarSoft-cg3-v1.3.6_GH0.tar.gz) = 6ad782fea6204d5899186fc6ad41ef36de94304b4221c388d64abb927f48bc5b
-SIZE (GrammarSoft-cg3-v1.3.6_GH0.tar.gz) = 365386
+TIMESTAMP = 1649020336
+SHA256 (cg3-1.3.6.tar.bz2) = ee43b20b251b100eca986655795e26b53636d889947654f4e4840b270cb9d6e9
+SIZE (cg3-1.3.6.tar.bz2) = 290961