From 088de196826fea517e9b8299abeab98a918678f5 Mon Sep 17 00:00:00 2001 From: Jonas Fentker Date: Sat, 17 Feb 2024 00:34:18 +0100 Subject: [PATCH 1/5] 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 " 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 Date: Sat, 17 Feb 2024 00:36:25 +0100 Subject: [PATCH 2/5] 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 " +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 Date: Sat, 17 Feb 2024 00:37:22 +0100 Subject: [PATCH 3/5] 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 " +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 0767ecb073618e35e9e89c942ecbab789663cfdb Mon Sep 17 00:00:00 2001 From: Jonas Fentker Date: Sat, 17 Feb 2024 01:53:52 +0100 Subject: [PATCH 4/5] New package: madeline --- srcpkgs/madeline/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/madeline/template diff --git a/srcpkgs/madeline/template b/srcpkgs/madeline/template new file mode 100644 index 00000000000000..a2e58988a64982 --- /dev/null +++ b/srcpkgs/madeline/template @@ -0,0 +1,17 @@ +# Template file for 'madeline' +pkgname=madeline +version=99git +_version=96bb0c28a8b59f7d96b9573447e6d1739d7ded7b +revision=1 +short_desc="tiny readline-alike with some batteries included" +maintainer="Jonas Fentker " +license="WTFPL" +homepage="https://git.sr.ht/~ecs/madeline" +distfiles="https://git.sr.ht/~ecs/${pkgname}/archive/${_version}.tar.gz" +checksum="16bba8ddb9102cfd108051fe1b92a48de25b43f9192460fcb822244ab7884236" + +do_install() { + vmkdir /usr/src/hare/third-party + vcopy graph /usr/src/hare/third-party + vcopy made /usr/src/hare/third-party +} From 247615688c968ae4b52c73522480f3212918fd52 Mon Sep 17 00:00:00 2001 From: Jonas Fentker Date: Sat, 17 Feb 2024 01:56:27 +0100 Subject: [PATCH 5/5] New package: rc-sircmpwn --- .../patches/01-update-madeline-usage.patch | 33 +++++++++++++++++++ srcpkgs/rc-sircmpwn/template | 25 ++++++++++++++ srcpkgs/rc/template | 5 +++ 3 files changed, 63 insertions(+) create mode 100644 srcpkgs/rc-sircmpwn/patches/01-update-madeline-usage.patch create mode 100644 srcpkgs/rc-sircmpwn/template diff --git a/srcpkgs/rc-sircmpwn/patches/01-update-madeline-usage.patch b/srcpkgs/rc-sircmpwn/patches/01-update-madeline-usage.patch new file mode 100644 index 00000000000000..b842d37c787fcf --- /dev/null +++ b/srcpkgs/rc-sircmpwn/patches/01-update-madeline-usage.patch @@ -0,0 +1,33 @@ +diff --git a/cmd/rc/interactive.ha b/cmd/rc/interactive.ha +index 1ab4003..ef3c6a0 100644 +--- a/cmd/rc/interactive.ha ++++ b/cmd/rc/interactive.ha +@@ -24,13 +24,13 @@ type prompter = struct { + prompt: str, + }; + +-fn prompt_get(p: *made::prompter, buf: []u8, pos: size) (str, str) = { ++fn prompt_get(p: *made::prompter, s: *made::state) (str, str) = { + let p = p: *prompter; + let loc = p.parser.lex.loc; + defer p.parser.lex.loc = loc; + io::seek(p.in, 0, io::whence::SET)!; + memio::reset(p.in); +- io::writeall(p.in, buf)!; ++ io::writeall(p.in, s.buf)!; + io::seek(p.in, 0, io::whence::SET)!; + + let post = match (parse::parse_commands(p.parser)) { +@@ -67,6 +67,12 @@ fn interactive(state: *interp::state) void = { + hist = &hist, + prompt = &p, + split = made::split_sh, ++ cfg = match (made::config_default("example")) { ++ case let cfg: made::config => ++ yield cfg; ++ case let e: made::error => ++ fmt::fatal(made::strerror(e)); ++ }, + ... + }; + defer made::ctx_finish(&ctx)!; diff --git a/srcpkgs/rc-sircmpwn/template b/srcpkgs/rc-sircmpwn/template new file mode 100644 index 00000000000000..a4533532b51326 --- /dev/null +++ b/srcpkgs/rc-sircmpwn/template @@ -0,0 +1,25 @@ +# Template file for 'rc-sircmpwn' +pkgname=rc-sircmpwn +version=99git +_version=efa26af8ee3af657c49693a8dd6ac25ef67fbe04 +revision=1 +build_style=configure +hostmakedepends="hare scdoc" +makedepends="madeline" +short_desc="Simple shell" +maintainer="Jonas Fentker " +license="GPL-3.0-only" +homepage="https://git.sr.ht/~sircmpwn/rc" +distfiles="https://git.sr.ht/~sircmpwn/rc/archive/${_version}.tar.gz" +checksum="ad6d2894304e8c7cbed31aea8e029d34940fa8077200be477510fd7071d1e098" +alternatives="rc:/usr/bin/rc:/usr/bin/rc-sircmpwn" +register_shell="/bin/rc" + +do_configure() { + sed -i 's|^PREFIX=/usr/local$|PREFIX=/usr|' Makefile +} + +post_install() { + mv ${DESTDIR}/usr/bin/rc ${DESTDIR}/usr/bin/rc-sircmpwn + mv ${DESTDIR}/usr/share/man/man1/rc.1 ${DESTDIR}/usr/share/man/man1/rc-sircmpwn.1 +} diff --git a/srcpkgs/rc/template b/srcpkgs/rc/template index 12d2169be11149..005791bd5669c7 100644 --- a/srcpkgs/rc/template +++ b/srcpkgs/rc/template @@ -15,6 +15,7 @@ license="Zlib" homepage="https://github.com/rakitzis/rc" distfiles="https://github.com/rakitzis/rc/archive/refs/tags/v${version}.tar.gz" checksum=0b83f8698dd8ef44ca97b25c4748c087133f53c7fff39b6b70dab65931def8b0 +alternatives="rc:/usr/bin/rc:/usr/bin/rc-rakitzis" register_shell="/bin/rc" build_options="readline libedit static" @@ -36,3 +37,7 @@ pre_build() { sigmsgs.c sigmsgs.h statval.h fi } + +post_install() { + mv ${DESTDIR}/usr/bin/rc ${DESTDIR}/usr/bin/rc-rakitzis +}