--- mu4e/meson.build.orig 2026-05-16 23:56:38 UTC +++ mu4e/meson.build @@ -46,6 +46,7 @@ mu4e_srcs=[ 'mu4e-contacts.el', 'mu4e-context.el', 'mu4e-contrib.el', + 'mu4e-dbus.el', 'mu4e-draft.el', 'mu4e-folders.el', 'mu4e-headers.el', @@ -66,69 +67,13 @@ mu4e_srcs=[ 'mu4e-server.el', 'mu4e-speedbar.el', 'mu4e-thread.el', + 'mu4e-transient.el', 'mu4e-update.el', 'mu4e-vars.el', 'mu4e-view.el', 'mu4e-window.el', 'mu4e.el' ] - -# 'bc'->byte-compile. The above should always be byte-compiled. -mu4e_bc_srcs = mu4e_srcs - -# emacs 28 is guaranteed to have transient -# not very elegant, but -# https://stackoverflow.com/questions/49221792/byte-compile-file-only-when-library-is-found -mu4e_srcs += 'mu4e-transient.el' -if emacs28.found() - mu4e_bc_srcs += 'mu4e-transient.el' -else - message('mu4e-transient.el cannot be byte-compiled') -endif - -# do have we have dbus support? -mu4e_srcs += 'mu4e-dbus.el' -emacs_dbus = run_command(emacs, '--batch', '--eval', '(kill-emacs (if (featurep \'dbusbind) 0 1))', - check: false) -if emacs_dbus.returncode() == 0 - mu4e_bc_srcs += 'mu4e-dbus.el' -else - message('mu4e-dbus.el cannot be byte-compiled') -endif - -# note, we cannot compile mu4e-config.el without incurring -# WARNING: Source item -# '[...]/build/mu4e/mu4e-meta.el' cannot be converted to File object, because -# it is a generated file. This will become a hard error in the future. -# -#... so let's not do that! - -# byte compile the sources that can be byte-compiled. This may exclude mu4e-transient.el and -# mu4e-dbus.el -foreach src : mu4e_bc_srcs - target_name= '@BASENAME@.elc' - target_path = join_paths(meson.current_build_dir(), target_name) - target_func = '(setq byte-compile-dest-file-function(lambda(_) "' + target_path + '"))' - - custom_target(src.underscorify() + '_el', - build_by_default: true, - input: src, - output: target_name, - install_dir: mu4e_lispdir, - install: true, - # rebuild all if any changed. - depend_files: mu4e_srcs, - command: [emacs, - '--no-init-file', - '--batch', - '--directory', meson.current_source_dir(), - '--directory', meson.current_build_dir(), - # we don't need warnings for items that have become - # obsolete _after_ our last supported emacs release. - '--eval', '(setq byte-compile-warnings \'(not obsolete))', - '--eval', target_func, - '--funcall', 'batch-byte-compile', '@INPUT@']) -endforeach # hack-around for native compile issue: copy sources to builddir. # see: https://debbugs.gnu.org/db/47/47987.html