我正在尝试在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 raimue@macports.org $
# 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添加端口?
答案 0 :(得分:3)
Portfiles 必须按以下方式组织:
$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
的特殊情况下,您始终可以使用变体git-core
安装端口+svn
,如下所示:$ sudo port install git-core +svn
。)
(另外,另一方面,与Git相关的端口通常在“devel”类别下组织,而不是“git”。)
答案 1 :(得分:1)
我不确定,但我认为您需要将目录结构更改为以下格式:portcategory/portname/Portfile
。在你的情况下,/Users/Masi/bin/MacPorts/ports/git/git-svn/Portfile
然后尝试从本地仓库(/Users/Masi/bin/MacPorts/ports
)