Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: himitsu-0.6
@ 2024-02-17  0:50 Pestdoktor
  2024-02-17 18:34 ` [PR PATCH] [Updated] " Pestdoktor
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17  0:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]

There is a new pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 4136 bytes --]

From 088de196826fea517e9b8299abeab98a918678f5 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/4] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..461f943544dfab 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,7 +9,7 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
 # Currently only aarch64 and x86_64 targets are supported and the checks
 # test the compiled binaries.

From 2af5d535114667f54b77d57e3041d770197164d5 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/4] New package: harec-0.24.0

---
 srcpkgs/harec/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..347afacb8c69be
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,16 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk > config.mk
+}

From 4b8f94d69b24851a22e2b7f686ec6ba6d583eff9 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 3/4] New package: hare-0.24.0

---
 srcpkgs/hare/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..ee61e25607a54b
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,17 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=configure
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk > config.mk
+}

From 4afd1fcf35bee146685d11e79c8bcff0b843e52f Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 4/4] New package: himitsu-0.6

---
 srcpkgs/himitsu/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..afb8542128e534
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,16 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
@ 2024-02-17 18:34 ` Pestdoktor
  2024-02-17 19:30 ` Pestdoktor
                   ` (25 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 18:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 7900 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/4] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107..7e8b04f615d02 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/4] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 0000000000000..831adad5e0b9f
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 4bc807b452df0419bbae0c5a5b90e3fbcb0f04b2 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 3/4] New package: hare-0.24.0

---
 .../01-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/hare/template                         | 41 +++++++++++++++++++
 2 files changed, 59 insertions(+)
 create mode 100644 srcpkgs/hare/patches/01-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/patches/01-use-native-compiler-for-haredoc.patch b/srcpkgs/hare/patches/01-use-native-compiler-for-haredoc.patch
new file mode 100644
index 0000000000000..eb88a7184547c
--- /dev/null
+++ b/srcpkgs/hare/patches/01-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..407c6d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 0000000000000..3703b6ac0d5f2
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,41 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=configure
+hostmakedepends="hare qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 98bbbccb77ff02920062a492ef65009ac36956b8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 4/4] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 0000000000000..42aa37b20a23c
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 0000000000000..e21d6b8f1f43b
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i 's|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE}|' Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
  2024-02-17 18:34 ` [PR PATCH] [Updated] " Pestdoktor
@ 2024-02-17 19:30 ` Pestdoktor
  2024-02-17 20:23 ` Pestdoktor
                   ` (24 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 19:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 13848 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/5] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107..7e8b04f615d02 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/5] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 0000000000000..831adad5e0b9f
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 899e0d5d7bd2906ea3498faa5b12778fe281b8ab Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 3/5] New package: hare-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 srcpkgs/hare/template                         | 42 +++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 srcpkgs/hare/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/hare/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 0000000000000..45a41860e751b
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,42 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From e8c73068caa19d646ab0fc1b0034473c6f0d2851 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/5] New package: haredoc-0.24.0

---
 srcpkgs/hare/template                         |  2 +-
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 21 ++++++++++
 4 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
index 45a41860e751b..b0993c0974490 100644
--- a/srcpkgs/hare/template
+++ b/srcpkgs/hare/template
@@ -6,7 +6,7 @@ build_style=configure
 make_build_target=".bin/hare docs"
 make_install_target="install-cmd install-mods"
 hostmakedepends="qbe harec scdoc"
-depends="qbe-1.2_1 harec-0.24.0_1"
+depends="qbe-1.2_1 harec-0.24.0_1 haredoc-0.24.0_1"
 short_desc="Systems programming language"
 maintainer="Jonas Fentker <jonas@fentker.eu>"
 license="MPL-2.0, GPL-3.0-only"
diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 0000000000000..eb88a7184547c
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..407c6d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 0000000000000..691df35fb7d17
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,21 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 75f29e35b493e5abd539c3f5c252b635af42e807 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 5/5] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 0000000000000..42aa37b20a23c
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 0000000000000..e21d6b8f1f43b
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i 's|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE}|' Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
  2024-02-17 18:34 ` [PR PATCH] [Updated] " Pestdoktor
  2024-02-17 19:30 ` Pestdoktor
@ 2024-02-17 20:23 ` Pestdoktor
  2024-02-17 20:33 ` Pestdoktor
                   ` (23 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 20:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14174 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107..7e8b04f615d02 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 0000000000000..831adad5e0b9f
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From d40e25bdb26c0538c2ebf581bcdf9d9ac84ecd66 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 43 +++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 0000000000000..48944b9fa68f8
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,43 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 3ae824c2b9bba772382c3fc118eeb8c45eecc07e Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 21 ++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 0000000000000..eb88a7184547c
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..407c6d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 0000000000000..1ace1e3e36312
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,21 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From babcbf0e5d646ba7a7b45410ac4659a2ab98f776 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 0000000000000..5760c39b5d33f
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From beabc0d3ee5d20ddcbdd8d539b12de24d2ffcccf Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 0000000000000..42aa37b20a23c
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 0000000000000..92d7237c19a1e
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i 's|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE} -R|' Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (2 preceding siblings ...)
  2024-02-17 20:23 ` Pestdoktor
@ 2024-02-17 20:33 ` Pestdoktor
  2024-02-17 20:58 ` Pestdoktor
                   ` (22 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 20:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14200 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..7e8b04f615d02e 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From cbdaabf73ebeb982ad665047836a8cb6ef688803 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 43 +++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..0513bcd89bab55
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,43 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From efc479453829814740e84e701ff1c88ca75bb434 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 21 ++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..eb88a7184547c0
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..407c6d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..1ace1e3e36312d
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,21 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From bdc4dbc2b69700c3e195f3f27822cba706b71cc4 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 005803daaedf6d99b43ff4f78e48689814a92517 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..92d7237c19a1e4
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i 's|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE} -R|' Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (3 preceding siblings ...)
  2024-02-17 20:33 ` Pestdoktor
@ 2024-02-17 20:58 ` Pestdoktor
  2024-02-17 21:09 ` Pestdoktor
                   ` (21 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 20:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14206 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..7e8b04f615d02e 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 3118fbe6c614bb343fd7ffce0275918132728d0e Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 43 +++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..546c1589f67d56
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,43 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 69bbe9caa1cc6828e29d2ddd448aba69c531eb6f Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 21 ++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..eb88a7184547c0
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..407c6d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..1ace1e3e36312d
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,21 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 24bb0c4950015d6a0a80303020ed4edcb644e731 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 1000e10d32d2f1a8403561de565a45b18f66aa09 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..92d7237c19a1e4
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i 's|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE} -R|' Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (4 preceding siblings ...)
  2024-02-17 20:58 ` Pestdoktor
@ 2024-02-17 21:09 ` Pestdoktor
  2024-02-17 21:14 ` Pestdoktor
                   ` (20 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 21:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14286 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..7e8b04f615d02e 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From db07aafbbebda0c796b0c11bb0e931ecf5e9660a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 44 +++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..7da8180767ca8a
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 13d7099823ff9482f10aaac569aa3b700d0288c4 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 21 ++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..eb88a7184547c0
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..407c6d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..1ace1e3e36312d
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,21 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 97d162bfcfb5287873d231c77febbd3839a03659 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 82fb16292e5a76503a5634cde355d59ec2d6f690 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..5e49b75ef7da42
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (5 preceding siblings ...)
  2024-02-17 21:09 ` Pestdoktor
