pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Get started with making a pkgsrc entry for the Hare language



Module Name:	pkgsrc-wip
Committed By:	Charlotte Koch <dressupgeekout%gmail.com@localhost>
Pushed By:	cfkoch
Date:		Tue May 3 20:14:57 2022 -0700
Changeset:	c7f07fb7d783741e1e5903958a4314761b8526a5

Added Files:
	hare/DESCR
	hare/Makefile
	hare/PLIST
	hare/TODO
	hare/distinfo
	hare/patches/patch-config.example.mk

Log Message:
Get started with making a pkgsrc entry for the Hare language

NetBSD support is, well, not there at the moment, but this package might
work on e.g. Linux

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c7f07fb7d783741e1e5903958a4314761b8526a5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 hare/DESCR                           |  5 ++++
 hare/Makefile                        | 30 ++++++++++++++++++++
 hare/PLIST                           |  1 +
 hare/TODO                            |  4 +++
 hare/distinfo                        |  3 ++
 hare/patches/patch-config.example.mk | 54 ++++++++++++++++++++++++++++++++++++
 6 files changed, 97 insertions(+)

diffs:
diff --git a/hare/DESCR b/hare/DESCR
new file mode 100644
index 0000000000..d68e816a9a
--- /dev/null
+++ b/hare/DESCR
@@ -0,0 +1,5 @@
+Hare is a systems programming language designed to be simple, stable, and
+robust. Hare uses a static type system, manual memory management, and a
+minimal runtime. It is well-suited to writing operating systems, system
+tools, compilers, networking software, and other low-level, high performance
+tasks.
diff --git a/hare/Makefile b/hare/Makefile
new file mode 100644
index 0000000000..5daf2a8a8c
--- /dev/null
+++ b/hare/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD$
+
+DISTNAME=	hare-0
+CATEGORIES=	lang
+GIT_REPO=	https://git.sr.ht/~sircmpwn/hare
+GIT_BRANCH=	master
+GIT_REVISION=	d9870303ec34c851b5d5a06402d8009dac76d174
+
+MAINTAINER=	dressupgeekout%gmail.com@localhost
+HOMEPAGE=	https://harelang.org/
+COMMENT=	The Hare programming language
+LICENSE=	gnu-gpl-v3
+
+USE_LANGUAGES=	c
+USE_TOOLS+=	gmake
+
+MAKE_FLAGS+=	BINDIR=${BINDIR}
+MAKE_FLAGS+=	LIBDIR=${LIBDIR}
+MAKE_FLAGS+=	MANDIR=${MANDIR}
+MAKE_FLAGS+=	PREFIX=${PREFIX}
+
+BUILD_DEPENDS+=		harec-[0-9]*:../../wip/harec
+BUILD_DEPENDS+=		qbe-[0-9]*:../../wip/qbe
+BUILD_DEPENDS+=		scdoc-[0-9]*:../../textproc/scdoc
+
+pre-configure:
+	${RUN} cd ${WRKSRC} && ${CP} -f config.example.mk config.mk
+
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/hare/PLIST b/hare/PLIST
new file mode 100644
index 0000000000..48d96a5493
--- /dev/null
+++ b/hare/PLIST
@@ -0,0 +1 @@
+@comment $NetBSD$
diff --git a/hare/TODO b/hare/TODO
new file mode 100644
index 0000000000..492e177f32
--- /dev/null
+++ b/hare/TODO
@@ -0,0 +1,4 @@
+hare TODO!
+
+Doesn't work on NetBSD at all -- requires that we provide a NetBSD runtime
+for Hare, whatever that takes
diff --git a/hare/distinfo b/hare/distinfo
new file mode 100644
index 0000000000..8bd4d58cb0
--- /dev/null
+++ b/hare/distinfo
@@ -0,0 +1,3 @@
+$NetBSD$
+
+SHA1 (patch-config.example.mk) = 40412e3a887c4c1b742429c50da00b0abd12376a
diff --git a/hare/patches/patch-config.example.mk b/hare/patches/patch-config.example.mk
new file mode 100644
index 0000000000..d692d707e5
--- /dev/null
+++ b/hare/patches/patch-config.example.mk
@@ -0,0 +1,54 @@
+$NetBSD$
+
+Allow configuration vars to be overridden
+--- config.example.mk.orig	2022-05-03 19:56:11.565203456 -0700
++++ config.example.mk	2022-05-03 19:56:36.752923296 -0700
+@@ -1,31 +1,31 @@
+ ## Install configuration
+ 
+-PREFIX = /usr
+-BINDIR = $(PREFIX)/bin
+-MANDIR = $(PREFIX)/share/man
+-SRCDIR = $(PREFIX)/src
++PREFIX ?= /usr
++BINDIR ?= $(PREFIX)/bin
++MANDIR ?= $(PREFIX)/share/man
++SRCDIR ?= $(PREFIX)/src
+ 
+ # Where to install the stdlib tree
+-STDLIB = $(SRCDIR)/hare/stdlib
++STDLIB ?= $(SRCDIR)/hare/stdlib
+ 
+ # Default HAREPATH
+-LOCALSRCDIR = /usr/local/src/hare
+-HAREPATH = $(LOCALSRCDIR)/stdlib:$(LOCALSRCDIR)/third-party:$(SRCDIR)/hare/stdlib:$(SRCDIR)/hare/third-party
++LOCALSRCDIR ?= /usr/local/src/hare
++HAREPATH ?= $(LOCALSRCDIR)/stdlib:$(LOCALSRCDIR)/third-party:$(SRCDIR)/hare/stdlib:$(SRCDIR)/hare/third-party
+ 
+ ## Build configuration
+ 
+ # Platform to build for
+-PLATFORM = linux
+-ARCH = x86_64
++PLATFORM ?= linux
++ARCH ?= x86_64
+ 
+ # External tools and flags
+-HAREC = harec
+-HAREFLAGS =
+-QBE = qbe
+-AS = as
+-LD = ld
+-AR = ar
+-SCDOC = scdoc
++HAREC ?= harec
++HAREFLAGS ?=
++QBE ?= qbe
++AS ?= as
++LD ?= ld
++AR ?= ar
++SCDOC ?= scdoc
+ 
+ # Where to store build artifacts
+-HARECACHE = .cache
++HARECACHE ?= .cache


Home | Main Index | Thread Index | Old Index