如何应用这个mutt侧边栏补丁?

14

由于自制游戏玩家现在已经移除了在安装期间应用Mutt侧边栏补丁的选项,我开始搜索并找到了一个为Mutt 1.5.22版本创建更新的侧边栏补丁的人(每个Mutt侧边栏版本似乎总是与前一个或下一个不兼容)。

然而,这个补丁只是一个位于Github存储库上的.patch文件,位置在https://github.com/nedos/mutt-sidebar-patch。没有任何安装说明。由于Homebrew软件包是一个二进制软件包,我不确定如何安装它,因为通常需要将patch命令指向要打补丁的文件。

经过更多搜索,我发现有人如何使用他们在git上找到的补丁来打补丁到其他软件中,他们克隆了git存储库,并使用git命令应用了该补丁,但我不知道1.5.22版本的mutt的github存储库网址(如果正在使用git),也不确定是否需要重新编译它。

能否有人指点我方向并给我一些提示?最好是一个解决方案。感谢您的时间。

5个回答

33

更新

这个答案已经有点过时了,幸运的是,有些人已经创建了一些自制补丁来解决这个问题,使得它变得更加简单。现在你只需要按照以下步骤操作:

brew uninstall mutt
brew tap sgeb/mutt
brew install sgeb/mutt/mutt --with-sidebar-patch

如果你想安装带有其他补丁的Mutt,请看看你可以通过输入以下命令安装的选项:

brew options sgeb/mutt/mutt

我的输出结果是:
--with-confirm-attachment-patch
    Apply confirm attachment patch
--with-debug
    Build with debug option enabled
--with-forwref-patch
    Apply forward_references patch
--with-gettext
    Build with gettext support
--with-gmail-labels-patch
    Apply gmail labels patch
--with-gmail-server-search-patch
    Apply gmail server search patch
--with-gpgme
    Build with gpgme support
--with-ignore-thread-patch
    Apply ignore-thread patch
--with-libidn
    Build with libidn support
--with-pgp-verbose-mime-patch
    Apply PGP verbose mime patch
--with-s-lang
    Build against slang instead of ncurses
--with-sidebar-patch
    Apply sidebar patch
--with-trash-patch
    Apply trash folder patch
--HEAD
    Install HEAD version

我在阅读以上所有答案时遇到了问题,但最终我成功地解决了。我的做法如下:

brew edit mutt

然后我滚动到一部分命令,所有这些命令都以“option”开头,有点像:

option "with-debug", "Build with debug option enabled"
option "with-trash-patch", "Apply trash folder patch"
option "with-s-lang", "Build against slang instead of ncurses"
option "with-ignore-thread-patch", "Apply ignore-thread patch"
option "with-pgp-verbose-mime-patch", "Apply PGP verbose mime patch"
option "with-confirm-attachment-patch", "Apply confirm attachment patch"

我随后在此块的底部添加了一行。
option "with-sidebar-patch", "Apply sidebar patch"

接着我向下滚动,来到了所有补丁的部分,例如:

patch do
  url "http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.2+deb7u1/features/trash-folder"
  sha1 "6c8ce66021d89a063e67975a3730215c20cf2859"
end if build.with? "trash-patch"

我添加了侧边栏的补丁(在这里发现:https://github.com/kevwil/homebrew-patches/blob/master/mutt.rb

patch do
  url "https://raw.github.com/nedos/mutt-sidebar-patch/7ba0d8db829fe54c4940a7471ac2ebc2283ecb15/mutt-sidebar.patch"
  sha1 "1e151d4ff3ce83d635cf794acf0c781e1b748ff1"
end if build.with? "sidebar-patch"

最后,请退出编辑 Homebrew 文件,并在命令行中输入以下命令:

brew install mutt --with-sidebar-patch

祝你好运!

p.s. 如果出现类似 aclocal 的错误,则需要安装automake,brew install automake


当我执行 brew install mutt --with-sidebar-patch 命令时,它会提示 警告: mutt-1.5.23_2 已经安装 - Hebbian
@Hebbian 在安装带有侧边栏补丁的mutt之前,您必须先执行brew remove mutt - Fredrik Wallgren
1
对于mutt 1.5.23_2,这个补丁对我有效: url "http://lunar-linux.org/~tchan/mutt/patch-1.5.23.sidebar.20140412.txt" sha256 "5f473e201519d95b8c2319f286221213386de2d7c27629c70733b40b643b59c4" - mirth23
FYI,那个git仓库上的侧边栏补丁有点旧,不包括sidebar_format功能。我使用了这个链接(http://lunar-linux.org/~tchan/mutt/patch-1.5.23.sidebar.20140412.txt)来自新的维护者(别忘了更改sha1哈希),它具有最新的侧边栏功能。 - Raj
我认为命令应该是 brew reinstall mutt,而不是 install - thorr18

4

这似乎比被接受的答案“brew reinstall kevwil/patches/mutt”更容易。 - thorr18

1

1

0

现在我已经解决了,通过下载源代码,使用补丁命令添加补丁,然后在mutt中运行所需的功能的configure,接着添加一个配置指令用于显示侧边栏。打开mutt时,侧边栏现在出现了,但它还没有列出任何文件夹,我怀疑这只是需要额外配置的问题而已。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接