@ 2024-02-17 21:14 ` Pestdoktor
  2024-02-17 21:25 ` Pestdoktor
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 21:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14272 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107..7e8b04f615d02 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 0000000000000..831adad5e0b9f
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From db07aafbbebda0c796b0c11bb0e931ecf5e9660a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 44 +++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 0000000000000..7da8180767ca8
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From df719df2d97d95fe4343989898f263c6d8f2005f Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 21 ++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 0000000000000..eb88a7184547c
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..407c6d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 0000000000000..13b916ebadad7
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,21 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 80034df36e62c3546ff6410df992e440c9609709 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 0000000000000..5760c39b5d33f
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 253ed745a5f12ad13c2783b24918b65ffa30a572 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 0000000000000..42aa37b20a23c
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 0000000000000..5e49b75ef7da4
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (6 preceding siblings ...)
  2024-02-17 21:14 ` Pestdoktor
@ 2024-02-17 21:25 ` Pestdoktor
  2024-02-17 21:39 ` Pestdoktor
                   ` (18 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 21:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14346 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107..7e8b04f615d02 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 0000000000000..831adad5e0b9f
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From db07aafbbebda0c796b0c11bb0e931ecf5e9660a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 44 +++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 0000000000000..7da8180767ca8
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 76a7a3c2f8b26e7d27a5e3113ad034249c91eb16 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 22 ++++++++++
 3 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 0000000000000..eb88a7184547c
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..407c6d2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 0000000000000..e91ffd93182f4
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,22 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 75448744b901596f7b2fdcecc335b9ef5971cf12 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 0000000000000..5760c39b5d33f
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 8674b2ad6576471cf5de3e17402b0d02133eea38 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 0000000000000..42aa37b20a23c
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 0000000000000..5e49b75ef7da4
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (7 preceding siblings ...)
  2024-02-17 21:25 ` Pestdoktor
@ 2024-02-17 21:39 ` Pestdoktor
  2024-02-17 21:53 ` Pestdoktor
                   ` (17 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 21:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14404 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..7e8b04f615d02e 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From db07aafbbebda0c796b0c11bb0e931ecf5e9660a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 44 +++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..7da8180767ca8a
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 4efdfcdb3848182ef80448015d52ed96090ed920 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 19 +++++++++
 srcpkgs/haredoc/template                      | 22 ++++++++++
 3 files changed, 83 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..132f836cfc3af1
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,19 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0e1718f7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,11 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) $(HARE_DEFINES) \
++		-o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..e91ffd93182f4a
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,22 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From aed93b672dc9a2797d1f446c2e6630bce82adf37 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 85d857df1f6cb8c9a79b80cc5cc8daaeeb060453 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..5e49b75ef7da42
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (8 preceding siblings ...)
  2024-02-17 21:39 ` Pestdoktor
@ 2024-02-17 21:53 ` Pestdoktor
  2024-02-17 21:59 ` Pestdoktor
                   ` (16 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 21:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14702 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..7e8b04f615d02e 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From db07aafbbebda0c796b0c11bb0e931ecf5e9660a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 44 +++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..7da8180767ca8a
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 4efdfcdb3848182ef80448015d52ed96090ed920 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 19 +++++++++
 srcpkgs/haredoc/template                      | 22 ++++++++++
 3 files changed, 83 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..132f836cfc3af1
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,19 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0e1718f7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,11 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) $(HARE_DEFINES) \
++		-o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..e91ffd93182f4a
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,22 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From aed93b672dc9a2797d1f446c2e6630bce82adf37 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From a4eec28b3c911936a73a8922dd9fdd705020606d Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 33 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 18 ++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..bf16d5c4164b63
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,33 @@
+diff --git a/Makefile b/Makefile
+index c861fef..9b9e7a8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,6 +2,7 @@
+ .SUFFIXES:
+ HARE=hare
+ HAREFLAGS=
++HARECFLAGS=
+ SCDOC=scdoc
+ 
+ DESTDIR=
+@@ -15,16 +16,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..5e27e860ce781f
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,18 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+	sed -i "s|^HARECFLAGS=$|HARECFLAGS= -a${XBPS_TARGET_MACHINE%-musl}|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (9 preceding siblings ...)
  2024-02-17 21:53 ` Pestdoktor
@ 2024-02-17 21:59 ` Pestdoktor
  2024-02-18 23:55 ` [PR REVIEW] " sug0
                   ` (15 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-17 21:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14757 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107..7e8b04f615d02 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 0000000000000..831adad5e0b9f
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From db07aafbbebda0c796b0c11bb0e931ecf5e9660a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 44 +++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 0000000000000..7da8180767ca8
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 4efdfcdb3848182ef80448015d52ed96090ed920 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 19 +++++++++
 srcpkgs/haredoc/template                      | 22 ++++++++++
 3 files changed, 83 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 0000000000000..132f836cfc3af
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,19 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0e1718f7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,11 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) $(HARE_DEFINES) \
++		-o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 0000000000000..e91ffd93182f4
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,22 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From aed93b672dc9a2797d1f446c2e6630bce82adf37 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 0000000000000..5760c39b5d33f
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From bac0332cca7128f6ee09c3e69bfcd6aa86ca35c1 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 37 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 18 +++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 0000000000000..b69c333566ca2
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,37 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6ce28d1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,6 +2,7 @@
+ .SUFFIXES:
+ HARE=hare
+ HAREFLAGS=
++HARECFLAGS=
+ SCDOC=scdoc
+ 
+ DESTDIR=
+@@ -15,19 +16,19 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+-	hare test
++	env HARECFLAGS="$(HARECFLAGS)" hare test
+ 
+ DOCS=\
+      himitsud.1 \
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 0000000000000..5e27e860ce781
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,18 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+	sed -i "s|^HARECFLAGS=$|HARECFLAGS= -a${XBPS_TARGET_MACHINE%-musl}|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR REVIEW] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (10 preceding siblings ...)
  2024-02-17 21:59 ` Pestdoktor
@ 2024-02-18 23:55 ` sug0
  2024-02-19 16:45 ` [PR PATCH] [Updated] " Pestdoktor
                   ` (14 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: sug0 @ 2024-02-18 23:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]

New review comment by sug0 on void-packages repository

https://github.com/void-linux/void-packages/pull/48784#discussion_r1493879476

Comment:
```suggestion
depends="qbe-1.2_1"
```
isn't `harec` only required to bootstrap the compiler?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (11 preceding siblings ...)
  2024-02-18 23:55 ` [PR REVIEW] " sug0
@ 2024-02-19 16:45 ` Pestdoktor
  2024-02-19 16:56 ` Pestdoktor
                   ` (13 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-19 16:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 14404 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..7e8b04f615d02e 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From db07aafbbebda0c796b0c11bb0e931ecf5e9660a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 ++++++++++++++++++
 srcpkgs/hare-driver/template                  | 44 +++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..7da8180767ca8a
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 4efdfcdb3848182ef80448015d52ed96090ed920 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 19 +++++++++
 srcpkgs/haredoc/template                      | 22 ++++++++++
 3 files changed, 83 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..132f836cfc3af1
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,19 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0e1718f7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,11 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) $(HARE_DEFINES) \
++		-o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..e91ffd93182f4a
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,22 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From aed93b672dc9a2797d1f446c2e6630bce82adf37 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 2f3669d93a150e16c0a667cbdfe19d17be04919c Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..5e49b75ef7da42
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (12 preceding siblings ...)
  2024-02-19 16:45 ` [PR PATCH] [Updated] " Pestdoktor
@ 2024-02-19 16:56 ` Pestdoktor
  2024-02-19 17:07 ` Pestdoktor
                   ` (12 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-19 16:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 19928 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..7e8b04f615d02e 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From ed9b1b6c3c3878d7ee2cc068fbac69e41d9f40b3 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  44 +++++
 3 files changed, 266 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 00000000000000..550fa2fd66b3f1
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..7da8180767ca8a
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From d1f8a4540539626c093c94a4274db2f1e7df7c35 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 19 +++++++++
 srcpkgs/haredoc/template                      | 22 ++++++++++
 3 files changed, 83 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..132f836cfc3af1
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,19 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0e1718f7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,11 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@env HARECFLAGS="$(HARECFLAGS)" hare build $(HAREFLAGS) $(HARE_DEFINES) \
++		-o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..e91ffd93182f4a
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,22 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 62dda66866eebf8dea1b2ad096d86ef7f574c6e0 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 081fda1262804b688549e3e86c0208a85de201e6 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..5e49b75ef7da42
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (13 preceding siblings ...)
  2024-02-19 16:56 ` Pestdoktor
@ 2024-02-19 17:07 ` Pestdoktor
  2024-02-19 17:21 ` Pestdoktor
                   ` (11 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-19 17:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 19778 bytes --]

From 2773da026c21255c5aec43e55c3f5e23beced515 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107..7e8b04f615d02 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
 	aarch64*|x86_64*) ;;
+	# Currently only aarch64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From 5a33a6e81ab762ff1e2e3a8882528abfb953aba8 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 0000000000000..831adad5e0b9f
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From ed9b1b6c3c3878d7ee2cc068fbac69e41d9f40b3 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  44 +++++
 3 files changed, 266 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 0000000000000..550fa2fd66b3f
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 0000000000000..7da8180767ca8
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,44 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 833ba923ecc6cd16fbb88b586824e80a3c65263e Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 21 ++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 0000000000000..328795e4a1363
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0f86869e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 0000000000000..13b916ebadad7
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,21 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 30e6bea1d7d31225951b49341e7f6038e699d12f Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 0000000000000..5760c39b5d33f
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 71749f31c187fa482e709937e072a8a000cf5c41 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 17 +++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 0000000000000..42aa37b20a23c
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 0000000000000..5e49b75ef7da4
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,17 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (14 preceding siblings ...)
  2024-02-19 17:07 ` Pestdoktor
@ 2024-02-19 17:21 ` Pestdoktor
  2024-02-19 17:28 ` [PR REVIEW] " Pestdoktor
                   ` (10 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-19 17:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 20122 bytes --]

From 154d8cdce4f81daa7f4cfe7df2234cde4928b5e7 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..8a42d36e3fe21d 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
-	aarch64*|x86_64*) ;;
+	aarch64*|riscv64*|x86_64*) ;;
+	# Currently only aarch64, riscv64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From a54f5861c91020befbe8382d859f2a0c0ed8dec9 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 92c94f8ce8657f4601d7e9b80645a23589df0754 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  45 +++++
 3 files changed, 267 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 00000000000000..550fa2fd66b3f1
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..82689be5698341
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,45 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From f2a31720443037188bf856a2746745da530fe259 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 24 +++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..328795e4a1363f
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0f86869e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..81ee785f00392e
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,24 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+# disable check of seperately packaged build driver
+make_check=no
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From f90f565066d80adfe4b6eb0e592f08487e0c228d Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 3395f2cbab8ca5137b83c42b567e15b13df43b1b Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 18 +++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..ee317b46e09f5a
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,18 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR REVIEW] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (15 preceding siblings ...)
  2024-02-19 17:21 ` Pestdoktor
@ 2024-02-19 17:28 ` Pestdoktor
  2024-02-19 17:34 ` [PR PATCH] [Updated] " Pestdoktor
                   ` (9 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-19 17:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

New review comment by Pestdoktor on void-packages repository

https://github.com/void-linux/void-packages/pull/48784#discussion_r1494871559

Comment:
the hosted compiler doesn't actually exist yet, the build driver uses the bootstrap compiler for IR gen

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (16 preceding siblings ...)
  2024-02-19 17:28 ` [PR REVIEW] " Pestdoktor
@ 2024-02-19 17:34 ` Pestdoktor
  2024-02-19 17:35 ` Pestdoktor
                   ` (8 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-19 17:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 20122 bytes --]

From 154d8cdce4f81daa7f4cfe7df2234cde4928b5e7 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107b..8a42d36e3fe21d 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
-	aarch64*|x86_64*) ;;
+	aarch64*|riscv64*|x86_64*) ;;
+	# Currently only aarch64, riscv64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From a54f5861c91020befbe8382d859f2a0c0ed8dec9 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..831adad5e0b9fc
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From a6237473bc0872d505c06ca8a80d45140e2e1973 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  45 +++++
 3 files changed, 267 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 00000000000000..550fa2fd66b3f1
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..1be1f80c40ae08
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,45 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 3e4bb1fbf5c88e552ac3cac0e174a09d27911769 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 24 +++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..328795e4a1363f
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0f86869e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..3183d99fe4df15
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,24 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+# disable check of seperately packaged build driver
+make_check=no
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 93766a4ea524abf3c44abdca856da65a19b6ba4e Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 2bfde827bf998320980e8b4fd6d7cd6aa7fc8ca0 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 18 +++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..8f70a4abd45151
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,18 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (17 preceding siblings ...)
  2024-02-19 17:34 ` [PR PATCH] [Updated] " Pestdoktor
@ 2024-02-19 17:35 ` Pestdoktor
  2024-02-19 17:38 ` [PR PATCH] [Updated] " Pestdoktor
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-19 17:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

New comment by Pestdoktor on void-packages repository

https://github.com/void-linux/void-packages/pull/48784#issuecomment-1952932834

Comment:
@sug0 thanks!

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (18 preceding siblings ...)
  2024-02-19 17:35 ` Pestdoktor
