summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2020-08-23 20:12:34 +0000
committerwiz <wiz@pkgsrc.org>2020-08-23 20:12:34 +0000
commit3348ac9b223d2bce2670896fd0d62f1c232a8ae4 (patch)
tree8bde411231093548f48f14ef2e41b6b1e10b2be4 /editors
parent7f2450ea38eb1893b7dc2786644c576b181ff925 (diff)
downloadpkgsrc-3348ac9b223d2bce2670896fd0d62f1c232a8ae4.tar.gz
emacs27: add default-on option for JSON support and add workaround for emacsclient socket issue
Both from iquiw on pkgsrc-users. Bump PKGREVISION.
Diffstat (limited to 'editors')
-rw-r--r--editors/emacs27/Makefile4
-rw-r--r--editors/emacs27/distinfo3
-rw-r--r--editors/emacs27/options.mk15
-rw-r--r--editors/emacs27/patches/patch-lib-src_emacsclient.c20
4 files changed, 36 insertions, 6 deletions
diff --git a/editors/emacs27/Makefile b/editors/emacs27/Makefile
index 2e56c511b7e..c797adeb3d5 100644
--- a/editors/emacs27/Makefile
+++ b/editors/emacs27/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2020/08/17 20:18:32 leot Exp $
+# $NetBSD: Makefile,v 1.3 2020/08/23 20:12:34 wiz Exp $
CONFLICTS+= emacs27-nox11-[0-9]*
-PKGREVISION= 1
+PKGREVISION= 2
.include "../../editors/emacs27/Makefile.common"
.include "options.mk"
diff --git a/editors/emacs27/distinfo b/editors/emacs27/distinfo
index b49b8cabfe6..586067c1a10 100644
--- a/editors/emacs27/distinfo
+++ b/editors/emacs27/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1 2020/08/12 14:14:48 ryoon Exp $
+$NetBSD: distinfo,v 1.2 2020/08/23 20:12:34 wiz Exp $
SHA1 (emacs-27.1.tar.gz) = 47d5c733cc41406e6f78df9784e4eddf92dfe392
RMD160 (emacs-27.1.tar.gz) = 9ddfd28ab54c4aee168eeecb783d13599e5b5288
SHA512 (emacs-27.1.tar.gz) = fce6c785e9fd9e53282d8293c0c222b3a8cf433db2c19de98bef9e5c1797ffe17663ce1cf205edea6a7b8ded7842df2def2c859c563f091bd68d03ffa9c39198
Size (emacs-27.1.tar.gz) = 65782481 bytes
+SHA1 (patch-lib-src_emacsclient.c) = 2299db9359f1628b5379d2fb0a813ff88e0461cc
SHA1 (patch-src_inotify.c) = 1fdc6566ed57e8418f1ddc85bb03518d7d9d6bb3
diff --git a/editors/emacs27/options.mk b/editors/emacs27/options.mk
index a0e8f6d05e4..5567014bc56 100644
--- a/editors/emacs27/options.mk
+++ b/editors/emacs27/options.mk
@@ -1,8 +1,8 @@
-# $NetBSD: options.mk,v 1.1 2020/08/12 14:14:48 ryoon Exp $
+# $NetBSD: options.mk,v 1.2 2020/08/23 20:12:34 wiz Exp $
### Set options
PKG_OPTIONS_VAR= PKG_OPTIONS.emacs
-PKG_SUPPORTED_OPTIONS= dbus gconf gnutls imagemagick svg xaw3d xft2 xml
+PKG_SUPPORTED_OPTIONS= dbus gconf gnutls imagemagick jansson svg xaw3d xft2 xml
# xaw3d is only valid with tookit = xaw
PKG_OPTIONS_OPTIONAL_GROUPS+= window-system
@@ -22,7 +22,7 @@ PKG_OPTIONS_GROUP.toolkit= gtk gtk2 gtk3 motif xaw lucid
# svg is omitted because it is rarely needed and either very
# heavyweight or unmaintained.
-PKG_SUGGESTED_OPTIONS= dbus gconf gnutls gtk3 xaw3d xft2 xml x11
+PKG_SUGGESTED_OPTIONS= dbus gconf gnutls gtk3 jansson xaw3d xft2 xml x11
.include "../../mk/bsd.options.mk"
@@ -37,6 +37,15 @@ CONFIGURE_ARGS+= --without-dbus
.endif
###
+### Support JSON
+###
+.if !empty(PKG_OPTIONS:Mjansson)
+. include "../../textproc/jansson/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-json
+.endif
+
+###
### Support XML2
###
.if !empty(PKG_OPTIONS:Mxml)
diff --git a/editors/emacs27/patches/patch-lib-src_emacsclient.c b/editors/emacs27/patches/patch-lib-src_emacsclient.c
new file mode 100644
index 00000000000..7caa31dc3b2
--- /dev/null
+++ b/editors/emacs27/patches/patch-lib-src_emacsclient.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-lib-src_emacsclient.c,v 1.1 2020/08/23 20:12:34 wiz Exp $
+
+Workaround for:
+On NetBSD, fstat on a socket returns zero instead of the user id.
+Reported upstream as http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43002
+
+--- lib-src/emacsclient.c.orig 2020-07-29 21:40:41.000000000 +0000
++++ lib-src/emacsclient.c
+@@ -1478,6 +1478,11 @@ set_local_socket (char const *server_nam
+ struct stat connect_stat;
+ if (fstat (s, &connect_stat) != 0)
+ sock_status = errno;
++#if defined(__NetBSD__)
++ else if (1) {
++ return s;
++ }
++#endif
+ else if (connect_stat.st_uid == uid)
+ return s;
+ else