Bug 254685 - devel/libegit2: libgit module install directory does not match Emacs version, when using emacs-devel (Patch Attached)
Summary: devel/libegit2: libgit module install directory does not match Emacs version,...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-01 04:22 UTC by Sean Champ
Modified: 2021-04-08 06:42 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (yasu)


Attachments
Patch devel/libegit2 for libgit install dir (877 bytes, patch)
2021-04-01 04:22 UTC, Sean Champ
no flags Details | Diff
Patch file (1.17 KB, patch)
2021-04-01 19:28 UTC, Yasuhiro Kimura
yasu: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Champ 2021-04-01 04:22:14 UTC
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.


Health.

- Sean Champ
Comment 1 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-04-01 19:28:53 UTC
Created attachment 223753 [details]
Patch file

* Fix files/patch-libgit.el so libgit--module-file in libgit.el is correctly replaced.
* Bump PORTREVISION.
Comment 2 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-04-01 19:31:16 UTC
(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.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-04-08 06:41:36 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ff5d36478476044aef26d9cfa51f6d42d6cb50cd

commit ff5d36478476044aef26d9cfa51f6d42d6cb50cd
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

    PR:             254685
    Reported by:    Sean Champ <lab+bsd@thinkum.space>
    Approved by:    Yasuhiro Kimura <yasu@utahime.org> (maintainer)

 devel/libegit2/Makefile              | 2 +-
 devel/libegit2/files/patch-libgit.el | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 4 Kevin Bowling freebsd_committer freebsd_triage 2021-04-08 06:42:38 UTC
Thanks!