@ 2024-02-19 17:38 ` Pestdoktor
  2024-02-23 19:22 ` AnInternetTroll
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-02-19 17:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 20100 bytes --]

From 154d8cdce4f81daa7f4cfe7df2234cde4928b5e7 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:34:18 +0100
Subject: [PATCH 1/6] qbe: update to 1.2.

---
 srcpkgs/qbe/template | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/qbe/template b/srcpkgs/qbe/template
index e56a69ffcc107..8a42d36e3fe21 100644
--- a/srcpkgs/qbe/template
+++ b/srcpkgs/qbe/template
@@ -1,6 +1,6 @@
 # Template file for 'qbe'
 pkgname=qbe
-version=1.1
+version=1.2
 revision=1
 build_style=gnu-makefile
 make_use_env=yes
@@ -9,15 +9,19 @@ maintainer="Bryce Vandegrift <bryce@brycevandegrift.xyz>"
 license="MIT"
 homepage="https://c9x.me/compile/"
 distfiles="https://c9x.me/compile/release/qbe-${version}.tar.xz"
-checksum=7d0a53dd40df48072aae317e11ddde15d1a980673160e514e235b9ecaa1db12c
+checksum=a6d50eb952525a234bf76ba151861f73b7a382ac952d985f2b9af1df5368225d
 
-# Currently only aarch64 and x86_64 targets are supported and the checks
-# test the compiled binaries.
 case "$XBPS_TARGET_MACHINE" in
-	aarch64*|x86_64*) ;;
+	aarch64*|riscv64*|x86_64*) ;;
+	# Currently only aarch64, riscv64 and x86_64 targets are supported and the checks
+	# test the compiled binaries.
 	*) make_check=no ;;
 esac
 
+do_configure() {
+	sed -i "s|^CC       = cc$|CC = ${CC}|" Makefile
+}
+
 post_install() {
 	vdoc doc/abi.txt
 	vdoc doc/il.txt

From a54f5861c91020befbe8382d859f2a0c0ed8dec9 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 2/6] New package: harec-0.24.0

