logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: bb6f7b39a8cc5ad1186235644e91aadb243ca6bd
parent 501e736e01ea80263ebab29b14076be07b9d97fc
Author: Michael Forney <mforney@mforney.org>
Date:   Thu, 17 Sep 2020 14:25:59 -0700

Add mblaze 1.0

Diffstat:

M.gitmodules4++++
Mpkg/gen.lua1+
Apkg/mblaze/gen.lua100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/mblaze/patch/0001-include-strings.h-for-str-n-casecmp.patch66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/mblaze/patch/0002-mpick-use-function-pointer-type-for-callback.patch28++++++++++++++++++++++++++++
Apkg/mblaze/src1+
Apkg/mblaze/ver1+
7 files changed, 201 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -178,6 +178,10 @@ path = pkg/libxkbcommon/src url = https://github.com/xkbcommon/libxkbcommon.git ignore = all +[submodule "pkg/mblaze/src"] + path = pkg/mblaze/src + url = https://github.com/leahneukirchen/mblaze.git + ignore = all [submodule "pkg/mc/src"] path = pkg/mc/src url = https://github.com/oridb/mc diff --git a/pkg/gen.lua b/pkg/gen.lua @@ -69,6 +69,7 @@ subgen 'lua' subgen 'make' subgen 'man-pages-posix' subgen 'mandoc' +subgen 'mblaze' subgen 'mc' subgen 'mpv' subgen 'msmtp' diff --git a/pkg/mblaze/gen.lua b/pkg/mblaze/gen.lua @@ -0,0 +1,100 @@ +cflags{ + '-std=c99', '-Wall', '-Wextra', '-Wpedantic', '-Wno-switch', + '-D _XOPEN_SOURCE=700', +} + +lib('libcommon.a', { + 'blaze822.c', + 'filter.c', + 'mymemmem.c', + 'mystrverscmp.c', + 'mytimegm.c', + 'pipeto.c', + 'rfc2045.c', + 'rfc2047.c', + 'rfc2231.c', + 'safe_u8putstr.c', + 'seq.c', + 'slurp.c', + 'squeeze_slash.c', +}) + +local tools = { + 'maddr', + 'magrep', + 'mdate', + 'mdeliver', + 'mdirs', + 'mexport', + 'mflag', + 'mflow', + 'mgenmid', + 'mhdr', + 'minc', + 'mlist', + 'mmime', + 'mpick', + 'mscan', + 'msed', + 'mseq', + 'mshow', + 'msort', + 'mthread', +} +for _, tool in ipairs(tools) do + exe(tool, {tool..'.c', 'libcommon.a'}) + file('bin/'..tool, '755', '$outdir/'..tool) +end + +build('awk', '$outdir/museragent', {'$srcdir/VERSION'}, { + expr=[['{print "#!/bin/sh"; print "exec printf \"User-Agent: mblaze/%s\\n\" \"" $$0 "\""}']], +}) + +local scripts = { + 'mcolor', + 'mcom', + 'mless', + 'mmkdir', + 'mquote', +} +for _, script in ipairs(scripts) do + file('bin/'..script, '755', '$srcdir/'..script) +end +file('bin/museragent', '755', '$outdir/museragent') +sym('bin/mbnc', 'mcom') +sym('bin/mfwd', 'mcom') +sym('bin/mrep', 'mcom') + +man{ + 'man/maddr.1', + 'man/magrep.1', + 'man/mblaze-profile.5', + 'man/mblaze.7', + 'man/mbnc.1', + 'man/mcom.1', + 'man/mdeliver.1', + 'man/mdirs.1', + 'man/mexport.1', + 'man/mflag.1', + 'man/mflow.1', + 'man/mfwd.1', + 'man/mgenmid.1', + 'man/mhdr.1', + 'man/minc.1', + 'man/mless.1', + 'man/mlist.1', + 'man/mmime.1', + 'man/mmkdir.1', + 'man/mmsg.7', + 'man/mpick.1', + 'man/mrefile.1', + 'man/mrep.1', + 'man/mscan.1', + 'man/msed.1', + 'man/mseq.1', + 'man/mshow.1', + 'man/msort.1', + 'man/mthread.1', +} + +fetch 'git' diff --git a/pkg/mblaze/patch/0001-include-strings.h-for-str-n-casecmp.patch b/pkg/mblaze/patch/0001-include-strings.h-for-str-n-casecmp.patch @@ -0,0 +1,66 @@ +From bd0ea24cf77efc683f103b037d446b0e5644364e Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 17 Sep 2020 12:16:34 -0700 +Subject: [PATCH] include strings.h for str(n)casecmp + +These POSIX functions are declared in strings.h, so include this +header explicitly instead of relying on the libc's default feature-test +macros to include it through string.h. +--- + magrep.c | 1 + + mdeliver.c | 1 + + mflow.c | 1 + + mhdr.c | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/magrep.c b/magrep.c +index 6f93a57..72ce1bb 100644 +--- a/magrep.c ++++ b/magrep.c +@@ -7,6 +7,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <strings.h> + #include <unistd.h> + + #include "blaze822.h" +diff --git a/mdeliver.c b/mdeliver.c +index 161cea5..27c4b9c 100644 +--- a/mdeliver.c ++++ b/mdeliver.c +@@ -10,6 +10,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <strings.h> + #include <unistd.h> + + #include "blaze822.h" +diff --git a/mflow.c b/mflow.c +index af6755d..1013da5 100644 +--- a/mflow.c ++++ b/mflow.c +@@ -7,6 +7,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <strings.h> + #include <unistd.h> + + #include "blaze822.h" +diff --git a/mhdr.c b/mhdr.c +index d434d1d..83bed02 100644 +--- a/mhdr.c ++++ b/mhdr.c +@@ -7,6 +7,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <strings.h> + #include <unistd.h> + + #include "blaze822.h" +-- +2.28.0 + diff --git a/pkg/mblaze/patch/0002-mpick-use-function-pointer-type-for-callback.patch b/pkg/mblaze/patch/0002-mpick-use-function-pointer-type-for-callback.patch @@ -0,0 +1,28 @@ +From 52fe8d766c7709e93f4ee2f57b2eab61287a2470 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 17 Sep 2020 12:24:08 -0700 +Subject: [PATCH] mpick: use function pointer type for callback + +Though POSIX requires this conversion to work correctly (for dlsym), +it is not valid in ISO C, so it is better to just uses the appropriate +function pointer type. +--- + mpick.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mpick.c b/mpick.c +index 379200d..3b11e67 100644 +--- a/mpick.c ++++ b/mpick.c +@@ -1466,7 +1466,7 @@ main(int argc, char *argv[]) + + xpledge("stdio rpath wpath cpath proc exec", 0); + +- void *cb = need_thr ? collect : oneline; ++ void (*cb)(char *) = need_thr ? collect : oneline; + if (argc == optind && isatty(0)) + i = blaze822_loop1(":", cb); + else +-- +2.28.0 + diff --git a/pkg/mblaze/src b/pkg/mblaze/src @@ -0,0 +1 @@ +Subproject commit 2c8acab338a84e6e4335b876aa5bd91fa72a9da8 diff --git a/pkg/mblaze/ver b/pkg/mblaze/ver @@ -0,0 +1 @@ +1.0 r0