Ticket #36135: gnuplot-emacs_app.2.patch

File gnuplot-emacs_app.2.patch, 894 bytes (added by mojca (Mojca Miklavec), 12 years ago)

Allow using emacs-app[-devel] port to compile emacs support for gnuplot

  • Portfile

    old new if {[variant_isset no_x11]} { 
    9494}
    9595
    9696variant emacs description "An emacs mode for working with gnuplot" {
    97     depends_build-append    path:bin/emacs:emacs
     97    # This would be nicer with an emacs PortGroup:
     98    # Use the port that provides Emacs.app (emacs-app[-devel])
     99    # or the usual emacs binary if the former doesn't exist
     100    set app_binary ${applications_dir}/Emacs.app/Contents/MacOS/Emacs
     101    set app_provider [registry_file_registered $app_binary]
     102    if {[file exists $app_binary] && $app_provider != 0} {
     103        depends_build-append port:${app_provider}
     104        configure.env-append EMACS=${app_binary}
     105    } else {
     106        depends_build-append path:bin/emacs:emacs
     107    }
    98108    configure.args-delete   --without-lisp-files
    99109    configure.args-append   --with-lisp-files --with-lispdir=${prefix}/share/emacs/site-lisp
    100110}