---
 srcpkgs/harec/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 0000000000000..831adad5e0b9f
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,20 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=configure
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE}|" | \
+	sed "s|^CC = cc$|CC = ${CC}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From a6237473bc0872d505c06ca8a80d45140e2e1973 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 3/6] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  45 +++++
 3 files changed, 267 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 0000000000000..550fa2fd66b3f
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 0000000000000..1be1f80c40ae0
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,45 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=configure
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	case "${XBPS_LIBC}" in
+		glibc) lib=gnu ;;
+		musl) lib=musl ;;
+	esac
+	case "${XBPS_TARGET_MACHINE%-musl}" in
+		aarch64) target=arm64 ;;
+		riscv64) target=rv64 ;;
+		x86_64) target=amd64_sysv ;;
+	esac
+
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^ARCH = x86_64$|ARCH = ${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^HARECFLAGS =$|HARECFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^QBEFLAGS =$|QBEFLAGS = -t${target}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" | \
+	sed 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' | \
+	sed "s|^AARCH64_AS=as$|AARCH64_AS=aarch64-unknown-linux-${lib}-as|" | \
+	sed "s|^AARCH64_CC=cc$|AARCH64_CC=aarch64-unknown-linux-${lib}-cc|" | \
+	sed "s|^AARCH64_LD=ld$|AARCH64_LD=aarch64-unknown-linux-${lib}-ld|" | \
+	sed "s|^RISCV64_AS=as$|RISCV64_AS=riscv64-unknown-linux-${lib}-as|" | \
+	sed "s|^RISCV64_CC=cc$|RISCV64_CC=riscv64-unknown-linux-${lib}-cc|" | \
+	sed "s|^RISCV64_LD=ld$|RISCV64_LD=riscv64-unknown-linux-${lib}-ld|" | \
+	sed "s|^X86_64_AS=as$|X86_64_AS=x86_64-unknown-linux-${lib}-as|" | \
+	sed "s|^X86_64_CC=cc$|X86_64_CC=x86_64-unknown-linux-${lib}-cc|" | \
+	sed "s|^X86_64_LD=ld$|X86_64_LD=x86_64-unknown-linux-${lib}-ld|" > config.mk
+}

From 88eca44a05674945e828db1f7c41387e4ca3ffa9 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 4/6] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 24 +++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 0000000000000..8019c08aa7de4
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 0000000000000..328795e4a1363
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0f86869e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 0000000000000..042584a5d2b6c
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,24 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=configure
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+# disable check of seperately packaged build driver
+make_check=no
+
+do_configure() {
+	sed 's|^PREFIX = /usr/local$|PREFIX = /usr|' configs/linux.mk | \
+	sed "s|^HAREFLAGS =$|HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}|" | \
+	sed "s|^AS = as$|AS = ${AS}|" | \
+	sed "s|^LD = ld$|LD = ${LD}|" > config.mk
+}

From 3799f0c3f959d39bf44ec3cd92ea16df446e28e0 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 5/6] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 0000000000000..5760c39b5d33f
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 0a1f97099d195747f07c0f42d921eb68b2bcf91d Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 6/6] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 18 +++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 0000000000000..42aa37b20a23c
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 0000000000000..8f70a4abd4515
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,18 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=configure
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile
+	sed -i "s|^HAREFLAGS=$|HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R|" Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (19 preceding siblings ...)
  2024-02-19 17:38 ` [PR PATCH] [Updated] " Pestdoktor
@ 2024-02-23 19:22 ` AnInternetTroll
  2024-03-17 12:28 ` [PR PATCH] [Updated] " Pestdoktor
                   ` (5 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: AnInternetTroll @ 2024-02-23 19:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

New comment by AnInternetTroll on void-packages repository

https://github.com/void-linux/void-packages/pull/48784#issuecomment-1961867136

Comment:
Tested on x86\_64-glibc. I can save, encrypt, and decrypt keys as
expected!


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (20 preceding siblings ...)
  2024-02-23 19:22 ` AnInternetTroll
@ 2024-03-17 12:28 ` Pestdoktor
  2024-03-17 12:38 ` Pestdoktor
                   ` (4 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-03-17 12:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 18683 bytes --]

From e550870d11a7a44e1edf983a2cf7d20606522c8f Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 1/5] New package: harec-0.24.0

---
 srcpkgs/harec/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..5ec494a593e5f8
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,23 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=gnu-makefile
+make_use_env=yes
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	cp configs/linux.mk config.mk
+	vsed -e "s/^ARCH = x86_64$/ARCH = ${XBPS_TARGET_MACHINE}/" \
+	     -e '/^PREFIX/d' \
+	     -e '/^CC/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From b3ba89bfa63b6d9af92f7ceae4d29c310e7dfd00 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 2/5] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  51 +++++
 3 files changed, 273 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 00000000000000..550fa2fd66b3f1
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..dd383e55a611fd
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,51 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	ARCH="${XBPS_TARGET_MACHINE%-musl}"
+
+	case "${XBPS_LIBC}" in
+		glibc) platform=unknown-linux-gnu ;;
+		musl) platform=unknown-linux-musl ;;
+	esac
+
+	case "${ARCH}" in
+		aarch64) qbetarget=arm64 ;;
+		riscv64) qbetarget=rv64 ;;
+		x86_64) qbetarget=amd64_sysv ;;
+	esac
+
+	cp configs/linux.mk config.mk
+	vsed -e "s/^ARCH = x86_64$/ARCH = ${ARCH}/" \
+	     -e "s/^HARECFLAGS =$/HARECFLAGS = -a${ARCH}/" \
+	     -e "s/^QBEFLAGS =$/QBEFLAGS = -t${qbetarget}/" \
+	     -e "s/^AARCH64_AS=as$/AARCH64_AS=aarch64-${platform}-as/" \
+	     -e "s/^AARCH64_CC=cc$/AARCH64_CC=aarch64-${platform}-cc/" \
+	     -e "s/^AARCH64_LD=ld$/AARCH64_LD=aarch64-${platform}-ld/" \
+	     -e "s/^RISCV64_AS=as$/RISCV64_AS=riscv64-${platform}-as/" \
+	     -e "s/^RISCV64_CC=cc$/RISCV64_CC=riscv64-${platform}-cc/" \
+	     -e "s/^RISCV64_LD=ld$/RISCV64_LD=riscv64-${platform}-ld/" \
+	     -e "s/^X86_64_AS=as$/X86_64_AS=x86_64-${platform}-as/" \
+	     -e "s/^X86_64_CC=cc$/X86_64_CC=x86_64-${platform}-cc/" \
+	     -e "s/^X86_64_LD=ld$/X86_64_LD=x86_64-${platform}-ld/" \
+	     -e 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' \
+	     -e '/^PREFIX/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From 00a8f26c456e38c92c4c4ffa735d4df50154d25a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 3/5] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 27 ++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..328795e4a1363f
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0f86869e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..6b443842454dc0
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,27 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+# disable check of seperately packaged build driver
+make_check=no
+
+do_configure() {
+	cp configs/linux.mk config.mk
+	vsed -e "s/^HAREFLAGS =$/HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}/ -R" \
+	     -e '/^PREFIX/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From d8da2579fdea2ba5cf9479461f693a95d433c396 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 4/5] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 76a8758604f2995197ce0d82e4fcbc56ee345913 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 5/5] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 20 +++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..9170971e63846a
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,20 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	vsed -e "s/^HAREFLAGS=$/HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R/" \
+	     -e '/^PREFIX/d' \
+	     -i Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (21 preceding siblings ...)
  2024-03-17 12:28 ` [PR PATCH] [Updated] " Pestdoktor
@ 2024-03-17 12:38 ` Pestdoktor
  2024-03-17 12:41 ` Pestdoktor
                   ` (3 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-03-17 12:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 18681 bytes --]

From e550870d11a7a44e1edf983a2cf7d20606522c8f Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 1/5] New package: harec-0.24.0

