mblaze: 1.2 -> 1.3

This commit is contained in:
John McQuah 2024-09-14 19:53:07 +00:00
parent 5310509863
commit e6d3f9bc29
5 changed files with 35 additions and 48 deletions

View File

@ -1,10 +1,10 @@
untrusted comment: verify with /etc/ports/jmq.pub untrusted comment: verify with /etc/ports/jmq.pub
RWTTPlFarK9CxOqrhkKcFh3r6XK9B+pBidpBgenpAKVjoQdfMQpCW+Xew05kvIEEg0ZREgX7GCNkvXspBFuNejogVoiJsdegpAI= RWTTPlFarK9CxHNDp5cIq3z0Hq05b/H23PsaPom2rEXh6YDamOCgCrH2fg52Q7S5kKmGRYF9w9aF2sJXZ55WCaIW/B28wBenJAo=
SHA256 (Pkgfile) = d7d54e0233a81265d11336ed4cf5933c1099ed55daa70c709a54001bc251a7c3 SHA256 (Pkgfile) = c4b5420cea23e80cf8155289ce3b35b199a1a9b939e9c7c92c2eba3e8fefddbf
SHA256 (.footprint) = 6fc746ca88bb316e98fd2525578806717913e4d9da14730deb9b20e4d6bb93ca SHA256 (.footprint) = 6fc746ca88bb316e98fd2525578806717913e4d9da14730deb9b20e4d6bb93ca
SHA256 (mblaze-1.2.tar.gz) = 50c164c88cc83b4f52691341ee14060da5a6f1859e86aa73ff595de4b410037f SHA256 (mblaze-1.3.tar.gz) = db2c7bdc37eb2f6ac07263232b1d70d733edfa709cdef87db63aaec4fe64da3c
SHA256 (reuse-sent.patch) = ece58ab54ab4b65ffd5af0c59a12a4bcfacb4b257adc01f4ae8369dbe9e1b593 SHA256 (mcom.patch) = 685d3f6209227a88f50610d92cb52c1e5c16bd7db964c9067c367aa8374e9273
SHA256 (mblaze-delete.patch) = 45e79542f911ae356cf03c20ad65d6ce8bdc4b0fad632922c2ca47fe5d7c1cc1 SHA256 (mdeliver.patch) = a39d6ec139f5a7401a44eedd7c616bcfec22bfa4bb70ae2e79a79655338132ea
SHA256 (mblaze-fofl.patch) = a829a8c52966dfa073b521214510eec78284214a7a8d2b9e26d979ad76f3e62e SHA256 (mmime.patch) = ea2c9fcade620ac7dad144f40554d455e0961168a3b193d97241e62e4df9f5dc
SHA256 (mdelete.1) = 3cf71d8227dbefe66273d5caf4096a271b10c81f81775b42d707ab93aa8a36c3 SHA256 (mdelete.1) = 3cf71d8227dbefe66273d5caf4096a271b10c81f81775b42d707ab93aa8a36c3
SHA256 (mailshow) = 2d3b51f11007e41cbeb3a30afac9a68b76817cd2130a57f80fda5b870145c53d SHA256 (mailshow) = 2d3b51f11007e41cbeb3a30afac9a68b76817cd2130a57f80fda5b870145c53d

View File

