git: 58aef862aba7 - main - lang/harec: update to version 0.24.0

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Tue, 02 Apr 2024 08:29:31 UTC
The branch main has been updated by se:

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

commit 58aef862aba780c3e66f12313ad34eef7cf68ac2
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2024-04-02 08:24:43 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2024-04-02 08:24:43 +0000

    lang/harec: update to version 0.24.0
    
    This is the initial versioned pre-release of the Hare compiler.
    
    All the bundled tests succeed on FreeBSD-CURRENT.
---
 lang/harec/Makefile                       | 22 +++++++++++++++-------
 lang/harec/distinfo                       |  6 +++---
 lang/harec/files/patch-configs_freebsd.mk | 11 +++++++++++
 lang/harec/pkg-plist                      |  4 ----
 4 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/lang/harec/Makefile b/lang/harec/Makefile
index 94e5597af1ea..4b6e24ab901b 100644
--- a/lang/harec/Makefile
+++ b/lang/harec/Makefile
@@ -1,9 +1,9 @@
 PORTNAME=	harec
-PORTVERSION=	g20230719
+PORTVERSION=	0.24.0
 CATEGORIES=	lang
 MASTER_SITES=	https://git.sr.ht/~sircmpwn/${PORTNAME}/archive/
-DISTNAME=	f16e9792
-DIST_SUBDIR=	hare
+DISTNAME=	${PORTVERSION}
+DIST_SUBDIR=	harec
 
 MAINTAINER=	se@FreeBSD.org
 COMMENT=	Hare compiler written in C11
@@ -21,20 +21,28 @@ RUN_DEPENDS=	as:devel/binutils \
 
 USES=		compiler:c11
 
+MAKE_ARGS=	ARCH=${ARCH:S/^amd64$/x86_64/} \
+		DESTDIR=${STAGEDIR} \
+		PREFIX=${PREFIX}
+
 WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTNAME}
 
+PLIST_FILES=	bin/harec
+PORTDOCS=	*
+
 OPTIONS_DEFINE=	DOCS
 
 do-build:
-		${MKDIR} ${WRKSRC}/build
-		cd ${WRKSRC}/build && CFLAGS="${CFLAGS}" ../configure --prefix=${PREFIX} && make
+		cd ${WRKSRC} && ${CP} configs/freebsd.mk config.mk
+		cd ${WRKSRC} && ${MAKE} ${MAKE_ARGS}
 
 do-install:
-		${INSTALL_PROGRAM} ${WRKSRC}/build/harec ${STAGEDIR}${PREFIX}/bin
+		cd ${WRKSRC} && ${MAKE} ${MAKE_ARGS} install
+		${STRIP_CMD} ${STAGEDIR}${LOCALBASE}/bin/*
 		${MKDIR} ${STAGEDIR}${DOCSDIR}
 		${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${STAGEDIR}${DOCSDIR}
 
 do-test:
-		cd ${WRKSRC}/build && make check
+		cd ${WRKSRC} && make ${MAKE_ARGS} check
 
 .include <bsd.port.mk>
diff --git a/lang/harec/distinfo b/lang/harec/distinfo
index 0dfb959d1af1..512bcd5b7423 100644
--- a/lang/harec/distinfo
+++ b/lang/harec/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1689765198
-SHA256 (hare/f16e9792.tar.gz) = 62f160dfe1078d5261efae281e1deec6f00b98b15fe953bc2074522ba94b408a
-SIZE (hare/f16e9792.tar.gz) = 184461
+TIMESTAMP = 1711981536
+SHA256 (harec/0.24.0.tar.gz) = add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de
+SIZE (harec/0.24.0.tar.gz) = 193534
diff --git a/lang/harec/files/patch-configs_freebsd.mk b/lang/harec/files/patch-configs_freebsd.mk
new file mode 100644
index 000000000000..40994195ed95
--- /dev/null
+++ b/lang/harec/files/patch-configs_freebsd.mk
@@ -0,0 +1,11 @@
+--- configs/freebsd.mk.orig	2024-02-07 07:40:03 UTC
++++ configs/freebsd.mk
+@@ -5,7 +5,7 @@ ARCH = x86_64
+ # variables used during build
+ PLATFORM = freebsd
+ ARCH = x86_64
+-HARECFLAGS =
++HARECFLAGS = -a ${ARCH}
+ QBEFLAGS =
+ ASFLAGS =
+ LDLINKFLAGS = --gc-sections -z noexecstack
diff --git a/lang/harec/pkg-plist b/lang/harec/pkg-plist
deleted file mode 100644
index 900ae4e1b7e2..000000000000
--- a/lang/harec/pkg-plist
+++ /dev/null
@@ -1,4 +0,0 @@
-bin/harec
-%%PORTDOCS%%%%DOCSDIR%%/declaration_solver.txt
-%%PORTDOCS%%%%DOCSDIR%%/env.txt
-%%PORTDOCS%%%%DOCSDIR%%/runtime.txt