diff options
author | dsainty <dsainty@pkgsrc.org> | 2020-04-25 05:56:36 +0000 |
---|---|---|
committer | dsainty <dsainty@pkgsrc.org> | 2020-04-25 05:56:36 +0000 |
commit | 851aa107686c91f20bb840b998fc20f030b3611d (patch) | |
tree | e0bb4a019265f50af7ebf776d75313740c499155 /editors | |
parent | 3f485cf20a73c07ee4e053831b6847b199f09bb9 (diff) | |
download | pkgsrc-851aa107686c91f20bb840b998fc20f030b3611d.tar.gz |
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 (limited to 'editors')
-rw-r--r-- | editors/emacs26-nox11/Makefile | 4 | ||||
-rw-r--r-- | editors/emacs26/Makefile | 4 | ||||
-rw-r--r-- | editors/emacs26/distinfo | 3 | ||||
-rw-r--r-- | editors/emacs26/patches/patch-src_unexmacosx.c | 77 |
4 files changed, 84 insertions, 4 deletions
diff --git a/editors/emacs26-nox11/Makefile b/editors/emacs26-nox11/Makefile index 2be5c0e3a27..4952064fb0d 100644 --- a/editors/emacs26-nox11/Makefile +++ b/editors/emacs26-nox11/Makefile @@ -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 @@ DISTINFO_FILE= ${.CURDIR}/../../editors/emacs26/distinfo .include "../../editors/emacs26/Makefile.common" +PKGREVISION= 1 + CONFIGURE_ARGS+= --without-dbus CONFIGURE_ARGS+= --without-xml2 CONFIGURE_ARGS+= --without-gnutls diff --git a/editors/emacs26/Makefile b/editors/emacs26/Makefile index 7925ac22025..a13665952ec 100644 --- a/editors/emacs26/Makefile +++ b/editors/emacs26/Makefile @@ -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 --git a/editors/emacs26/distinfo b/editors/emacs26/distinfo index cc26e84c1a8..1c311c4f2be 100644 --- a/editors/emacs26/distinfo +++ b/editors/emacs26/distinfo @@ -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 @@ Size (emacs-26.3.tar.gz) = 65207899 bytes SHA1 (patch-configure) = ceb64518bd90b9c6dbd46174ad19e540b5ea96ed SHA1 (patch-configure.ac) = 232c4466c7de759881169c7016b07537043a6d54 SHA1 (patch-src_inotify.c) = 1fdc6566ed57e8418f1ddc85bb03518d7d9d6bb3 +SHA1 (patch-src_unexmacosx.c) = 528b243253f5673ad4621c3998a191880b885e47 diff --git a/editors/emacs26/patches/patch-src_unexmacosx.c b/editors/emacs26/patches/patch-src_unexmacosx.c new file mode 100644 index 00000000000..bfee72a674c --- /dev/null +++ b/editors/emacs26/patches/patch-src_unexmacosx.c @@ -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; |