On Mon, Jul 31 2023, Renato Aguiar wrote:
> On Mon, Jul 31 2023, lux wrote:
>
>> Hi, Emacs 29.1 was released yesterday, I update to 29.1.
>>
>
> Maybe add textproc/tree-sitter to LIB_DEPENDS to enable the new
> built-in tree-sitter integration?
Hi,
Here is a bit more fleshed out version for emacs-29 update.
- adds sqlite, tree-sitter and libwebp dependencies
- add texinfo as build dep to cope with info generation
- add step to rename emacs dump image to have portable name for it
- drop unused patches
Timo
diff /usr/ports
commit - 5bf3179bb9032056cf8b8a7114fd5364d403e2d6
path + /usr/ports
blob - 8424b4685309e158b3a173b29e1c00114d24ed79
file + editors/emacs/Makefile
--- editors/emacs/Makefile
+++ editors/emacs/Makefile
@@ -1,7 +1,6 @@
COMMENT= GNU editor: extensible, customizable, self-documenting
-VERSION= 28.2
-REVISION= 4
+VERSION= 29.1
DISTNAME= emacs-${VERSION}
CATEGORIES= editors
@@ -13,7 +12,8 @@ WANTLIB = c curses execinfo jansson gmp gnutls m pthr
# GPLv3+
PERMIT_PACKAGE= Yes
-WANTLIB = c curses execinfo jansson gmp gnutls m pthread xml2 z
+WANTLIB = c curses jansson gmp gnutls m pthread sqlite3 \
+ tree-sitter xml2 z
MASTER_SITES= ${MASTER_SITE_GNU:=emacs/}
EXTRACT_SUFX= .tar.xz
@@ -28,10 +28,12 @@ CONFIGURE_ARGS= --build="${GCCARCH}" \
CONFIGURE_STYLE= gnu
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/build-aux
CONFIGURE_ARGS= --build="${GCCARCH}" \
- --without-sound
+ --without-sound \
+ --without-native-compilation
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}"
+ LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}" \
+ MAKEINFO=${PREFIX}/bin/gmakeinfo
MAKE_ENV= INSTALL_EMACS="${INSTALL_SCRIPT}" \
LOGNAME="${SHAREOWN}"
@@ -39,10 +41,15 @@ LIB_DEPENDS= devel/jansson \
SUBST_VARS= GCCARCH VERSION
USE_GMAKE= Yes
+
+BUILD_DEPENDS= databases/sqlite \
+ print/texinfo
+
LIB_DEPENDS= devel/jansson \
devel/gmp \
security/gnutls \
- textproc/libxml
+ textproc/libxml \
+ textproc/tree-sitter
.if ${FLAVOR} == "no_x11"
CONFIGURE_ARGS+= --without-x \
@@ -52,7 +59,8 @@ CONFIGURE_ARGS+= --without-x \
--without-jpeg \
--without-lcms2 \
--without-libotf \
- --without-m17n-flt
+ --without-m17n-flt \
+ --without-webp
.else
LIB_DEPENDS+= devel/harfbuzz \
devel/libotf \
@@ -61,6 +69,7 @@ LIB_DEPENDS+= devel/harfbuzz \
graphics/tiff \
graphics/giflib \
graphics/lcms2 \
+ graphics/libwebp \
misc/m17n/lib \
x11/dbus \
x11/gnome/librsvg
@@ -70,11 +79,11 @@ WANTLIB += ICE SM X11 X11-xcb Xaw3d Xext Xfixes Xinera
. if ${FLAVOR} == "athena"
CONFIGURE_ARGS+= --with-x-toolkit=athena
LIB_DEPENDS+= x11/Xaw3d
-WANTLIB += ICE SM X11 X11-xcb Xaw3d Xext Xfixes Xinerama Xmu
-WANTLIB += Xpm Xrandr Xrender Xt cairo dbus-1 fontconfig freetype
-WANTLIB += gdk_pixbuf-2.0 gif gio-2.0 glib-2.0 gobject-2.0 harfbuzz
-WANTLIB += intl jpeg lcms2 m17n-core m17n-flt otf png rsvg-2 tiff
-WANTLIB += xcb
+WANTLIB += ICE SM X11 X11-xcb Xaw3d Xcomposite Xext Xfixes Xi
+WANTLIB += Xinerama Xmu Xpm Xrandr Xrender Xt cairo dbus-1 fontconfig
+WANTLIB += freetype gdk_pixbuf-2.0 gif gio-2.0 glib-2.0 gobject-2.0
+WANTLIB += harfbuzz intl jpeg lcms2 m17n-core m17n-flt otf png rsvg-2
+WANTLIB += sharpyuv tiff webp webpdemux xcb xcb-shape xcb-util
. elif ${FLAVOR} == "gtk2"
CONFIGURE_ARGS+= --with-x-toolkit=gtk2
LIB_DEPENDS+= x11/gtk+2
@@ -83,23 +92,32 @@ WANTLIB += pangoft2-1.0 png rsvg-2 tiff xcb
WANTLIB += dbus-1 fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
WANTLIB += gif gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0 harfbuzz
WANTLIB += intl jpeg lcms2 m17n-core m17n-flt otf pango-1.0 pangocairo-1.0
-WANTLIB += pangoft2-1.0 png rsvg-2 tiff xcb
+WANTLIB += pangoft2-1.0 png rsvg-2 sharpyuv tiff webp webpdemux
+WANTLIB += xcb xcb-shape xcb-util
. elif ${FLAVOR} == "gtk3"
CONFIGURE_ARGS+= --with-x-toolkit=gtk3
LIB_DEPENDS+= x11/gtk+3
-WANTLIB += ICE SM X11 X11-xcb Xext Xfixes Xinerama Xpm Xrandr
-WANTLIB += Xrender atk-1.0 cairo cairo-gobject dbus-1 fontconfig
-WANTLIB += freetype gdk-3 gdk_pixbuf-2.0 gif gio-2.0 glib-2.0
-WANTLIB += gobject-2.0 gtk-3 harfbuzz intl jpeg lcms2 m17n-core
-WANTLIB += m17n-flt otf pango-1.0 pangocairo-1.0 png rsvg-2 tiff
-WANTLIB += xcb
+WANTLIB += ICE SM X11 X11-xcb Xcomposite Xext Xfixes Xi Xinerama Xpm
+WANTLIB += Xrandr Xrender atk-1.0 cairo cairo-gobject dbus-1
+WANTLIB += fontconfig freetype gdk-3 gdk_pixbuf-2.0 gif gio-2.0
+WANTLIB += glib-2.0 gobject-2.0 gtk-3 harfbuzz intl jpeg lcms2
+WANTLIB += m17n-core m17n-flt otf pango-1.0 pangocairo-1.0 png rsvg-2
+WANTLIB += sharpyuv tiff webp webpdemux xcb xcb-shape xcb-util
. else
ERRORS+= "Fatal: Conflicting flavor: ${FLAVOR}"
. endif
.endif
+# backtrace() crashes at build time on powerpc
+.if ${MACHINE_ARCH} == "powerpc"
+CONFIGURE_ENV += ac_cv_header_execinfo_h=no
+.else
+WANTLIB += execinfo
+.endif
+
post-install:
chmod -t ${PREFIX}/bin/emacs-${VERSION}
+ mv ${PREFIX}/libexec/emacs/${VERSION}/${GCCARCH}/emacs-*.pdmp ${PREFIX}/libexec/emacs/${VERSION}/${GCCARCH}/emacs.pdmp
.if ${FLAVOR:Mno_x11}
rm -Rf ${PREFIX}/share/applications/ ${PREFIX}/share/icons/
.endif
blob - f69c33c98903deea45ab3e2c5430bde0e143ae5c
file + editors/emacs/distinfo
--- editors/emacs/distinfo
+++ editors/emacs/distinfo
@@ -1,2 +1,2 @@
-SHA256 (emacs-28.2.tar.xz) = 7iEYIjPvMjLcl7SGry2G4UBC27ZbvFNd9WLDqFgjJIg=
-SIZE (emacs-28.2.tar.xz) = 47722600
+SHA256 (emacs-29.1.tar.xz) = 0viBpcwjHi9aA+hvRYSwQ4+D7ddZignSSiG9jQA+LgE=
+SIZE (emacs-29.1.tar.xz) = 52081008
blob - 5da62bf1f3b6dc0abd682d65d943e975ccd139be
file + /dev/null
--- editors/emacs/patches/patch-etc_emacsclient-mail_desktop
+++ /dev/null
@@ -1,28 +0,0 @@
-"Fix emacsclient-mail.desktop code injection vulnerability" (CVE-2023-27985, CVE-2023-27986)
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=3c1693d08b0a71d40a77e7b40c0ebc42dca2d2cc
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29&id=c8ec0017cb96d4ac98be21e1fe9a95e1aa723e99
-
-Index: etc/emacsclient-mail.desktop
---- etc/emacsclient-mail.desktop.orig
-+++ etc/emacsclient-mail.desktop
-@@ -1,7 +1,10 @@
- [Desktop Entry]
- Categories=Network;Email;
- Comment=GNU Emacs is an extensible, customizable text editor - and more
--Exec=sh -c "exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\\\(message-mailto\\\\ \\\\\\"%u\\\\\\"\\\\)"
-+# We want to pass the following commands to the shell wrapper:
-+# u=$(echo "$1" | sed 's/[\"]/\\&/g'); exec emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"$u\")"
-+# Special chars '"', '$', and '\' must be escaped as '\\"', '\\$', and '\\\\'.
-+Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u
- Icon=emacs
- Name=Emacs (Mail, Client)
- MimeType=x-scheme-handler/mailto;
-@@ -13,7 +16,7 @@ Actions=new-window;new-instance;
-
- [Desktop Action new-window]
- Name=New Window
--Exec=emacsclient --alternate-editor= --create-frame --eval "(message-mailto \\"%u\\")"
-+Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --create-frame --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u
-
- [Desktop Action new-instance]
- Name=New Instance
blob - 8782e5147d60a6a40fde98375e5a9ffb69fad182
file + /dev/null
--- editors/emacs/patches/patch-lib-src_etags_c
+++ /dev/null
@@ -1,329 +0,0 @@
-"Fixed ctags local command execute vulnerability" (CVE-2022-45939)
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-28&id=5d05ea803e9996c4c1edbe0fa0f6f5b05d2ffc87
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51
-
-"Fix etags local command injection vulnerability" (CVE-2022-48337)
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-28&id=e339926272a598bd9ee7e02989c1662b89e64cf0
-https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=01a4035c869b91c153af9a9132c87adb7669ea1c
-
-Index: lib-src/etags.c
---- lib-src/etags.c.orig
-+++ lib-src/etags.c
-@@ -382,7 +382,7 @@ static void just_read_file (FILE *);
-
- static language *get_language_from_langname (const char *);
- static void readline (linebuffer *, FILE *);
--static ptrdiff_t readline_internal (linebuffer *, FILE *, char const *);
-+static ptrdiff_t readline_internal (linebuffer *, FILE *, char const *, const bool);
- static bool nocase_tail (const char *);
- static void get_tag (char *, char **);
- static void get_lispy_tag (char *);
-@@ -406,7 +406,10 @@ static void free_fdesc (fdesc *);
- static void pfnote (char *, bool, char *, ptrdiff_t, intmax_t, intmax_t);
- static void invalidate_nodes (fdesc *, node **);
- static void put_entries (node *);
-+static void clean_matched_file_tag (char const * const, char const * const);
-
-+static char *escape_shell_arg_string (char *);
-+static void do_move_file (const char *, const char *);
- static char *concat (const char *, const char *, const char *);
- static char *skip_spaces (char *);
- static char *skip_non_spaces (char *);
-@@ -1339,7 +1342,7 @@ main (int argc, char **argv)
- if (parsing_stdin)
- fatal ("cannot parse standard input "
- "AND read file names from it");
-- while (readline_internal (&filename_lb, stdin, "-") > 0)
-+ while (readline_internal (&filename_lb, stdin, "-", false) > 0)
- process_file_name (filename_lb.buffer, lang);
- }
- else
-@@ -1387,9 +1390,6 @@ main (int argc, char **argv)
- /* From here on, we are in (CTAGS && !cxref_style) */
- if (update)
- {
-- char *cmd =
-- xmalloc (strlen (tagfile) + whatlen_max +
-- sizeof "mv..OTAGS;grep -Fv '\t\t' OTAGS >;rm OTAGS");
- for (i = 0; i < current_arg; ++i)
- {
- switch (argbuffer[i].arg_type)
-@@ -1400,17 +1400,8 @@ main (int argc, char **argv)
- default:
- continue; /* the for loop */
- }
-- char *z = stpcpy (cmd, "mv ");
-- z = stpcpy (z, tagfile);
-- z = stpcpy (z, " OTAGS;grep -Fv '\t");
-- z = stpcpy (z, argbuffer[i].what);
-- z = stpcpy (z, "\t' OTAGS >");
-- z = stpcpy (z, tagfile);
-- strcpy (z, ";rm OTAGS");
-- if (system (cmd) != EXIT_SUCCESS)
-- fatal ("failed to execute shell command");
-+ clean_matched_file_tag (tagfile, argbuffer[i].what);
- }
-- free (cmd);
- append_to_tagfile = true;
- }
-
-@@ -1439,7 +1430,52 @@ main (int argc, char **argv)
- return EXIT_SUCCESS;
- }
-
-+/*
-+ * Equivalent to: mv tags OTAGS;grep -Fv ' filename ' OTAGS >tags;rm OTAGS
-+ */
-+static void
-+clean_matched_file_tag (const char* tagfile, const char* match_file_name)
-+{
-+ FILE *otags_f = fopen ("OTAGS", "wb");
-+ FILE *tag_f = fopen (tagfile, "rb");
-
-+ if (otags_f == NULL)
-+ pfatal ("OTAGS");
-+
-+ if (tag_f == NULL)
-+ pfatal (tagfile);
-+
-+ int buf_len = strlen (match_file_name) + sizeof ("\t\t ") + 1;
-+ char *buf = xmalloc (buf_len);
-+ snprintf (buf, buf_len, "\t%s\t", match_file_name);
-+
-+ linebuffer line;
-+ linebuffer_init (&line);
-+ while (readline_internal (&line, tag_f, tagfile, true) > 0)
-+ {
-+ if (ferror (tag_f))
-+ pfatal (tagfile);
-+
-+ if (strstr (line.buffer, buf) == NULL)
-+ {
-+ fprintf (otags_f, "%s\n", line.buffer);
-+ if (ferror (tag_f))
-+ pfatal (tagfile);
-+ }
-+ }
-+ free (buf);
-+ free (line.buffer);
-+
-+ if (fclose (otags_f) == EOF)
-+ pfatal ("OTAGS");
-+
-+ if (fclose (tag_f) == EOF)
-+ pfatal (tagfile);
-+
-+ do_move_file ("OTAGS", tagfile);
-+ return;
-+}
-+
- /*
- * Return a compressor given the file name. If EXTPTR is non-zero,
- * return a pointer into FILE where the compressor-specific
-@@ -1669,13 +1705,18 @@ process_file_name (char *file, language *lang)
- else
- {
- #if MSDOS || defined (DOS_NT)
-- char *cmd1 = concat (compr->command, " \"", real_name);
-- char *cmd = concat (cmd1, "\" > ", tmp_name);
-+ int buf_len = strlen (compr->command) + strlen (" \"\" > \"\"") + strlen (real_name) + strlen (tmp_name) + 1;
-+ char *cmd = xmalloc (buf_len);
-+ snprintf (cmd, buf_len, "%s \"%s\" > \"%s\"", compr->command, real_name, tmp_name);
- #else
-- char *cmd1 = concat (compr->command, " '", real_name);
-- char *cmd = concat (cmd1, "' > ", tmp_name);
-+ char *new_real_name = escape_shell_arg_string (real_name);
-+ char *new_tmp_name = escape_shell_arg_string (tmp_name);
-+ int buf_len = strlen (compr->command) + strlen (" > ") + strlen (new_real_name) + strlen (new_tmp_name) + 1;
-+ char *cmd = xmalloc (buf_len);
-+ snprintf (cmd, buf_len, "%s %s > %s", compr->command, new_real_name, new_tmp_name);
-+ free (new_real_name);
-+ free (new_tmp_name);
-
No comments:
Post a Comment