Stefan Hagen wrote:
> I've driven this a little further with sed in the Makefile instead of
> patching the placeholder in. This way no patch is necessary at all.
> 
> I like it much better and I've seen similiar approaches in other ports.
> 
> > Still has utf8 in README, but I really don't think upstream upgrade
> > notes belong there at all.
> 
> I removed the README.
> 
> I also removed the manpage patch as this has been fixed upstream in 1.4.10.
> 
> Ok now? More suggestions?
> 
> Tested on amd64 and sparc64.
> 
> Best Regards,
> Stefan

That was a bit too fast. I forgot to include the optimization fix from Todd.
It's in now...

Index: mail/mu/Makefile
===================================================================
RCS file: /cvs/ports/mail/mu/Makefile,v
retrieving revision 1.19
diff -u -p -u -p -r1.19 Makefile
--- mail/mu/Makefile    24 Jan 2020 10:36:41 -0000    1.19
+++ mail/mu/Makefile    12 Jul 2020 14:49:24 -0000
@@ -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+ports@codev
 # 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,21 @@ AUTOMAKE_VERSION=    1.15
 CONFIGURE_STYLE=    autoreconf
 
 CONFIGURE_ARGS=        --disable-gtk \
-            --disable-webkit \
-            --disable-guile
+            --disable-webkit
+
+.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:
+    sed -e 's/exec guile/exec guile${GUILE_V}/' -i \
+        ${WRKDIST}/guile/*/*.scm
 
 .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    12 Jul 2020 14:49:24 -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    12 Jul 2020 14:49:24 -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-lib_parser_utils_cc
===================================================================
RCS file: /cvs/ports/mail/mu/patches/patch-lib_parser_utils_cc,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-lib_parser_utils_cc
--- mail/mu/patches/patch-lib_parser_utils_cc    26 Jul 2019 06:41:59 -0000    
1.1
+++ mail/mu/patches/patch-lib_parser_utils_cc    12 Jul 2020 14:49:24 -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_h
===================================================================
RCS file: mail/mu/patches/patch-lib_utils_mu-str_h
diff -N mail/mu/patches/patch-lib_utils_mu-str_h
--- /dev/null    1 Jan 1970 00:00:00 -0000
+++ mail/mu/patches/patch-lib_utils_mu-str_h    12 Jul 2020 14:49:24 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+Prevent the compiler from incorrectly optimizing mu_str_size()
+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;
+ 
+ 
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    12 Jul 2020 14:49:24 -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
+@@ -17,8 +17,6 @@
+ **  02110-1301, USA.
+ */
+ 
+-
+-#define _XOPEN_SOURCE
+ #include <time.h>
+ 
+ #define GNU_SOURCE
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    12 Jul 2020 14:49:24 -0000
@@ -0,0 +1,19 @@
+@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/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    12 Jul 2020 14:49:24 -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,10 +17,9 @@
 @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%%
 share/doc/mu/
 share/doc/mu/NEWS.org
 share/doc/mu/mu4e-about.org
@@ -37,6 +38,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 +50,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 +66,5 @@ 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
+@comment mu is compiled without gtk
+@comment man/man1/mug.1

Reply via email to