Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/editors Pull in patch from upstream to fix a build fai...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e47d5ceb74e4
branches:  trunk
changeset: 429804:e47d5ceb74e4
user:      dsainty <dsainty%pkgsrc.org@localhost>
date:      Sat Apr 25 05:56:36 2020 +0000

description:
Pull in patch from upstream to fix a build failure under MacOS X.

Fix unexec failure on macOS 10.15.4
* src/unexmacosx.c (unexec_regions_merge): Align region start addresses to
page boundaries and then merge regions.

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=888ffd960c06d56a409a7ff15b1d930d25c56089

Bump PKGREVISION of emacs26 and emacs26-nox11.

diffstat:

 editors/emacs26-nox11/Makefile                 |   4 +-
 editors/emacs26/Makefile                       |   4 +-
 editors/emacs26/distinfo                       |   3 +-
 editors/emacs26/patches/patch-src_unexmacosx.c |  77 ++++++++++++++++++++++++++
 4 files changed, 84 insertions(+), 4 deletions(-)

diffs (129 lines):

diff -r 85e1cc877fe4 -r e47d5ceb74e4 editors/emacs26-nox11/Makefile
--- a/editors/emacs26-nox11/Makefile    Sat Apr 25 02:07:20 2020 +0000
+++ b/editors/emacs26-nox11/Makefile    Sat Apr 25 05:56:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2019/06/08 10:40:54 rillig Exp $
+# $NetBSD: Makefile,v 1.4 2020/04/25 05:56:36 dsainty Exp $
 
 PKGNAME=       ${DISTNAME:S/emacs/emacs26/:S/-/-nox11-/}
 CONFLICTS+=    emacs26-[0-9]*
@@ -10,6 +10,8 @@
 
 .include "../../editors/emacs26/Makefile.common"
 
+PKGREVISION=   1
+
 CONFIGURE_ARGS+=       --without-dbus
 CONFIGURE_ARGS+=       --without-xml2
 CONFIGURE_ARGS+=       --without-gnutls
diff -r 85e1cc877fe4 -r e47d5ceb74e4 editors/emacs26/Makefile
--- a/editors/emacs26/Makefile  Sat Apr 25 02:07:20 2020 +0000
+++ b/editors/emacs26/Makefile  Sat Apr 25 05:56:36 2020 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.17 2020/04/12 08:28:35 adam Exp $
+# $NetBSD: Makefile,v 1.18 2020/04/25 05:56:36 dsainty Exp $
 
 CONFLICTS+=    emacs26-nox11-[0-9]*
 
 .include "../../editors/emacs26/Makefile.common"
 
-PKGREVISION=   4
+PKGREVISION=   5
 
 .include "options.mk"
 
diff -r 85e1cc877fe4 -r e47d5ceb74e4 editors/emacs26/distinfo
--- a/editors/emacs26/distinfo  Sat Apr 25 02:07:20 2020 +0000
+++ b/editors/emacs26/distinfo  Sat Apr 25 05:56:36 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2019/08/30 15:46:11 ryoon Exp $
+$NetBSD: distinfo,v 1.5 2020/04/25 05:56:36 dsainty Exp $
 
 SHA1 (emacs-26.3.tar.gz) = 79f6d7c4b26787c44189fe5d1520c354f470f3fb
 RMD160 (emacs-26.3.tar.gz) = 263c0152f538d3371c60accb710f3825b01ae097
@@ -7,3 +7,4 @@
 SHA1 (patch-configure) = ceb64518bd90b9c6dbd46174ad19e540b5ea96ed
 SHA1 (patch-configure.ac) = 232c4466c7de759881169c7016b07537043a6d54
 SHA1 (patch-src_inotify.c) = 1fdc6566ed57e8418f1ddc85bb03518d7d9d6bb3
+SHA1 (patch-src_unexmacosx.c) = 528b243253f5673ad4621c3998a191880b885e47
diff -r 85e1cc877fe4 -r e47d5ceb74e4 editors/emacs26/patches/patch-src_unexmacosx.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/emacs26/patches/patch-src_unexmacosx.c    Sat Apr 25 05:56:36 2020 +0000
@@ -0,0 +1,77 @@
+$NetBSD: patch-src_unexmacosx.c,v 1.1 2020/04/25 05:56:36 dsainty Exp $
+
+Pull in patch from upstream to fix a build failure under MacOS X.
+
+Fix unexec failure on macOS 10.15.4
+* src/unexmacosx.c (unexec_regions_merge): Align region start addresses to
+page boundaries and then merge regions.
+
+http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=888ffd960c06d56a409a7ff15b1d930d25c56089
+
+--- src/unexmacosx.c
++++ src/unexmacosx.c
+@@ -503,22 +503,34 @@ unexec_regions_sort_compare (const void *a, const void *b)
+ static void
+ unexec_regions_merge (void)
+ {
+-  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)
++
++  /* Align each region start address to a page boundary.  */
++  for (unexec_region_info *cur = unexec_regions;
++       cur < unexec_regions + num_unexec_regions; cur++)
+     {
+-      r.range.address -= padsize;
+-      r.range.size += padsize;
+-      r.filesize += padsize;
++      vm_size_t padsize = cur->range.address & (pagesize - 1);
++      if (padsize)
++      {
++        cur->range.address -= padsize;
++        cur->range.size += padsize;
++        cur->filesize += padsize;
++
++        unexec_region_info *prev = cur == unexec_regions ? NULL : cur - 1;
++        if (prev
++            && prev->range.address + prev->range.size > cur->range.address)
++          {
++            prev->range.size = cur->range.address - prev->range.address;
++            if (prev->filesize > prev->range.size)
++              prev->filesize = prev->range.size;
++          }
++      }
+     }
+-  for (i = 1; i < num_unexec_regions; i++)
++
++  int n = 0;
++  unexec_region_info r = unexec_regions[0];
++  for (int i = 1; i < num_unexec_regions; i++)
+     {
+       if (r.range.address + r.range.size == unexec_regions[i].range.address
+         && r.range.size - r.filesize < 2 * pagesize)
+@@ -530,17 +542,6 @@ unexec_regions_merge (void)
+       {
+         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;



Home | Main Index | Thread Index | Old Index