summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/emacs24/hacks.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/editors/emacs24/hacks.mk b/editors/emacs24/hacks.mk
index e222031c97a..aeccd5e3cdf 100644
--- a/editors/emacs24/hacks.mk
+++ b/editors/emacs24/hacks.mk
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.1 2016/04/04 13:39:08 ryoon Exp $
+# $NetBSD: hacks.mk,v 1.2 2016/04/12 13:25:21 ryoon Exp $
.if !defined(EMACS_HACKS_MK)
EMACS_HACKS_MK= defined
@@ -15,4 +15,18 @@ BUILDLINK_TRANSFORM+= opt:-O2:-O0
. endif
. endif
+### PaX is enabled, bootstrap-emacs command dumps core with segfault.
+### emacs-24.5/src/Makefile.in does not support NetBSD paxctl(8) syntax.
+###
+. if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64)
+. if exists(/usr/sbin/paxctl)
+SUBST_CLASSES+= paxctl
+SUBST_STAGE.paxctl= pre-configure
+SUBST_MESSAGE.paxctl= Setting paxctl command
+SUBST_FILES.paxctl+= src/Makefile.in
+SUBST_SED.paxctl+= -e 's,test "X$$(PAXCTL)" = X || $$(PAXCTL) -zex,/usr/sbin/paxctl +a,g'
+SUBST_SED.paxctl+= -e 's,test "X$$(PAXCTL)" = X || $$(PAXCTL) -r,/usr/sbin/paxctl +a,g'
+. endif
+. endif
+
.endif # EMACS_HACKS_MK