From e94bf408f25e346febb38f554f72cd42bb26c7be Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 23 Aug 2023 07:23:28 +0800 Subject: [PATCH 1/3] mu4e: remove mu4e-builddir It is not used. --- mu4e/meson.build | 2 -- mu4e/mu4e-config.el.in | 3 --- 2 files changed, 5 deletions(-) diff --git a/mu4e/meson.build b/mu4e/meson.build index ee4a8e4f..0a01dc12 100644 --- a/mu4e/meson.build +++ b/mu4e/meson.build @@ -23,8 +23,6 @@ mu4e_meta = configure_file( install_dir: mu4e_lispdir, configuration: { 'VERSION' : meson.project_version(), - # project_build_root() with meson >= 0.56 - 'abs_top_builddir': join_paths(meson.current_build_dir()), 'MU_DOC_DIR' : join_paths(datadir, 'doc', 'mu'), }) diff --git a/mu4e/mu4e-config.el.in b/mu4e/mu4e-config.el.in index 22a6263f..5f99db42 100644 --- a/mu4e/mu4e-config.el.in +++ b/mu4e/mu4e-config.el.in @@ -3,9 +3,6 @@ (defconst mu4e-mu-version "@VERSION@" "Required mu binary version; mu4e's version must agree with this.") -(defconst mu4e-builddir "@abs_top_builddir@" - "Top-level build directory.") - (defconst mu4e-doc-dir "@MU_DOC_DIR@" "Mu4e's data-dir.") From 00f7053d51105eea0c72151f1a8cf0b6d8478e4e Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 23 Aug 2023 08:04:31 +0800 Subject: [PATCH 2/3] mu4e: add mu4e-pkg.el This file provides information needed by package.el. --- meson.build | 3 ++- mu4e/meson.build | 10 ++++++++++ mu4e/mu4e-pkg.el.in | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 mu4e/mu4e-pkg.el.in diff --git a/meson.build b/meson.build index 2228f438..381a9699 100644 --- a/meson.build +++ b/meson.build @@ -194,7 +194,8 @@ endif # emacs -- needed for mu4e compilation emacs_name=get_option('emacs') -emacs=find_program([emacs_name], version: '>=26.3', required:false) +emacs_min_version='26.3' +emacs=find_program([emacs_name], version: '>='+emacs_min_version, required:false) if not emacs.found() message('emacs not found; not pre-compiling mu4e sources') endif diff --git a/mu4e/meson.build b/mu4e/meson.build index 0a01dc12..07b329d8 100644 --- a/mu4e/meson.build +++ b/mu4e/meson.build @@ -26,6 +26,16 @@ mu4e_meta = configure_file( 'MU_DOC_DIR' : join_paths(datadir, 'doc', 'mu'), }) +mu4e_pkg_desc = configure_file( + input: 'mu4e-pkg.el.in', + output: 'mu4e-pkg.el', + install: true, + install_dir: mu4e_lispdir, + configuration: { + 'VERSION' : meson.project_version(), + 'EMACS_MIN_VERSION' : emacs_min_version, + }) + mu4e_srcs=[ 'mu4e-actions.el', 'mu4e-bookmarks.el', diff --git a/mu4e/mu4e-pkg.el.in b/mu4e/mu4e-pkg.el.in new file mode 100644 index 00000000..ed8e733a --- /dev/null +++ b/mu4e/mu4e-pkg.el.in @@ -0,0 +1,7 @@ +;; -*- no-byte-compile: t; -*- +(define-package "mu4e" "@VERSION@" + "part of mu4e, the mu mail user agent" + '((emacs "@EMACS_MIN_VERSION@")) + :authors '(("Dirk-Jan C. Binnema" . "djcb@djcbsoftware.nl")) + :maintainer '("Dirk-Jan C. Binnema" . "djcb@djcbsoftware.nl") + :keywords '("email")) From 842027faddc16b5dd6a929ec17b8f6d05b37ef07 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 23 Aug 2023 09:05:37 +0800 Subject: [PATCH 3/3] mu4e: generate mu4e-autoloads.el This file can be used by package.el. --- mu4e/meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mu4e/meson.build b/mu4e/meson.build index 07b329d8..2878026d 100644 --- a/mu4e/meson.build +++ b/mu4e/meson.build @@ -83,6 +83,17 @@ foreach src : mu4e_srcs install_mode: 'r--r--r--') endforeach +# this depends on the above hack: all mu4e elisp files needs to be in builddir +mu4e_autoloads = configure_file( + output: 'mu4e-autoloads.el', + install: true, + install_dir: mu4e_lispdir, + command: [emacs, + '--no-init-file', + '--batch', + '--load', 'package', + '--eval', '(package-generate-autoloads "mu4e" "' + meson.current_build_dir() + '" )']) + foreach src : mu4e_srcs target_name= '@BASENAME@.elc' target_path = join_paths(meson.current_build_dir(), target_name)