Created attachment 352518 [details] notmuch-0.15.2.ebuild - modified The next release of notmuch will have a replacement for notmuch-vim written in ruby. This requires building of the ruby bindings. I just tried around getting the bindings built with ruby-ng.eclass, but did not succeed - help is very appreciated! As ruby18 will be removed from portage sooner or later I sticked with ruby19 for the moment and simply used the bindings function. Current release also requires a patch to properly link.
Created attachment 352520 [details, diff] ruby_fix_UINT2FIX.patch
Comment on attachment 352518 [details] notmuch-0.15.2.ebuild - modified --- notmuch-0.15.2.ebuild 2013-03-10 20:40:06.780636776 +0100 +++ - 2013-07-03 15:20:14.966709944 +0200 @@ -21,7 +21,7 @@ pick? ( emacs ) test? ( crypt emacs python ) " -IUSE="bash-completion crypt debug doc emacs mutt nmbug pick python test vim +IUSE="bash-completion crypt debug doc emacs mutt nmbug pick python ruby test vim zsh-completion" CDEPEND=" @@ -32,6 +32,7 @@ debug? ( dev-util/valgrind ) emacs? ( >=virtual/emacs-23 ) x86? ( >=dev-libs/xapian-1.2.7-r2 ) + ruby? ( dev-lang/ruby:1.9 ) vim? ( || ( >=app-editors/vim-7.0 >=app-editors/gvim-7.0 ) ) " DEPEND="${CDEPEND} @@ -51,7 +52,7 @@ zsh-completion? ( app-shells/zsh ) " -PATCHES=( ) +PATCHES=( "${FILESDIR}/ruby_fix_UINT2FIX.patch" ) DOCS=( AUTHORS NEWS README ) SITEFILE="50${PN}-gentoo.el" SITEFILE_PICK="60${PN}-pick-gentoo.el" @@ -66,6 +67,15 @@ fi } +compile_ruby() { + ruby19 extconf.rb || die "ruby config failed" + emake || die "ruby compile failed" +} + +install_ruby() { + emake DESTDIR="${D}" install || die "ruby install failed" +} + pkg_setup() { if use emacs; then elisp-need-emacs 23 || die "Emacs version too low" @@ -108,6 +118,7 @@ src_compile() { default bindings python distutils_src_compile + bindings ruby compile_ruby if use mutt; then pushd contrib/notmuch-mutt || die @@ -169,6 +180,7 @@ fi DOCS="" bindings python distutils_src_install + bindings ruby install_ruby if use doc; then bindings python dohtml -r python
Franz, thanks for patches. Jer, thanks for fixing. :-) (Franz, you don't have to add yourself to CC since you are the reporter.)
(In reply to Amadeusz Żołnowski from comment #3) > Franz, thanks for patches. Jer, thanks for fixing. :-) Great to hear :) > (Franz, you don't have to add yourself to CC since you are the reporter.) That happened automatically when attaching the ebuild.
I have committed changes to live ebuild in my overlay for now. I am going to move these changes to official repo with upcoming 0.16 release. Changes include: - ruby bindings - new UI for Vim - cosmetic changes
(In reply to Amadeusz Żołnowski from comment #5) > I have committed changes to live ebuild in my overlay for now. To test: # layman -a aidecoe # layman -S # echo '=net-mail/notmuch-9999 **' >> /etc/portage/package.keywords Edit /etc/portage/package.use to add missing flags (possibly: ruby, vim). # emerge =net-mail/notmuch-9999 And enjoy. :-)
I am sorry, but I am not going to fix it. The simple approach provided by jer doesn't work as good as I hoped. Multiple Ruby targets are required here. Adding Ruby bindings support is not so trivial. To make it working correctly, ruby-ng eclass needs to be used. Until somebody with more patience to Ruby adds support for it, notmuch ebuild doesn't support neither Vim UI nor Ruby bindings. I am not going to touch Ruby bindings myself anymore.
Hello Ruby team. If somebody of you would be interested in adding support for Ruby bindings in notmuch-0.16, I'd be grateful. :-) If not, please ignore it.
I just added a standalone package "notmuch-ruby". It works so far, but there are still some things I am not sure about - TODO in the commit message. Any ideas? https://github.com/ff2000/gentoo-overlay/commit/f3cd82b63a69efbd08d254dc225a09e14f837578 Concerning notmuch-vim: I do not use the one bundled with notmuch, I use a direct git clone from https://github.com/felipec/notmuch-vim-ruby
Hi Franz! Thank you for you ebuild, but please have in mind that notmuch-ruby bindings will not get into tree until new ruby eclass is ready (bug #444828).
(In reply to Amadeusz Żołnowski from comment #10) > Hi Franz! > > Thank you for you ebuild, but please have in mind that notmuch-ruby bindings > will not get into tree until new ruby eclass is ready (bug #444828). Yes, I know that report. That's the reason I finally stripped out the bindings into a new ebuild: https://bugs.gentoo.org/show_bug.cgi?id=444828#c1 I just wanted to to get the bindings and share the result (probably it's useful for others :)) As I use notmuch-vim mostly for testing I am happy with it.
As there seems to be some interest in improving notmuch-vim (Ian Main pushed quite some patches to the ML/his github fork) I wanted to start playing around with it again. Therefor I created notmuch-ruby-0.18.1.ebuild. Will attach it and a new version of the build_standalone patch.
Created attachment 386176 [details] dev-ruby/notmuch-ruby-0.18.1.ebuild
Created attachment 386178 [details, diff] notmuch-ruby-0.18.1-build_standalone.patch
@ruby team: could you review it and possibly take it under your wings?
(In reply to Franz Fellner from comment #13) > Created attachment 386176 [details] > dev-ruby/notmuch-ruby-0.18.1.ebuild DEPEND="=net-mail/notmuch-${PV}" RDEPEND="${DEPEND}" PDEPEND="dev-ruby/mail" This won't work well with ruby-ng.eclass since it also manipulates DEPEND and RDEPEND. I'd write this as DEPEND+="=net-mail/notmuch-${PV}" RDEPEND+="=net-mail/notmuch-${PV}" I'm not sure why you use PDEPEND here because I assume this is a runtime dependency. In that case you should use the ruby_add_rdepend() method to add the dependency to ensure that ruby version USE flags are properly propagated. Also note that dev-ruby/mail is slotted and each slots has API differences, so your version may need to be more precise. For emake it's better to use "emake V=1 ..." since that triggers verbose build mode, which some of the QA tools use. For bindings that are spun out of other packages I think it makes more sense for the original package maintainer to be the primary maintainer, but feel free to add it to the ruby herd so we can help with general ruby issues.
Created attachment 387202 [details] notmuch-ruby-0.18.1.ebuild Changes applied as requested. dev-ruby/mail DEP was taken from the vim deps, AFAIR I initially wanted to add a USE="vim" to notmuch-ruby, which turned out to be not what I REALLY wanted, but I forgot the DEP... (USE="vim" for net-mail/notmuch should PDEPEND on notmuch-ruby and dev-ruby/mail, I think)
The given approach is to provide ruby bindings by separate package, but I really don't want to maintain ruby packages. Reassigning to proxy maintainers.
I have submitted a patch[0] to notmuch to allow building for a different ruby version, but I have not yet succeeded to make use of this in the ebuild. Someone who understands ruby-ng.eclass might. [0]: https://notmuchmail.org/pipermail/notmuch/2018/026528.html
(In reply to Amadeusz Żołnowski from comment #18) > The given approach is to provide ruby bindings by separate package, but I > really don't want to maintain ruby packages. Reassigning to proxy > maintainers. The ruby team could be a co-maintainer on this package and help with the ruby side of things.
As mentioned in https://bugs.gentoo.org/801142 I am working on packaging the notmuch-vim plugin for Gentoo, now that the plugin author has announced that he will resume work and has also released a new version. The plugin requires Ruby bindings, something the current net-mail/notmuch ebuild does not support. What is the status of dev-ruby/notmuch-ruby? I only know that it is not available in the Gentoo tree as of 2021-07-08, and based on the existing comments, this ticket has been dormant for several years.