Stuart Henderson writes:

> On 2020/06/28 18:57, Stefan Hagen wrote:
>> Hello,
>> 
>> maintainer here, this updates mu from 1.2 to 1.4.10. It includes the
>> changes discussed in an earlier thread and the guile flavor contributed
>> by Miguel <hen...@camandro.org>.
>> 
>> Version 1.2 to 1.4 introduces some incompatibilities. Those are mentioned
>> in the README. I plan to remove the README file after 6.8.
>> 
>> Please commit if ok.
>
> The ports tree uses a standard format for pkg/README, see
> ports/infrastructure/template and every other pkg/README file in
> the ports tree. Don't use utf8 chars. README is really a place for
> OpenBSD-specific docs rather than a place to replicate upstream release
> notes.
>
>> +.if ${FLAVOR} == "guile"
>> +WANTLIB += guile-2.2 gc ltdl gmp
>> +LIB_DEPENDS +=  lang/guile2
>> +SHARED_LIBS= guile-mu       0.0
>
> please just set SHARED_LIBS unconditionally near the top of the file,
> it will be ignored for the flavour that doesn't use this.
>
>> +.else
>> +CONFIGURE_ARGS +=   --disable-guile
>> +.endif
>>  
>>  USE_GMAKE=          Yes
>> +
>> +SEPARATE_BUILD=             Yes
>>  
>>  .include <bsd.port.mk>
>> Index: mail/mu/distinfo
>> ===================================================================
>> RCS file: /cvs/ports/mail/mu/distinfo,v
>> retrieving revision 1.7
>> diff -u -p -u -p -r1.7 distinfo
>> --- mail/mu/distinfo 21 Jul 2019 00:10:04 -0000      1.7
>> +++ mail/mu/distinfo 28 Jun 2020 16:44:29 -0000
>> @@ -1,2 +1,2 @@
>> -SHA256 (mu-1.2.0.tar.xz) = 9jTH8kTcaET/cdw8PhiT5I4ZPKqeDnR+umFjCXdfBTo=
>> -SIZE (mu-1.2.0.tar.xz) = 844192
>> +SHA256 (mu-1.4.10.tar.xz) = RnXxSkO0hT4Uo+CJIFF4fRuC30jqG9Q3UXKJNnbNfm0=
>> +SIZE (mu-1.4.10.tar.xz) = 873328
>> Index: mail/mu/patches/patch-configure_ac
>> ===================================================================
>> RCS file: mail/mu/patches/patch-configure_ac
>> diff -N mail/mu/patches/patch-configure_ac
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-configure_ac       28 Jun 2020 16:44:29 -0000
>> @@ -0,0 +1,15 @@
>> +$OpenBSD$
>> +Look for guile-snarf as guile-snarf2.2
>> +(lang/guile2 installs it that way)
>> +Index: configure.ac
>> +--- configure.ac.orig
>> ++++ configure.ac
>> +@@ -230,7 +230,7 @@ AS_IF([test "x$enable_guile" != "xno"],[
>> +     GUILE_FLAGS
>> +     AC_DEFINE_UNQUOTED([GUILE_BINARY],"$GUILE",[guile binary])
>> +     AC_DEFINE(BUILD_GUILE,[1], [Do we support Guile?])
>> +-    AC_SUBST(GUILE_SNARF, [guile-snarf])
>> ++    AC_SUBST(GUILE_SNARF, [guile-snarf2.2])
>> +     guile_version=$($PKG_CONFIG guile-2.2 --modversion)
>> +   ])
>> + ])
>> Index: mail/mu/patches/patch-guile_scripts_find-dups_scm
>> ===================================================================
>> RCS file: mail/mu/patches/patch-guile_scripts_find-dups_scm
>> diff -N mail/mu/patches/patch-guile_scripts_find-dups_scm
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-guile_scripts_find-dups_scm        28 Jun 2020 
>> 16:44:29 -0000
>> @@ -0,0 +1,12 @@
>> +$OpenBSD$
>> +look for guile interpreter as guile2.2
>
> these patches are going to be a complete pain when guile is updated..
> can you at least use a variable e.g. set GUILE_V=2.2 and SUBST_VARS+=GUILE_V
> in the port Makefile and use ${SUBST_CMD} in a makefile target (e.g.
> pre-configure) to substitute the actual version into place?
>
>> +Index: guile/scripts/find-dups.scm
>> +--- guile/scripts/find-dups.scm.orig
>> ++++ guile/scripts/find-dups.scm
>> +@@ -1,5 +1,5 @@
>> + #!/bin/sh
>> +-exec guile -e main -s $0 $@
>> ++exec guile2.2 -e main -s $0 $@
>> + !#
>> + ;;
>> + ;; Copyright (C) 2013-2015 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
>> Index: mail/mu/patches/patch-guile_scripts_msgs-count_scm
>> ===================================================================
>> RCS file: mail/mu/patches/patch-guile_scripts_msgs-count_scm
>> diff -N mail/mu/patches/patch-guile_scripts_msgs-count_scm
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-guile_scripts_msgs-count_scm       28 Jun 2020 
>> 16:44:29 -0000
>> @@ -0,0 +1,12 @@
>> +$OpenBSD$
>> +look for guile interpreter as guile2.2
>> +Index: guile/scripts/msgs-count.scm
>> +--- guile/scripts/msgs-count.scm.orig
>> ++++ guile/scripts/msgs-count.scm
>> +@@ -1,5 +1,5 @@
>> + #!/bin/sh
>> +-exec guile -e main -s $0 $@
>> ++exec guile2.2 -e main -s $0 $@
>> + !#
>> + ;;
>> + ;; Copyright (C) 2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
>> Index: mail/mu/patches/patch-guile_scripts_msgs-per-day_scm
>> ===================================================================
>> RCS file: mail/mu/patches/patch-guile_scripts_msgs-per-day_scm
>> diff -N mail/mu/patches/patch-guile_scripts_msgs-per-day_scm
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-guile_scripts_msgs-per-day_scm     28 Jun 2020 
>> 16:44:29 -0000
>> @@ -0,0 +1,12 @@
>> +$OpenBSD$
>> +look for guile interpreter as guile2.2
>> +Index: guile/scripts/msgs-per-day.scm
>> +--- guile/scripts/msgs-per-day.scm.orig
>> ++++ guile/scripts/msgs-per-day.scm
>> +@@ -1,5 +1,5 @@
>> + #!/bin/sh
>> +-exec guile -e main -s $0 $@
>> ++exec guile2.2 -e main -s $0 $@
>> + !#
>> + ;;
>> + ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
>> Index: mail/mu/patches/patch-guile_scripts_msgs-per-hour_scm
>> ===================================================================
>> RCS file: mail/mu/patches/patch-guile_scripts_msgs-per-hour_scm
>> diff -N mail/mu/patches/patch-guile_scripts_msgs-per-hour_scm
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-guile_scripts_msgs-per-hour_scm    28 Jun 2020 
>> 16:44:29 -0000
>> @@ -0,0 +1,12 @@
>> +$OpenBSD$
>> +look for guile interpreter as guile2.2
>> +Index: guile/scripts/msgs-per-hour.scm
>> +--- guile/scripts/msgs-per-hour.scm.orig
>> ++++ guile/scripts/msgs-per-hour.scm
>> +@@ -1,5 +1,5 @@
>> + #!/bin/sh
>> +-exec guile -e main -s $0 $@
>> ++exec guile2.2 -e main -s $0 $@
>> + !#
>> + ;;
>> + ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
>> Index: mail/mu/patches/patch-guile_scripts_msgs-per-month_scm
>> ===================================================================
>> RCS file: mail/mu/patches/patch-guile_scripts_msgs-per-month_scm
>> diff -N mail/mu/patches/patch-guile_scripts_msgs-per-month_scm
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-guile_scripts_msgs-per-month_scm   28 Jun 2020 
>> 16:44:29 -0000
>> @@ -0,0 +1,12 @@
>> +$OpenBSD$
>> +look for guile interpreter as guile2.2
>> +Index: guile/scripts/msgs-per-month.scm
>> +--- guile/scripts/msgs-per-month.scm.orig
>> ++++ guile/scripts/msgs-per-month.scm
>> +@@ -1,5 +1,5 @@
>> + #!/bin/sh
>> +-exec guile -e main -s $0 $@
>> ++exec guile2.2 -e main -s $0 $@
>> + !#
>> + ;;
>> + ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
>> Index: mail/mu/patches/patch-guile_scripts_msgs-per-year-month_scm
>> ===================================================================
>> RCS file: mail/mu/patches/patch-guile_scripts_msgs-per-year-month_scm
>> diff -N mail/mu/patches/patch-guile_scripts_msgs-per-year-month_scm
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-guile_scripts_msgs-per-year-month_scm      28 Jun 
>> 2020 16:44:29 -0000
>> @@ -0,0 +1,12 @@
>> +$OpenBSD$
>> +look for guile interpreter as guile2.2
>> +Index: guile/scripts/msgs-per-year-month.scm
>> +--- guile/scripts/msgs-per-year-month.scm.orig
>> ++++ guile/scripts/msgs-per-year-month.scm
>> +@@ -1,5 +1,5 @@
>> + #!/bin/sh
>> +-exec guile -e main -s $0 $@
>> ++exec guile2.2 -e main -s $0 $@
>> + !#
>> + ;;
>> + ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
>> Index: mail/mu/patches/patch-guile_scripts_msgs-per-year_scm
>> ===================================================================
>> RCS file: mail/mu/patches/patch-guile_scripts_msgs-per-year_scm
>> diff -N mail/mu/patches/patch-guile_scripts_msgs-per-year_scm
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-guile_scripts_msgs-per-year_scm    28 Jun 2020 
>> 16:44:29 -0000
>> @@ -0,0 +1,12 @@
>> +$OpenBSD$
>> +look for guile interpreter as guile2.2
>> +Index: guile/scripts/msgs-per-year.scm
>> +--- guile/scripts/msgs-per-year.scm.orig
>> ++++ guile/scripts/msgs-per-year.scm
>> +@@ -1,5 +1,5 @@
>> + #!/bin/sh
>> +-exec guile -e main -s $0 $@
>> ++exec guile2.2 -e main -s $0 $@
>> + !#
>> + ;;
>> + ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
>> Index: mail/mu/patches/patch-guile_tests_test-mu-guile_scm
>> ===================================================================
>> RCS file: mail/mu/patches/patch-guile_tests_test-mu-guile_scm
>> diff -N mail/mu/patches/patch-guile_tests_test-mu-guile_scm
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-guile_tests_test-mu-guile_scm      28 Jun 2020 
>> 16:44:29 -0000
>> @@ -0,0 +1,12 @@
>> +$OpenBSD$
>> +look for guile interpreter as guile2.2
>> +Index: guile/tests/test-mu-guile.scm
>> +--- guile/tests/test-mu-guile.scm.orig
>> ++++ guile/tests/test-mu-guile.scm
>> +@@ -1,5 +1,5 @@
>> + #!/bin/sh
>> +-exec guile -e main -s $0 $@
>> ++exec guile2.2 -e main -s $0 $@
>> + !#
>> + 
>> + ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
>> Index: mail/mu/patches/patch-lib_parser_utils_cc
>> ===================================================================
>> RCS file: mail/mu/patches/patch-lib_parser_utils_cc
>> diff -N mail/mu/patches/patch-lib_parser_utils_cc
>> --- mail/mu/patches/patch-lib_parser_utils_cc        26 Jul 2019 06:41:59 
>> -0000      1.1
>> +++ /dev/null        1 Jan 1970 00:00:00 -0000
>> @@ -1,14 +0,0 @@
>> -$OpenBSD: patch-lib_parser_utils_cc,v 1.1 2019/07/26 06:41:59 pvk Exp $
>> -Bring g_vasprintf into scope
>> -Index: lib/parser/utils.cc
>> ---- lib/parser/utils.cc.orig
>> -+++ lib/parser/utils.cc
>> -@@ -17,7 +17,7 @@
>> - **  02110-1301, USA.
>> - */
>> - 
>> --#define _XOPEN_SOURCE
>> -+#define _XOPEN_SOURCE_EXTENDED 1
>> - #include <time.h>
>> - 
>> - #define GNU_SOURCE
>> Index: mail/mu/patches/patch-lib_utils_mu-str_c
>> ===================================================================
>> RCS file: mail/mu/patches/patch-lib_utils_mu-str_c
>> diff -N mail/mu/patches/patch-lib_utils_mu-str_c
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-lib_utils_mu-str_c 28 Jun 2020 16:44:29 -0000
>> @@ -0,0 +1,14 @@
>> +$OpenBSD$
>> +make this function compile correctly under clang
>> +Index: lib/utils/mu-str.c
>> +--- lib/utils/mu-str.c.orig
>> ++++ lib/utils/mu-str.c
>> +@@ -49,7 +49,7 @@ mu_str_size_s  (size_t s)
>> + char*
>> + mu_str_size (size_t s)
>> + {
>> +-   return g_strdup (mu_str_size_s(s));
>> ++   return g_format_size_for_display ((goffset)s);
>> + }
>
> I'm no expert on glib2 but this seems a bit odd for "make this function
> compile correctly under clang", have you talked to upstream about it
> at all?
>
>> + 
>> + 
>> Index: mail/mu/patches/patch-lib_utils_mu-utils_cc
>> ===================================================================
>> RCS file: mail/mu/patches/patch-lib_utils_mu-utils_cc
>> diff -N mail/mu/patches/patch-lib_utils_mu-utils_cc
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-lib_utils_mu-utils_cc      28 Jun 2020 16:44:29 
>> -0000
>> @@ -0,0 +1,15 @@
>> +$OpenBSD$
>> +Bring g_vasprintf into scope
>> +Index: lib/utils/mu-utils.cc
>> +--- lib/utils/mu-utils.cc.orig
>> ++++ lib/utils/mu-utils.cc
>> +@@ -18,7 +18,8 @@
>> + */
>> + 
>> + 
>> +-#define _XOPEN_SOURCE
>> ++//#define _XOPEN_SOURCE 500
>> ++//#define _POSIX_SOURCE
>> + #include <time.h>
>> + 
>> + #define GNU_SOURCE
>> Index: mail/mu/patches/patch-lib_utils_mu-utils_cc.orig
>> ===================================================================
>> RCS file: mail/mu/patches/patch-lib_utils_mu-utils_cc.orig
>> diff -N mail/mu/patches/patch-lib_utils_mu-utils_cc.orig
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-lib_utils_mu-utils_cc.orig 28 Jun 2020 16:44:29 
>> -0000
>> @@ -0,0 +1,14 @@
>> +$OpenBSD$
>> +Bring g_vasprintf into scope
>> +Index: lib/utils/mu-utils.cc
>> +--- lib/utils/mu-utils.cc.orig
>> ++++ lib/utils/mu-utils.cc
>> +@@ -18,7 +18,7 @@
>> + */
>> + 
>> + 
>> +-#define _XOPEN_SOURCE
>> ++#define _GNU_SOURCE
>> + #include <time.h>
>> + 
>> + #define GNU_SOURCE
>> Index: mail/mu/patches/patch-man_mu_1
>> ===================================================================
>> RCS file: mail/mu/patches/patch-man_mu_1
>> diff -N mail/mu/patches/patch-man_mu_1
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/patches/patch-man_mu_1   28 Jun 2020 16:44:29 -0000
>> @@ -0,0 +1,14 @@
>> +$OpenBSD$
>> +reference mu-script(1) instead of nonexistent mu-guile(1)
>> +Index: man/mu.1
>> +--- man/mu.1.orig
>> ++++ man/mu.1
>> +@@ -54,7 +54,7 @@ remove specific messages from the database. See
>> + 
>> + .B mu script [options]
>> + run a mu (Guile) script. See
>> +-.BR mu-guile(1)
>> ++.BR mu-script(1)
>> + 
>> + .B mu server [options]
>> + start a server process (for \fBmu4e\fR-internal use). See
>> Index: mail/mu/pkg/PFRAG.guile
>> ===================================================================
>> RCS file: mail/mu/pkg/PFRAG.guile
>> diff -N mail/mu/pkg/PFRAG.guile
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/pkg/PFRAG.guile  28 Jun 2020 16:44:29 -0000
>> @@ -0,0 +1,22 @@
>> +@comment $OpenBSD: PFRAG-guile,v$
>> +@info info/mu-guile.info
>> +@static-lib lib/libguile-mu.a
>
> does the static lib do anything useful? if not please disable if possible,
> "LIBTOOL_FLAGS = --tag=disable-static" may work
>
>> +lib/libguile-mu.la
>> +@lib lib/libguile-mu.so.${LIBguile-mu_VERSION}
>> +share/guile/
>> +share/guile/site/
>> +share/guile/site/2.2/
>> +share/guile/site/2.2/mu/
>> +share/guile/site/2.2/mu.scm
>> +share/guile/site/2.2/mu/plot.scm
>> +share/guile/site/2.2/mu/script.scm
>> +share/guile/site/2.2/mu/stats.scm
>> +share/mu/
>> +share/mu/scripts/
>> +share/mu/scripts/find-dups.scm
>> +share/mu/scripts/msgs-count.scm
>> +share/mu/scripts/msgs-per-day.scm
>> +share/mu/scripts/msgs-per-hour.scm
>> +share/mu/scripts/msgs-per-month.scm
>> +share/mu/scripts/msgs-per-year-month.scm
>> +share/mu/scripts/msgs-per-year.scm
>> Index: mail/mu/pkg/PLIST
>> ===================================================================
>> RCS file: /cvs/ports/mail/mu/pkg/PLIST,v
>> retrieving revision 1.6
>> diff -u -p -u -p -r1.6 PLIST
>> --- mail/mu/pkg/PLIST        20 May 2018 08:02:14 -0000      1.6
>> +++ mail/mu/pkg/PLIST        28 Jun 2020 16:44:29 -0000
>> @@ -1,4 +1,4 @@
>> -@comment $OpenBSD: PLIST,v 1.6 2018/05/20 08:02:14 espie Exp $
>> +@comment $OpenBSD: PLIST-main,v$
>>  @bin bin/mu
>>  @info info/mu4e.info
>>  @man man/man1/mu-add.1
>> @@ -8,6 +8,8 @@
>>  @man man/man1/mu-find.1
>>  @man man/man1/mu-help.1
>>  @man man/man1/mu-index.1
>> +@man man/man1/mu-info.1
>> +@man man/man1/mu-init.1
>>  @man man/man1/mu-mkdir.1
>>  @man man/man1/mu-remove.1
>>  @man man/man1/mu-script.1
>> @@ -15,13 +17,15 @@
>>  @man man/man1/mu-verify.1
>>  @man man/man1/mu-view.1
>>  @man man/man1/mu.1
>> -@comment mu is compiled without gtk
>> -@comment man/man1/mug.1
>>  @man man/man5/mu-bookmarks.5
>>  @man man/man7/mu-query.7
>> +%%guile%%
>> +@comment mu is compiled without gtk
>> +@comment man/man1/mug.1
>>  share/doc/mu/
>>  share/doc/mu/NEWS.org
>>  share/doc/mu/mu4e-about.org
>> +share/doc/pkg-readmes/${PKGSTEM}
>>  share/emacs/
>>  share/emacs/site-lisp/
>>  share/emacs/site-lisp/mu4e/
>> @@ -37,6 +41,8 @@ share/emacs/site-lisp/mu4e/mu4e-draft.el
>>  share/emacs/site-lisp/mu4e/mu4e-draft.elc
>>  share/emacs/site-lisp/mu4e/mu4e-headers.el
>>  share/emacs/site-lisp/mu4e/mu4e-headers.elc
>> +share/emacs/site-lisp/mu4e/mu4e-icalendar.el
>> +share/emacs/site-lisp/mu4e/mu4e-icalendar.elc
>>  share/emacs/site-lisp/mu4e/mu4e-lists.el
>>  share/emacs/site-lisp/mu4e/mu4e-lists.elc
>>  share/emacs/site-lisp/mu4e/mu4e-main.el
>> @@ -47,6 +53,8 @@ share/emacs/site-lisp/mu4e/mu4e-message.
>>  share/emacs/site-lisp/mu4e/mu4e-message.elc
>>  share/emacs/site-lisp/mu4e/mu4e-meta.el
>>  share/emacs/site-lisp/mu4e/mu4e-meta.elc
>> +share/emacs/site-lisp/mu4e/mu4e-org.el
>> +share/emacs/site-lisp/mu4e/mu4e-org.elc
>>  share/emacs/site-lisp/mu4e/mu4e-proc.el
>>  share/emacs/site-lisp/mu4e/mu4e-proc.elc
>>  share/emacs/site-lisp/mu4e/mu4e-speedbar.el
>> @@ -61,5 +69,3 @@ share/emacs/site-lisp/mu4e/mu4e.el
>>  share/emacs/site-lisp/mu4e/mu4e.elc
>>  share/emacs/site-lisp/mu4e/org-mu4e.el
>>  share/emacs/site-lisp/mu4e/org-mu4e.elc
>> -share/emacs/site-lisp/mu4e/org-old-mu4e.el
>> -share/emacs/site-lisp/mu4e/org-old-mu4e.elc
>> Index: mail/mu/pkg/README
>> ===================================================================
>> RCS file: mail/mu/pkg/README
>> diff -N mail/mu/pkg/README
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ mail/mu/pkg/README       28 Jun 2020 16:44:29 -0000
>> @@ -0,0 +1,28 @@
>> +Breaking Changes from 1.2. to 1.4.
>> +══════════════════════════════════
>> +
>> +A description of all changes and features can be found the release
>> +notes (NEWS.org). Breaking changes below:
>> +
>> +mu changes:
>> +-----------
>> +* Base path has changed from ~/.mu to ~/.cache/mu. You may want to
>> +  delete the old cache location.
>> +* A new command `mu init` needs to be run once to save the maildir
>> +  location and email adresses in the database.
>> +
>> +  mu init --maildir=~/Maildir --my-address=j...@example.com \
>> +                --my-address=b...@example.com
>> +
>> +mu4e changes:
>> +-------------
>> +* Variables `mu4e-maildir` and `mu4e-user-mail-address-list`
>> +  are obsolete. The information is taken from the Xapian database now.
>> +  Run `mu init` with the appropiate parameters to create these
>> +  entries.
>> +* Contact sorting is done by `mu` now. As a side effect the following
>> +  variables have been obsoleted:
>> +    - mu4e-contacts-rewrite-function
>> +    - mu4e-compose-complete-ignore-address-regexp
>> +  You can use `mu4e-contact-process-function` instead.
>> +
>> 

