Ticket #36135: gnuplot-emacs_app.patch

File gnuplot-emacs_app.patch, 3.9 KB (added by mojca (Mojca Miklavec), 12 years ago)

Patch to allow adding support to Emacs.app

  • Portfile

    old new depends_lib port:expat \ 
    5050                            port:zlib
    5151
    5252patchfiles                  patch-src-variable.c.diff \
     53                            patch-lisp-configure.in.diff \
    5354                            patch-upstream-compilerwarnings.diff \
    5455                            patch-upstream-wxt-scroll.diff \
    5556                            patch-upstream-qt.diff \
    if {[variant_isset no_x11]} { 
    105106    default_variants +x11
    106107}
    107108
    108 variant emacs description "An emacs mode for working with gnuplot" {
     109variant emacs conflicts emacs_app description "An emacs mode for working with gnuplot" {
    109110    depends_build-append    path:bin/emacs:emacs
    110111    configure.args-delete   --without-lisp-files
    111112    configure.args-append   --with-lisp-files --with-lispdir=${prefix}/share/emacs/site-lisp
    112113}
    113114
     115# not sure if the extra variant is really needed (there might be a workaround to select the right EMACS?); TODO: check 'depends_build'
     116variant emacs_app conflicts emacs description "An emacs mode for working with gnuplot, using Emacs.app." {
     117    depends_build-append    path:share/emacs/site-lisp:emacs-app
     118    configure.args-delete   --without-lisp-files
     119    configure.args-append   --with-lisp-files --with-lispdir=${prefix}/share/emacs/site-lisp
     120    configure.env-append    EMACS=${applications_dir}/Emacs.app/Contents/MacOS/Emacs
     121}
     122
    114123variant luaterm description "Enable lua-based terminals" {
    115124    depends_lib-append      port:lua
    116125    configure.args-delete   --without-lua
  • new file files/patch-lisp-configure.in.diff

    - +  
     1--- lisp/configure.orig
     2+++ lisp/configure
     3@@ -2323,8 +2323,6 @@ fi
     4 
     5 
     6 
     7-EMACS=`basename $EMACS`
     8-
     9 for ac_prog in dvips
     10 do
     11   # Extract the first word of "$ac_prog", so it can be a program name with args.
     12@@ -2539,7 +2537,7 @@ vnum=`echo $emacs_version |awk -F\. '{print 100*$1+$2}'`
     13 
     14 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether info-look.el is needed" >&5
     15 $as_echo_n "checking whether info-look.el is needed... " >&6; }
     16-if test "$EMACS" = emacs ; then
     17+if test `basename $EMACS` = emacs ; then
     18   if test "$vnum" -ge 2030 ; then
     19     info_look="not needed with emacs $emacs_version"
     20     INFO_LOOK_ELC=
     21@@ -2547,7 +2545,7 @@ if test "$EMACS" = emacs ; then
     22     info_look="using info-look.20.2.el"
     23     cp info-look.20.2.el info-look.el
     24   fi
     25-elif test "$EMACS" = xemacs ; then
     26+elif test `basename $EMACS` = xemacs ; then
     27   if test "$vnum" -ge 2000 ; then
     28     info_look="using info-look.20.3.el"
     29     cp info-look.20.3.el info-look.el
     30@@ -2557,6 +2555,7 @@ elif test "$EMACS" = xemacs ; then
     31   fi
     32 else
     33   info_look="using none"
     34+  INFO_LOOK_ELC=
     35 fi
     36 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $info_look" >&5
     37 $as_echo "$info_look" >&6; }
     38--- lisp/configure.in.orig
     39+++ lisp/configure.in
     40@@ -13,8 +13,6 @@ AC_SET_MAKE
     41 AC_PROG_INSTALL
     42 AM_PATH_LISPDIR
     43 
     44-EMACS=`basename $EMACS`
     45-
     46 AC_CHECK_PROGS(DVIPS, dvips, no)
     47 AC_CHECK_PROGS(LATEX, latex latex2e, no)
     48 AC_PATH_PROG(MAKEINFO, makeinfo, no)
     49@@ -75,7 +73,7 @@ AC_MSG_RESULT([$emacs_version])
     50 vnum=`echo $emacs_version |awk -F\. '{print 100*$1+$2}'`
     51 
     52 AC_MSG_CHECKING([whether info-look.el is needed])
     53-if test "$EMACS" = emacs ; then
     54+if test `basename $EMACS` = emacs ; then
     55   if test "$vnum" -ge 2030 ; then
     56     info_look="not needed with emacs $emacs_version"
     57     INFO_LOOK_ELC=
     58@@ -83,7 +81,7 @@ if test "$EMACS" = emacs ; then
     59     info_look="using info-look.20.2.el"
     60     cp info-look.20.2.el info-look.el
     61   fi
     62-elif test "$EMACS" = xemacs ; then
     63+elif test `basename $EMACS` = xemacs ; then
     64   if test "$vnum" -ge 2000 ; then
     65     info_look="using info-look.20.3.el"
     66     cp info-look.20.3.el info-look.el
     67@@ -93,6 +91,7 @@ elif test "$EMACS" = xemacs ; then
     68   fi
     69 else
     70   info_look="using none"
     71+  INFO_LOOK_ELC=
     72 fi
     73 AC_MSG_RESULT([$info_look])
     74