[62683] trunk/dports/editors

blair at macports.org blair at macports.org
Wed Jan 13 14:20:10 PST 2010


Revision: 62683
          http://trac.macports.org/changeset/62683
Author:   blair at macports.org
Date:     2010-01-13 14:20:08 -0800 (Wed, 13 Jan 2010)
Log Message:
-----------
Make a new emacs22 port for Emacs 22.3.  This is svn copied from the
emacs Port before I did the 23.1 upgrade and then patched.  This is
the second half of closing #23165.

Modified Paths:
--------------
    trunk/dports/editors/emacs22/Portfile

Added Paths:
-----------
    trunk/dports/editors/emacs22/
    trunk/dports/editors/emacs22/files/patch-s-darwin.h.diff
    trunk/dports/editors/emacs22/files/patch-unexmacosx.c.diff

Modified: trunk/dports/editors/emacs22/Portfile
===================================================================
--- trunk/dports/editors/emacs/Portfile	2010-01-13 21:51:23 UTC (rev 62680)
+++ trunk/dports/editors/emacs22/Portfile	2010-01-13 22:20:08 UTC (rev 62683)
@@ -1,3 +1,4 @@
+# -*- 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
 # $Id$
 
 PortSystem 1.0
@@ -2,8 +3,8 @@
 
-name            emacs
+name            emacs22
 version         22.3
-revision        2
+
 categories      editors
-maintainers     nomaintainer
-description     The GNU Emacs text editor (command line only)
+maintainers     ambulatoryclam.net:dports openmaintainer
+description     The GNU Emacs text editor
 long_description \
@@ -18,32 +19,54 @@
 
 platforms       darwin freebsd
 homepage        http://www.gnu.org/software/emacs/emacs.html
-master_sites    gnu
-checksums       md5 aa8ba34f548cd78b35914ae5a7bb87eb
-patchfiles	patch-Makefile.in.diff \
-		patch-leim-Makefile.in.diff
+master_sites    gnu:emacs
+distname        emacs-${version}
+checksums       md5     aa8ba34f548cd78b35914ae5a7bb87eb \
+                sha1    5e9b3e0205099a83be7198fd43ba1c9442a3feb0 \
+                rmd160  a7eed5099d0cab25f34152f1b18b5c1b4e2e0746
+
+patchfiles      patch-Makefile.in.diff \
+                patch-leim-Makefile.in.diff \
+                patch-unexmacosx.c.diff \
+		patch-s-darwin.h.diff
+
+set major       22
+set suffix      ".${name}"
+
 configure.args  --without-x \
-                --without-carbon
+                --without-carbon \
+                --program-suffix=${suffix} \
+                --infodir=${prefix}/share/info/${name}
 
 depends_lib     port:ncurses
 
