diff --git a/devel/magit/Makefile b/devel/magit/Makefile index 065aa673645e..b20e7cead1d2 100644 --- a/devel/magit/Makefile +++ b/devel/magit/Makefile @@ -1,73 +1,74 @@ PORTNAME= magit DISTVERSIONPREFIX= v DISTVERSION= 4.4.2 +PORTREVISION= 1 CATEGORIES= devel elisp PKGNAMESUFFIX= ${EMACS_PKGNAMESUFFIX} MAINTAINER= yasu@FreeBSD.org COMMENT= Interface to Git for Emacs WWW= https://magit.vc/ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= compat.el${EMACS_PKGNAMESUFFIX}>=30.1.0.0:misc/compat.el@${EMACS_FLAVOR} \ cond-let${EMACS_PKGNAMESUFFIX}>=0.1:devel/cond-let@${EMACS_FLAVOR} \ git:devel/git \ llama.el${EMACS_PKGNAMESUFFIX}>=1.0.0:devel/llama.el@${EMACS_FLAVOR} \ transient${EMACS_PKGNAMESUFFIX}>=0.10.0:devel/transient@${EMACS_FLAVOR} \ with-editor${EMACS_PKGNAMESUFFIX}>=3.4.4:editors/with-editor@${EMACS_FLAVOR} RUN_DEPENDS= compat.el${EMACS_PKGNAMESUFFIX}>=30.1.0.0:misc/compat.el@${EMACS_FLAVOR} \ cond-let${EMACS_PKGNAMESUFFIX}>=0.1:devel/cond-let@${EMACS_FLAVOR} \ git:devel/git \ llama.el${EMACS_PKGNAMESUFFIX}>=1.0.0:devel/llama.el@${EMACS_FLAVOR} \ transient${EMACS_PKGNAMESUFFIX}>=0.10.0:devel/transient@${EMACS_FLAVOR} \ with-editor${EMACS_PKGNAMESUFFIX}>=3.4.4:editors/with-editor@${EMACS_FLAVOR} USES= emacs gmake makeinfo USE_GITHUB= yes MAKE_ENV+= docdir=${DOCSDIR} \ infodir=${PREFIX}/${INFO_PATH} \ INSTALL_INFO=install-info \ lispdir=${PREFIX}/${ELISPDIR} \ LOAD_PATH="-L ${WRKSRC}/lisp -L ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR} -L ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/compat" \ VERSION=${PORTVERSION} # Parallel build fails if Emacs is built with native compilation enabled MAKE_JOBS_UNSAFE= yes ALL_TARGET= lisp info INSTALL_TARGET= install-lisp install-info CONFLICTS_INSTALL= magit-devel-emacs* NO_ARCH= yes INFO= magit magit-section PLIST_SUB+= ELISPDIR=${ELISPDIR} PORTDOCS= *.html *.md RelNotes/* OPTIONS_DEFINE= DOCS PDF OPTIONS_SUB= yes PDF_DESC= Build and install PDF document DOCS_BUILD_DEPENDS= gsed:textproc/gsed DOCS_ALL_TARGET= html DOCS_BINARY_ALIAS= sed=gsed PDF_BUILD_DEPENDS= texi2pdf:print/texinfo PDF_USES= tex PDF_USE= TEX=dvipdfmx:build PDF_ALL_TARGET= pdf ELISPDIR= ${EMACS_VERSION_SITE_LISPDIR}/${PORTNAME} do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR}/RelNotes ${INSTALL_DATA} ${WRKSRC}/docs/*.md ${STAGEDIR}${DOCSDIR} ${COPYTREE_SHARE} ${WRKSRC}/docs/RelNotes ${STAGEDIR}${DOCSDIR}/RelNotes do-install-PDF-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/docs/*.pdf ${STAGEDIR}${DOCSDIR} .include diff --git a/devel/magit/files/patch-lisp_magit-autorevert.el b/devel/magit/files/patch-lisp_magit-autorevert.el new file mode 100644 index 000000000000..f85fe0995e7e --- /dev/null +++ b/devel/magit/files/patch-lisp_magit-autorevert.el @@ -0,0 +1,48 @@ +From 5183b8f0d42345432a560996e4f434d27452faa8 Mon Sep 17 00:00:00 2001 +From: Jonas Bernoulli +Date: Fri, 24 Oct 2025 23:25:01 +0200 +Subject: [PATCH] Support Emacs builds that feature + custom-initialize-after-file-load + +This will need more work. We might be able to learn from that function +and simplify even when that is not available. Also, while rudimentary +testing indicates this works as intended, this has to be studied in more +detail before we can be sure. Do it now anyway, because the breakage +caused by not doing is definitely real. + +See #5462. +--- + lisp/magit-autorevert.el | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git lisp/magit-autorevert.el lisp/magit-autorevert.el +index 90d83367..564b9c0d 100644 +--- lisp/magit-autorevert.el ++++ lisp/magit-autorevert.el +@@ -166,13 +166,16 @@ and code surrounding the definition of this function." + (format " (%.3fs, %s buffers checked)" elapsed + (length (buffer-list))) + "")))))) +-(if after-init-time +- ;; Since `after-init-hook' has already been +- ;; run, turn the mode on or off right now. +- (magit-auto-revert-mode--init-kludge) +- ;; By the time the init file has been fully loaded the +- ;; values of the relevant variables might have changed. +- (add-hook 'after-init-hook #'magit-auto-revert-mode--init-kludge t)) ++;; FIXME Suppressing this for recent 31.0.50 builds is not the ++;; final solution. ++(unless (fboundp 'custom-initialize-after-file-load) ++ (if after-init-time ++ ;; Since `after-init-hook' has already been ++ ;; run, turn the mode on or off right now. ++ (magit-auto-revert-mode--init-kludge) ++ ;; By the time the init file has been fully loaded the ++ ;; values of the relevant variables might have changed. ++ (add-hook 'after-init-hook #'magit-auto-revert-mode--init-kludge t))) + + (put 'magit-auto-revert-mode 'function-documentation + "Toggle Magit Auto Revert mode. +-- +2.51.2 +