For convenience, here is a patch that applies sthen@'s suggestions.

This mail was sent from 1.4.10 using the attached patch!

diff --git a/mail/mu/Makefile b/mail/mu/Makefile
index 2062eae2a34..c41d9a16f55 100644
--- a/mail/mu/Makefile
+++ b/mail/mu/Makefile
@@ -2,8 +2,15 @@
 
 COMMENT=	maildir indexer and searcher with emacs frontend
 
-DISTNAME=	mu-1.2.0
-REVISION=	0
+V=		1.4.10
+GUILE_V=	2.2
+
+DISTNAME=	mu-$V
+
+FLAVORS=	guile
+FLAVOR ?=
+
+SHARED_LIBS=	guile-mu	0.0
 
 CATEGORIES=	mail
 HOMEPAGE=	http://www.djcbsoftware.nl/code/mu/
@@ -13,12 +20,12 @@ MAINTAINER=	Stefan Hagen <sh+po...@codevoid.de>
 # GPLv3+
 PERMIT_PACKAGE=	Yes
 
-WANTLIB += ${COMPILER_LIBCXX} assuan c ffi gio-2.0 glib-2.0 gmime-3.0
-WANTLIB += gmodule-2.0 gobject-2.0 gpg-error gpgme gthread-2.0
-WANTLIB += iconv idn2 intl json-glib-1.0 m pcre unistring uuid
-WANTLIB += xapian z
+WANTLIB += ${COMPILER_LIBCXX} assuan c curses ffi gio-2.0 glib-2.0
+WANTLIB += gmime-3.0 gmodule-2.0 gobject-2.0 gpg-error gpgme gthread-2.0
+WANTLIB += iconv idn2 intl json-glib-1.0 m pcre readline unistring
+WANTLIB += uuid xapian z
 