---
 srcpkgs/harec/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..5ec494a593e5f8
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,23 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=gnu-makefile
+make_use_env=yes
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	cp configs/linux.mk config.mk
+	vsed -e "s/^ARCH = x86_64$/ARCH = ${XBPS_TARGET_MACHINE}/" \
+	     -e '/^PREFIX/d' \
+	     -e '/^CC/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From fce9ba6e976546707cd2fc330456f7d7a61f6150 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 2/5] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  51 +++++
 3 files changed, 273 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 00000000000000..550fa2fd66b3f1
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..79a1a4592a6b9b
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,51 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	ARCH="${XBPS_TARGET_MACHINE%-musl}"
+
+	case "${XBPS_LIBC}" in
+		glibc) platform=unknown-linux-gnu ;;
+		musl) platform=unknown-linux-musl ;;
+	esac
+
+	case "${ARCH}" in
+		aarch64) qbetarget=arm64 ;;
+		riscv64) qbetarget=rv64 ;;
+		x86_64) qbetarget=amd64_sysv ;;
+	esac
+
+	cp configs/linux.mk config.mk
+	vsed -e "s/^ARCH = x86_64$/ARCH=${ARCH}/" \
+	     -e "s/^HARECFLAGS =$/HARECFLAGS = -a${ARCH}/" \
+	     -e "s/^QBEFLAGS =$/QBEFLAGS = -t${qbetarget}/" \
+	     -e "s/^AARCH64_AS=as$/AARCH64_AS=aarch64-${platform}-as/" \
+	     -e "s/^AARCH64_CC=cc$/AARCH64_CC=aarch64-${platform}-cc/" \
+	     -e "s/^AARCH64_LD=ld$/AARCH64_LD=aarch64-${platform}-ld/" \
+	     -e "s/^RISCV64_AS=as$/RISCV64_AS=riscv64-${platform}-as/" \
+	     -e "s/^RISCV64_CC=cc$/RISCV64_CC=riscv64-${platform}-cc/" \
+	     -e "s/^RISCV64_LD=ld$/RISCV64_LD=riscv64-${platform}-ld/" \
+	     -e "s/^X86_64_AS=as$/X86_64_AS=x86_64-${platform}-as/" \
+	     -e "s/^X86_64_CC=cc$/X86_64_CC=x86_64-${platform}-cc/" \
+	     -e "s/^X86_64_LD=ld$/X86_64_LD=x86_64-${platform}-ld/" \
+	     -e 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' \
+	     -e '/^PREFIX/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From 06a410c954622de8af15861b1d72b610197c23bb Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 3/5] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 27 ++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..328795e4a1363f
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0f86869e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..6b443842454dc0
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,27 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+# disable check of seperately packaged build driver
+make_check=no
+
+do_configure() {
+	cp configs/linux.mk config.mk
+	vsed -e "s/^HAREFLAGS =$/HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}/ -R" \
+	     -e '/^PREFIX/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From 211086b305f7e52f4d9d7b7365501157439e7da6 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 4/5] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 377f844406eedacd84bfcf970e544b22d9c923b0 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 5/5] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 20 +++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..9170971e63846a
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,20 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	vsed -e "s/^HAREFLAGS=$/HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R/" \
+	     -e '/^PREFIX/d' \
+	     -i Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (22 preceding siblings ...)
  2024-03-17 12:38 ` Pestdoktor
@ 2024-03-17 12:41 ` Pestdoktor
  2024-03-17 12:45 ` Pestdoktor
                   ` (2 subsequent siblings)
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-03-17 12:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 18679 bytes --]

From b41a97ee47b1c5fffefd9db1eedde1595a2df95f Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 1/5] New package: harec-0.24.0

---
 srcpkgs/harec/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..98b005765ef3b5
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,23 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=gnu-makefile
+make_use_env=yes
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	cp configs/linux.mk config.mk
+	vsed -e "s/^ARCH = x86_64$/ARCH=${XBPS_TARGET_MACHINE}/" \
+	     -e '/^PREFIX/d' \
+	     -e '/^CC/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From eec7a81291c923149d5f0e92f49845d049694670 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 2/5] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  51 +++++
 3 files changed, 273 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 00000000000000..550fa2fd66b3f1
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..79a1a4592a6b9b
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,51 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	ARCH="${XBPS_TARGET_MACHINE%-musl}"
+
+	case "${XBPS_LIBC}" in
+		glibc) platform=unknown-linux-gnu ;;
+		musl) platform=unknown-linux-musl ;;
+	esac
+
+	case "${ARCH}" in
+		aarch64) qbetarget=arm64 ;;
+		riscv64) qbetarget=rv64 ;;
+		x86_64) qbetarget=amd64_sysv ;;
+	esac
+
+	cp configs/linux.mk config.mk
+	vsed -e "s/^ARCH = x86_64$/ARCH=${ARCH}/" \
+	     -e "s/^HARECFLAGS =$/HARECFLAGS = -a${ARCH}/" \
+	     -e "s/^QBEFLAGS =$/QBEFLAGS = -t${qbetarget}/" \
+	     -e "s/^AARCH64_AS=as$/AARCH64_AS=aarch64-${platform}-as/" \
+	     -e "s/^AARCH64_CC=cc$/AARCH64_CC=aarch64-${platform}-cc/" \
+	     -e "s/^AARCH64_LD=ld$/AARCH64_LD=aarch64-${platform}-ld/" \
+	     -e "s/^RISCV64_AS=as$/RISCV64_AS=riscv64-${platform}-as/" \
+	     -e "s/^RISCV64_CC=cc$/RISCV64_CC=riscv64-${platform}-cc/" \
+	     -e "s/^RISCV64_LD=ld$/RISCV64_LD=riscv64-${platform}-ld/" \
+	     -e "s/^X86_64_AS=as$/X86_64_AS=x86_64-${platform}-as/" \
+	     -e "s/^X86_64_CC=cc$/X86_64_CC=x86_64-${platform}-cc/" \
+	     -e "s/^X86_64_LD=ld$/X86_64_LD=x86_64-${platform}-ld/" \
+	     -e 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' \
+	     -e '/^PREFIX/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From d4bf40452c07d956b748256f83f554accfc8b1b9 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 3/5] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 27 ++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..328795e4a1363f
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0f86869e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..6b443842454dc0
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,27 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+# disable check of seperately packaged build driver
+make_check=no
+
+do_configure() {
+	cp configs/linux.mk config.mk
+	vsed -e "s/^HAREFLAGS =$/HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl}/ -R" \
+	     -e '/^PREFIX/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From c51da55a6cf76cf4f04577ecf97bdf6883c4c3b4 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 4/5] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From a264d1f2395bbf9ce268aada0a6e8aa52237ceda Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 5/5] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 20 +++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..9170971e63846a
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,20 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	vsed -e "s/^HAREFLAGS=$/HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R/" \
+	     -e '/^PREFIX/d' \
+	     -i Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR PATCH] [Updated] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (23 preceding siblings ...)
  2024-03-17 12:41 ` Pestdoktor
@ 2024-03-17 12:45 ` Pestdoktor
  2024-03-31 17:15 ` [PR REVIEW] " aryalaadi
  2024-03-31 17:15 ` aryalaadi
  26 siblings, 0 replies; 28+ messages in thread
From: Pestdoktor @ 2024-03-17 12:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