@ -4,25 +4,25 @@
# Depends on: # Depends on:
name=mblaze name=mblaze
version=1.2 version=1.3
release=1 release=1
source=("https://leahneukirchen.org/releases/$name-$version.tar.gz" source=("https://leahneukirchen.org/releases/$name-$version.tar.gz"
reuse-sent.patch mblaze-delete.patch mblaze-fofl.patch mdelete.1 mailshow) mcom.patch mdeliver.patch mmime.patch mdelete.1 mailshow)
build() { build() {
cd $name-$version cd $name-$version
patch -p1 < $SRC/reuse-sent.patch patch -p1 < $SRC/mcom.patch
# Next patch adds support for easily deleting messages from disk, adopting the syntax # Next patch adds support for easily deleting messages from disk, adopting the syntax
# of mrefile (except for the destination folder, of course). Comment out if you're # of mrefile (except for the destination folder, of course). Comment out if you're
# wary of accidental data loss. # wary of accidental data loss.
# #
patch -p1 < $SRC/mblaze-delete.patch patch -p1 < $SRC/mdeliver.patch
cp $SRC/mdelete.1 man cp $SRC/mdelete.1 man
# #
# Next patch eliminates quoted-printable encoding in favor of 7bit, format=flowed, # Next patch eliminates quoted-printable encoding in favor of 7bit, format=flowed,
# if it looks like English is the primary language of composition. # if it looks like English is the primary language of composition.
# #
[ "${LANG:0:3}" = "en_" ] && patch -p1 < $SRC/mblaze-fofl.patch [ "${LANG:0:3}" = "en_" ] && patch -p1 < $SRC/mmime.patch
# dirent.h on CRUX musl protects some macros behind an ifdef test, # dirent.h on CRUX musl protects some macros behind an ifdef test,
# which the upstream source does not pass. # which the upstream source does not pass.
@ -34,7 +34,7 @@ build() {
BUILDDATE=$(date +'%Y-%m-%d') BUILDDATE=$(date +'%Y-%m-%d')
cat > $PKG/usr/bin/museragent << EOF cat > $PKG/usr/bin/museragent << EOF
#!/bin/sh #!/bin/sh
printf "User-Agent: $name/$version-$release ($BUILDDATE)\n" printf "%s" "User-Agent: $name/$version-$release ($BUILDDATE)\n"
EOF EOF
chmod 755 $PKG/usr/bin/museragent chmod 755 $PKG/usr/bin/museragent

View File

@ -1,6 +1,6 @@
--- mblaze-1.2/mcom 2021-12-12 11:39:30.000000000 -0500 --- a/mcom 2024-09-13 15:45:12.000000000 +0000
+++ mblaze-1.2f/mcom 2022-05-12 08:54:57.169177959 -0400 +++ b/mcom 2024-09-14 19:21:01.680579567 +0000
@@ -12,13 +12,13 @@ commajoin() { @@ -12,13 +12,13 @@
notmine() { notmine() {
mine="$(maddr -a -h local-mailbox:alternate-mailboxes: "$MBLAZE/profile")" mine="$(maddr -a -h local-mailbox:alternate-mailboxes: "$MBLAZE/profile")"
@ -16,13 +16,13 @@
} }
ouniq() { ouniq() {
@@ -133,6 +133,19 @@ case "$0" in @@ -134,6 +134,19 @@
"$draft" 1>&2 "$draft" 1>&2
exit 1 exit 1
fi fi
+ outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:") + outbox=$(mhdr -h outbox "$MBLAZE/profile" | sed "s:^~/:$HOME/:")
+ anyout=$(basename $outbox) + anyout=$(basename $outbox)
+ if [ -n "$(dirname "$draft" | grep "$anyout/cur$")" ]; then + if [ -n "$(dirname "$draft" | grep -q "$anyout/cur$")" ]; then
+ newdraft=$(true | mdeliver -v -c -XD "$outbox") + newdraft=$(true | mdeliver -v -c -XD "$outbox")
+ if [ -z "$newdraft" ]; then + if [ -z "$newdraft" ]; then
+ printf '%s\n' "$0: failed to load draft for editing." 1>&2 + printf '%s\n' "$0: failed to load draft for editing." 1>&2
@ -36,14 +36,3 @@
echo "using draft $draft" echo "using draft $draft"
shift shift
fi fi
@@ -358,8 +370,8 @@ fi
[ -z "$to" ] && to=$(mhdr -d -A -h from "$1")
printf 'To: %s\n' "$to"
printf 'Cc: %s\n' \
- "$(mhdr -d -A -h to:cc: "$1" |
- notmine |grep -Fv -e "$to" |
+ "$(maddr -a -h to:cc: "$1" |
+ notmine |grep -Fvi -e "$to" |
ouniq |commajoin)"
printf 'Bcc: \n'
printf '%s\n' "$hdrs" | awk '{ print }' |

View File

@ -1,10 +1,9 @@
--- mblaze-1.2/mdeliver.c 2021-12-12 11:39:30.000000000 -0500 --- a/mdeliver.c 2024-09-13 15:45:12.000000000 +0000
+++ mblaze-1.2f/mdeliver.c 2022-05-12 09:01:42.858863260 -0400 +++ b/mdeliver.c 2024-09-14 19:31:37.687633223 +0000
@@ -300,6 +300,23 @@ refile(char *file) @@ -300,6 +300,22 @@
unlink(file); unlink(file);
} }
+
+void +void
+mdelete(char *file) +mdelete(char *file)
+{ +{
@ -24,15 +23,14 @@
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
@@ -335,6 +352,32 @@ usage: @@ -335,7 +351,32 @@
return 0; return 0;
} }
+
+ +
+ if (strchr(argv[0], 't')) { + if (strchr(argv[0], 't')) {
+ // mdelete(1) + // mdelete(1)
+
+ int c; + int c;
+ while ((c = getopt(argc, argv, "kv")) != -1) + while ((c = getopt(argc, argv, "kv")) != -1)
+ switch (c) { + switch (c) {
@ -54,12 +52,13 @@
+ +
+ return 0; + return 0;
+ } + }
+
int c; int c;
while ((c = getopt(argc, argv, "cMvX:")) != -1) while ((c = getopt(argc, argv, "cMvX:")) != -1)
--- mblaze-1.2/GNUmakefile 2021-12-12 11:39:30.000000000 -0500 switch (c) {
+++ mblaze-1.2f/GNUmakefile 2022-05-12 09:02:48.345479146 -0400 --- a/GNUmakefile 2024-09-13 15:45:12.000000000 +0000
@@ -62,6 +62,7 @@ install: FRC all +++ b/GNUmakefile 2024-09-14 19:32:32.333637833 +0000
@@ -63,6 +63,7 @@
ln -sf mcom $(DESTDIR)$(BINDIR)/mfwd ln -sf mcom $(DESTDIR)$(BINDIR)/mfwd
ln -sf mcom $(DESTDIR)$(BINDIR)/mrep ln -sf mcom $(DESTDIR)$(BINDIR)/mrep
ln -sf mdeliver $(DESTDIR)$(BINDIR)/mrefile ln -sf mdeliver $(DESTDIR)$(BINDIR)/mrefile

View File

@ -1,10 +1,9 @@
--- mblaze-1.2/mmime.c 2021-12-12 11:39:30.000000000 -0500 --- a/mmime.c 2024-09-13 15:45:12.000000000 +0000
+++ mblaze-1.2f/mmime.c 2022-05-12 09:13:44.371637134 -0400 +++ b/mmime.c 2024-09-14 19:25:49.016603808 +0000
@@ -143,6 +143,70 @@ gen_qp(uint8_t *s, off_t size, size_t ma @@ -144,6 +144,69 @@
return linelen; return linelen;
} }
+
+size_t +size_t
+gen_flowd(uint8_t *s, off_t size, size_t maxlinelen, size_t linelen) +gen_flowd(uint8_t *s, off_t size, size_t maxlinelen, size_t linelen)
+{ +{
@ -71,7 +70,7 @@
static const char * static const char *
basenam(const char *s) basenam(const char *s)
{ {
@@ -444,8 +508,8 @@ gen_build() @@ -445,8 +508,8 @@
inheader = 0; inheader = 0;
printf("MIME-Version: 1.0\n"); printf("MIME-Version: 1.0\n");
if (rflag) { if (rflag) {
@ -82,7 +81,7 @@
printf("\n"); printf("\n");
} else { } else {
printf("Content-Type: %s; boundary=\"%s\"\n", tflag, sep); printf("Content-Type: %s; boundary=\"%s\"\n", tflag, sep);
@@ -487,9 +551,9 @@ gen_build() @@ -488,9 +551,9 @@
if (!rflag && !intext) { if (!rflag && !intext) {
printf("\n--%s\n", sep); printf("\n--%s\n", sep);
@ -94,7 +93,7 @@
printf("\n"); printf("\n");
intext = 1; intext = 1;
@@ -498,7 +562,7 @@ gen_build() @@ -499,7 +562,7 @@
if (contenttransferenc) if (contenttransferenc)
printf("%s", line); printf("%s", line);
else else