-MASTER_SITES=	https://github.com/djcb/mu/releases/download/1.2/
+MASTER_SITES=	https://github.com/djcb/mu/releases/download/${V}/
 EXTRACT_SUFX=	.tar.xz
 
 BUILD_DEPENDS=	emacs->=24:editors/emacs
@@ -37,9 +44,22 @@ AUTOMAKE_VERSION=	1.15
 CONFIGURE_STYLE=	autoreconf
 
 CONFIGURE_ARGS=		--disable-gtk \
-			--disable-webkit \
-			--disable-guile
+			--disable-webkit
+
+SUBST_VARS+=		GUILE_V
+
+.if ${FLAVOR} == "guile"
+WANTLIB +=		guile-2.2 gc ltdl gmp
+LIB_DEPENDS +=		lang/guile2
+.else
+CONFIGURE_ARGS +=	--disable-guile
+.endif
 
 USE_GMAKE=		Yes
 
+SEPARATE_BUILD=		Yes
+
+pre-configure:
+	${SUBST_CMD} ${WRKDIST}/guile/*/*.scm
+
 .include <bsd.port.mk>
diff --git a/mail/mu/distinfo b/mail/mu/distinfo
index 437fb1dede1..619e803f594 100644
--- a/mail/mu/distinfo
+++ b/mail/mu/distinfo
@@ -1,2 +1,2 @@
-SHA256 (mu-1.2.0.tar.xz) = 9jTH8kTcaET/cdw8PhiT5I4ZPKqeDnR+umFjCXdfBTo=
-SIZE (mu-1.2.0.tar.xz) = 844192
+SHA256 (mu-1.4.10.tar.xz) = RnXxSkO0hT4Uo+CJIFF4fRuC30jqG9Q3UXKJNnbNfm0=
+SIZE (mu-1.4.10.tar.xz) = 873328
diff --git a/mail/mu/patches/patch-configure_ac b/mail/mu/patches/patch-configure_ac
new file mode 100644
index 00000000000..f6a400d90b6
--- /dev/null
+++ b/mail/mu/patches/patch-configure_ac
@@ -0,0 +1,15 @@
+$OpenBSD$
+Look for guile-snarf as guile-snarf2.2
+(lang/guile2 installs it that way)
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -230,7 +230,7 @@ AS_IF([test "x$enable_guile" != "xno"],[
+     GUILE_FLAGS
+     AC_DEFINE_UNQUOTED([GUILE_BINARY],"$GUILE",[guile binary])
+     AC_DEFINE(BUILD_GUILE,[1], [Do we support Guile?])
+-    AC_SUBST(GUILE_SNARF, [guile-snarf])
++    AC_SUBST(GUILE_SNARF, [guile-snarf2.2])
+     guile_version=$($PKG_CONFIG guile-2.2 --modversion)
+   ])
+ ])
diff --git a/mail/mu/patches/patch-guile_scripts_find-dups_scm b/mail/mu/patches/patch-guile_scripts_find-dups_scm
new file mode 100644
index 00000000000..faf6e9d342a
--- /dev/null
+++ b/mail/mu/patches/patch-guile_scripts_find-dups_scm
@@ -0,0 +1,12 @@
+$OpenBSD$
+look for guile interpreter as guile${GUILE_V}
+Index: guile/scripts/find-dups.scm
+--- guile/scripts/find-dups.scm.orig
++++ guile/scripts/find-dups.scm
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-exec guile -e main -s $0 $@
++exec guile${GUILE_V} -e main -s $0 $@
+ !#
+ ;;
+ ;; Copyright (C) 2013-2015 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
diff --git a/mail/mu/patches/patch-guile_scripts_msgs-count_scm b/mail/mu/patches/patch-guile_scripts_msgs-count_scm
new file mode 100644
index 00000000000..7474b2d98c7
--- /dev/null
+++ b/mail/mu/patches/patch-guile_scripts_msgs-count_scm
@@ -0,0 +1,12 @@
+$OpenBSD$
+look for guile interpreter as guile${GUILE_V}
+Index: guile/scripts/msgs-count.scm
+--- guile/scripts/msgs-count.scm.orig
++++ guile/scripts/msgs-count.scm
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-exec guile -e main -s $0 $@
++exec guile${GUILE_V} -e main -s $0 $@
+ !#
+ ;;
+ ;; Copyright (C) 2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
diff --git a/mail/mu/patches/patch-guile_scripts_msgs-per-day_scm b/mail/mu/patches/patch-guile_scripts_msgs-per-day_scm
new file mode 100644
index 00000000000..5cd336901cf
--- /dev/null
+++ b/mail/mu/patches/patch-guile_scripts_msgs-per-day_scm
@@ -0,0 +1,12 @@
+$OpenBSD$
+look for guile interpreter as guile${GUILE_V}
+Index: guile/scripts/msgs-per-day.scm
+--- guile/scripts/msgs-per-day.scm.orig
++++ guile/scripts/msgs-per-day.scm
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-exec guile -e main -s $0 $@
++exec guile${GUILE_V} -e main -s $0 $@
+ !#
+ ;;
+ ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
diff --git a/mail/mu/patches/patch-guile_scripts_msgs-per-hour_scm b/mail/mu/patches/patch-guile_scripts_msgs-per-hour_scm
new file mode 100644
index 00000000000..f794ee55de9
--- /dev/null
+++ b/mail/mu/patches/patch-guile_scripts_msgs-per-hour_scm
@@ -0,0 +1,12 @@
+$OpenBSD$
+look for guile interpreter as guile${GUILE_V}
+Index: guile/scripts/msgs-per-hour.scm
+--- guile/scripts/msgs-per-hour.scm.orig
++++ guile/scripts/msgs-per-hour.scm
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-exec guile -e main -s $0 $@
++exec guile${GUILE_V} -e main -s $0 $@
+ !#
+ ;;
+ ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
diff --git a/mail/mu/patches/patch-guile_scripts_msgs-per-month_scm b/mail/mu/patches/patch-guile_scripts_msgs-per-month_scm
new file mode 100644
index 00000000000..cbce5bd9646
--- /dev/null
+++ b/mail/mu/patches/patch-guile_scripts_msgs-per-month_scm
@@ -0,0 +1,12 @@
+$OpenBSD$
+look for guile interpreter as guile${GUILE_V}
+Index: guile/scripts/msgs-per-month.scm
+--- guile/scripts/msgs-per-month.scm.orig
++++ guile/scripts/msgs-per-month.scm
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-exec guile -e main -s $0 $@
++exec guile${GUILE_V} -e main -s $0 $@
+ !#
+ ;;
+ ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
diff --git a/mail/mu/patches/patch-guile_scripts_msgs-per-year-month_scm b/mail/mu/patches/patch-guile_scripts_msgs-per-year-month_scm
new file mode 100644
index 00000000000..a1eb614db40
--- /dev/null
+++ b/mail/mu/patches/patch-guile_scripts_msgs-per-year-month_scm
@@ -0,0 +1,12 @@
+$OpenBSD$
+look for guile interpreter as guile${GUILE_V}
+Index: guile/scripts/msgs-per-year-month.scm
+--- guile/scripts/msgs-per-year-month.scm.orig
++++ guile/scripts/msgs-per-year-month.scm
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-exec guile -e main -s $0 $@
++exec guile${GUILE_V} -e main -s $0 $@
+ !#
+ ;;
+ ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
diff --git a/mail/mu/patches/patch-guile_scripts_msgs-per-year_scm b/mail/mu/patches/patch-guile_scripts_msgs-per-year_scm
new file mode 100644
index 00000000000..4321a1a0cdc
--- /dev/null
+++ b/mail/mu/patches/patch-guile_scripts_msgs-per-year_scm
@@ -0,0 +1,12 @@
+$OpenBSD$
+look for guile interpreter as guile${GUILE_V}
+Index: guile/scripts/msgs-per-year.scm
+--- guile/scripts/msgs-per-year.scm.orig
++++ guile/scripts/msgs-per-year.scm
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-exec guile -e main -s $0 $@
++exec guile${GUILE_V} -e main -s $0 $@
+ !#
+ ;;
+ ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
diff --git a/mail/mu/patches/patch-guile_tests_test-mu-guile_scm b/mail/mu/patches/patch-guile_tests_test-mu-guile_scm
new file mode 100644
index 00000000000..d16dc10b683
--- /dev/null
+++ b/mail/mu/patches/patch-guile_tests_test-mu-guile_scm
@@ -0,0 +1,12 @@
+$OpenBSD$
+look for guile interpreter as guile${GUILE_V}
+Index: guile/tests/test-mu-guile.scm
+--- guile/tests/test-mu-guile.scm.orig
++++ guile/tests/test-mu-guile.scm
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-exec guile -e main -s $0 $@
++exec guile${GUILE_V} -e main -s $0 $@
+ !#
+ 
+ ;; Copyright (C) 2012-2013 Dirk-Jan C. Binnema <d...@djcbsoftware.nl>
diff --git a/mail/mu/patches/patch-lib_parser_utils_cc b/mail/mu/patches/patch-lib_parser_utils_cc
deleted file mode 100644
index 58e1438e96f..00000000000
--- a/mail/mu/patches/patch-lib_parser_utils_cc
+++ /dev/null
@@ -1,14 +0,0 @@
-$OpenBSD: patch-lib_parser_utils_cc,v 1.1 2019/07/26 06:41:59 pvk Exp $
-Bring g_vasprintf into scope
-Index: lib/parser/utils.cc
---- lib/parser/utils.cc.orig
-+++ lib/parser/utils.cc
-@@ -17,7 +17,7 @@
- **  02110-1301, USA.
- */
- 
--#define _XOPEN_SOURCE
-+#define _XOPEN_SOURCE_EXTENDED 1
- #include <time.h>
- 
- #define GNU_SOURCE
diff --git a/mail/mu/patches/patch-lib_utils_mu-str_h b/mail/mu/patches/patch-lib_utils_mu-str_h
new file mode 100644
index 00000000000..ea7449eee17
--- /dev/null
+++ b/mail/mu/patches/patch-lib_utils_mu-str_h
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: lib/utils/mu-str.h
+--- lib/utils/mu-str.h.orig
++++ lib/utils/mu-str.h
+@@ -48,7 +48,7 @@ G_BEGIN_DECLS
+  * @return a string representation of the size; see above
+  * for what to do with it
+  */
+-const char* mu_str_size_s  (size_t s) G_GNUC_CONST;
++const char* mu_str_size_s  (size_t s);
+ char*       mu_str_size    (size_t s) G_GNUC_WARN_UNUSED_RESULT;
+ 
+ 
diff --git a/mail/mu/patches/patch-lib_utils_mu-utils_cc b/mail/mu/patches/patch-lib_utils_mu-utils_cc
new file mode 100644
index 00000000000..288343180c7
--- /dev/null
+++ b/mail/mu/patches/patch-lib_utils_mu-utils_cc
@@ -0,0 +1,15 @@
+$OpenBSD$
+Bring g_vasprintf into scope
+Index: lib/utils/mu-utils.cc
+--- lib/utils/mu-utils.cc.orig
++++ lib/utils/mu-utils.cc
+@@ -18,7 +18,8 @@
+ */
+ 
+ 
+-#define _XOPEN_SOURCE
++//#define _XOPEN_SOURCE 500
++//#define _POSIX_SOURCE
+ #include <time.h>
+ 
+ #define GNU_SOURCE
diff --git a/mail/mu/patches/patch-man_mu_1 b/mail/mu/patches/patch-man_mu_1
new file mode 100644
index 00000000000..5ea2b1ef2be
--- /dev/null
+++ b/mail/mu/patches/patch-man_mu_1
@@ -0,0 +1,14 @@
+$OpenBSD$
+reference mu-script(1) instead of nonexistent mu-guile(1)
+Index: man/mu.1
+--- man/mu.1.orig
++++ man/mu.1
+@@ -54,7 +54,7 @@ remove specific messages from the database. See
+ 
+ .B mu script [options]
+ run a mu (Guile) script. See
+-.BR mu-guile(1)
++.BR mu-script(1)
+ 
+ .B mu server [options]
+ start a server process (for \fBmu4e\fR-internal use). See
diff --git a/mail/mu/pkg/PFRAG.guile b/mail/mu/pkg/PFRAG.guile
new file mode 100644
index 00000000000..1808b230477
--- /dev/null
+++ b/mail/mu/pkg/PFRAG.guile
@@ -0,0 +1,22 @@
+@comment $OpenBSD: PFRAG-guile,v$
+@info info/mu-guile.info
+@static-lib lib/libguile-mu.a
+lib/libguile-mu.la
+@lib lib/libguile-mu.so.${LIBguile-mu_VERSION}
+share/guile/
+share/guile/site/
+share/guile/site/2.2/
+share/guile/site/2.2/mu/
+share/guile/site/2.2/mu.scm
+share/guile/site/2.2/mu/plot.scm
+share/guile/site/2.2/mu/script.scm
+share/guile/site/2.2/mu/stats.scm
+share/mu/
+share/mu/scripts/
+share/mu/scripts/find-dups.scm
+share/mu/scripts/msgs-count.scm
+share/mu/scripts/msgs-per-day.scm
+share/mu/scripts/msgs-per-hour.scm
+share/mu/scripts/msgs-per-month.scm
+share/mu/scripts/msgs-per-year-month.scm
+share/mu/scripts/msgs-per-year.scm
diff --git a/mail/mu/pkg/PLIST b/mail/mu/pkg/PLIST
index a24708f574d..51b980a8763 100644
--- a/mail/mu/pkg/PLIST
+++ b/mail/mu/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $OpenBSD: PLIST,v 1.6 2018/05/20 08:02:14 espie Exp $
+@comment $OpenBSD: PLIST-main,v$
 @bin bin/mu
 @info info/mu4e.info
 @man man/man1/mu-add.1
