Diff mercurial-4.9.1 with a mercurial-9999

/usr/portage/dev-vcs/mercurial/mercurial-9999.ebuild 2019-04-15 13:09:00.000000000 +0300
1 1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=5
5 5

  
6 6
PYTHON_COMPAT=( python2_7 )
7 7
PYTHON_REQ_USE="threads"
8 8

  
9
inherit bash-completion-r1 elisp-common eutils distutils-r1 flag-o-matic
9
inherit bash-completion-r1 elisp-common eutils distutils-r1 mercurial flag-o-matic
10 10

  
11 11
DESCRIPTION="Scalable distributed SCM"
12 12
HOMEPAGE="https://www.mercurial-scm.org/"
13
SRC_URI="https://www.mercurial-scm.org/release/${P}.tar.gz"
13
EHG_REPO_URI="http://selenic.com/repo/hg"
14
EHG_REVISION="@"
14 15

  
15 16
LICENSE="GPL-2+"
16 17
SLOT="0"
17
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18
IUSE="+chg bugzilla emacs gpg test tk"
18
KEYWORDS=""
19
IUSE="+chg bugzilla emacs gpg test tk zsh-completion"
19 20

  
20
RDEPEND="app-misc/ca-certificates
21
	dev-python/zstandard[${PYTHON_USEDEP}]
22
	bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
21
RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
23 22
	gpg? ( app-crypt/gnupg )
24
	tk? ( dev-lang/tk )"
25

  
23
	tk? ( dev-lang/tk )
24
	zsh-completion? ( app-shells/zsh )
25
	app-misc/ca-certificates"
26 26
DEPEND="emacs? ( virtual/emacs )
27 27
	test? ( app-arch/unzip
28
		dev-python/pygments[${PYTHON_USEDEP}] )"
28
		dev-python/pygments[${PYTHON_USEDEP}] )
29
	dev-python/docutils[${PYTHON_USEDEP}]"
29 30

  
30 31
SITEFILE="70${PN}-gentoo.el"
31 32

  
32 33
# Too many tests fail #608720
33 34
RESTRICT="test"
34 35

  
35
PATCHES=(
36
	"${FILESDIR}/${PN}-3.0.1-po_fixes.patch"
37
	"${FILESDIR}/${PN}-4.8.1-unbundle_zstd.patch"
38
)
39

  
40 36
python_prepare_all() {
41 37
	# fix up logic that won't work in Gentoo Prefix (also won't outside in
42 38
	# certain cases), bug #362891
43 39
	sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
44 40

  
45
	# Don't use bundled zstandard (#666972)
46
	rm -r contrib/python-zstandard || die
47

  
48 41
	distutils-r1_python_prepare_all
49 42
}
50 43

  
......
57 50
}
58 51

  
59 52
python_compile_all() {
60
	rm -r contrib/win32 || die
53
	rm -r contrib/{win32,macosx} || die
54
	emake doc
61 55
	if use chg; then
62 56
		emake -C contrib/chg
63 57
	fi
......
72 66

  
73 67
	newbashcomp contrib/bash_completion hg
74 68

  
75
	insinto /usr/share/zsh/site-functions
76
	newins contrib/zsh_completion _hg
69
	if use zsh-completion ; then
70
		insinto /usr/share/zsh/site-functions
71
		newins contrib/zsh_completion _hg
72
	fi
77 73

  
78
	rm -f doc/*.?.txt
79
	dodoc CONTRIBUTORS
74
	rm -f doc/*.?.txt || die
75
	dodoc CONTRIBUTORS doc/*.txt
80 76
	cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
81 77

  
82 78
	dobin hgeditor
......
88 84
		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
89 85
	fi
90 86

  
91
	local RM_CONTRIB=( hgk hg-ssh bash_completion zsh_completion wix plan9 *.el )
87
	local RM_CONTRIB=(hgk hg-ssh bash_completion zsh_completion wix buildrpm plan9
88
	                  *.el mercurial.spec)
92 89

  
93 90
	if use chg; then
94 91
		dobin contrib/chg/chg
......
97 94
	fi
98 95

  
99 96
	for f in ${RM_CONTRIB[@]}; do
100
		rm -r contrib/${f} || die
97
		rm -rf contrib/$f || die
101 98
	done
102 99

  
103 100
	dodoc -r contrib
104 101
	docompress -x /usr/share/doc/${PF}/contrib
105 102
	doman doc/*.?
106 103

  
104
	cat > "${T}/80mercurial" <<-EOF
105
HG="${EPREFIX}/usr/bin/hg"
106
EOF
107
	doenvd "${T}/80mercurial"
108

  
107 109
	insinto /etc/mercurial/hgrc.d
108 110
	doins "${FILESDIR}/cacerts.rc"
109

  
110
	# symlink to system zstd
111
	local sitedir=$(python_get_sitedir)
112
	dosym ../zstd.so "${sitedir#${EPREFIX}}"/${PN}/zstd.so
113 111
}
114 112

  
115 113
src_test() {
116
	pushd tests &>/dev/null || die
117
	rm -rf *svn*			# Subversion tests fail with 1.5
118
	rm -f test-archive*		# Fails due to verbose tar output changes
119
	rm -f test-convert-baz*		# GNU Arch baz
120
	rm -f test-convert-cvs*		# CVS
121
	rm -f test-convert-darcs*	# Darcs
122
	rm -f test-convert-git*		# git
123
	rm -f test-convert-mtn*		# monotone
124
	rm -f test-convert-tla*		# GNU Arch tla
125
	#rm -f test-doctest*		# doctest always fails with python 2.5.x
126
	rm -f test-largefiles*		# tends to time out
114
	cd tests || die
115
	rm -rf *svn* || die					# Subversion tests fail with 1.5
116
	rm -f test-archive* || die			# Fails due to verbose tar output changes
117
	rm -f test-convert-baz* || die		# GNU Arch baz
118
	rm -f test-convert-cvs* || die		# CVS
119
	rm -f test-convert-darcs* || die	# Darcs
120
	rm -f test-convert-git* || die		# git
121
	rm -f test-convert-mtn* || die		# monotone
122
	rm -f test-convert-tla* || die		# GNU Arch tla
123
	rm -f test-doctest* || die			# doctest always fails with python 2.5.x
124
	rm -f test-largefiles* || die		# tends to time out
125
	if [[ ${EUID} -eq 0 ]]; then
126
		einfo "Removing tests which require user privileges to succeed"
127
		rm -f test-command-template* || die	# Test is broken when run as root
128
		rm -f test-convert* || die			# Test is broken when run as root
129
		rm -f test-lock-badness* || die		# Test is broken when run as root
130
		rm -f test-permissions* || die		# Test is broken when run as root
131
		rm -f test-pull-permission* || die	# Test is broken when run as root
132
		rm -f test-clone-failure* || die
133
		rm -f test-journal-exists* || die
134
		rm -f test-repair-strip* || die
135
	fi
127 136

  
128
	popd &>/dev/null || die
137
	cd .. || die
129 138
	distutils-r1_src_test
130 139
}
131 140

  
Thank you!