Skip to content

Commit

Permalink
lang/harec: update to version 0.24.0
Browse files Browse the repository at this point in the history
This is the initial versioned pre-release of the Hare compiler.

All the bundled tests succeed on FreeBSD-CURRENT.
  • Loading branch information
stesser committed Apr 2, 2024
1 parent 8813865 commit 58aef86
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 14 deletions.
22 changes: 15 additions & 7 deletions lang/harec/Makefile
Original file line number Diff line number Diff line change
@@ -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= [email protected]
COMMENT= Hare compiler written in C11
Expand All @@ -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>
6 changes: 3 additions & 3 deletions lang/harec/distinfo
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions lang/harec/files/patch-configs_freebsd.mk
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions lang/harec/pkg-plist

This file was deleted.

0 comments on commit 58aef86

Please sign in to comment.