@@ -8,6 +8,8 @@
 @man man/man1/mu-find.1
 @man man/man1/mu-help.1
 @man man/man1/mu-index.1
+@man man/man1/mu-info.1
+@man man/man1/mu-init.1
 @man man/man1/mu-mkdir.1
 @man man/man1/mu-remove.1
 @man man/man1/mu-script.1
@@ -15,13 +17,15 @@
 @man man/man1/mu-verify.1
 @man man/man1/mu-view.1
 @man man/man1/mu.1
-@comment mu is compiled without gtk
-@comment man/man1/mug.1
 @man man/man5/mu-bookmarks.5
 @man man/man7/mu-query.7
+%%guile%%
+@comment mu is compiled without gtk
+@comment man/man1/mug.1
 share/doc/mu/
 share/doc/mu/NEWS.org
 share/doc/mu/mu4e-about.org
+share/doc/pkg-readmes/${PKGSTEM}
 share/emacs/
 share/emacs/site-lisp/
 share/emacs/site-lisp/mu4e/
@@ -37,6 +41,8 @@ share/emacs/site-lisp/mu4e/mu4e-draft.el
 share/emacs/site-lisp/mu4e/mu4e-draft.elc
 share/emacs/site-lisp/mu4e/mu4e-headers.el
 share/emacs/site-lisp/mu4e/mu4e-headers.elc
