summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk2
-rw-r--r--gnu/packages/emacs.scm53
-rw-r--r--gnu/packages/patches/guile-emacs-build-fixes.patch100
-rw-r--r--gnu/packages/patches/guile-emacs-fix-configure.patch211
4 files changed, 140 insertions, 226 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index a7bd32453b..a02745d59c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1524,7 +1524,7 @@ dist_patch_DATA = \
%D%/packages/patches/guile-present-coding.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/guile-ssh-rename-bool.patch \
- %D%/packages/patches/guile-emacs-fix-configure.patch \
+ %D%/packages/patches/guile-emacs-build-fixes.patch \
%D%/packages/patches/gtk2-fix-builder-test.patch \
%D%/packages/patches/gtk2-harden-list-store.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index fcbb4fdfcb..e6dd17b510 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -12,7 +12,7 @@
;;; Copyright © 2017, 2019, 2020, 2023, 2024 Maxim Cournoyer <[email protected]>
;;; Copyright © 2017 Alex Vong <[email protected]>
;;; Copyright © 2017, 2018 Ricardo Wurmus <[email protected]>
-;;; Copyright © 2017, 2023 Janneke Nieuwenhuizen <[email protected]>
+;;; Copyright © 2017, 2023, 2024 Janneke Nieuwenhuizen <[email protected]>
;;; Copyright © 2018, 2023 Efraim Flashner <[email protected]>
;;; Copyright © 2018 Mathieu Othacehe <[email protected]>
;;; Copyright © 2018, 2019, 2021 Tobias Geerinckx-Rice <[email protected]>
@@ -629,7 +629,7 @@ editor (with wide ints)" )
(deprecated-package "emacs-next-tree-sitter" emacs-next))
(define-public guile-emacs
- (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b")
+ (let ((commit "8f87cbc1dae6a9e77368afc5736df8c342e9153d")
(revision "0"))
(package
(inherit emacs)
@@ -638,35 +638,60 @@ editor (with wide ints)" )
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://git.hcoop.net/git/bpt/emacs.git")
+ (url "https://codeberg.org/lyrra/guilemacs")
(commit commit)))
(file-name (git-file-name name version))
- (patches (search-patches "guile-emacs-fix-configure.patch"))
+ (patches (search-patches "guile-emacs-build-fixes.patch"))
(sha256
(base32
- "0lvcvsz0f4mawj04db35p1dvkffdqkz8pkhc0jzh9j9x2i63kcz6"))))
+ "1yhxy6d5i673y35i66d2x975zih3cw6p59ylsb8xk68wds6s7xrl"))))
(native-inputs
(modify-inputs (package-native-inputs emacs)
(prepend autoconf automake guile-for-guile-emacs)))
(arguments
- (substitute-keyword-arguments `(;; Build fails if we allow parallel build.
- #:parallel-build? #f
- ;; Tests aren't passing for now.
+ (substitute-keyword-arguments `(;; Tests aren't passing for now.
#:tests? #f
+ #:strip-binaries? #f
,@(package-arguments emacs))
((#:configure-flags flags ''())
- #~(delete "--with-cairo" #$flags))
+ #~`("CFLAGS=-Og -ggdb3"
+ "--with-native-compilation=no"
+ "--without-modules"
+ "--without-threads"
+ "--with-jpeg=no"
+ "--without-cairo"
+ "--without-tree-sitter"
+ ,@(fold delete #$flags '("--with-cairo"
+ "--with-modules"
+ "--with-native-compilation=aot"))))
+ ((#:make-flags flags #~'())
+ #~(list "V=1"))
((#:phases phases)
#~(modify-phases #$phases
(add-after 'unpack 'autogen
(lambda _
(invoke "sh" "autogen.sh")))
- ;; Build sometimes fails: deps/dispnew.d: No such file or directory
- (add-before 'build 'make-deps-dir
- (lambda _
- (invoke "mkdir" "-p" "src/deps")))
+ (delete 'patch-compilation-driver)
+ (delete 'set-libgccjit-path)
+ (delete 'validate-comp-integrity)
(delete 'restore-emacs-pdmp)
- (delete 'strip-double-wrap))))))))
+ (delete 'build-trampolines)
+ (delete 'install-site-start)
+ (add-after 'unpack 'help-patch-progam-file-names
+ (lambda _
+ (call-with-output-file "lisp/obsolete/terminal.el"
+ (lambda (port) (display port)))))
+ (add-after 'configure 'touch-lisp/finder-inf.el
+ (lambda _
+ (call-with-output-file "lisp/finder-inf.el"
+ (lambda (port) (display port)))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "EMACSLOADPATH")
+ (files '("share/emacs/31.0.50/lisp")))
+ (search-path-specification
+ (variable "INFOPATH")
+ (files '("share/info"))))))))
(define-public m17n-db
(package
diff --git a/gnu/packages/patches/guile-emacs-build-fixes.patch b/gnu/packages/patches/guile-emacs-build-fixes.patch
new file mode 100644
index 0000000000..3fb173b490
--- /dev/null
+++ b/gnu/packages/patches/guile-emacs-build-fixes.patch
@@ -0,0 +1,100 @@
+From 49e8725b66cb721931a9a5f0f35405e19ccee956 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <[email protected]>
+Date: Sat, 7 Dec 2024 20:52:04 +0100
+Subject: [PATCH 1/3] robin's patch.
+
+---
+ src/gtkutil.c | 4 ++--
+ src/print.c | 5 ++---
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/src/gtkutil.c b/src/gtkutil.c
+index b1471d56eb9..be72b50c9ef 100644
+--- a/src/gtkutil.c
++++ b/src/gtkutil.c
+@@ -241,13 +241,13 @@ xg_display_open (char *display_name, GdkDisplay **dpy)
+ {
+ GdkDisplay *gdpy;
+
+- unrequest_sigio (); /* See comment in x_display_ok, xterm.c. */
++ // unrequest_sigio (); /* See comment in x_display_ok, xterm.c. */
+ #ifndef HAVE_PGTK
+ gdpy = gdk_display_open (display_name);
+ #else
+ gdpy = gdk_display_open (strlen (display_name) == 0 ? NULL : display_name);
+ #endif
+- request_sigio ();
++ // request_sigio ();
+ if (!gdpy_def && gdpy)
+ {
+ gdpy_def = gdpy;
+diff --git a/src/print.c b/src/print.c
+index 002274bd7da..e2c2251bf5c 100644
+--- a/src/print.c
++++ b/src/print.c
+@@ -2532,9 +2532,8 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
+ else
+ scm_write (obj, port);
+ scm_display (SCM_MAKE_CHAR ('>'), port);
+- //guilemacs: this looks wrong (size_byte = -1)
+- //strout (scm_to_locale_string (scm_get_output_string (port)),
+- // -1, -1, printcharfun);
++ char* str = scm_to_locale_string (scm_get_output_string (port));
++ strout (str, strlen(str), strlen(str), printcharfun);
+ scm_close_port (port);
+ }
+ break;
+--
+2.46.0
+
+From 325fc39906198c33d78e33895e385916099a283f Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <[email protected]>
+Date: Sat, 7 Dec 2024 19:00:45 +0100
+Subject: [PATCH 2/3] src/xfns.c: Link fix.
+
+---
+ src/xfns.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/xfns.c b/src/xfns.c
+index 858402613b4..94fde4b9e84 100644
+--- a/src/xfns.c
++++ b/src/xfns.c
+@@ -8921,7 +8921,8 @@ x_hide_tip (bool delete)
+ else
+ tip_frame = Qnil;
+
+- return unbind_to (count, was_open);
++ dynwind_end ();
++ return was_open;
+ }
+ #else /* not USE_GTK */
+ if (NILP (tip_frame)
+--
+2.46.0
+
+From 7754d875df5c9cb8fefa44604061479108429bce Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <[email protected]>
+Date: Sat, 7 Dec 2024 20:14:17 +0100
+Subject: [PATCH 3/3] dump fix: comment use of cl-function-documentation.
+
+---
+ lisp/simple.el | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lisp/simple.el b/lisp/simple.el
+index 15c790226b5..d1ceded84ae 100644
+--- a/lisp/simple.el
++++ b/lisp/simple.el
+@@ -2800,7 +2800,7 @@ command-completion--command-for-this-buffer-function
+ '(cl-defmethod function-documentation ((function accessor))
+ (oclosure--accessor-docstring function)) ;; FIXME: η-reduce!
+
+-(cl-defmethod function-documentation ((f cconv--interactive-helper))
++'(cl-defmethod function-documentation ((f cconv--interactive-helper))
+ (function-documentation (cconv--interactive-helper--fun f)))
+
+ ;; This should be in `oclosure.el' but that file is loaded before `cl-generic'.
+--
+2.46.0
+
diff --git a/gnu/packages/patches/guile-emacs-fix-configure.patch b/gnu/packages/patches/guile-emacs-fix-configure.patch
deleted file mode 100644
index b1f7146d21..0000000000
--- a/gnu/packages/patches/guile-emacs-fix-configure.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-Two patches here backporting fixes from Emacs master.
-
-Upstream status: emailed first patch to latest committer, Robin Templeton
-<[email protected]>, no response.
-
-From dfcb3b6ff318e47b84a28cfc43f50bec42fa3570 Mon Sep 17 00:00:00 2001
-From: Jan Nieuwenhuizen <[email protected]>
-Date: Tue, 7 Nov 2017 18:48:03 +0100
-Subject: [PATCH 1/2] backport: Port jpeg configuration to Solaris 10 with Sun
- C.
-
-* configure.ac: Check for jpeglib 6b by trying to link it, instead
-of relying on cpp magic that has problems in practice. Check for
-both jpeglib.h and jerror.h features. Remove special case for
-mingw32, which should no longer be needed (and if it were needed,
-should now be addressable by hotwiring emacs_cv_jpeglib).
-Fixes: bug#20332
-
- From fdf532b9c915ad9ba72155646d29d0f530fd72ec Mon Sep 17 00:00:00 2001
- From: Paul Eggert <address@hidden>
- Date: Wed, 15 Apr 2015 18:30:01 -0700
- Subject: [PATCH] Port jpeg configuration to Solaris 10 with Sun C.
-
- * configure.ac: Check for jpeglib 6b by trying to link it, instead
- of relying on cpp magic that has problems in practice. Check for
- both jpeglib.h and jerror.h features. Remove special case for
- mingw32, which should no longer be needed (and if it were needed,
- should now be addressable by hotwiring emacs_cv_jpeglib).
- Fixes: bug#20332
----
- configure.ac | 72 ++++++++++++++++++++++++++++--------------------------------
- 1 file changed, 34 insertions(+), 38 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2445db4886..36fa8eb390 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3014,44 +3014,40 @@ AC_SUBST(LIBXPM)
- ### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
- HAVE_JPEG=no
- LIBJPEG=
--if test "${opsys}" = "mingw32"; then
-- if test "${with_jpeg}" != "no"; then
-- dnl Checking for jpeglib.h can lose because of a redefinition of
-- dnl HAVE_STDLIB_H.
-- AC_CHECK_HEADER(jerror.h, HAVE_JPEG=yes, HAVE_JPEG=no)
-- fi
-- AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
-- if test "${HAVE_JPEG}" = "yes"; then
-- AC_DEFINE(HAVE_JPEG)
-- AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])],
-- [#include <jpeglib.h>
-- version=JPEG_LIB_VERSION
--],
-- [AC_DEFINE(HAVE_JPEG)],
-- [AC_MSG_WARN([libjpeg found, but not version 6b or later])
-- HAVE_JPEG=no])
-- fi
--elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
-- if test "${with_jpeg}" != "no"; then
-- dnl Checking for jpeglib.h can lose because of a redefinition of
-- dnl HAVE_STDLIB_H.
-- AC_CHECK_HEADER(jerror.h,
-- [AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)])
-- fi
--
-- AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
-- if test "${HAVE_JPEG}" = "yes"; then
-- AC_DEFINE(HAVE_JPEG)
-- AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])],
-- [#include <jpeglib.h>
-- version=JPEG_LIB_VERSION
--],
-- [AC_DEFINE(HAVE_JPEG)],
-- [AC_MSG_WARN([libjpeg found, but not version 6b or later])
-- HAVE_JPEG=no])
-- fi
-- if test "${HAVE_JPEG}" = "yes"; then
-- LIBJPEG=-ljpeg
-+if test "${with_jpeg}" != "no"; then
-+ AC_CACHE_CHECK([for jpeglib 6b or later],
-+ [emacs_cv_jpeglib],
-+ [OLD_LIBS=$LIBS
-+ for emacs_cv_jpeglib in yes -ljpeg no; do
-+ case $emacs_cv_jpeglib in
-+ yes) ;;
-+ no) break;;
-+ *) LIBS="$LIBS $emacs_cv_jpeglib";;
-+ esac
-+ AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [[#undef HAVE_STDLIB_H /* Avoid config.h/jpeglib.h collision. */
-+ #include <stdio.h> /* jpeglib.h needs FILE and size_t. */
-+ #include <jpeglib.h>
-+ #include <jerror.h>
-+ char verify[JPEG_LIB_VERSION < 62 ? -1 : 1];
-+ struct jpeg_decompress_struct cinfo;
-+ ]],
-+ [[
-+ jpeg_create_decompress (&cinfo);
-+ WARNMS (&cinfo, JWRN_JPEG_EOF);
-+ jpeg_destroy_decompress (&cinfo);
-+ ]])],
-+ [emacs_link_ok=yes],
-+ [emacs_link_ok=no])
-+ LIBS=$OLD_LIBS
-+ test $emacs_link_ok = yes && break
-+ done])
-+ if test "$emacs_cv_jpeglib" != no; then
-+ HAVE_JPEG=yes
-+ AC_DEFINE([HAVE_JPEG], 1,
-+ [Define to 1 if you have the jpeg library (typically -ljpeg).])
-+ test "$emacs_cv_jpeglib" != yes && LIBJPEG=$emacs_cv_jpeglib
- fi
- fi
- AC_SUBST(LIBJPEG)
---
-Jan Nieuwenhuizen <[email protected]> | GNU LilyPond http://lilypond.org
-Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
-
-From f761b92d520b72954be28ad66eb82d1a96c785fb Mon Sep 17 00:00:00 2001
-From: Jan Nieuwenhuizen <[email protected]>
-Date: Wed, 8 Nov 2017 14:05:43 +0100
-Subject: [PATCH 2/2] backport fix for #24065: calloc loop when compiling with
- -O2.
-
-This patch fixes
-
- EMACSLOADPATH= '../src/bootstrap-emacs' -batch --no-site-file --no-site-lisp -l autoload \
- --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
- --eval "(setq generated-autoload-file (expand-file-name
- (unmsys--file-name
- \"../../git-checkout/lisp/calendar/cal-loaddefs.el\")))" \
- -f batch-update-autoloads ../../git-checkout/lisp/calendar
- make[2]: *** [Makefile:466: ../../git-checkout/lisp/calendar/cal-loaddefs.el] Segmentation fault
-
-in gdb seen as
-
- in calloc (nmemb=<error reading variable: DWARF-2 expression error:Loop detected (257).>, size=size@entry=1) at gmalloc.c:1510
-
-I did not find malloc-fixing commits from emacs master to cleanly
-cherry-pick, so this patch replaces the relevant part in configure
-(emacs 53da55b8cc45e76b836ebaadd23f46e92d25abce).
-
-* configure.ac: backport system_malloc/hybrid_malloc detection.
----
- configure.ac | 29 ++++++++++++++++++++++++++++-
- 1 file changed, 28 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 36fa8eb390..3cc1794f37 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1966,7 +1966,25 @@ case "$opsys" in
- darwin|mingw32|sol2-10) system_malloc=yes ;;
- esac
-
-+hybrid_malloc=
-+system_malloc=yes
-+
-+test "$CANNOT_DUMP" = yes ||
-+case "$opsys" in
-+ ## darwin ld insists on the use of malloc routines in the System framework.
-+ darwin | mingw32 | nacl | sol2-10) ;;
-+ cygwin) hybrid_malloc=yes
-+ system_malloc= ;;
-+ *) test "$ac_cv_func_sbrk" = yes && system_malloc=$emacs_cv_sanitize_address;;
-+esac
-+
-+if test "${system_malloc}" != yes && test "${doug_lea_malloc}" != yes \
-+ && test "${UNEXEC_OBJ}" = unexelf.o; then
-+ hybrid_malloc=yes
-+fi
-+
- GMALLOC_OBJ=
-+HYBRID_MALLOC=
- if test "${system_malloc}" = "yes"; then
- AC_DEFINE([SYSTEM_MALLOC], 1,
- [Define to 1 to use the system memory allocator, even if it is not
-@@ -1975,6 +1993,14 @@ if test "${system_malloc}" = "yes"; then
- GNU_MALLOC_reason="
- (The GNU allocators don't work with this system configuration.)"
- VMLIMIT_OBJ=
-+elif test "$hybrid_malloc" = yes; then
-+ AC_DEFINE(HYBRID_MALLOC, 1,
-+ [Define to use gmalloc before dumping and the system malloc after.])
-+ HYBRID_MALLOC=1
-+ GNU_MALLOC=no
-+ GNU_MALLOC_reason=" (only before dumping)"
-+ GMALLOC_OBJ=gmalloc.o
-+ VMLIMIT_OBJ=
- else
- test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
- VMLIMIT_OBJ=vm-limit.o
-@@ -1993,10 +2019,11 @@ else
- of the main data segment.])
- fi
- fi
-+AC_SUBST([HYBRID_MALLOC])
- AC_SUBST(GMALLOC_OBJ)
- AC_SUBST(VMLIMIT_OBJ)
-
--if test "$doug_lea_malloc" = "yes" ; then
-+if test "$doug_lea_malloc" = "yes" && test "$hybrid_malloc" != yes; then
- if test "$GNU_MALLOC" = yes ; then
- GNU_MALLOC_reason="
- (Using Doug Lea's new malloc from the GNU C Library.)"
---
-Jan Nieuwenhuizen <[email protected]> | GNU LilyPond http://lilypond.org
-Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
-