| 1 |
polynomial-c |
1.1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
|
|
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.3.2.ebuild,v 1.1 2012/10/02 08:09:06 djc Exp $ |
| 4 |
|
|
|
| 5 |
|
|
EAPI=3 |
| 6 |
|
|
PYTHON_DEPEND="2" |
| 7 |
|
|
PYTHON_USE_WITH="threads" |
| 8 |
|
|
SUPPORT_PYTHON_ABIS="1" |
| 9 |
|
|
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*" |
| 10 |
|
|
|
| 11 |
|
|
inherit bash-completion-r1 elisp-common eutils distutils |
| 12 |
|
|
|
| 13 |
|
|
DESCRIPTION="Scalable distributed SCM" |
| 14 |
|
|
HOMEPAGE="http://mercurial.selenic.com/" |
| 15 |
|
|
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz" |
| 16 |
|
|
|
| 17 |
|
|
LICENSE="GPL-2" |
| 18 |
|
|
SLOT="0" |
| 19 |
|
|
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" |
| 20 |
|
|
IUSE="bugzilla emacs gpg test tk zsh-completion" |
| 21 |
|
|
|
| 22 |
|
|
RDEPEND="bugzilla? ( dev-python/mysql-python ) |
| 23 |
|
|
gpg? ( app-crypt/gnupg ) |
| 24 |
|
|
tk? ( dev-lang/tk ) |
| 25 |
|
|
zsh-completion? ( app-shells/zsh )" |
| 26 |
|
|
DEPEND="emacs? ( virtual/emacs ) |
| 27 |
|
|
test? ( app-arch/unzip |
| 28 |
|
|
dev-python/pygments )" |
| 29 |
|
|
|
| 30 |
|
|
PYTHON_CFLAGS=( |
| 31 |
|
|
"2.* + -fno-strict-aliasing" |
| 32 |
|
|
"* - -ftracer -ftree-vectorize" |
| 33 |
|
|
) |
| 34 |
|
|
|
| 35 |
|
|
PYTHON_MODNAME="${PN} hgext" |
| 36 |
|
|
SITEFILE="70${PN}-gentoo.el" |
| 37 |
|
|
|
| 38 |
|
|
src_prepare() { |
| 39 |
|
|
distutils_src_prepare |
| 40 |
|
|
|
| 41 |
|
|
# fix up logic that won't work in Gentoo Prefix (also won't outside in |
| 42 |
|
|
# certain cases), bug #362891 |
| 43 |
|
|
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die |
| 44 |
|
|
} |
| 45 |
|
|
|
| 46 |
|
|
src_compile() { |
| 47 |
|
|
distutils_src_compile |
| 48 |
|
|
|
| 49 |
|
|
if use emacs; then |
| 50 |
|
|
cd "${S}"/contrib || die |
| 51 |
|
|
elisp-compile mercurial.el || die "elisp-compile failed!" |
| 52 |
|
|
fi |
| 53 |
|
|
|
| 54 |
|
|
rm -rf contrib/{win32,macosx} || die |
| 55 |
|
|
} |
| 56 |
|
|
|
| 57 |
|
|
src_install() { |
| 58 |
|
|
distutils_src_install |
| 59 |
|
|
|
| 60 |
|
|
newbashcomp contrib/bash_completion ${PN} || die |
| 61 |
|
|
|
| 62 |
|
|
if use zsh-completion ; then |
| 63 |
|
|
insinto /usr/share/zsh/site-functions |
| 64 |
|
|
newins contrib/zsh_completion _hg || die |
| 65 |
|
|
fi |
| 66 |
|
|
|
| 67 |
|
|
rm -f doc/*.?.txt || die |
| 68 |
|
|
dodoc CONTRIBUTORS PKG-INFO README doc/*.txt || die |
| 69 |
|
|
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die |
| 70 |
|
|
|
| 71 |
|
|
dobin hgeditor || die |
| 72 |
|
|
dobin contrib/hgk || die |
| 73 |
|
|
dobin contrib/hg-ssh || die |
| 74 |
|
|
|
| 75 |
|
|
rm -f contrib/hgk contrib/hg-ssh || die |
| 76 |
|
|
|
| 77 |
|
|
rm -f contrib/bash_completion || die |
| 78 |
|
|
cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die |
| 79 |
|
|
doman doc/*.? || die |
| 80 |
|
|
|
| 81 |
|
|
cat > "${T}/80mercurial" <<-EOF |
| 82 |
|
|
HG="${EPREFIX}/usr/bin/hg" |
| 83 |
|
|
EOF |
| 84 |
|
|
doenvd "${T}/80mercurial" || die |
| 85 |
|
|
|
| 86 |
|
|
if use emacs; then |
| 87 |
|
|
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!" |
| 88 |
|
|
elisp-site-file-install "${FILESDIR}"/${SITEFILE} |
| 89 |
|
|
fi |
| 90 |
|
|
} |
| 91 |
|
|
|
| 92 |
|
|
src_test() { |
| 93 |
|
|
cd "${S}/tests/" || die |
| 94 |
|
|
rm -rf *svn* || die # Subversion tests fail with 1.5 |
| 95 |
|
|
rm -f test-archive || die # Fails due to verbose tar output changes |
| 96 |
|
|
rm -f test-convert-baz* || die # GNU Arch baz |
| 97 |
|
|
rm -f test-convert-cvs* || die # CVS |
| 98 |
|
|
rm -f test-convert-darcs* || die # Darcs |
| 99 |
|
|
rm -f test-convert-git* || die # git |
| 100 |
|
|
rm -f test-convert-mtn* || die # monotone |
| 101 |
|
|
rm -f test-convert-tla* || die # GNU Arch tla |
| 102 |
|
|
rm -f test-doctest* || die # doctest always fails with python 2.5.x |
| 103 |
|
|
if [[ ${EUID} -eq 0 ]]; then |
| 104 |
|
|
einfo "Removing tests which require user privileges to succeed" |
| 105 |
|
|
rm -f test-command-template || die # Test is broken when run as root |
| 106 |
|
|
rm -f test-convert || die # Test is broken when run as root |
| 107 |
|
|
rm -f test-lock-badness || die # Test is broken when run as root |
| 108 |
|
|
rm -f test-permissions || die # Test is broken when run as root |
| 109 |
|
|
rm -f test-pull-permission || die # Test is broken when run as root |
| 110 |
|
|
rm -f test-clone-failure || die |
| 111 |
|
|
rm -f test-journal-exists || die |
| 112 |
|
|
rm -f test-repair-strip || die |
| 113 |
|
|
fi |
| 114 |
|
|
|
| 115 |
|
|
testing() { |
| 116 |
|
|
local testdir="${T}/tests-${PYTHON_ABI}" |
| 117 |
|
|
rm -rf "${testdir}" || die |
| 118 |
|
|
"$(PYTHON)" run-tests.py --tmpdir="${testdir}" |
| 119 |
|
|
} |
| 120 |
|
|
python_execute_function testing |
| 121 |
|
|
} |
| 122 |
|
|
|
| 123 |
|
|
pkg_postinst() { |
| 124 |
|
|
distutils_pkg_postinst |
| 125 |
|
|
use emacs && elisp-site-regen |
| 126 |
|
|
|
| 127 |
|
|
elog "If you want to convert repositories from other tools using convert" |
| 128 |
|
|
elog "extension please install correct tool:" |
| 129 |
|
|
elog " dev-vcs/cvs" |
| 130 |
|
|
elog " dev-vcs/darcs" |
| 131 |
|
|
elog " dev-vcs/git" |
| 132 |
|
|
elog " dev-vcs/monotone" |
| 133 |
|
|
elog " dev-vcs/subversion" |
| 134 |
|
|
} |
| 135 |
|
|
|
| 136 |
|
|
pkg_postrm() { |
| 137 |
|
|
distutils_pkg_postrm |
| 138 |
|
|
use emacs && elisp-site-regen |
| 139 |
|
|
} |