+share/emacs/site-lisp/mu4e/mu4e-icalendar.el
+share/emacs/site-lisp/mu4e/mu4e-icalendar.elc
 share/emacs/site-lisp/mu4e/mu4e-lists.el
 share/emacs/site-lisp/mu4e/mu4e-lists.elc
 share/emacs/site-lisp/mu4e/mu4e-main.el
@@ -47,6 +53,8 @@ share/emacs/site-lisp/mu4e/mu4e-message.el
 share/emacs/site-lisp/mu4e/mu4e-message.elc
 share/emacs/site-lisp/mu4e/mu4e-meta.el
 share/emacs/site-lisp/mu4e/mu4e-meta.elc
+share/emacs/site-lisp/mu4e/mu4e-org.el
+share/emacs/site-lisp/mu4e/mu4e-org.elc
 share/emacs/site-lisp/mu4e/mu4e-proc.el
 share/emacs/site-lisp/mu4e/mu4e-proc.elc
 share/emacs/site-lisp/mu4e/mu4e-speedbar.el
@@ -61,5 +69,3 @@ share/emacs/site-lisp/mu4e/mu4e.el
 share/emacs/site-lisp/mu4e/mu4e.elc
 share/emacs/site-lisp/mu4e/org-mu4e.el
 share/emacs/site-lisp/mu4e/org-mu4e.elc
