Ticket #23165: patch-emacs.diff

File patch-emacs.diff, 8.3 KB (added by drkp (Dan Ports), 14 years ago)

patch for emacs port

  • Portfile

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/Portfile ./Portfile
    old new  
    1 # $Id: Portfile 61886 2009-12-23 02:21:11Z jmr@macports.org $
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
     2# $Id: Portfile 57407 2009-09-10 19:52:45Z snc@macports.org $
    23
    34PortSystem 1.0
    45
    56name            emacs
    6 version         22.3
    7 revision        2
     7version         23.1
     8
    89categories      editors
    9 maintainers     nomaintainer
    10 description     The GNU Emacs text editor (command line only)
     10maintainers     ambulatoryclam.net:dports
     11description     The GNU Emacs text editor
    1112long_description \
    1213    GNU Emacs is a self-documenting, customizable, extensible real-time \
    1314    display editor. Users new to Emacs will be able to use basic        \
     
    1920platforms       darwin freebsd
    2021homepage        http://www.gnu.org/software/emacs/emacs.html
    2122master_sites    gnu
    22 checksums       md5 aa8ba34f548cd78b35914ae5a7bb87eb
    23 patchfiles      patch-Makefile.in.diff \
    24                 patch-leim-Makefile.in.diff
     23checksums       md5     a620d4452769d04ad8864d662f34f8dd \
     24                sha1    e993445d14d2fdedd1418bc32c8c4ea30442bc51 \
     25                rmd160  c557149f59916b82f0ae156f87406126b03671b4
     26patchfiles      patch-unexmacosx.c.diff \
     27                patch-s-darwin.h.diff
     28
    2529configure.args  --without-x \
    2630                --without-carbon
    2731
     
    3135    xinstall -d ${destroot}${prefix}/share/emacs/${version}/leim
    3236    delete ${destroot}${prefix}/bin/ctags
    3337    delete ${destroot}${prefix}/share/man/man1/ctags.1
    34     if {[variant_isset carbon]} {
    35         global version
    36         delete ${destroot}${prefix}/bin/emacs ${destroot}${prefix}/bin/emacs-${version}
    37     }
    38 }
    39 
    40 platform darwin 7 {
    41     depends_build-append    port:autoconf
    4238}
    4339
    4440livecheck.type  regex
     
    7571    depends_lib-append      lib:libgtk.2:gtk2 \
    7672                            lib:libglib.2:glib2
    7773}
    78 
    79 variant carbon conflicts x11 description {Adds a Mac (Carbon) version of Emacs} {
    80     configure.args-delete   --without-carbon
    81     configure.args-append   --with-carbon \
    82                             --enable-carbon-app=${applications_dir}
    83 }
    84 
    85 variant atsui requires carbon description {Adds a Mac (Carbon) version of Emacs that uses the ATSUI protocol} {
    86     configure.cflags-append -DUSE_ATSUI
    87 }
    88 
  • files/patch-Makefile.in.diff

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-Makefile.in.diff ./files/patch-Makefile.in.diff
    old new  
    1 --- Makefile.in.orig    2008-08-11 18:46:00.000000000 +0100
    2 +++ Makefile.in 2008-08-11 18:48:32.000000000 +0100
    3 @@ -438,7 +438,6 @@
    4               (cd $${dir}; tar -chf - . ) \
    5                 | (cd $${dest}; umask 022; \
    6                     tar -xvf - && cat > /dev/null) || exit 1; \
    7 -             find $${dest} -exec chown $${LOGNAME:-$$USERNAME} {} ';' ;\
    8               for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \
    9                 chmod a+rx $${subdir} ; \
    10                 rm -rf $${subdir}/RCS ; \
    11 @@ -478,7 +477,7 @@
    12            echo "Copying etc/DOC-* to $(DESTDIR)${docdir} ..." ; \
    13            (cd ./etc; tar -chf - DOC*) \
    14              |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
    15 -          (cd $(DESTDIR)$(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \
    16 +          (cd $(DESTDIR)$(docdir); chmod a+r DOC*; \
    17             if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \
    18         else true; fi
    19         -unset CDPATH; \
    20 @@ -490,7 +489,6 @@
    21            echo "Copying lisp/*.el and lisp/*.elc to $(DESTDIR)${lispdir} ..." ; \
    22            (cd lisp; tar -chf - *.el *.elc) \
    23              |(cd $(DESTDIR)${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
    24 -          (cd $(DESTDIR)${lispdir}; find . -exec chown $${LOGNAME:-$$USERNAME} {} ';') ; \
    25         else true; fi
    26         -unset CDPATH; \
    27         if [ -n "${GZIP_PROG}" ]; \
  • files/patch-leim-Makefile.in.diff

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-leim-Makefile.in.diff ./files/patch-leim-Makefile.in.diff
    old new  
    1 --- leim/Makefile.in.orig       2008-08-11 18:46:16.000000000 +0100
    2 +++ leim/Makefile.in    2008-08-11 18:48:39.000000000 +0100
    3 @@ -253,7 +253,6 @@
    4             done) \
    5         else true; fi
    6         -chmod -R a+r ${INSTALLDIR}
    7 -       -find ${INSTALLDIR} -exec chown $${LOGNAME:-$$USERNAME} '{}' ';'
    8  
    9  clean mostlyclean:
    10         rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \
  • files/patch-s-darwin.h.diff

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-s-darwin.h.diff ./files/patch-s-darwin.h.diff
    old new  
     1--- src/s/darwin.h      2009/02/04 11:31:30     1.53
     2+++ src/s/darwin.h      2009/08/28 22:49:58     1.54
     3@@ -171,6 +171,9 @@
     4 #define malloc unexec_malloc
     5 #define realloc unexec_realloc
     6 #define free unexec_free
     7+/* Don't use posix_memalign because it is not compatible with
     8+   unexmacosx.c.  */
     9+#undef HAVE_POSIX_MEMALIGN
     10 #endif
     11 
     12 /* The ncurses library has been moved out of the System framework in
     13
  • files/patch-unexmacosx.c.diff

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-unexmacosx.c.diff ./files/patch-unexmacosx.c.diff
    old new  
     1--- src/unexmacosx.c    2009/01/08 03:16:02     1.29
     2+++ src/unexmacosx.c    2009/08/28 22:49:46     1.30
     3@@ -582,6 +582,14 @@
     4       printf ("LC_UUID          ");
     5       break;
     6 #endif
     7+#ifdef LC_DYLD_INFO
     8+    case LC_DYLD_INFO:
     9+      printf ("LC_DYLD_INFO     ");
     10+      break;
     11+    case LC_DYLD_INFO_ONLY:
     12+      printf ("LC_DYLD_INFO_ONLY");
     13+      break;
     14+#endif
     15     default:
     16       printf ("unknown          ");
     17     }
     18@@ -819,6 +827,7 @@
     19               || strncmp (sectp->sectname, "__const", 16) == 0
     20               || strncmp (sectp->sectname, "__cfstring", 16) == 0
     21               || strncmp (sectp->sectname, "__gcc_except_tab", 16) == 0
     22+              || strncmp (sectp->sectname, "__program_vars", 16) == 0
     23               || strncmp (sectp->sectname, "__objc_", 7) == 0)
     24        {
     25          if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
     26@@ -1086,6 +1095,36 @@
     27   curr_header_offset += lc->cmdsize;
     28 }
     29 
     30+#ifdef LC_DYLD_INFO
     31+/* Copy a LC_DYLD_INFO(_ONLY) load command from the input file to the output
     32+   file, adjusting the file offset fields.  */
     33+static void
     34+copy_dyld_info (struct load_command *lc, long delta)
     35+{
     36+  struct dyld_info_command *dip = (struct dyld_info_command *) lc;
     37+
     38+  if (dip->rebase_off > 0)
     39+    dip->rebase_off += delta;
     40+  if (dip->bind_off > 0)
     41+    dip->bind_off += delta;
     42+  if (dip->weak_bind_off > 0)
     43+    dip->weak_bind_off += delta;
     44+  if (dip->lazy_bind_off > 0)
     45+    dip->lazy_bind_off += delta;
     46+  if (dip->export_off > 0)
     47+    dip->export_off += delta;
     48+
     49+  printf ("Writing ");
     50+  print_load_command_name (lc->cmd);
     51+  printf (" command\n");
     52+
     53+  if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
     54+    unexec_error ("cannot write dyld info command to header");
     55+
     56+  curr_header_offset += lc->cmdsize;
     57+}
     58+#endif
     59+
     60 /* Copy other kinds of load commands from the input file to the output
     61    file, ones that do not require adjustments of file offsets.  */
     62 static void
     63@@ -1152,6 +1191,12 @@
     64       case LC_TWOLEVEL_HINTS:
     65        copy_twolevelhints (lca[i], linkedit_delta);
     66        break;
     67+#ifdef LC_DYLD_INFO
     68+      case LC_DYLD_INFO:
     69+      case LC_DYLD_INFO_ONLY:
     70+       copy_dyld_info (lca[i], linkedit_delta);
     71+       break;
     72+#endif
     73       default:
     74        copy_other (lca[i]);
     75        break;
     76