There is an updated pull request by Pestdoktor against master on the void-packages repository

https://github.com/Pestdoktor/void-packages himitsu
https://github.com/void-linux/void-packages/pull/48784

New package: himitsu-0.6
<!-- Uncomment relevant sections and delete options which are not applicable -->

requested by  #40466
dependencies tracked at #48783

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48784.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-himitsu-48784.patch --]
[-- Type: text/x-diff, Size: 18679 bytes --]

From b41a97ee47b1c5fffefd9db1eedde1595a2df95f Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:36:25 +0100
Subject: [PATCH 1/5] New package: harec-0.24.0

---
 srcpkgs/harec/template | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 srcpkgs/harec/template

diff --git a/srcpkgs/harec/template b/srcpkgs/harec/template
new file mode 100644
index 00000000000000..98b005765ef3b5
--- /dev/null
+++ b/srcpkgs/harec/template
@@ -0,0 +1,23 @@
+# Template file for 'harec'
+pkgname=harec
+version=0.24.0
+revision=1
+build_style=gnu-makefile
+make_use_env=yes
+checkdepends="qbe"
+short_desc="Hare bootstrap compiler"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://git.sr.ht/~sircmpwn/harec"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="add6a7c4cbfd130c5e9fcecd2d43bec39640ed9f9cfbe9166e4b7e945a46b7de"
+
+do_configure() {
+	cp configs/linux.mk config.mk
+	vsed -e "s/^ARCH = x86_64$/ARCH=${XBPS_TARGET_MACHINE}/" \
+	     -e '/^PREFIX/d' \
+	     -e '/^CC/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From eec7a81291c923149d5f0e92f49845d049694670 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:43:46 +0100
Subject: [PATCH 2/5] New package: hare-driver-0.24.0

---
 ...-add-separate-haredoc-install-target.patch |  42 ++++
 .../patches/02-pass-arch-to-harec.patch       | 180 ++++++++++++++++++
 srcpkgs/hare-driver/template                  |  51 +++++
 3 files changed, 273 insertions(+)
 create mode 100644 srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
 create mode 100644 srcpkgs/hare-driver/template

diff --git a/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
new file mode 100644
index 00000000000000..550fa2fd66b3f1
--- /dev/null
+++ b/srcpkgs/hare-driver/patches/02-pass-arch-to-harec.patch
@@ -0,0 +1,180 @@
+From 700336294285a553fe47600b6d155a4a7dba8339 Mon Sep 17 00:00:00 2001
+From: Ember Sawady <ecs@d2evs.net>
+Date: Sun, 18 Feb 2024 19:32:10 +0000
+Subject: [PATCH hare] hare build: pass -a to harec
+
+reported by Jonas Fenkter
+
+Signed-off-by: Ember Sawady <ecs@d2evs.net>
+---
+ cmd/hare/arch.ha        | 22 ++++++++--------------
+ cmd/hare/build.ha       |  7 +++----
+ cmd/hare/build/types.ha | 10 +++++++++-
+ cmd/hare/build/util.ha  |  9 +++++++--
+ 4 files changed, 27 insertions(+), 21 deletions(-)
+
+diff --git a/cmd/hare/arch.ha b/cmd/hare/arch.ha
+index 791fac9b..10bf79f7 100644
+--- a/cmd/hare/arch.ha
++++ b/cmd/hare/arch.ha
+@@ -1,6 +1,8 @@
+ // SPDX-License-Identifier: GPL-3.0-only
+ // (c) Hare authors <https://harelang.org>
+ 
++use cmd::hare::build;
++
+ // When building the bootstrap toolchain, these values will get overwritten to
+ // equal the values in config.mk
+ def AARCH64_AS = "as";
+@@ -13,32 +15,24 @@ def X86_64_AS  = "as";
+ def X86_64_CC  = "cc";
+ def X86_64_LD  = "ld";
+ 
+-type arch = struct {
+-	name: str,
+-	qbe_name: str,
+-	as_cmd: str,
+-	cc_cmd: str,
+-	ld_cmd: str,
+-};
+-
+ // TODO: implement cross compiling to other kernels (e.g. linux => freebsd)
+ // TODO: sysroots
+-const arches: [_]arch = [
+-	arch {
++const arches: [_]build::arch = [
++	build::arch {
+ 		name = "aarch64",
+ 		qbe_name = "arm64",
+ 		as_cmd = AARCH64_AS,
+ 		cc_cmd = AARCH64_CC,
+ 		ld_cmd = AARCH64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "riscv64",
+ 		qbe_name = "rv64",
+ 		as_cmd = RISCV64_AS,
+ 		cc_cmd = RISCV64_CC,
+ 		ld_cmd = RISCV64_LD,
+ 	},
+-	arch {
++	build::arch {
+ 		name = "x86_64",
+ 		qbe_name = "amd64_sysv",
+ 		as_cmd = X86_64_AS,
+@@ -47,12 +41,12 @@ const arches: [_]arch = [
+ 	},
+ ];
+ 
+-fn set_arch_tags(tags: *[]str, a: *arch) void = {
++fn set_arch_tags(tags: *[]str, a: *build::arch) void = {
+ 	merge_tags(tags, "-aarch64-riscv64-x86_64")!;
+ 	append(tags, a.name);
+ };
+ 
+-fn get_arch(name: str) (*arch | unknown_arch) = {
++fn get_arch(name: str) (*build::arch | unknown_arch) = {
+ 	for (let i = 0z; i < len(arches); i += 1) {
+ 		if (arches[i].name == name) {
+ 			return &arches[i];
+diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
+index b2ac6518..bf6b26a9 100644
+--- a/cmd/hare/build.ha
++++ b/cmd/hare/build.ha
+@@ -21,8 +21,7 @@ use strings;
+ use unix::tty;
+ 
+ fn build(name: str, cmd: *getopt::command) (void | error) = {
+-	let arch = os::arch_name(os::architecture());
+-	let arch = get_arch(arch)!;
++	let arch = get_arch(os::arch_name(os::architecture()))!;
+ 	let output = "";
+ 	let ctx = build::context {
+ 		ctx = module::context {
+@@ -38,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 			yield ncpu;
+ 		},
+ 		version = build::get_version(os::tryenv("HAREC", "harec"))?,
+-		arch = arch.qbe_name,
++		arch = arch,
+ 		platform = build::get_platform(os::sysname())?,
+ 		...
+ 	};
+@@ -59,7 +58,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
+ 		switch (opt.0) {
+ 		case 'a' =>
+ 			arch = get_arch(opt.1)?;
+-			ctx.arch = arch.qbe_name;
++			ctx.arch = arch;
+ 		case 'D' =>
+ 			let buf = memio::fixed(strings::toutf8(opt.1));
+ 			let sc = bufio::newscanner(&buf, len(opt.1));
+diff --git a/cmd/hare/build/types.ha b/cmd/hare/build/types.ha
+index df6c12b9..d7086c47 100644
+--- a/cmd/hare/build/types.ha
++++ b/cmd/hare/build/types.ha
+@@ -51,9 +51,17 @@ export type output = enum {
+ 	VVERBOSE,
+ };
+ 
++export type arch = struct {
++	name: str,
++	qbe_name: str,
++	as_cmd: str,
++	cc_cmd: str,
++	ld_cmd: str,
++};
++
+ export type context = struct {
+ 	ctx: module::context,
+-	arch: str,
++	arch: *arch,
+ 	platform: *platform,
+ 	goal: stage,
+ 	defines: []ast::decl_const,
+diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
+index a648788f..d4725b1e 100644
+--- a/cmd/hare/build/util.ha
++++ b/cmd/hare/build/util.ha
+@@ -104,7 +104,7 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 	case stage::SSA => void; // below
+ 	case stage::S =>
+ 		append(flags, strings::dup("-t"));
+-		append(flags, strings::dup(ctx.arch));
++		append(flags, strings::dup(ctx.arch.qbe_name));
+ 		return flags;
+ 	case stage::O =>
+ 		return flags;
+@@ -123,6 +123,9 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
+ 		return flags;
+ 	};
+ 
++	append(flags, strings::dup("-a"));
++	append(flags, strings::dup(ctx.arch.name));
++
+ 	let mod = ctx.mods[t.idx];
+ 	if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ 		append(flags, strings::dup("-N"));
+@@ -190,6 +193,8 @@ fn get_hash(
+ 	switch (t.kind) {
+ 	case stage::TD => abort();
+ 	case stage::SSA =>
++		hash::write(&h, strings::toutf8(ctx.arch.name));
++		hash::write(&h, [0]);
+ 		hash::write(&h, ctx.version);
+ 		hash::write(&h, [0]);
+ 		for (let i = 0z; i < len(ctx.mods[t.idx].deps); i += 1) {
+@@ -209,7 +214,7 @@ fn get_hash(
+ 			hash::write(&h, [0]);
+ 		};
+ 	case stage::S =>
+-		hash::write(&h, strings::toutf8(ctx.arch));
++		hash::write(&h, strings::toutf8(ctx.arch.qbe_name));
+ 		hash::write(&h, [0]);
+ 	case stage::O => void;
+ 	case stage::BIN =>
+-- 
+2.43.1
+
+
diff --git a/srcpkgs/hare-driver/template b/srcpkgs/hare-driver/template
new file mode 100644
index 00000000000000..79a1a4592a6b9b
--- /dev/null
+++ b/srcpkgs/hare-driver/template
@@ -0,0 +1,51 @@
+# Template file for 'hare-driver'
+pkgname=hare-driver
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+make_build_target=".bin/hare docs"
+make_install_target="install-cmd install-mods"
+hostmakedepends="qbe harec scdoc"
+depends="qbe-1.2_1 harec-0.24.0_1"
+short_desc="Hare build driver"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+
+do_configure() {
+	ARCH="${XBPS_TARGET_MACHINE%-musl}"
+
+	case "${XBPS_LIBC}" in
+		glibc) platform=unknown-linux-gnu ;;
+		musl) platform=unknown-linux-musl ;;
+	esac
+
+	case "${ARCH}" in
+		aarch64) qbetarget=arm64 ;;
+		riscv64) qbetarget=rv64 ;;
+		x86_64) qbetarget=amd64_sysv ;;
+	esac
+
+	cp configs/linux.mk config.mk
+	vsed -e "s/^ARCH = x86_64$/ARCH=${ARCH}/" \
+	     -e "s/^HARECFLAGS =$/HARECFLAGS = -a${ARCH}/" \
+	     -e "s/^QBEFLAGS =$/QBEFLAGS = -t${qbetarget}/" \
+	     -e "s/^AARCH64_AS=as$/AARCH64_AS=aarch64-${platform}-as/" \
+	     -e "s/^AARCH64_CC=cc$/AARCH64_CC=aarch64-${platform}-cc/" \
+	     -e "s/^AARCH64_LD=ld$/AARCH64_LD=aarch64-${platform}-ld/" \
+	     -e "s/^RISCV64_AS=as$/RISCV64_AS=riscv64-${platform}-as/" \
+	     -e "s/^RISCV64_CC=cc$/RISCV64_CC=riscv64-${platform}-cc/" \
+	     -e "s/^RISCV64_LD=ld$/RISCV64_LD=riscv64-${platform}-ld/" \
+	     -e "s/^X86_64_AS=as$/X86_64_AS=x86_64-${platform}-as/" \
+	     -e "s/^X86_64_CC=cc$/X86_64_CC=x86_64-${platform}-cc/" \
+	     -e "s/^X86_64_LD=ld$/X86_64_LD=x86_64-${platform}-ld/" \
+	     -e 's|^VERSION=$$(./scripts/version)$|VERSION=0.24.0|' \
+	     -e '/^PREFIX/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From 4424fb852dcdad8d2d1a110a55702bba0e4bcd4e Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 20:24:10 +0100
Subject: [PATCH 3/5] New package: haredoc-0.24.0

---
 ...-add-separate-haredoc-install-target.patch | 42 +++++++++++++++++++
 .../02-use-native-compiler-for-haredoc.patch  | 18 ++++++++
 srcpkgs/haredoc/template                      | 27 ++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
 create mode 100644 srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
 create mode 100644 srcpkgs/haredoc/template

diff --git a/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
new file mode 100644
index 00000000000000..8019c08aa7de41
--- /dev/null
+++ b/srcpkgs/haredoc/patches/01-add-separate-haredoc-install-target.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..69e5ab8e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -82,8 +82,8 @@ docs: \
+ 	docs/haredoc.5 \
+ 	docs/hare-module.5
+ 
+-MAN1 = hare hare-build hare-cache hare-deps haredoc hare-run hare-test
+-MAN5 = haredoc hare-module
++MAN1 = hare hare-build hare-cache hare-deps hare-run hare-test
++MAN5 = hare-module
+ 
+ bootstrap:
+ 	@BINOUT=$(BINOUT) ./scripts/genbootstrap
+@@ -97,17 +97,24 @@ check: $(BINOUT)/hare
+ 		QBEFLAGS='$(QBEFLAGS)' ASFLAGS='$(ASFLAGS)' \
+ 		LDLINKFLAGS='$(LDLINKFLAGS)' '$(BINOUT)/hare' test
+ 
+-install: install-cmd install-mods
++install: install-cmd install-haredoc install-mods
+ 
+ install-cmd:
+ 	mkdir -p -- \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
+ 		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
+ 	install -m755 '$(BINOUT)/hare' '$(DESTDIR)$(BINDIR)/hare'
+-	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
+ 	for i in $(MAN1); do install -m644 docs/$$i.1 '$(DESTDIR)$(MANDIR)'/man1/$$i.1; done
+ 	for i in $(MAN5); do install -m644 docs/$$i.5 '$(DESTDIR)$(MANDIR)'/man5/$$i.5; done
+ 
++install-haredoc:
++	mkdir -p -- \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' \
++		'$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man5'
++	install -m755 '$(BINOUT)/haredoc' '$(DESTDIR)$(BINDIR)/haredoc'
++	install -m644 docs/haredoc.1 '$(DESTDIR)$(MANDIR)'/man1/haredoc.1
++	install -m644 docs/haredoc.5 '$(DESTDIR)$(MANDIR)'/man5/haredoc.5
++
+ install-mods:
+ 	rm -rf -- '$(DESTDIR)$(STDLIB)'
+ 	mkdir -p -- '$(DESTDIR)$(STDLIB)'
diff --git a/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
new file mode 100644
index 00000000000000..328795e4a1363f
--- /dev/null
+++ b/srcpkgs/haredoc/patches/02-use-native-compiler-for-haredoc.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile b/Makefile
+index 2482be1f..0f86869e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -52,11 +52,10 @@ $(BINOUT)/harec2: $(BINOUT)/hare
+ 		LDLINKFLAGS="$(LDLINKFLAGS)" \
+ 		$(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/harec2 cmd/harec
+ 
+-$(BINOUT)/haredoc: $(BINOUT)/hare
++$(BINOUT)/haredoc:
+ 	@mkdir -p $(BINOUT)
+ 	@printf 'HARE\t%s\n' "$@"
+-	@env HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" $(BINOUT)/hare build \
+-		$(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
++	@hare build $(HAREFLAGS) -o $(BINOUT)/haredoc ./cmd/haredoc
+ 
+ docs/html: $(BINOUT)/haredoc
+ 	mkdir -p docs/html
diff --git a/srcpkgs/haredoc/template b/srcpkgs/haredoc/template
new file mode 100644
index 00000000000000..d72d50c06e66c5
--- /dev/null
+++ b/srcpkgs/haredoc/template
@@ -0,0 +1,27 @@
+# Template file for 'haredoc'
+pkgname=haredoc
+version=0.24.0
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+make_build_target=".bin/haredoc docs"
+make_install_target="install-haredoc"
+hostmakedepends="hare-driver scdoc"
+short_desc="Hare documentation reader and formatter"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"
+distfiles="https://git.sr.ht/~sircmpwn/hare/archive/${version}.tar.gz"
+checksum="7061dad3c79cca51a1662a71b1c6f8ec001f52ef3053dd3c2dbb95ae9beff7bc"
+# disable check of seperately packaged build driver
+make_check=no
+
+do_configure() {
+	cp configs/linux.mk config.mk
+	vsed -e "s/^HAREFLAGS =$/HAREFLAGS = -a${XBPS_TARGET_MACHINE%-musl} -R/" \
+	     -e '/^PREFIX/d' \
+	     -e '/^AS/d' \
+	     -e '/^LD/d' \
+	     -i config.mk
+}

From b9f381819ed2505b3b43cb5df517710c894e4a8a Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 00:37:22 +0100
Subject: [PATCH 4/5] New package: hare-0.24.0

---
 srcpkgs/hare/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/hare/template

diff --git a/srcpkgs/hare/template b/srcpkgs/hare/template
new file mode 100644
index 00000000000000..5760c39b5d33fa
--- /dev/null
+++ b/srcpkgs/hare/template
@@ -0,0 +1,10 @@
+# Template file for 'hare'
+pkgname=hare
+version=0.24.0
+revision=1
+build_style=meta
+depends="hare-driver-0.24.0_1 haredoc-0.24.0_1"
+short_desc="Systems programming language"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="MPL-2.0, GPL-3.0-only"
+homepage="https://harelang.org/"

From 85138307918c8a4bbd691857286556bf83c86305 Mon Sep 17 00:00:00 2001
From: Jonas Fentker <jonas@fentker.eu>
Date: Sat, 17 Feb 2024 01:44:02 +0100
Subject: [PATCH 5/5] New package: himitsu-0.6

---
 .../himitsu/patches/01-use-hareflags.patch    | 25 +++++++++++++++++++
 srcpkgs/himitsu/template                      | 20 +++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/himitsu/patches/01-use-hareflags.patch
 create mode 100644 srcpkgs/himitsu/template

diff --git a/srcpkgs/himitsu/patches/01-use-hareflags.patch b/srcpkgs/himitsu/patches/01-use-hareflags.patch
new file mode 100644
index 00000000000000..42aa37b20a23c1
--- /dev/null
+++ b/srcpkgs/himitsu/patches/01-use-hareflags.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index c861fef..6668520 100644
+--- a/Makefile
++++ b/Makefile
+@@ -15,16 +15,16 @@ THIRDPARTYDIR=$(HARESRCDIR)/third-party
+ all: himitsud himitsu-store hiq hiprompt-tty docs
+ 
+ himitsud:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ himitsu-store:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiprompt-tty:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ hiq:
+-	hare build -o $@ cmd/$@/
++	hare build $(HAREFLAGS) -o $@ cmd/$@/
+ 
+ check:
+ 	hare test
diff --git a/srcpkgs/himitsu/template b/srcpkgs/himitsu/template
new file mode 100644
index 00000000000000..9170971e63846a
--- /dev/null
+++ b/srcpkgs/himitsu/template
@@ -0,0 +1,20 @@
+# Template file for 'himitsu'
+pkgname=himitsu
+version=0.6
+revision=1
+archs="x86_64 x86_64-musl aarch64 aarch64-musl riscv64 riscv64-musl"
+build_style=gnu-makefile
+make_use_env=yes
+hostmakedepends="hare-driver scdoc"
+short_desc="Secret storage manager"
+maintainer="Jonas Fentker <jonas@fentker.eu>"
+license="GPL-3.0-only"
+homepage="https://himitsustore.org/"
+distfiles="https://git.sr.ht/~sircmpwn/${pkgname}/archive/${version}.tar.gz"
+checksum="a71c9a9b4cb41946261ca84bf8f6e252149e1c12cf106cdbd6644d8952b64b3e"
+
+do_configure() {
+	vsed -e "s/^HAREFLAGS=$/HAREFLAGS= -a${XBPS_TARGET_MACHINE%-musl} -R/" \
+	     -e '/^PREFIX/d' \
+	     -i Makefile
+}

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR REVIEW] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (25 preceding siblings ...)
  2024-03-31 17:15 ` [PR REVIEW] " aryalaadi
@ 2024-03-31 17:15 ` aryalaadi
  26 siblings, 0 replies; 28+ messages in thread
From: aryalaadi @ 2024-03-31 17:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

New review comment by aryalaadi on void-packages repository

https://github.com/void-linux/void-packages/pull/48784#discussion_r1545737347

Comment:
this could be part of upstream

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PR REVIEW] New package: himitsu-0.6
  2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
                   ` (24 preceding siblings ...)
  2024-03-17 12:45 ` Pestdoktor
@ 2024-03-31 17:15 ` aryalaadi
  2024-03-31 17:15 ` aryalaadi
  26 siblings, 0 replies; 28+ messages in thread
From: aryalaadi @ 2024-03-31 17:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

New review comment by aryalaadi on void-packages repository

https://github.com/void-linux/void-packages/pull/48784#discussion_r1545738114

Comment:
this could also be a part of upstream 

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2024-03-31 17:15 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17  0:50 [PR PATCH] New package: himitsu-0.6 Pestdoktor
2024-02-17 18:34 ` [PR PATCH] [Updated] " Pestdoktor
2024-02-17 19:30 ` Pestdoktor
2024-02-17 20:23 ` Pestdoktor
2024-02-17 20:33 ` Pestdoktor
2024-02-17 20:58 ` Pestdoktor
2024-02-17 21:09 ` Pestdoktor
2024-02-17 21:14 ` Pestdoktor
2024-02-17 21:25 ` Pestdoktor
2024-02-17 21:39 ` Pestdoktor
2024-02-17 21:53 ` Pestdoktor
2024-02-17 21:59 ` Pestdoktor
2024-02-18 23:55 ` [PR REVIEW] " sug0
2024-02-19 16:45 ` [PR PATCH] [Updated] " Pestdoktor
2024-02-19 16:56 ` Pestdoktor
2024-02-19 17:07 ` Pestdoktor
2024-02-19 17:21 ` Pestdoktor
2024-02-19 17:28 ` [PR REVIEW] " Pestdoktor
2024-02-19 17:34 ` [PR PATCH] [Updated] " Pestdoktor
2024-02-19 17:35 ` Pestdoktor
2024-02-19 17:38 ` [PR PATCH] [Updated] " Pestdoktor
2024-02-23 19:22 ` AnInternetTroll
2024-03-17 12:28 ` [PR PATCH] [Updated] " Pestdoktor
2024-03-17 12:38 ` Pestdoktor
2024-03-17 12:41 ` Pestdoktor
2024-03-17 12:45 ` Pestdoktor
2024-03-31 17:15 ` [PR REVIEW] " aryalaadi
2024-03-31 17:15 ` aryalaadi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).