+
 post-destroot {
     xinstall -d ${destroot}${prefix}/share/emacs/${version}/leim
-    delete ${destroot}${prefix}/bin/ctags
+    # avoid conflict with ctags installed by the ctags port
+    delete ${destroot}${prefix}/bin/ctags${suffix}
     delete ${destroot}${prefix}/share/man/man1/ctags.1
-    if {[variant_isset carbon]} {
-        global version
-        delete ${destroot}${prefix}/bin/emacs ${destroot}${prefix}/bin/emacs-${version}
+
+    # remove non-version-specific site-lisp dir
+    delete ${destroot}${prefix}/share/emacs/site-lisp
+    delete ${destroot}${prefix}/var/games/emacs/snake-scores
+    delete ${destroot}${prefix}/var/games/emacs/tetris-scores
+
+    # add suffixes to man pages to match binary names
+    foreach f [glob -dir ${destroot}${prefix}/share/man/man1 *.1] {
+        move $f "[file rootname $f].${suffix}.1"
     }
-}
 
-platform darwin 7 {
-    depends_build-append    port:autoconf
+    # give the emacs binary a more sane name
+    move ${destroot}${prefix}/bin/emacs${suffix} \
+         ${destroot}${prefix}/bin/${name}
+    move ${destroot}${prefix}/bin/emacs-${version}${suffix} \
+         ${destroot}${prefix}/bin/emacs-${version}
 }
 
 livecheck.type  regex
 livecheck.url   http://ftp.gnu.org/gnu/emacs/?C=M&O=D
-livecheck.regex ${name}-(\\d+\\.\\d+\\w*)\\.tar
+livecheck.regex emacs-(${major}\\.\\d+\\w*)\\.tar
 
 variant x11 description {Builds emacs as a X11 program with Lucid widgets} {
     configure.args-delete   --without-x
@@ -76,13 +99,3 @@
                             lib:libglib.2:glib2
 }
 
-variant carbon conflicts x11 description {Adds a Mac (Carbon) version of Emacs} {
-    configure.args-delete   --without-carbon
-    configure.args-append   --with-carbon \
-                            --enable-carbon-app=${applications_dir}
-}
-
-variant atsui requires carbon description {Adds a Mac (Carbon) version of Emacs that uses the ATSUI protocol} {
-    configure.cflags-append -DUSE_ATSUI
-}
-

Added: trunk/dports/editors/emacs22/files/patch-s-darwin.h.diff
===================================================================
--- trunk/dports/editors/emacs22/files/patch-s-darwin.h.diff	                        (rev 0)
+++ trunk/dports/editors/emacs22/files/patch-s-darwin.h.diff	2010-01-13 22:20:08 UTC (rev 62683)
@@ -0,0 +1,13 @@
+--- src/s/darwin.h	2009/02/04 11:31:30	1.53
++++ src/s/darwin.h	2009/08/28 22:49:58	1.54
+@@ -171,6 +171,9 @@
+ #define malloc unexec_malloc
+ #define realloc unexec_realloc
+ #define free unexec_free
++/* Don't use posix_memalign because it is not compatible with
++   unexmacosx.c.  */
++#undef HAVE_POSIX_MEMALIGN
+ #endif
+ 
+ /* The ncurses library has been moved out of the System framework in
+

Added: trunk/dports/editors/emacs22/files/patch-unexmacosx.c.diff
===================================================================
--- trunk/dports/editors/emacs22/files/patch-unexmacosx.c.diff	                        (rev 0)
+++ trunk/dports/editors/emacs22/files/patch-unexmacosx.c.diff	2010-01-13 22:20:08 UTC (rev 62683)
@@ -0,0 +1,76 @@
+--- src/unexmacosx.c	2009/01/08 03:16:02	1.29
++++ src/unexmacosx.c	2009/08/28 22:49:46	1.30
+@@ -582,6 +582,14 @@
+       printf ("LC_UUID          ");
+       break;
+ #endif
++#ifdef LC_DYLD_INFO
++    case LC_DYLD_INFO:
++      printf ("LC_DYLD_INFO     ");
++      break;
++    case LC_DYLD_INFO_ONLY:
++      printf ("LC_DYLD_INFO_ONLY");
++      break;
++#endif
+     default:
+       printf ("unknown          ");
+     }
+@@ -819,6 +827,7 @@
+ 	       || strncmp (sectp->sectname, "__const", 16) == 0
+ 	       || strncmp (sectp->sectname, "__cfstring", 16) == 0
+ 	       || strncmp (sectp->sectname, "__gcc_except_tab", 16) == 0
++	       || strncmp (sectp->sectname, "__program_vars", 16) == 0
+ 	       || strncmp (sectp->sectname, "__objc_", 7) == 0)
+ 	{
+ 	  if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
+@@ -1086,6 +1095,36 @@
+   curr_header_offset += lc->cmdsize;
+ }
+ 
++#ifdef LC_DYLD_INFO
++/* Copy a LC_DYLD_INFO(_ONLY) load command from the input file to the output
++   file, adjusting the file offset fields.  */
++static void
++copy_dyld_info (struct load_command *lc, long delta)
++{
++  struct dyld_info_command *dip = (struct dyld_info_command *) lc;
++
++  if (dip->rebase_off > 0)
++    dip->rebase_off += delta;
++  if (dip->bind_off > 0)
++    dip->bind_off += delta;
++  if (dip->weak_bind_off > 0)
++    dip->weak_bind_off += delta;
++  if (dip->lazy_bind_off > 0)
++    dip->lazy_bind_off += delta;
++  if (dip->export_off > 0)
++    dip->export_off += delta;
++
++  printf ("Writing ");
++  print_load_command_name (lc->cmd);
++  printf (" command\n");
++
++  if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
++    unexec_error ("cannot write dyld info command to header");
++
++  curr_header_offset += lc->cmdsize;
++}
++#endif
++
+ /* Copy other kinds of load commands from the input file to the output
+    file, ones that do not require adjustments of file offsets.  */
+ static void
+@@ -1152,6 +1191,12 @@
+       case LC_TWOLEVEL_HINTS:
+ 	copy_twolevelhints (lca[i], linkedit_delta);
+ 	break;
++#ifdef LC_DYLD_INFO
++      case LC_DYLD_INFO:
++      case LC_DYLD_INFO_ONLY:
++	copy_dyld_info (lca[i], linkedit_delta);
++	break;
++#endif
+       default:
+ 	copy_other (lca[i]);
+ 	break;
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100113/c9be8eb5/attachment-0001.html>


More information about the macports-changes mailing list