Skip to content

Commit 1f2cf63

Browse files
committed
lang/harec: add port of the Hare compiler written in C11
The Hare programming language is a simple systems programming language that is currently under development. It supports code generation for amd64, aarch64, and riscv64 targets, but this port is currently limited to amd64 due to lack of testing on other FreeBSD architectures.
1 parent 692fe38 commit 1f2cf63

File tree

5 files changed

+54
-0
lines changed

5 files changed

+54
-0
lines changed

lang/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
SUBDIR += guile1
122122
SUBDIR += guile2
123123
SUBDIR += halide
124+
SUBDIR += harec
124125
SUBDIR += haskell-mode.el
125126
SUBDIR += hermes
126127
SUBDIR += hla

lang/harec/Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
PORTNAME= harec
2+
PORTVERSION= g20220428
3+
CATEGORIES= lang
4+
MASTER_SITES= https://git.sr.ht/~sircmpwn/${PORTNAME}/archive/
5+
DISTNAME= e5fb517
6+
DIST_SUBDIR= hare
7+
8+
MAINTAINER= se@FreeBSD.org
9+
COMMENT= Hare compiler written in C11
10+
11+
LICENSE= AGPLv3
12+
LICENSE_FILE= ${WRKSRC}/COPYING
13+
14+
ONLY_FOR_ARCHS= amd64 # aarch64 riscv64
15+
16+
BUILD_DEPENDS= qbe:devel/qbe
17+
RUN_DEPENDS= qbe:devel/qbe
18+
19+
USES= compiler:c11
20+
21+
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTNAME}
22+
23+
OPTIONS_DEFINE= DOCS
24+
25+
do-build:
26+
${MKDIR} ${WRKSRC}/build
27+
cd ${WRKSRC}/build && CFLAGS="${CFLAGS}" ../configure --prefix=${PREFIX} && make
28+
29+
do-install:
30+
${INSTALL_PROGRAM} ${WRKSRC}/build/harec ${STAGEDIR}${PREFIX}/bin
31+
${MKDIR} ${STAGEDIR}${DOCSDIR}
32+
${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${STAGEDIR}${DOCSDIR}
33+
34+
#do-test:
35+
# cd ${WRKSRC}/build && make check
36+
37+
.include <bsd.port.mk>

lang/harec/distinfo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
TIMESTAMP = 1651310936
2+
SHA256 (hare/e5fb517.tar.gz) = 12694873b5c356b7962fba3a838167141a60dd8db713e715cf6f1eb25aa12944
3+
SIZE (hare/e5fb517.tar.gz) = 155242

lang/harec/pkg-descr

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This is the Hare compiler written in C.
2+
3+
Hare is a systems programming language designed to be simple, stable,
4+
and robust. Hare uses a static type system, manual memory management,
5+
and a minimal runtime. It is well-suited to writing operating systems,
6+
system tools, compilers, networking software, and other low-level,
7+
high performance tasks.
8+
9+
WWW: https://harelang.org/

lang/harec/pkg-plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bin/harec
2+
%%PORTDOCS%%%%DOCSDIR%%/declaration_solver.txt
3+
%%PORTDOCS%%%%DOCSDIR%%/env.txt
4+
%%PORTDOCS%%%%DOCSDIR%%/runtime.txt

0 commit comments

Comments
 (0)