pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fix for mail/notmuch to add BUILD_DEPENDS emacs>=24.0



Hello.

On Mac OS X Mavericks 10.9.4 (Darwin 13.3.0), mail/notmuch from -current
fails to build, producing the following error:

===
EMACS emacs/notmuch-show.elc

In toplevel form:
emacs/notmuch-show.el:35:1:Error: Symbol's value as variable is void: \
notmuch-show-insert-bodypart
gnumake: *** [emacs/notmuch-show.elc] Error 1
*** Error code 2
===

I think this is because the system version of emacs is too old:

===
$ /usr/bin/emacs --version | head -n 1
GNU Emacs 22.1.1
===

There are two problems: mail/notmuch does not declare a build dependency
on emacs even though it uses emacs, and mail/notmuch requires a minimum
version of emacs (in my case, a version newer than the system version
of emacs in Mac OS X Mavericks).  (I did not investigate the minimum
version requirement other than trying editors/emacs24-nox11 and noting
that the build succeeds with it as a build dependency.)

I propose the attached patch to fix this problem.  It adds an option,
notmuch-emacs, that is enabled by default for backward compatibility,
that allows the user to build Notmuch without the Emacs email client
(e.g. "-notmuch-emacs").  If the option is turned on, the default,
the build dependency on editors/emacs is correctly added and the
Notmuch Emacs email client is built.  If the option is turned off,
the editors/emacs build dependency is eliminated, thus avoiding
unnecessarily pulling in editors/emacs for users that don't intend to
use the Emacs email client, and the Emacs email client is not built.

Comments?  Would a developer be willing to commit this patch?

Thanks!

Lewis
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/notmuch/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile    3 Jul 2014 15:01:46 -0000       1.2
+++ Makefile    15 Aug 2014 20:47:34 -0000
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.2 2014/07/03 15:01:46 wiz Exp $
 
 DISTNAME=      notmuch-0.18.1
+PKGREVISION=   1
 CATEGORIES=    mail
 MASTER_SITES=  http://notmuchmail.org/releases/
 
@@ -16,6 +17,8 @@
 USE_TOOLS+=    gmake pkg-config
 MAKE_FLAGS+=   PYTHONBIN=${PYTHONBIN}
 
+.include "options.mk"
+
 CONFIGURE_ARGS+=       --prefix=${PREFIX}
 CONFIGURE_ARGS+=       --mandir=${PREFIX}/${PKGMANDIR}
 
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/mail/notmuch/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- PLIST       3 Jul 2014 15:01:46 -0000       1.2
+++ PLIST       15 Aug 2014 20:47:34 -0000
@@ -19,22 +19,22 @@
 man/man1/notmuch.1.gz
 man/man5/notmuch-hooks.5.gz
 man/man7/notmuch-search-terms.7.gz
-share/emacs/site-lisp/coolj.el
-share/emacs/site-lisp/notmuch-address.el
-share/emacs/site-lisp/notmuch-crypto.el
-share/emacs/site-lisp/notmuch-hello.el
-share/emacs/site-lisp/notmuch-lib.el
-share/emacs/site-lisp/notmuch-logo.png
-share/emacs/site-lisp/notmuch-maildir-fcc.el
-share/emacs/site-lisp/notmuch-message.el
-share/emacs/site-lisp/notmuch-mua.el
-share/emacs/site-lisp/notmuch-parser.el
-share/emacs/site-lisp/notmuch-print.el
-share/emacs/site-lisp/notmuch-query.el
-share/emacs/site-lisp/notmuch-show.el
-share/emacs/site-lisp/notmuch-tag.el
-share/emacs/site-lisp/notmuch-tree.el
-share/emacs/site-lisp/notmuch-version.el
-share/emacs/site-lisp/notmuch-wash.el
-share/emacs/site-lisp/notmuch.el
+${PLIST.emacs}share/emacs/site-lisp/coolj.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-address.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-crypto.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-hello.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-lib.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-logo.png
+${PLIST.emacs}share/emacs/site-lisp/notmuch-maildir-fcc.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-message.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-mua.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-parser.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-print.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-query.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-show.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-tag.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-tree.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-version.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch-wash.el
+${PLIST.emacs}share/emacs/site-lisp/notmuch.el
 share/examples/notmuch/zsh/functions/Completion/Unix/_notmuch
Index: options.mk
===================================================================
RCS file: options.mk
diff -N options.mk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ options.mk  15 Aug 2014 20:47:34 -0000
@@ -0,0 +1,18 @@
+# $NetBSD: $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.notmuch
+PKG_SUPPORTED_OPTIONS= notmuch-emacs
+PKG_SUGGESTED_OPTIONS= notmuch-emacs
+
+.include "../../mk/bsd.options.mk"
+
+###
+### emacs support
+###
+PLIST_VARS+=           emacs
+.if !empty(PKG_OPTIONS:Mnotmuch-emacs)
+BUILD_DEPENDS+=                emacs>=24.0:../../editors/emacs
+PLIST.emacs=           yes
+.else
+CONFIGURE_ARGS+=       --without-emacs
+.endif


Home | Main Index | Thread Index | Old Index