将 MacPorts 依赖项替换为其他包

发布于 2024-08-14 03:11:44 字数 111 浏览 1 评论 0原文

有没有一种方法可以满足 MacPorts 中另一个包(而不是指定的包)的特定端口依赖性?更具体地说,对于需要 XYZ 的第二个端口,使用 XYZ-devel 包而不仅仅是 XYZ?

提前致谢。

Is there a way to satisfy a certain port dependency with another package (than the specified one) in MacPorts? More specifically, to use the package XYZ-devel instead of just XYZ for a second port that requires XYZ?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

自我难过 2024-08-21 03:11:44

如果 -devel 端口未作为变体提供,则唯一的方法是编辑端口文件。

$ sudo port edit $the_port

将在编辑器中打开指定的端口。您可以将依赖关系从发布端口更改为 -devel 端口。

请注意:

  1. 这可能会破坏端口,因为它可能不适用于 -devel 版本(不太可能,但有可能)。
  2. 每当您执行端口自我更新时,您对端口文件的更改都会恢复。如果您不想每次更新时都“修复”Portfile,您可能需要设置一个 本地端口文件存储库

If the -devel port is not offered as a variant, then the only way is to edit the Portfile.

$ sudo port edit $the_port

will open the specified port in an editor. You can change the dependency from the release port to the -devel port there.

Note that:

  1. This may break the port, since it may not work with the -devel version (unlikely, but possible).
  2. Your changes to the Portfile will get reverted anytime you do a port selfupdate. If you don't want to have to "fix" the Portfile each time you update, you may want to set up a local Portfile repository.
┊风居住的梦幻卍 2024-08-21 03:11:44

您可以使用“端口变体”命令来显示给定端口的可用变体列表。例如:

[michaelsafyan@codemage ~]$ port variants ffmpeg
ffmpeg has the variants:
   darwin_10: Platform variant, selected automatically
   no_gpl: disallow use of GPL code, license will be LGPL
   no_mmx: disable all x86 asm optimizations
   speex: enable Speex decoding via libspeex

然后您可以使用“+variantname”来激活或使用“-variantname”来停用安装的给定变体(例如,可以使用“sudo port install ffmpeg +speex”来安装带 speex 变体的 ffmpeg)。这是您可以在不同配置和依赖项之间进行选择的唯一方法(不会破坏 MacPorts)。

You can use the "port variants" command to display the list of available variants for a given port. Ex:

[michaelsafyan@codemage ~]$ port variants ffmpeg
ffmpeg has the variants:
   darwin_10: Platform variant, selected automatically
   no_gpl: disallow use of GPL code, license will be LGPL
   no_mmx: disable all x86 asm optimizations
   speex: enable Speex decoding via libspeex

You can then use "+variantname" to activate or "-variantname" to deactivate a given variant for the install (for example, one can use "sudo port install ffmpeg +speex" to install ffmpeg with the speex variant). This is the only way (that won't break MacPorts) that you can select between different configurations and dependencies.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文