add(dev-vcs/mercurial): go libraries in hg, need this

we need this because a number of go libraries are in hg repos.
This commit is contained in:
Brandon Philips 2013-05-27 13:37:55 -07:00
parent f2db2b892d
commit 08e822dfb6
15 changed files with 2458 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
AUX 70mercurial-gentoo.el 76 SHA256 c215746e4a5375569808c6aa6ddabe08e82d33d744128179be3142d9cd53a5ab SHA512 2efb67d5f595842ccdb9b9ea0c6b6fbc3a28a77955d7255817309486fac19e7550ee0a545d5824e3f9acaf586d93533e90ccd05e15d76884d6493f50fb390a44 WHIRLPOOL f4e8fa6a0400bf04314569f3d6e26e464ebf3c7a693508250e2b150919ad5e34a534af86b1b5847ff13f2964d23db531b1a77cc8bdd24e550c7f9e885c6f1682
AUX cacerts.rc 51 SHA256 3d7c7e238ab4db22d2457e039bb1afcb02c6ac3a6c9aee8448614b0a6f414774 SHA512 39c40c6cc95c54dcae13effb5c23f541f49fd89e0f040e214673afd906c6d5140eb18801d55330f4455507b467f0fae011998e60932e9a2accf37a0e7a047b90 WHIRLPOOL 12c178cf03d7d31744311fd71200efd07a2c9ab3ab3bf1c08f254d113fbd0500848ac3bb76da2baa2c567666f2174026a605dd561a3b1bc96133f314e149f289
DIST mercurial-2.4.2.tar.gz 3613392 SHA256 cc21083d7eab4caa8159b941e36c7229acbb6d41a26a7bed21a771b3f63dedf3 SHA512 642dbcc9de6662e563059cafadbd4a0f1b4d6cebad48b2bfc7160571fad950a0110456be52690f1aeef6b91a4f6ac1edf6fc3607d1f590337a60c4b2bcab4625 WHIRLPOOL 64b7f5d620ed132849318e270bc97a0bed99f8be16d1c65da0a38dab47cf3f20bbe0f6b1b9ab145ca6df70c48ba70814df5c0c6c8fa07b271fcda251bb7c9ddf
DIST mercurial-2.5.4.tar.gz 3673850 SHA256 c86fe9feb9aaada286fa297d9d68d1b16e2f842b8bd645826c81bc705a629d5a SHA512 928fdeaaf0eaec80adbd8765521de9666ab56aaa2101fb9ab2cb392d8b29475d3b052d89652ff9b67522cfcc6cd958717ac715f51b0573ee088e9a595f29afe2 WHIRLPOOL d90a0c6a8752442ad2f7e524a4b07910538aa9d910ae4889196eb41cdcc903dbfb3f17d18f54a788fcf8232e154852566503d652a3904b4b307242a7d306ce80
DIST mercurial-2.6.1.tar.gz 3728067 SHA256 b6413aa339fd91a86288df7cf4f9db9bf3443b1ff55e8118530fdb9e8c788e64 SHA512 2ebc2608ca991d99e729d2ff22fc8b61811e709a855f051a0e1b611d21a1eddc3d6e46b7a8886d4bc476d0c0218ed768a4a42d820b6fa138e4f3d3538857cc59 WHIRLPOOL 1846d6a0e9c9d8d7db13d84f947a901569385d9664c3d51465c99d6539f9a15e45ae3886937d98d9b6fa5775003e87ec10d1b348f47f754d3535cd5a336a42d3
DIST mercurial-2.6.tar.gz 3726957 SHA256 5da022bd8114c498fbeb249f7f670a1b3e381e57225419b50f941b65444da1c1 SHA512 bbe8691d629905e73affb3b1208901ecbd0d4a6e4a4765a5a37588bde026b66a09f1060cfdf49b1470c1fc226be091036adc249bbd7a6e45e76f9eed0b6821b5 WHIRLPOOL 01c7088f67936048ad13115ecd5df8c23c271988e3f4c2102c56b5d9aebfd139242cfbe145cbc3f038f26c1e07a99d6641528c29eff7b40f446ab5e990ca3baa
EBUILD mercurial-2.4.2.ebuild 4205 SHA256 e83115c31a5188e8eaac882ddce4e5a319bfd6bd8b2546f2734b3e9a35f1b014 SHA512 b64c82462d8c2ff4f24088b82e08ec3154b6aac08b44774a5e30d7f64e8346a9e18d624c3abe6e57d8a1e64bf60c9bc47c456186d22a316d0c10f7bb1ce847cc WHIRLPOOL 70d109a32ddc21d494c361ad66c8a2e2b60ea1346fedca67820a9ce32285fc3a24b9e5530501489df15cf1a494b43e54c29b8be3ee5f2c4b11f3cddd3fe80fd8
EBUILD mercurial-2.5.4.ebuild 4434 SHA256 802a0947aaa8f6e007544d287adf4799cde8cbb649675a44c0626804b3e8f6e3 SHA512 59dbd1704c47309c035b92180681a15ebf1fee604b355303694e8a08d8c3bd2b62cfa3d6a14aaa4e24a58584bc26ce0fad68fd7d881cd29b40490a9a4c51d67c WHIRLPOOL e318ff12ef41f8f04ba2eb95e9b40c28d156cffcb7237ea2db56c7c4eae82d698bb3cdf3e0ef8fe6aa44834e4347a1964c73ac268dc4aa683950843a8871ec54
EBUILD mercurial-2.6.1.ebuild 4428 SHA256 0e06370bb0f9311fa2643c5697a787262f1f43fa5037b55172583a7301c03c9b SHA512 8678e7afd22b44ed12f8cd0013c2c8bb8cff2598eb38a8ff6152b4535fea329d0b123df474c629427095467a52906e43d681ded0fa6fac701df2be9ee2e9e068 WHIRLPOOL 0b5d4eb0f8ed30330eea23756d7afaea145fcd4c17774c2d9fe5018fff816cf44558c4deb03041090281a4b2bc05824796a05f30d72f88f8f44c0deabb4b04a0
EBUILD mercurial-2.6.ebuild 4426 SHA256 310281dd9e44e2809025674986ce9c5b5f55e9d6b12595933b63987708b102af SHA512 9c2b8b68399479d5b72352a19c3df2196cfb8672004f66a9e696e7b38b64f3c8294217c66bbb565ed45b3b1a626bd49e8133f2f22403523e43d21a5849a165be WHIRLPOOL c16cda718be0918f415eb438f716d833e2eef36305574e31d70e9900fd2449368c58db87a8adbb51d0b3c3269158836ce299278bcc18d108ba84027e86f69227
EBUILD mercurial-9999.ebuild 4260 SHA256 5b239abb781847009e4b6b6116ef33dec80c038426621f278dd36e2ebaa83cca SHA512 021945d82dbb6ff4121be9a12fce2c610b241f90a74058b21bec0dc248646081acfc4ed44b29866fb7d1fb19aa9a30ec6a6efb4198965f901cef010f1daf1b6e WHIRLPOOL ffce0e96c7976f12c34dd66443dcee25705d70ebbcda10869c0dd3d95467c81b0b248bcf38af3006717dc2054e6980870081574564abe32605734e027df9c129
MISC ChangeLog 34976 SHA256 56c6686aed268e6af50960e6edb288145883f51b4c080a72a94da3d43a357c0a SHA512 5173d5a07b89dd58b7240addfb8466f3ff64b721c706601d72e14096178c5cbd91f562a7aeaaa4298850020c904d1177046efab3c221fda65b1f0138940d0535 WHIRLPOOL ce764e96de2e05a42b95bc103999b3fbd1bae0544a8d6c46faca6b3d7a1b2b46ed7297ea2e9e3980c52b2857a56f329c3fe178c6897e449cc6dd2b6b52147503
MISC metadata.xml 704 SHA256 76c0566b9a503099f6cf40750ffe09726dcf338e24378e780fb932cbebe1f0c1 SHA512 21a386ecca4b3d337c69019e750752df3f06137de8b8b27199b6218d4a5253bade522c5a9183340dfea61333bd783c14d60ff3f3e46cb58121c7100449722bfd WHIRLPOOL 7f64d01b4d31ae756e63e16be8add1bcba9a073961663ae481be883a5fcc6e3473d5da5f26d524502ade4eba0b2f3692934ed63f1e41bfa8d8b6a0a1532e11b6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iEYEAREIAAYFAlGTT04ACgkQxeMuLWsGW/vGEgCfek5DhRMnpOv1uVOAgsxkSGdQ
QTkAn3D9nV9/h/4+ZPAxOxBVro1PVQAT
=4/Oh
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
;;; mercurial site-lisp configuration
(add-to-list 'load-path "@SITELISP@")

View File

@ -0,0 +1,2 @@
[web]
cacerts = /etc/ssl/certs/ca-certificates.crt

View File

@ -0,0 +1,43 @@
# HG changeset patch
# User Idan Kamara <idankk86@gmail.com>
# Date 1352741223 -7200
# Node ID 35ba170c0f82dba18f0207ef4bd93216e6de8bbf
# Parent 45bd0cd7ca04f8cda0a61cddded8838dd312675a
grep: don't search past the end of the searched string
'*' causes the resulting RE to match 0 or more repetitions of the preceding RE:
>>> bool(re.search('.*', ''))
>>> True
This causes an infinite loop because currently we're only checking if there was
a match without looking at where we are in the searched string.
diff -r 45bd0cd7ca04 -r 35ba170c0f82 mercurial/commands.py
--- a/mercurial/commands.py Tue Nov 13 08:41:56 2012 -0800
+++ b/mercurial/commands.py Mon Nov 12 19:27:03 2012 +0200
@@ -2935,7 +2935,7 @@
def matchlines(body):
begin = 0
linenum = 0
- while True:
+ while True and begin < len(body):
match = regexp.search(body, begin)
if not match:
break
diff -r 45bd0cd7ca04 -r 35ba170c0f82 tests/test-grep.t
--- a/tests/test-grep.t Tue Nov 13 08:41:56 2012 -0800
+++ b/tests/test-grep.t Mon Nov 12 19:27:03 2012 +0200
@@ -23,6 +23,10 @@
simple
+ $ hg grep '.*'
+ port:4:export
+ port:4:vaportight
+ port:4:import/export
$ hg grep port port
port:4:export
port:4:vaportight

View File

@ -0,0 +1,139 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.1.1.ebuild,v 1.8 2012/06/17 17:32:15 armin76 Exp $
EAPI=3
PYTHON_DEPEND="2"
PYTHON_USE_WITH="threads"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
inherit bash-completion-r1 elisp-common eutils distutils
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments )"
PYTHON_CFLAGS=(
"2.* + -fno-strict-aliasing"
"* - -ftracer -ftree-vectorize"
)
PYTHON_MODNAME="${PN} hgext"
SITEFILE="70${PN}-gentoo.el"
src_prepare() {
distutils_src_prepare
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
}
src_compile() {
distutils_src_compile
if use emacs; then
cd "${S}"/contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
rm -rf contrib/{win32,macosx} || die
}
src_install() {
distutils_src_install
newbashcomp contrib/bash_completion ${PN} || die
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg || die
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS PKG-INFO README doc/*.txt || die
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor || die
dobin contrib/hgk || die
dobin contrib/hg-ssh || die
rm -f contrib/hgk contrib/hg-ssh || die
rm -f contrib/bash_completion || die
cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die
doman doc/*.? || die
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial" || die
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
}
src_test() {
cd "${S}/tests/" || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template || die # Test is broken when run as root
rm -f test-convert || die # Test is broken when run as root
rm -f test-lock-badness || die # Test is broken when run as root
rm -f test-permissions || die # Test is broken when run as root
rm -f test-pull-permission || die # Test is broken when run as root
rm -f test-clone-failure || die
rm -f test-journal-exists || die
rm -f test-repair-strip || die
fi
testing() {
local testdir="${T}/tests-${PYTHON_ABI}"
rm -rf "${testdir}" || die
"$(PYTHON)" run-tests.py --tmpdir="${testdir}"
}
python_execute_function testing
}
pkg_postinst() {
distutils_pkg_postinst
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
distutils_pkg_postrm
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,142 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.4.2.ebuild,v 1.11 2013/02/10 14:40:06 ago Exp $
EAPI=3
PYTHON_DEPEND="2"
PYTHON_USE_WITH="threads"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
inherit bash-completion-r1 elisp-common eutils distutils
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )
app-misc/ca-certificates"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments )"
PYTHON_CFLAGS=(
"2.* + -fno-strict-aliasing"
"* - -ftracer -ftree-vectorize"
)
PYTHON_MODNAME="${PN} hgext"
SITEFILE="70${PN}-gentoo.el"
src_prepare() {
distutils_src_prepare
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
}
src_compile() {
distutils_src_compile
if use emacs; then
cd "${S}"/contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
rm -rf contrib/{win32,macosx} || die
}
src_install() {
distutils_src_install
python_convert_shebangs 2 contrib/hg-ssh
newbashcomp contrib/bash_completion ${PN} || die
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg || die
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS README doc/*.txt || die
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor || die
dobin contrib/hgk || die
dobin contrib/hg-ssh || die
rm -f contrib/hgk contrib/hg-ssh || die
rm -f contrib/bash_completion || die
cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die
doman doc/*.? || die
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial" || die
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
insinto /etc/mercurial/hgrc.d
doins "${FILESDIR}/cacerts.rc"
}
src_test() {
cd "${S}/tests/" || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive* || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
rm -f test-largefiles* || die # tends to time out
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template* || die # Test is broken when run as root
rm -f test-convert* || die # Test is broken when run as root
rm -f test-lock-badness* || die # Test is broken when run as root
rm -f test-permissions* || die # Test is broken when run as root
rm -f test-pull-permission* || die # Test is broken when run as root
rm -f test-clone-failure* || die
rm -f test-journal-exists* || die
rm -f test-repair-strip* || die
fi
testing() {
local testdir="${T}/tests-${PYTHON_ABI}"
rm -rf "${testdir}" || die
"$(PYTHON)" run-tests.py --tmpdir="${testdir}"
}
python_execute_function testing
}
pkg_postinst() {
distutils_pkg_postinst
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
distutils_pkg_postrm
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,142 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.5.1.ebuild,v 1.2 2013/02/21 03:19:14 zmedico Exp $
EAPI=3
PYTHON_DEPEND="2"
PYTHON_USE_WITH="threads"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
inherit bash-completion-r1 elisp-common eutils distutils
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )
app-misc/ca-certificates"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments )"
PYTHON_CFLAGS=(
"2.* + -fno-strict-aliasing"
"* - -ftracer -ftree-vectorize"
)
PYTHON_MODNAME="${PN} hgext"
SITEFILE="70${PN}-gentoo.el"
src_prepare() {
distutils_src_prepare
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
}
src_compile() {
distutils_src_compile
if use emacs; then
cd "${S}"/contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
rm -rf contrib/{win32,macosx} || die
}
src_install() {
distutils_src_install
python_convert_shebangs 2 contrib/hg-ssh
newbashcomp contrib/bash_completion ${PN} || die
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg || die
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS README doc/*.txt || die
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor || die
dobin contrib/hgk || die
dobin contrib/hg-ssh || die
rm -f contrib/hgk contrib/hg-ssh || die
rm -f contrib/bash_completion || die
cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die
doman doc/*.? || die
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial" || die
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
insinto /etc/mercurial/hgrc.d
doins "${FILESDIR}/cacerts.rc"
}
src_test() {
cd "${S}/tests/" || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive* || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
rm -f test-largefiles* || die # tends to time out
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template* || die # Test is broken when run as root
rm -f test-convert* || die # Test is broken when run as root
rm -f test-lock-badness* || die # Test is broken when run as root
rm -f test-permissions* || die # Test is broken when run as root
rm -f test-pull-permission* || die # Test is broken when run as root
rm -f test-clone-failure* || die
rm -f test-journal-exists* || die
rm -f test-repair-strip* || die
fi
testing() {
local testdir="${T}/tests-${PYTHON_ABI}"
rm -rf "${testdir}" || die
"$(PYTHON)" run-tests.py --tmpdir="${testdir}"
}
python_execute_function testing
}
pkg_postinst() {
distutils_pkg_postinst
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
distutils_pkg_postrm
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,149 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.5.2.ebuild,v 1.3 2013/03/09 12:55:52 mgorny Exp $
EAPI=5
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
PYTHON_REQ_USE="threads"
inherit bash-completion-r1 elisp-common eutils distutils-r1 flag-o-matic
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )
app-misc/ca-certificates"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments[${PYTHON_USEDEP}] )"
SITEFILE="70${PN}-gentoo.el"
python_prepare_all() {
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
distutils-r1_python_prepare_all
}
python_configure_all() {
strip-flags -ftracer -ftree-vectorize
# Note: make it impl-conditional if py3 is supported
append-flags -fno-strict-aliasing
"${PYTHON}" setup.py build_mo || die
}
python_compile_all() {
rm -r contrib/{win32,macosx} || die
if use emacs; then
cd contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
}
python_install_all() {
distutils-r1_python_install_all
newbashcomp contrib/bash_completion ${PN}
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS doc/*.txt
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor
dobin contrib/hgk
python_foreach_impl python_doscript contrib/hg-ssh
rm -f contrib/hgk contrib/hg-ssh || die
rm -f contrib/bash_completion || die
dodoc -r contrib
docompress -x /usr/share/doc/${PF}/contrib
doman doc/*.?
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial"
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
insinto /etc/mercurial/hgrc.d
doins "${FILESDIR}/cacerts.rc"
}
src_test() {
cd tests || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive* || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
rm -f test-largefiles* || die # tends to time out
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template* || die # Test is broken when run as root
rm -f test-convert* || die # Test is broken when run as root
rm -f test-lock-badness* || die # Test is broken when run as root
rm -f test-permissions* || die # Test is broken when run as root
rm -f test-pull-permission* || die # Test is broken when run as root
rm -f test-clone-failure* || die
rm -f test-journal-exists* || die
rm -f test-repair-strip* || die
fi
cd .. || die
distutils-r1_src_test
}
python_test() {
local TEST_DIR
rm -rf "${TMPDIR}"/test
distutils_install_for_testing
cd tests || die
"${PYTHON}" run-tests.py --verbose \
--tmpdir="${TMPDIR}"/test \
--with-hg="${TEST_DIR}"/scripts/hg \
|| die "Tests fail with ${EPYTHON}"
}
pkg_postinst() {
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,152 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.5.4.ebuild,v 1.1 2013/04/08 18:38:49 maksbotan Exp $
EAPI=5
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
PYTHON_REQ_USE="threads"
inherit bash-completion-r1 elisp-common eutils distutils-r1 flag-o-matic
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )
app-misc/ca-certificates"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments[${PYTHON_USEDEP}] )"
SITEFILE="70${PN}-gentoo.el"
python_prepare_all() {
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
distutils-r1_python_prepare_all
}
python_configure_all() {
strip-flags -ftracer -ftree-vectorize
# Note: make it impl-conditional if py3 is supported
append-flags -fno-strict-aliasing
"${PYTHON}" setup.py build_mo || die
}
python_compile_all() {
rm -r contrib/{win32,macosx} || die
if use emacs; then
cd contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
}
python_install_all() {
distutils-r1_python_install_all
newbashcomp contrib/bash_completion ${PN}
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS doc/*.txt
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor
dobin contrib/hgk
python_foreach_impl python_doscript contrib/hg-ssh
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
local RM_CONTRIB=(hgk hg-ssh bash_completion zsh_completion wix buildrpm plan9
*.el mercurial.spec)
for f in ${RM_CONTRIB[@]}; do
rm -rf contrib/$f || die
done
dodoc -r contrib
docompress -x /usr/share/doc/${PF}/contrib
doman doc/*.?
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial"
insinto /etc/mercurial/hgrc.d
doins "${FILESDIR}/cacerts.rc"
}
src_test() {
cd tests || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive* || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
rm -f test-largefiles* || die # tends to time out
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template* || die # Test is broken when run as root
rm -f test-convert* || die # Test is broken when run as root
rm -f test-lock-badness* || die # Test is broken when run as root
rm -f test-permissions* || die # Test is broken when run as root
rm -f test-pull-permission* || die # Test is broken when run as root
rm -f test-clone-failure* || die
rm -f test-journal-exists* || die
rm -f test-repair-strip* || die
fi
cd .. || die
distutils-r1_src_test
}
python_test() {
local TEST_DIR
rm -rf "${TMPDIR}"/test
distutils_install_for_testing
cd tests || die
"${PYTHON}" run-tests.py --verbose \
--tmpdir="${TMPDIR}"/test \
--with-hg="${TEST_DIR}"/scripts/hg \
|| die "Tests fail with ${EPYTHON}"
}
pkg_postinst() {
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,142 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.5.ebuild,v 1.2 2013/02/03 14:41:06 djc Exp $
EAPI=3
PYTHON_DEPEND="2"
PYTHON_USE_WITH="threads"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
inherit bash-completion-r1 elisp-common eutils distutils
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )
app-misc/ca-certificates"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments )"
PYTHON_CFLAGS=(
"2.* + -fno-strict-aliasing"
"* - -ftracer -ftree-vectorize"
)
PYTHON_MODNAME="${PN} hgext"
SITEFILE="70${PN}-gentoo.el"
src_prepare() {
distutils_src_prepare
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
}
src_compile() {
distutils_src_compile
if use emacs; then
cd "${S}"/contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
rm -rf contrib/{win32,macosx} || die
}
src_install() {
distutils_src_install
python_convert_shebangs 2 contrib/hg-ssh
newbashcomp contrib/bash_completion ${PN} || die
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg || die
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS README doc/*.txt || die
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor || die
dobin contrib/hgk || die
dobin contrib/hg-ssh || die
rm -f contrib/hgk contrib/hg-ssh || die
rm -f contrib/bash_completion || die
cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die
doman doc/*.? || die
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial" || die
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
insinto /etc/mercurial/hgrc.d
doins "${FILESDIR}/cacerts.rc"
}
src_test() {
cd "${S}/tests/" || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive* || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
rm -f test-largefiles* || die # tends to time out
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template* || die # Test is broken when run as root
rm -f test-convert* || die # Test is broken when run as root
rm -f test-lock-badness* || die # Test is broken when run as root
rm -f test-permissions* || die # Test is broken when run as root
rm -f test-pull-permission* || die # Test is broken when run as root
rm -f test-clone-failure* || die
rm -f test-journal-exists* || die
rm -f test-repair-strip* || die
fi
testing() {
local testdir="${T}/tests-${PYTHON_ABI}"
rm -rf "${testdir}" || die
"$(PYTHON)" run-tests.py --tmpdir="${testdir}"
}
python_execute_function testing
}
pkg_postinst() {
distutils_pkg_postinst
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
distutils_pkg_postrm
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,152 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.6.1.ebuild,v 1.1 2013/05/15 09:03:00 djc Exp $
EAPI=5
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
PYTHON_REQ_USE="threads"
inherit bash-completion-r1 elisp-common eutils distutils-r1 flag-o-matic
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )
app-misc/ca-certificates"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments[${PYTHON_USEDEP}] )"
SITEFILE="70${PN}-gentoo.el"
python_prepare_all() {
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
distutils-r1_python_prepare_all
}
python_configure_all() {
strip-flags -ftracer -ftree-vectorize
# Note: make it impl-conditional if py3 is supported
append-flags -fno-strict-aliasing
"${PYTHON}" setup.py build_mo || die
}
python_compile_all() {
rm -r contrib/{win32,macosx} || die
if use emacs; then
cd contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
}
python_install_all() {
distutils-r1_python_install_all
newbashcomp contrib/bash_completion ${PN}
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS doc/*.txt
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor
dobin contrib/hgk
python_foreach_impl python_doscript contrib/hg-ssh
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
local RM_CONTRIB=(hgk hg-ssh bash_completion zsh_completion wix buildrpm plan9
*.el mercurial.spec)
for f in ${RM_CONTRIB[@]}; do
rm -rf contrib/$f || die
done
dodoc -r contrib
docompress -x /usr/share/doc/${PF}/contrib
doman doc/*.?
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial"
insinto /etc/mercurial/hgrc.d
doins "${FILESDIR}/cacerts.rc"
}
src_test() {
cd tests || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive* || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
rm -f test-largefiles* || die # tends to time out
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template* || die # Test is broken when run as root
rm -f test-convert* || die # Test is broken when run as root
rm -f test-lock-badness* || die # Test is broken when run as root
rm -f test-permissions* || die # Test is broken when run as root
rm -f test-pull-permission* || die # Test is broken when run as root
rm -f test-clone-failure* || die
rm -f test-journal-exists* || die
rm -f test-repair-strip* || die
fi
cd .. || die
distutils-r1_src_test
}
python_test() {
local TEST_DIR
rm -rf "${TMPDIR}"/test
distutils_install_for_testing
cd tests || die
"${PYTHON}" run-tests.py --verbose \
--tmpdir="${TMPDIR}"/test \
--with-hg="${TEST_DIR}"/scripts/hg \
|| die "Tests fail with ${EPYTHON}"
}
pkg_postinst() {
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,152 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.6.ebuild,v 1.1 2013/05/03 07:26:46 djc Exp $
EAPI=5
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
PYTHON_REQ_USE="threads"
inherit bash-completion-r1 elisp-common eutils distutils-r1 flag-o-matic
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )
app-misc/ca-certificates"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments[${PYTHON_USEDEP}] )"
SITEFILE="70${PN}-gentoo.el"
python_prepare_all() {
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
distutils-r1_python_prepare_all
}
python_configure_all() {
strip-flags -ftracer -ftree-vectorize
# Note: make it impl-conditional if py3 is supported
append-flags -fno-strict-aliasing
"${PYTHON}" setup.py build_mo || die
}
python_compile_all() {
rm -r contrib/{win32,macosx} || die
if use emacs; then
cd contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
}
python_install_all() {
distutils-r1_python_install_all
newbashcomp contrib/bash_completion ${PN}
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS doc/*.txt
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor
dobin contrib/hgk
python_foreach_impl python_doscript contrib/hg-ssh
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
local RM_CONTRIB=(hgk hg-ssh bash_completion zsh_completion wix buildrpm plan9
*.el mercurial.spec)
for f in ${RM_CONTRIB[@]}; do
rm -rf contrib/$f || die
done
dodoc -r contrib
docompress -x /usr/share/doc/${PF}/contrib
doman doc/*.?
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial"
insinto /etc/mercurial/hgrc.d
doins "${FILESDIR}/cacerts.rc"
}
src_test() {
cd tests || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive* || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
rm -f test-largefiles* || die # tends to time out
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template* || die # Test is broken when run as root
rm -f test-convert* || die # Test is broken when run as root
rm -f test-lock-badness* || die # Test is broken when run as root
rm -f test-permissions* || die # Test is broken when run as root
rm -f test-pull-permission* || die # Test is broken when run as root
rm -f test-clone-failure* || die
rm -f test-journal-exists* || die
rm -f test-repair-strip* || die
fi
cd .. || die
distutils-r1_src_test
}
python_test() {
local TEST_DIR
rm -rf "${TMPDIR}"/test
distutils_install_for_testing
cd tests || die
"${PYTHON}" run-tests.py --verbose \
--tmpdir="${TMPDIR}"/test \
--with-hg="${TEST_DIR}"/scripts/hg \
|| die "Tests fail with ${EPYTHON}"
}
pkg_postinst() {
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,155 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-9999.ebuild,v 1.19 2013/04/17 08:52:32 maksbotan Exp $
EAPI=5
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
PYTHON_REQ_USE="threads"
inherit bash-completion-r1 elisp-common eutils distutils-r1 mercurial flag-o-matic
DESCRIPTION="Scalable distributed SCM"
HOMEPAGE="http://mercurial.selenic.com/"
EHG_REPO_URI="http://selenic.com/repo/hg"
EHG_REVISION="@"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="bugzilla emacs gpg test tk zsh-completion"
RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
gpg? ( app-crypt/gnupg )
tk? ( dev-lang/tk )
zsh-completion? ( app-shells/zsh )
app-misc/ca-certificates"
DEPEND="emacs? ( virtual/emacs )
test? ( app-arch/unzip
dev-python/pygments[${PYTHON_USEDEP}] )
dev-python/docutils[${PYTHON_USEDEP}]"
SITEFILE="70${PN}-gentoo.el"
python_prepare_all() {
# fix up logic that won't work in Gentoo Prefix (also won't outside in
# certain cases), bug #362891
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
distutils-r1_python_prepare_all
}
python_configure_all() {
strip-flags -ftracer -ftree-vectorize
# Note: make it impl-conditional if py3 is supported
append-flags -fno-strict-aliasing
"${PYTHON}" setup.py build_mo || die
}
python_compile_all() {
rm -r contrib/{win32,macosx} || die
emake doc
if use emacs; then
cd contrib || die
elisp-compile mercurial.el || die "elisp-compile failed!"
fi
}
python_install_all() {
distutils-r1_python_install_all
newbashcomp contrib/bash_completion ${PN}
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
newins contrib/zsh_completion _hg
fi
rm -f doc/*.?.txt || die
dodoc CONTRIBUTORS doc/*.txt
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
dobin hgeditor
dobin contrib/hgk
python_foreach_impl python_doscript contrib/hg-ssh
if use emacs; then
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
fi
local RM_CONTRIB=(hgk hg-ssh bash_completion zsh_completion wix buildrpm plan9
*.el mercurial.spec)
for f in ${RM_CONTRIB[@]}; do
rm -rf contrib/$f || die
done
dodoc -r contrib
docompress -x /usr/share/doc/${PF}/contrib
doman doc/*.?
cat > "${T}/80mercurial" <<-EOF
HG="${EPREFIX}/usr/bin/hg"
EOF
doenvd "${T}/80mercurial"
insinto /etc/mercurial/hgrc.d
doins "${FILESDIR}/cacerts.rc"
}
src_test() {
cd tests || die
rm -rf *svn* || die # Subversion tests fail with 1.5
rm -f test-archive* || die # Fails due to verbose tar output changes
rm -f test-convert-baz* || die # GNU Arch baz
rm -f test-convert-cvs* || die # CVS
rm -f test-convert-darcs* || die # Darcs
rm -f test-convert-git* || die # git
rm -f test-convert-mtn* || die # monotone
rm -f test-convert-tla* || die # GNU Arch tla
rm -f test-doctest* || die # doctest always fails with python 2.5.x
rm -f test-largefiles* || die # tends to time out
if [[ ${EUID} -eq 0 ]]; then
einfo "Removing tests which require user privileges to succeed"
rm -f test-command-template* || die # Test is broken when run as root
rm -f test-convert* || die # Test is broken when run as root
rm -f test-lock-badness* || die # Test is broken when run as root
rm -f test-permissions* || die # Test is broken when run as root
rm -f test-pull-permission* || die # Test is broken when run as root
rm -f test-clone-failure* || die
rm -f test-journal-exists* || die
rm -f test-repair-strip* || die
fi
cd .. || die
distutils-r1_src_test
}
python_test() {
local TEST_DIR
rm -rf "${TMPDIR}"/test
distutils_install_for_testing
cd tests || die
"${PYTHON}" run-tests.py --verbose \
--tmpdir="${TMPDIR}"/test \
--with-hg="${TEST_DIR}"/scripts/hg \
|| die "Tests fail with ${EPYTHON}"
}
pkg_postinst() {
use emacs && elisp-site-regen
elog "If you want to convert repositories from other tools using convert"
elog "extension please install correct tool:"
elog " dev-vcs/cvs"
elog " dev-vcs/darcs"
elog " dev-vcs/git"
elog " dev-vcs/monotone"
elog " dev-vcs/subversion"
}
pkg_postrm() {
use emacs && elisp-site-regen
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>djc@gentoo.org</email>
<name>Dirkjan Ochtman</name>
</maintainer>
<maintainer>
<email>polynomial-c@gentoo.org</email>
<name>Lars Wendler</name>
</maintainer>
<maintainer>
<email>sterkrig@myopera.com</email>
<name>Nikolaj Sjujskij</name>
<description>Fallback maintaner, please CC on bugs</description>
</maintainer>
<use>
<flag name="bugzilla">Support bugzilla integration.</flag>
<flag name="gpg">Support signing with GnuPG.</flag>
<flag name="tk">Install dev-lang/tk for hgk script.</flag>
</use>
</pkgmetadata>