Created attachment 223737 [details]
Patch devel/libegit2 for libgit install dir
When magit-devel is built with the LIBEGIT2 port option for emacs-devel, it may not be able to find libegit2.
As a workaround, a site using emacs-devel may be able provide a site-lisp expr, such that would set libgit--module-file for the correct directory for the Emacs version under emacs-devel. Presently, this would be "/usr/local/share/emacs/28.0.50/site-lisp" under normal LOCALBASE
A patch is attached for the patch-libgit.el under devel/libegit2 such that would serve to ensure that the matching, versioned site lisp directory will be used for libgit--module-file.
The previous patch file used a hard-coded Emacs version. However, from the contents of the port Makefile, it may seem that this build-time pathname replacement was already partially supported.
This patch has been tested for build and for usage with Magit, under devel/magit-devel@devel_full with the LIBEGIT2 port option enabled
To mention one known concern with the patch as provided here, the patch file updated with the provided ports-tree patch would use a different timestamp format than the original patch file under devel/libegit2. Personally, I'm not certain how to get diff(1) to use the same timestamp format as the original - does it need a specific locales def?
The patched code has been tested though.
- Sean Champ
Created attachment 223753 [details]
* Fix files/patch-libgit.el so libgit--module-file in libgit.el is correctly replaced.
* Bump PORTREVISION.
(In reply to Sean Champ from comment #0)
Thank you for patch. I submitted patch that includes your fix and also bump PORTREVISION to build correct packages.
A commit in branch main references this bug:
Author: Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2021-04-08 06:37:45 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-04-08 06:41:13 +0000
devel/libegit2: fix with emacs-devel
Reported by: Sean Champ <email@example.com>
Approved by: Yasuhiro Kimura <firstname.lastname@example.org> (maintainer)
devel/libegit2/Makefile | 2 +-
devel/libegit2/files/patch-libgit.el | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)