Skip to content

Commit

Permalink
devel/hare: 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 programming
language.

All tests succeed on FreeBSD-CURRENT, including the optional slow
tests.
  • Loading branch information
stesser committed Apr 2, 2024
1 parent 58aef86 commit c11df43
Show file tree
Hide file tree
Showing 5 changed files with 244 additions and 107 deletions.
25 changes: 15 additions & 10 deletions devel/hare/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
PORTNAME= hare
PORTVERSION= g20230719
PORTREVISION= 1
PORTVERSION= 0.24.0
CATEGORIES= devel
MASTER_SITES= https://git.sr.ht/~sircmpwn/${PORTNAME}/archive/
# https://git.sr.ht/~sircmpwn/hare/archive/0.24.0.tar.gz
PKGNAMESUFFIX= -lang
DISTNAME= 0919412b
DISTNAME= ${PORTVERSION}
DIST_SUBDIR= hare

MAINTAINER= se@FreeBSD.org
COMMENT= Hare language build system and standard library
WWW= https://harelang.org/

LICENSE= MPL20 GPLv3
LICENSE= GPLv3 MPL20
LICENSE_COMB= multi
LICENSE_FILE= ${WRKSRC}/COPYING

Expand All @@ -22,21 +22,26 @@ BUILD_DEPENDS= harec:lang/harec \
scdoc:textproc/scdoc
RUN_DEPENDS= harec:lang/harec

MAKE_ARGS= ARCH=${ARCH:S/^amd64$/x86_64/} HARECACHE=${WRKDIR}/.cache/hare PREFIX=${PREFIX}
MAKE_ARGS= ARCH=${ARCH:S/^amd64$/x86_64/} \
DESTDIR=${STAGEDIR} \
PREFIX=${PREFIX}

# HARECACHE=${WRKDIR}/.cache/hare \
# HARECFLAGS="-a x86_64" \

WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTNAME}

OPTIONS_DEFINE= DOCS

do-build:
${CP} ${WRKSRC}/config.example.mk ${WRKSRC}/config.mk
cd ${WRKSRC} && ${CP} configs/freebsd.mk config.mk
cd ${WRKSRC} && ${MAKE} ${MAKE_ARGS}

post-stage:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
${MV} ${STAGEDIR}${DATADIR}/src/hare/* ${STAGEDIR}${DATADIR}/
do-install:
cd ${WRKSRC} && ${MAKE} ${MAKE_ARGS} install
${STRIP_CMD} ${STAGEDIR}${LOCALBASE}/bin/*
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}/
${INSTALL_DATA} ${WRKSRC}/docs/*.md ${STAGEDIR}${DOCSDIR}/

do-test:
Expand Down
6 changes: 3 additions & 3 deletions devel/hare/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1689760640
SHA256 (hare/0919412b.tar.gz) = 66e005b9fd3073d7eed2b5143425f5988649215ff6947f2218b99614f5429e91
SIZE (hare/0919412b.tar.gz) = 725891
TIMESTAMP = 1711977865
SHA256 (hare/0.24.0.tar.gz) = 7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc
SIZE (hare/0.24.0.tar.gz) = 767869
33 changes: 0 additions & 33 deletions devel/hare/files/patch-config.example.mk

This file was deleted.

36 changes: 36 additions & 0 deletions devel/hare/files/patch-configs_freebsd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
--- configs/freebsd.mk.orig 2024-02-16 09:48:20 UTC
+++ configs/freebsd.mk
@@ -1,15 +1,16 @@
# install locations
-PREFIX = /usr/local
-BINDIR = $(PREFIX)/bin
-MANDIR = $(PREFIX)/share/man
-SRCDIR = $(PREFIX)/src
-STDLIB = $(SRCDIR)/hare/stdlib
+#PREFIX = %%LOCALBASE%%
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/man
+DATADIR = $(PREFIX)/share/hare
+SRCDIR = $(DATADIR)/src
+STDLIB = $(DATADIR)/stdlib

# variables used during build
PLATFORM = freebsd
ARCH = x86_64
HAREFLAGS =
-HARECFLAGS =
+HARECFLAGS = -a ${ARCH}
QBEFLAGS =
ASFLAGS =
LDLINKFLAGS = --gc-sections -z noexecstack
@@ -26,7 +27,9 @@ BINOUT = .bin
BINOUT = .bin

# variables that will be embedded in the binary with -D definitions
-HAREPATH = $(SRCDIR)/hare/stdlib:$(SRCDIR)/hare/third-party
+#LOCALSRCDIR = ${SRCDIR}/local-src
+#HAREPATH = $(LOCALSRCDIR)/stdlib:$(LOCALSRCDIR)/third-party:$(DATADIR)/stdlib:$(DATADIR)/third-party
+HAREPATH = $(DATADIR)/stdlib:$(DATADIR)/third-party
VERSION=$$(./scripts/version)

# For cross-compilation, modify the variables below
Loading

0 comments on commit c11df43

Please sign in to comment.