#36135: gnuplot enhancement to support emacs-app --------------------------+------------------------------------ Reporter: jrh@… | Owner: mojca.miklavec.lists@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: haspatch Port: gnuplot | --------------------------+------------------------------------ Comment (by jrh@…): Replying to [comment:6 mojca.miklavec.lists@…]:
I attached my suggestion for the patch based on your original patch. Can you please review it? I'm not sure about this line: {{{ depends_build-append path:share/emacs/site-lisp:emacs-app }}} Doesn't the normal emacs also satisfy this? The normal emacs does, too, yes. Within an "emacs_app" variant, it makes more sense to have that as it is, of course, but if we come to the point where the gnuplot port doesn't have to care about emacs vs. emacs-app, then it would perhaps be less intrusive to use {{{ depends_build-append path:share/emacs/site-lisp:emacs }}} (i.e. the "normal" == CLI-only emacs) in the one emacs variant.
One part of the patch ({{{lisp/configure[.in]}}}) should be applied upstream anyway. The version 4.6.1 is soon going to be released. I would like to see if developers are willing to take the patch upstream before committing anything to MacPorts repository.
Now, given that {{{${prefix}/share/emacs/site-lisp}}} works for both normal emacs and Emacs.app I would like to find a way to avoid two different variants if possible. That would be nice, yes. This doesn't do anything but install a few files to that location. In case of user having just Emacs.app installed it just boils down to setting {{{EMACS}}} variable to do the job. The result is more or less the same, I believe. Well, it installs *.el files to share/emacs/site-lisp, but it also uses {{{EMACS}}} to compile them to *.elc files: {{{ $ port contents gnuplot Port gnuplot contains: ... /opt/local/share/emacs/site-lisp/gnuplot-gui.el /opt/local/share/emacs/site-lisp/gnuplot-gui.elc /opt/local/share/emacs/site-lisp/gnuplot.el /opt/local/share/emacs/site-lisp/gnuplot.elc /opt/local/share/emacs/site-lisp/info-look.20.2.el /opt/local/share/emacs/site-lisp/info-look.20.3.el ... }}} At the very least I think we want to make sure to use an Emacs from MacPorts to compile those files, either {{{${prefix}/bin/emacs}}} or Emacs.app -- in particular, not Apple's outdated {{{/usr/bin/emacs}}}.
Is there fancy Portfile syntax that can set {{{EMACS}}} to the first that it finds of {{{${prefix}/bin/emacs}}} or {{{${applications_dir}/Emacs.app/Contents/MacOS/Emacs}}}? If so, then the One True Variant need only look like {{{ variant emacs description "An emacs mode for working with gnuplot." { depends_build-append path:share/emacs/site-lisp:emacs configure.args-delete --without-lisp-files configure.args-append --with-lisp-files --with- lispdir=${prefix}/share/emacs/site-lisp configure.env-append EMACS=<magic goes here> } }}}
Is there any Emacs PortGroup to take care of differences between emacs
and emacs-app? ;) That would indeed be nice. I'm sure there are a boatload of ports that would benefit from some systematic Emacs agnosticism. -- Ticket URL: <https://trac.macports.org/ticket/36135#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS