[34744] trunk/dports/editors/emacs

jmr at macports.org jmr at macports.org
Mon Mar 3 21:21:54 PST 2008


Revision: 34744
          http://trac.macosforge.org/projects/macports/changeset/34744
Author:   jmr at macports.org
Date:     2008-03-03 21:21:53 -0800 (Mon, 03 Mar 2008)

Log Message:
-----------
emacs: fix building on Leopard. Closes #13294.

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

Added Paths:
-----------
    trunk/dports/editors/emacs/files/patch-src-unexmacosx.c.diff

Modified: trunk/dports/editors/emacs/Portfile
===================================================================
--- trunk/dports/editors/emacs/Portfile	2008-03-04 04:50:37 UTC (rev 34743)
+++ trunk/dports/editors/emacs/Portfile	2008-03-04 05:21:53 UTC (rev 34744)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 name            emacs
 version         22.1
-revision        1
+revision        2
 categories      editors
 maintainers     gmail.com:darren.bane
 description     The GNU Emacs text editor (command line only)
@@ -39,6 +39,10 @@
     depends_build-append    port:autoconf
 }
 
+platform darwin 9 {
+    patchfiles-append patch-src-unexmacosx.c.diff
+}
+
 livecheck.check regex
 livecheck.url   http://ftp.gnu.org/gnu/emacs/?C=M&O=D
 livecheck.regex ${name}-(\\d+\\.\\d+\\w*)\\.tar

Added: trunk/dports/editors/emacs/files/patch-src-unexmacosx.c.diff
===================================================================
--- trunk/dports/editors/emacs/files/patch-src-unexmacosx.c.diff	                        (rev 0)
+++ trunk/dports/editors/emacs/files/patch-src-unexmacosx.c.diff	2008-03-04 05:21:53 UTC (rev 34744)
@@ -0,0 +1,94 @@
+Index: src/unexmacosx.c
+===================================================================
+RCS file: /cvsroot/emacs/emacs/src/unexmacosx.c,v
+retrieving revision 1.22.2.1
+diff -c -p -r1.22.2.1 unexmacosx.c
+*** src/unexmacosx.c	25 Jul 2007 05:15:30 -0000	1.22.2.1
+--- src/unexmacosx.c	29 Oct 2007 23:09:00 -0000
+*************** unexec_regions_recorder (task_t task, vo
+*** 443,457 ****
+
+    while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
+      {
+!       /* Subtract the size of trailing null pages from filesize.  It
+  	 can be smaller than vmsize in segment commands.  In such a
+! 	 case, trailing pages are initialized with zeros.  */
+!       for (p = ranges->address + ranges->size; p > ranges->address;
+! 	   p -= sizeof (int))
+! 	if (*(((int *) p)-1))
+! 	  break;
+!       filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address);
+!       assert (filesize <= ranges->size);
+
+        unexec_regions[num_unexec_regions].filesize = filesize;
+        unexec_regions[num_unexec_regions++].range = *ranges;
+--- 443,455 ----
+
+    while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
+      {
+!       /* Subtract the size of trailing null bytes from filesize.  It
+  	 can be smaller than vmsize in segment commands.  In such a
+! 	 case, trailing bytes are initialized with zeros.  */
+!       for (p = ranges->address + ranges->size; p > ranges->address; p--)
+!       	if (*(((char *) p)-1))
+!       	  break;
+!       filesize = p - ranges->address;
+
+        unexec_regions[num_unexec_regions].filesize = filesize;
+        unexec_regions[num_unexec_regions++].range = *ranges;
+*************** unexec_regions_merge ()
+*** 503,513 ****
+--- 501,519 ----
+  {
+    int i, n;
+    unexec_region_info r;
++   vm_size_t padsize;
+
+    qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]),
+  	 &unexec_regions_sort_compare);
+    n = 0;
+    r = unexec_regions[0];
++   padsize = r.range.address & (pagesize - 1);
++   if (padsize)
++     {
++       r.range.address -= padsize;
++       r.range.size += padsize;
++       r.filesize += padsize;
++     }
+    for (i = 1; i < num_unexec_regions; i++)
+      {
+        if (r.range.address + r.range.size == unexec_regions[i].range.address
+*************** unexec_regions_merge ()
+*** 520,525 ****
+--- 526,542 ----
+  	{
+  	  unexec_regions[n++] = r;
+  	  r = unexec_regions[i];
++ 	  padsize = r.range.address & (pagesize - 1);
++ 	  if (padsize)
++ 	    {
++ 	      if ((unexec_regions[n-1].range.address
++ 		   + unexec_regions[n-1].range.size) == r.range.address)
++ 		unexec_regions[n-1].range.size -= padsize;
++ 
++ 	      r.range.address -= padsize;
++ 	      r.range.size += padsize;
++ 	      r.filesize += padsize;
++ 	    }
+  	}
+      }
+    unexec_regions[n++] = r;
+*************** print_load_command_name (int lc)
+*** 562,567 ****
+--- 579,589 ----
+      case LC_TWOLEVEL_HINTS:
+        printf ("LC_TWOLEVEL_HINTS");
+        break;
++ #ifdef LC_UUID
++     case LC_UUID:
++       printf ("LC_UUID          ");
++       break;
++ #endif
+      default:
+        printf ("unknown          ");
+      }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080303/bb909a24/attachment-0001.html 


More information about the macports-changes mailing list