git: 67e8adc75d76 - main - devel/qbe: add port qbe - an embeddable compiler backend

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Thu, 28 Apr 2022 15:23:11 UTC
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/ports/commit/?id=67e8adc75d76b3f82d144b862d79635cdc8379a3

commit 67e8adc75d76b3f82d144b862d79635cdc8379a3
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2022-04-28 15:17:40 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2022-04-28 15:17:40 +0000

    devel/qbe: add port qbe - an embeddable compiler backend
    
    The qbe program translates intermediate language (IL) code into
    assembler code of supported processors (amd64, arm64, and riscv64).
---
 devel/Makefile      |  1 +
 devel/qbe/Makefile  | 25 +++++++++++++++++++++++++
 devel/qbe/distinfo  |  3 +++
 devel/qbe/pkg-descr |  8 ++++++++
 devel/qbe/pkg-plist |  6 ++++++
 5 files changed, 43 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 22ac07480f7e..f586933c5a6e 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5544,6 +5544,7 @@
     SUBDIR += pysvn
     SUBDIR += pythontidy
     SUBDIR += pytype
+    SUBDIR += qbe
     SUBDIR += qbs
     SUBDIR += qca
     SUBDIR += qconf
diff --git a/devel/qbe/Makefile b/devel/qbe/Makefile
new file mode 100644
index 000000000000..b43b26674b4a
--- /dev/null
+++ b/devel/qbe/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	qbe
+DISTVERSION=	g20220411
+CATEGORIES=	devel
+MASTER_SITES=	https://c9x.me/git/qbe.git/snapshot/
+DISTNAME=	qbe-2caa26e388b
+
+MAINTAINER=	se@FreeBSD.org
+COMMENT=	Embeddable compiler backend for C type languages
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		gmake
+
+OPTIONS_DEFINE=	DOCS
+
+do-build:
+		cd ${WRKSRC}; ${GMAKE}
+
+do-install:
+		${INSTALL_PROGRAM} ${WRKSRC}/obj/qbe ${STAGEDIR}${PREFIX}/bin
+		${MKDIR} ${STAGEDIR}${DOCSDIR}
+		${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${STAGEDIR}${DOCSDIR}/
+
+.include <bsd.port.mk>
diff --git a/devel/qbe/distinfo b/devel/qbe/distinfo
new file mode 100644
index 000000000000..a011990dadcb
--- /dev/null
+++ b/devel/qbe/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1651151683
+SHA256 (qbe-2caa26e388b.tar.gz) = 508b22d9792016627b56a04c9167e16cd9303c7d35c2630edefdd57a2bfaec4d
+SIZE (qbe-2caa26e388b.tar.gz) = 351810
diff --git a/devel/qbe/pkg-descr b/devel/qbe/pkg-descr
new file mode 100644
index 000000000000..5744f2509d90
--- /dev/null
+++ b/devel/qbe/pkg-descr
@@ -0,0 +1,8 @@
+QBE aims to be a pure C embeddable backend that provides 70% of
+the performance of advanced compilers in 10% of the code.
+
+Its small size serves both its aspirations of correctness and
+our ability to understand, fix, and improve it. It also serves
+its users by providing trivial integration and great flexibility.
+
+WWW: https://c9x.me/compile/
diff --git a/devel/qbe/pkg-plist b/devel/qbe/pkg-plist
new file mode 100644
index 000000000000..1477455a02aa
--- /dev/null
+++ b/devel/qbe/pkg-plist
@@ -0,0 +1,6 @@
+bin/qbe
+%%PORTDOCS%%%%DOCSDIR%%/abi.txt
+%%PORTDOCS%%%%DOCSDIR%%/il.txt
+%%PORTDOCS%%%%DOCSDIR%%/llvm.txt
+%%PORTDOCS%%%%DOCSDIR%%/rv64.txt
+%%PORTDOCS%%%%DOCSDIR%%/win.txt