-share/emacs/site-lisp/mu4e/org-old-mu4e.el
-share/emacs/site-lisp/mu4e/org-old-mu4e.elc
diff --git a/mail/mu/pkg/README b/mail/mu/pkg/README
new file mode 100644
index 00000000000..77c19849563
--- /dev/null
+++ b/mail/mu/pkg/README
@@ -0,0 +1,34 @@
+$OpenBSD: README.template,v 1.7 2019/05/09 17:45:05 ajacoutot Exp $
+
++-------------------------------------------------------------------------------
+| Running ${PKGSTEM} on OpenBSD
++-------------------------------------------------------------------------------
+
+Breaking Changes from 1.2. to 1.4.
+══════════════════════════════════
+
+A description of all changes and features can be found the release
+notes (NEWS.org). Breaking changes below:
+
+mu changes:
+-----------
+* Base path has changed from ~/.mu to ~/.cache/mu. You may want to
+  delete the old cache location.
+* A new command `mu init` needs to be run once to save the maildir
+  location and email adresses in the database.
+
+  mu init --maildir=~/Maildir --my-address=j...@example.com \
+                --my-address=b...@example.com
+
+mu4e changes:
+-------------
+* Variables `mu4e-maildir` and `mu4e-user-mail-address-list`
+  are obsolete. The information is taken from the Xapian database now.
+  Run `mu init` with the appropiate parameters to create these
+  entries.
+* Contact sorting is done by `mu` now. As a side effect the following
+  variables have been obsoleted:
+    - mu4e-contacts-rewrite-function
+    - mu4e-compose-complete-ignore-address-regexp
+  You can use `mu4e-contact-process-function` instead.
+
-- 
PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A  4AF0 1F81 112D 62A9 ADCE

Reply via email to