macos - 无法将端口添加到 MacPorts 中的本地存储库

标签 macos macports

我正在尝试将端口添加到 MacPorts 中的本地存储库。

我知道guide .

我在/Users/Masi/bin/MacPorts/ports/Git 运行失败

portindex
Creating software index in /Users/Masi/bin/MacPorts/ports/Git

Total number of ports parsed:   0 
Ports successfully parsed:  0    
Ports failed:           0

我的端口文件如下

PortSystem          1.0

name                git-svn 
version             1.0 
categories          git 
maintainers         sl 
description         svn for Git 
long_description    Git-svn is a tool which allows Git to use svn 
homepage            http://www.kernel.org/pub/software/scm/git/docs/git-svn.html 
platforms           darwin
master_sites        http://git-scm.com/ 

checksums           md5 

depends_lib         
                    port:syfi-dev\ 
                    port:syfi-doc\ 
                    port:python-syfi0\ 
                    port:libcln5\ 
                    port:libsyfi0\ 
                    port:libginac1.4\ 
                    port:libsyfi0-dev\
                    port:syfi-bin\

#I do not know what these are: I leave them as they are by default
configure.args      --enable-perl-site-install \
                    --mandir=${prefix}/share/man

我的sources.conf

#  MacPorts system wide sources configuration file
#  $Id: sources.conf 42662 2008-11-28 23:18:50Z <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d3a1b2babea6b693beb2b0a3bca1a7a0fdbca1b4" rel="noreferrer noopener nofollow">[email protected]</a> $

#  To setup a local ports repository, insert a "file://" entry following
#  the example below that points to your local ports directory:
#  Example: file:///Users/landonf/misc/MacPorts/ports
file:///Users/Masi/bin/MacPorts/ports
rsync://rsync.macports.org/release/ports


#  The default MacPorts repository should always be tagged [default]
#  for proper functionality of various resources (port groups, mirror
#  sites, etc).  If you switch it from the rsync:// URL, be sure to keep
#  it tagged [default].

#  To prevent a source from synchronizing when `port sync` is used,
#  append [nosync] at the end as shown in this example:
#  Example: file:///Users/landonf/misc/MacPorts/ports [nosync]

#  NOTE: The port command parses source URLs in order and installs the
#        first occurrance when a port appears in multiple repositories.
#        So keep "file://" URLs above other URL types.


#  To get the ports tree from the master MacPorts server in California, USA use:
#      rsync://rsync.macports.org/release/ports/
#  To get it from the mirror in Trondheim, Norway use:
#      rsync://trd.no.rsync.macports.org/release/ports/
#  A current list of mirrors is available at http://trac.macports.org/wiki/Mirrors
rsync://rsync.macports.org/release/ports/ [default]

如何成功将端口添加到本地 MacPorts?

最佳答案

端口文件必须按以下方式组织:

$LOCAL_PORT_DIR/{category}/{portname}/

所有文件,包括Portfile,都位于该目录下。

就您而言,您的本地端口目录是 /Users/Masi/bin/MacPorts/ports,并且您的端口 git-svn 位于类别 git,所以你的目录结构应该如下所示:

/Users/Masi/bin/MacPorts/ports/git/git-svn/Portfile

(不过,在 git-svn 的特殊情况下,您始终可以使用变体 +svn 安装端口 git-core ,就像这样:$ sudo port install git-core +svn。)

(另外,作为另一个旁注,Git 相关的端口通常组织在“devel”类别下,而不是“git”类别下。)

关于macos - 无法将端口添加到 MacPorts 中的本地存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/765392/

相关文章:

ruby-on-rails - 将 Rails 应用程序从 Windows 移植到 Mac 或 Linux

macos - AVCaptureDevice devicesWithMediaType : Does not update after added/removed camera

xcode - Xcode 4-启动可执行文件时出错

php - 如何使用 MacPorts 添加对 PHP 的 MySQL 支持?

python - 我需要安装多少个 macports

macos - mac os X 上的 svn,SSL 错误 : point is not on curve

objective-c - Cocoa NSOutlineView 取消选择之前的选择

ios - WKWebView上传文件名含有中文导致乱码

python - 使用 MacPorts 安装 PyOpenGL

在 Eclipse 中使用 OsX Mavericks 上的 Macports 为 Pydev 安装 OpenCV