Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/git/
Date: Tue, 29 Mar 2016 07:39:43
Message-Id: 1459237172.42151501b7e9fbcf18d7a99b6d685a7ab3964599.polynomial-c@gentoo
1 commit: 42151501b7e9fbcf18d7a99b6d685a7ab3964599
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 29 07:39:17 2016 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 29 07:39:32 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42151501
7
8 dev-vcs/git: Bump to version 2.8.0
9
10 Package-Manager: portage-2.2.28
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 dev-vcs/git/Manifest | 3 +
14 dev-vcs/git/git-2.8.0.ebuild | 672 +++++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 675 insertions(+)
16
17 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
18 index 7047e3c..c2f62be 100644
19 --- a/dev-vcs/git/Manifest
20 +++ b/dev-vcs/git/Manifest
21 @@ -4,13 +4,16 @@ DIST git-2.6.6.tar.xz 3822260 SHA256 8d53410d60f9c36b0f34c125076634d068c8d812f41
22 DIST git-2.7.3-00-9831e92bfa833ee9c0ce464bbc2f941ae6c2698d-lose-name-path.patch 28198 SHA256 b6bf7d67b9cc4d34550a10933af63b665b136b869dbbe23ad3ece0d463f027f9 SHA512 3fd64b0d6b53d5b08b791195e6edc162db682fc8a1bafc04aab7a7a4e61e2db4b3b84d9f769e0d7756da2739bdd900e30a233c228706c39817e42e309c36684c WHIRLPOOL 7e1d9337d46222ea4ae2164429a6a220adb0f763bdde6722c0f2adf79789e092f5cfb74b932597b8d3971af4fc27dede1fea51b9cb72b44ec8e30bd78bdaaa8d
23 DIST git-2.7.3.tar.xz 3909636 SHA256 89c467912d4740da2b40288f956251f0a1e276e28eecd28a6d776067103629b6 SHA512 f7acbf52d12f39d323bd90a82c7135aa2aacf2661f7087c71b41dbfbec688342e0a2fc061fc0f216848a538a0dbc4fce68e24ea2a26e747f5eb92f763fa5bc72 WHIRLPOOL 5cc261749f91c2e0b0509d2fac1bc7426b3ddcc37e859d4f524838e1dd471071ad430886751933bae57aafc20bdcf3f9a43f4c018cc9c89610134a5203b22447
24 DIST git-2.7.4.tar.xz 3909636 SHA256 dee574defbe05ec7356a0842ddbda51315926f2fa7e39c2539f2c3dcc52e457b SHA512 82a646140834e909bf1748a017e86f37f0711c759fe0a6ad03529beb57c79742cb7bf77c2dba29ccd84fcf3d5f18ad9c85c00f002d3b257be42e058750423da7 WHIRLPOOL 74532038b6ba95a5354f43ebad00a9c159c495d46e7dc1b8a2a59f5a86e149538190d9800144a719dcc00e28cfea1039cd5dbfb67fd5aac5e7d0998d3231bae3
25 +DIST git-2.8.0.tar.xz 3969912 SHA256 9a099a4f1e68c0446800f0c538ce7d5d24bd5b4ee5d559317600cd407a59e74c SHA512 1b1f786d540efc96f89fdb5d6cc85db5ccc36fa03b066093e149ff491c349501806832279c09ed85afe7f248c6f183834b343e28ea8a9117499032569479c5fd WHIRLPOOL 7069717d84e045ca67af2ef79ca19ce447fb0ad3a63e6ba90903e8000213842a5812c673579be698266627f5236c0acc0957110e9b161f2fdf157f5ab1c0ee80
26 DIST git-htmldocs-2.4.11.tar.xz 997132 SHA256 2764af41b319f4d11b29832de4bd05392f2887d9a1d3c56c864fb081920eac97 SHA512 d5d2abae9cc303fe8ebeb72ae7078d44db94610d549ca03afffcbbef8b611efda662677423d9ff97a0c7a2384bbd4c3468b01a2ecd7b68f4fdc89e62ad688eb4 WHIRLPOOL 66cd4fc754be7c103ca58a030d4799ba988792419a426e85a39805172e6329ec617b3561696dc74be36801cca0b17a26102a194a1a58d6c7b9ee1ab17752c4a6
27 DIST git-htmldocs-2.5.5.tar.xz 1010216 SHA256 15de2f234cf419496399f7ad396709544d62537488a8e5200e6e34b0f1a685e7 SHA512 265ddf3835352f85eb2e2ee983eb8aaf37bc7b151968866bdb8b9bb6782cdb72dbd1fefe5d7f694a6825954d49bcf4c799e8bcb4e3b25e3f228f6f97f041fd9b WHIRLPOOL 90da44c0bdb6f9ff428d1673289e612936ed5f26110cd13d155c8cbef8433b13bd8b15cea88f967224a699e4c3a6ac41d70b67be1b25c4d35989879626eb10ad
28 DIST git-htmldocs-2.6.6.tar.xz 1021856 SHA256 897fb0bc7e2eb67a4b582c963f337fda3a6ad2b23bca55e27f23f7d15bad7c5d SHA512 85dcd8514e1ba2cb591512a0003aedf25eafbf185ba1eed01f8adfd9eb467d29b17108e6b087183004004ab17301316d403cd6762619ac2a030a565ea5c776b3 WHIRLPOOL 3cd964f1d0164db98e97e0097813a620911adadd9c50837e23a5ca79eb0f2d988aa68317b5b79fa7b052900564657c36d050e75841a1018d5ff12e1299c01dc6
29 DIST git-htmldocs-2.7.3.tar.xz 1031848 SHA256 f71f5e8e1a6103e83ea794f367bc419a1d14ba0f79ebacdc81b3b9430714adea SHA512 50de5d9d3c0f6d874a6a4bc3b247a1795b1bcf154a276b546f88c3b5f5fb2eb27212d207a4bb50c04cba36d8537853afd25816addfb87c9a50e18528d93586fe WHIRLPOOL 057d9bebfe51c29a0a7f689baa9873cb6a54feb1d2869c541396902b160379c9220c5de79a4cb59c6e804e5c7557c0fd141b89621b97d3b495dc6e0a77c67a9f
30 DIST git-htmldocs-2.7.4.tar.xz 1032428 SHA256 3fae21e2e68104621ea1405be73192b46bf3ef29bbc248a81b1e7e6fcf5acfad SHA512 f05b7b8a4dd4abe23f7e51982e9c33026aa31610ac8640028aeae6b310b70b764aee9a81fa702ed0712ccf1b7ad897e06163eb5c5246c14f6cce7c5f4e462682 WHIRLPOOL 87fc486d182a4b72fd906105fefcc53b722c4ae6832b290cd6f759ac1eca7ebfbbe7c0e72c1d7b5ef3581d19d7576f1d0387d6e5b0a33d960d57f59ee61a7869
31 +DIST git-htmldocs-2.8.0.tar.xz 1038900 SHA256 515bee47dbb1f1c345eae394e14f82009865529aaf0c201301defee32512a7c6 SHA512 a3c8f474e049260e175edbb85a8ad8c7e44a6bdf56f143ad7c3c62ba23f56a43234fd0dc89b5ff031a17ee48884af27e5bd857f22835e5d076a4b410467cc4c1 WHIRLPOOL 5c7f88ce2aa44ed4f5bb0c78d8fef99f4c9987660e057b53df53427ac482b23c75b240468693cdf3b1b7b92e3481a6d4681ab10c1b8ed45c8cd28eef20565fda
32 DIST git-manpages-2.4.11.tar.xz 373956 SHA256 0a1fff7650e635339f92985a47198f5f6664eda1c233c3cf48e92f22c3735db2 SHA512 78226baf1c8be28c456a84b06f403af9b918cd3e46218917cce18b3b9ce494600bf00014b818ca0dff9f675aca8b17cd9f7893c7063e218d719a9567e81d9040 WHIRLPOOL f8883ca7d327c378937f62287cbb515b5271cb8aeda18d32135f1c7ea71c9f39282fe55b191476f046de4815a994e4f6f98696d9353f0bfcca7994101398786c
33 DIST git-manpages-2.5.5.tar.xz 378304 SHA256 41b66002436add0781618764c3f0c8222bac7d8a636f1d7e2994480b22369930 SHA512 bebcc04fa54080316d01f1bd1ba7b91a1712e6c6a6f95306d9f079cf5858cf0fb2ccea24c606153e9adb99e956c5dbae5a5c7a7a0ed8c643efdf5a5db599cda1 WHIRLPOOL e72873d3f1a404a311e643d89cf65996d884e794e468417272cdda494ef621f0ebf875faa17433e443fcece54608c59a3c094372101bf4342fadcf8395dabce8
34 DIST git-manpages-2.6.6.tar.xz 381588 SHA256 0f64c1db015e3c74e56eef646a9fdd456cf043cae54714f404ad9b35ddb537a0 SHA512 bd8573f58bd988f78978041b88643e6d0af99ae0df4be6ec80db7de6e042970a23d9a153e84ddb8ffc538724b1482ff6dac7594462e28073067f54d040fdddfd WHIRLPOOL 3e8af6df1b96e3211c5799ace846dab331f30c1133c1d093e344b4576d8f588631e29187909b600112a9f7b42a0de63f56cec953e0d162cc49c2b6efeef0db53
35 DIST git-manpages-2.7.3.tar.xz 384544 SHA256 9f088427c61a9e0a840007c7f50fc6f7caba36ac8c403460c49210983090496d SHA512 883441df049bfaf0f22cf9d17041125dc9c8f0e7d94efa7a4188a68c2242d1b4c3d34fd3bd3ecdd2af905ee2f8fb5fefd0ce6328dd76c665f7ec20e3b9c87d1b WHIRLPOOL 7ee013444665366ecb8f3df507a3c5af8a9f48d3185783a94db827b192c32ac6998157eb42bcbfe397f96d452451b2416c32e2dffbabc71062422e7c5e25c184
36 DIST git-manpages-2.7.4.tar.xz 384460 SHA256 d04fd81ab8aa32efbe54acd27ab5c88ef4ab615313e4cdfa793dd0065899ce25 SHA512 1af6f0d9fc3945a5a215092caabd0963f3eaa35c5f3b0270861b625bf7bd88e4fdea9b3e50ce1b10c79a12ee2b06b203fab4aa9d566560535c1decf7b2d987cd WHIRLPOOL 38306b6e198336dd3c75a9fd032b636e0e43a3b75eba2746d2d42c3752cf7405b1f8572199748509974d68bfc77c74fbea52626884f9b509d8b593cefce4aad5
37 +DIST git-manpages-2.8.0.tar.xz 386684 SHA256 2945558be9e16de71a67f00fe3f6bdd8ca24977389a86ef9a077ce73612fb353 SHA512 67a0ddc1a8cec0d835f0889467315523020bb75460cffba39883528833b4e714496950738898c79d156a821db78d16bd76dff0bc7aa5eab8a0217862aa2672e8 WHIRLPOOL 23b172c736264086f27e93e6b7fc4c02941cce30b1936deaaa94a4bc9b0bdcc3d798986da564e6f2067f059b193ef97a62970563c4227005d1cfb99d9d5d1a60
38
39 diff --git a/dev-vcs/git/git-2.8.0.ebuild b/dev-vcs/git/git-2.8.0.ebuild
40 new file mode 100644
41 index 0000000..d8bf7cd
42 --- /dev/null
43 +++ b/dev-vcs/git/git-2.8.0.ebuild
44 @@ -0,0 +1,672 @@
45 +# Copyright 1999-2016 Gentoo Foundation
46 +# Distributed under the terms of the GNU General Public License v2
47 +# $Id$
48 +
49 +EAPI=6
50 +
51 +GENTOO_DEPEND_ON_PERL=no
52 +
53 +# bug #329479: git-remote-testgit is not multiple-version aware
54 +PYTHON_COMPAT=( python2_7 )
55 +[[ ${PV} == *9999 ]] && SCM="git-2"
56 +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
57 +EGIT_MASTER=pu
58 +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN"
59 +
60 +inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
61 +
62 +MY_PV="${PV/_rc/.rc}"
63 +MY_P="${PN}-${MY_PV}"
64 +
65 +DOC_VER=${MY_PV}
66 +
67 +DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
68 +HOMEPAGE="http://www.git-scm.com/"
69 +if [[ ${PV} != *9999 ]]; then
70 + SRC_URI_SUFFIX="xz"
71 + SRC_URI_GOOG="https://git-core.googlecode.com/files"
72 + SRC_URI_KORG="mirror://kernel/software/scm/git"
73 + SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
74 + ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
75 + ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
76 + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
77 + doc? (
78 + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
79 + ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
80 + )"
81 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
82 +fi
83 +
84 +LICENSE="GPL-2"
85 +SLOT="0"
86 +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
87 +
88 +# Common to both DEPEND and RDEPEND
89 +CDEPEND="
90 + !libressl? ( dev-libs/openssl:0= )
91 + libressl? ( dev-libs/libressl:= )
92 + sys-libs/zlib
93 + pcre? ( dev-libs/libpcre )
94 + perl? ( dev-lang/perl:=[-build(-)] )
95 + tk? ( dev-lang/tk:0= )
96 + curl? (
97 + net-misc/curl
98 + webdav? ( dev-libs/expat )
99 + )
100 + emacs? ( virtual/emacs )
101 + gnome-keyring? ( gnome-base/libgnome-keyring )"
102 +
103 +RDEPEND="${CDEPEND}
104 + gpg? ( app-crypt/gnupg )
105 + mediawiki? (
106 + dev-perl/DateTime-Format-ISO8601
107 + dev-perl/HTML-Tree
108 + dev-perl/MediaWiki-API
109 + )
110 + perl? ( dev-perl/Error
111 + dev-perl/Net-SMTP-SSL
112 + dev-perl/Authen-SASL
113 + cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
114 + cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
115 + subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
116 + )
117 + python? ( gtk?
118 + (
119 + >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
120 + >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
121 + )
122 + ${PYTHON_DEPS} )"
123 +
124 +# This is how info docs are created with Git:
125 +# .txt/asciidoc --(asciidoc)---------> .xml/docbook
126 +# .xml/docbook --(docbook2texi.pl)--> .texi
127 +# .texi --(makeinfo)---------> .info
128 +DEPEND="${CDEPEND}
129 + doc? (
130 + app-text/asciidoc
131 + app-text/docbook2X
132 + sys-apps/texinfo
133 + app-text/xmlto
134 + )
135 + nls? ( sys-devel/gettext )
136 + test? ( app-crypt/gnupg )"
137 +
138 +# Live ebuild builds man pages and HTML docs, additionally
139 +if [[ ${PV} == *9999 ]]; then
140 + DEPEND="${DEPEND}
141 + app-text/asciidoc"
142 +fi
143 +
144 +SITEFILE=50${PN}-gentoo.el
145 +S="${WORKDIR}/${MY_P}"
146 +
147 +REQUIRED_USE="
148 + cgi? ( perl )
149 + cvs? ( perl )
150 + mediawiki? ( perl )
151 + mediawiki-experimental? ( mediawiki )
152 + subversion? ( perl )
153 + webdav? ( curl )
154 + gtk? ( python )
155 + python? ( ${PYTHON_REQUIRED_USE} )
156 +"
157 +
158 +PATCHES=(
159 + # bug #350330 - automagic CVS when we don't want it is bad.
160 + "${FILESDIR}"/git-2.2.2-optional-cvs.patch
161 +
162 + # install mediawiki perl modules also in vendor_dir
163 + # hack, needs better upstream solution
164 + "${FILESDIR}"/git-1.8.5-mw-vendor.patch
165 +
166 + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
167 +
168 + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc.
169 + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch
170 +)
171 +
172 +pkg_setup() {
173 + if use subversion && has_version "dev-vcs/subversion[dso]"; then
174 + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
175 + ewarn "with USE=dso, there may be weird crashes in git-svn. You"
176 + ewarn "have been warned."
177 + fi
178 + if use python ; then
179 + python-single-r1_pkg_setup
180 + fi
181 +}
182 +
183 +# This is needed because for some obscure reasons future calls to make don't
184 +# pick up these exports if we export them in src_unpack()
185 +exportmakeopts() {
186 + local myopts
187 +
188 + if use blksha1 ; then
189 + myopts+=" BLK_SHA1=YesPlease"
190 + elif use ppcsha1 ; then
191 + myopts+=" PPC_SHA1=YesPlease"
192 + fi
193 +
194 + if use curl ; then
195 + use webdav || myopts+=" NO_EXPAT=YesPlease"
196 + else
197 + myopts+=" NO_CURL=YesPlease"
198 + fi
199 +
200 + # broken assumptions, because of broken build system ...
201 + myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
202 + myopts+=" INSTALL=install TAR=tar"
203 + myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
204 + myopts+=" SANE_TOOL_PATH="
205 + myopts+=" OLD_ICONV="
206 + myopts+=" NO_EXTERNAL_GREP="
207 +
208 + # For svn-fe
209 + extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
210 +
211 + # can't define this to null, since the entire makefile depends on it
212 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
213 +
214 + use iconv \
215 + || myopts+=" NO_ICONV=YesPlease"
216 + use nls \
217 + || myopts+=" NO_GETTEXT=YesPlease"
218 + use tk \
219 + || myopts+=" NO_TCLTK=YesPlease"
220 + use pcre \
221 + && myopts+=" USE_LIBPCRE=yes" \
222 + && extlibs+=" -lpcre"
223 + use perl \
224 + && myopts+=" INSTALLDIRS=vendor" \
225 + || myopts+=" NO_PERL=YesPlease"
226 + use python \
227 + || myopts+=" NO_PYTHON=YesPlease"
228 + use subversion \
229 + || myopts+=" NO_SVN_TESTS=YesPlease"
230 + use threads \
231 + && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
232 + || myopts+=" NO_PTHREADS=YesPlease"
233 + use cvs \
234 + || myopts+=" NO_CVS=YesPlease"
235 +# Disabled until ~m68k-mint can be keyworded again
236 +# if [[ ${CHOST} == *-mint* ]] ; then
237 +# myopts+=" NO_MMAP=YesPlease"
238 +# myopts+=" NO_IPV6=YesPlease"
239 +# myopts+=" NO_STRLCPY=YesPlease"
240 +# myopts+=" NO_MEMMEM=YesPlease"
241 +# myopts+=" NO_MKDTEMP=YesPlease"
242 +# myopts+=" NO_MKSTEMPS=YesPlease"
243 +# fi
244 + if [[ ${CHOST} == ia64-*-hpux* ]]; then
245 + myopts+=" NO_NSEC=YesPlease"
246 + fi
247 + if [[ ${CHOST} == *-*-aix* ]]; then
248 + myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
249 + fi
250 + if [[ ${CHOST} == *-solaris* ]]; then
251 + myopts+=" NEEDS_LIBICONV=YesPlease"
252 + fi
253 +
254 + has_version '>=app-text/asciidoc-8.0' \
255 + && myopts+=" ASCIIDOC8=YesPlease"
256 + myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
257 +
258 + # Bug 290465:
259 + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
260 + [[ "${CHOST}" == *-uclibc* ]] && \
261 + myopts+=" NO_NSEC=YesPlease"
262 +
263 + export MY_MAKEOPTS="${myopts}"
264 + export EXTLIBS="${extlibs}"
265 +}
266 +
267 +src_unpack() {
268 + if [[ ${PV} != *9999 ]]; then
269 + unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
270 + cd "${S}"
271 + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
272 + use doc && \
273 + cd "${S}"/Documentation && \
274 + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
275 + cd "${S}"
276 + else
277 + git-2_src_unpack
278 + cd "${S}"
279 + #cp "${FILESDIR}"/GIT-VERSION-GEN .
280 + fi
281 +
282 +}
283 +
284 +src_prepare() {
285 + # add experimental patches to improve mediawiki support
286 + # see patches for origin
287 + if use mediawiki-experimental ; then
288 + PATCHES+=(
289 + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
290 + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
291 + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
292 + )
293 + fi
294 +
295 + default
296 +
297 + sed -i \
298 + -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
299 + -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
300 + -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
301 + -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
302 + -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
303 + -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
304 + Makefile contrib/svn-fe/Makefile || die "sed failed"
305 +
306 + # Never install the private copy of Error.pm (bug #296310)
307 + sed -i \
308 + -e '/private-Error.pm/s,^,#,' \
309 + perl/Makefile.PL
310 +
311 + # Fix docbook2texi command
312 + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
313 + Documentation/Makefile || die "sed failed"
314 +
315 + # Fix git-subtree missing DESTDIR
316 + sed -i \
317 + -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
318 + -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
319 + contrib/subtree/Makefile
320 +}
321 +
322 +git_emake() {
323 + # bug #326625: PERL_PATH, PERL_MM_OPT
324 + # bug #320647: PYTHON_PATH
325 + PYTHON_PATH=""
326 + use python && PYTHON_PATH="${PYTHON}"
327 + emake ${MY_MAKEOPTS} \
328 + DESTDIR="${D}" \
329 + OPTCFLAGS="${CFLAGS}" \
330 + OPTLDFLAGS="${LDFLAGS}" \
331 + OPTCC="$(tc-getCC)" \
332 + OPTAR="$(tc-getAR)" \
333 + prefix="${EPREFIX}"/usr \
334 + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
335 + sysconfdir="${EPREFIX}"/etc \
336 + PYTHON_PATH="${PYTHON_PATH}" \
337 + PERL_MM_OPT="" \
338 + GIT_TEST_OPTS="--no-color" \
339 + V=1 \
340 + "$@"
341 + # This is the fix for bug #326625, but it also causes breakage, see bug
342 + # #352693.
343 + # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
344 +}
345 +
346 +src_configure() {
347 + exportmakeopts
348 +}
349 +
350 +src_compile() {
351 + if use perl ; then
352 + git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
353 + git_emake perl/perl.mak || die "emake perl/perl.mak failed"
354 + fi
355 + git_emake || die "emake failed"
356 +
357 + if use emacs ; then
358 + elisp-compile contrib/emacs/git{,-blame}.el
359 + fi
360 +
361 + if use perl && use cgi ; then
362 + git_emake \
363 + gitweb \
364 + || die "emake gitweb (cgi) failed"
365 + fi
366 +
367 + if [[ ${CHOST} == *-darwin* ]]; then
368 + cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
369 + git_emake || die "emake credential-osxkeychain"
370 + fi
371 +
372 + cd "${S}"/Documentation
373 + if [[ ${PV} == *9999 ]] ; then
374 + git_emake man \
375 + || die "emake man failed"
376 + if use doc ; then
377 + git_emake info html \
378 + || die "emake info html failed"
379 + fi
380 + else
381 + if use doc ; then
382 + git_emake info \
383 + || die "emake info html failed"
384 + fi
385 + fi
386 +
387 + if use subversion ; then
388 + cd "${S}"/contrib/svn-fe
389 + # by defining EXTLIBS we override the detection for libintl and
390 + # libiconv, bug #516168
391 + local nlsiconv=
392 + use nls && use !elibc_glibc && nlsiconv+=" -lintl"
393 + use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
394 + git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
395 + if use doc ; then
396 + git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
397 + fi
398 + cd "${S}"
399 + fi
400 +
401 + if use gnome-keyring ; then
402 + cd "${S}"/contrib/credential/gnome-keyring
403 + git_emake || die "emake git-credential-gnome-keyring failed"
404 + fi
405 +
406 + cd "${S}"/contrib/subtree
407 + git_emake
408 + use doc && git_emake doc
409 +
410 + if use mediawiki ; then
411 + cd "${S}"/contrib/mw-to-git
412 + git_emake
413 + fi
414 +}
415 +
416 +src_install() {
417 + git_emake \
418 + install || \
419 + die "make install failed"
420 +
421 + if [[ ${CHOST} == *-darwin* ]]; then
422 + dobin contrib/credential/osxkeychain/git-credential-osxkeychain
423 + fi
424 +
425 + # Depending on the tarball and manual rebuild of the documentation, the
426 + # manpages may exist in either OR both of these directories.
427 + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
428 + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
429 + dodoc README.md Documentation/{SubmittingPatches,CodingGuidelines}
430 + use doc && dodir /usr/share/doc/${PF}/html
431 + for d in / /howto/ /technical/ ; do
432 + docinto ${d}
433 + dodoc Documentation${d}*.txt
434 + if use doc ; then
435 + docinto ${d}/html
436 + dodoc Documentation${d}*.html
437 + fi
438 + done
439 + docinto /
440 + # Upstream does not ship this pre-built :-(
441 + use doc && doinfo Documentation/{git,gitman}.info
442 +
443 + newbashcomp contrib/completion/git-completion.bash ${PN}
444 + bashcomp_alias git gitk
445 + # Not really a bash-completion file (bug #477920)
446 + # but still needed uncompressed (bug #507480)
447 + insinto /usr/share/${PN}
448 + doins contrib/completion/git-prompt.sh
449 +
450 + if use emacs ; then
451 + elisp-install ${PN} contrib/emacs/git.{el,elc}
452 + elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
453 + #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
454 + # don't add automatically to the load-path, so the sitefile
455 + # can do a conditional loading
456 + touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
457 + elisp-site-file-install "${FILESDIR}"/${SITEFILE}
458 + fi
459 +
460 + if use python && use gtk ; then
461 + python_doscript "${S}"/contrib/gitview/gitview
462 + dodoc "${S}"/contrib/gitview/gitview.txt
463 + fi
464 +
465 + #dobin contrib/fast-import/git-p4 # Moved upstream
466 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
467 + newbin contrib/fast-import/import-tars.perl import-tars
468 + exeinto /usr/libexec/git-core/
469 + newexe contrib/git-resurrect.sh git-resurrect
470 +
471 + # git-subtree
472 + cd "${S}"/contrib/subtree
473 + git_emake install || die "Failed to emake install git-subtree"
474 + if use doc ; then
475 + git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
476 + fi
477 + newdoc README README.git-subtree
478 + dodoc git-subtree.txt
479 + cd "${S}"
480 +
481 + if use mediawiki ; then
482 + cd "${S}"/contrib/mw-to-git
483 + git_emake install
484 + cd "${S}"
485 + fi
486 +
487 + # diff-highlight
488 + dobin contrib/diff-highlight/diff-highlight
489 + newdoc contrib/diff-highlight/README README.diff-highlight
490 +
491 + # git-jump
492 + exeinto /usr/libexec/git-core/
493 + doexe contrib/git-jump/git-jump
494 + newdoc contrib/git-jump/README git-jump.txt
495 +
496 + # git-contacts
497 + exeinto /usr/libexec/git-core/
498 + doexe contrib/contacts/git-contacts
499 + dodoc contrib/contacts/git-contacts.txt
500 +
501 + if use gnome-keyring ; then
502 + cd "${S}"/contrib/credential/gnome-keyring
503 + dobin git-credential-gnome-keyring
504 + fi
505 +
506 + if use subversion ; then
507 + cd "${S}"/contrib/svn-fe
508 + dobin svn-fe
509 + dodoc svn-fe.txt
510 + if use doc ; then
511 + doman svn-fe.1
512 + docinto html
513 + dodoc svn-fe.html
514 + fi
515 + cd "${S}"
516 + fi
517 +
518 + dodir /usr/share/${PN}/contrib
519 + # The following are excluded:
520 + # completion - installed above
521 + # credential/gnome-keyring TODO
522 + # diff-highlight - done above
523 + # emacs - installed above
524 + # examples - these are stuff that is not used in Git anymore actually
525 + # git-jump - done above
526 + # gitview - installed above
527 + # p4import - excluded because fast-import has a better one
528 + # patches - stuff the Git guys made to go upstream to other places
529 + # persistent-https - TODO
530 + # mw-to-git - TODO
531 + # subtree - build seperately
532 + # svnimport - use git-svn
533 + # thunderbird-patch-inline - fixes thunderbird
534 + for i in \
535 + buildsystems convert-objects fast-import \
536 + hg-to-git hooks remotes2config.sh rerere-train.sh \
537 + stats workdir \
538 + ; do
539 + cp -rf \
540 + "${S}"/contrib/${i} \
541 + "${ED}"/usr/share/${PN}/contrib \
542 + || die "Failed contrib ${i}"
543 + done
544 +
545 + if use perl && use cgi ; then
546 + # We used to install in /usr/share/${PN}/gitweb
547 + # but upstream installs in /usr/share/gitweb
548 + # so we will install a symlink and use their location for compat with other
549 + # distros
550 + dosym /usr/share/gitweb /usr/share/${PN}/gitweb
551 +
552 + # INSTALL discusses configuration issues, not just installation
553 + docinto /
554 + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
555 + newdoc "${S}"/gitweb/README README.gitweb
556 +
557 + find "${ED}"/usr/lib64/perl5/ \
558 + -name .packlist \
559 + -exec rm \{\} \;
560 + else
561 + rm -rf "${ED}"/usr/share/gitweb
562 + fi
563 +
564 + if ! use subversion ; then
565 + rm -f "${ED}"/usr/libexec/git-core/git-svn \
566 + "${ED}"/usr/share/man/man1/git-svn.1*
567 + fi
568 +
569 + if use xinetd ; then
570 + insinto /etc/xinetd.d
571 + newins "${FILESDIR}"/git-daemon.xinetd git-daemon
572 + fi
573 +
574 + if use !prefix ; then
575 + newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
576 + newconfd "${FILESDIR}"/git-daemon.confd git-daemon
577 + systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
578 + systemd_dounit "${FILESDIR}/git-daemon.socket"
579 + fi
580 +
581 + perl_delete_localpod
582 +
583 + # Remove disabled linguas
584 + # we could remove sources in src_prepare, but install does not
585 + # handle missing locale dir well
586 + rm_loc() {
587 + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
588 + rm -r "${ED}/usr/share/locale/${1}" || die
589 + fi
590 + }
591 + l10n_for_each_disabled_locale_do rm_loc
592 +}
593 +
594 +src_test() {
595 + local disabled=""
596 + local tests_cvs="t9200-git-cvsexportcommit.sh \
597 + t9400-git-cvsserver-server.sh \
598 + t9401-git-cvsserver-crlf.sh \
599 + t9402-git-cvsserver-refs.sh \
600 + t9600-cvsimport.sh \
601 + t9601-cvsimport-vendor-branch.sh \
602 + t9602-cvsimport-branches-tags.sh \
603 + t9603-cvsimport-patchsets.sh \
604 + t9604-cvsimport-timestamps.sh"
605 + local tests_perl="t3701-add-interactive.sh \
606 + t5502-quickfetch.sh \
607 + t5512-ls-remote.sh \
608 + t5520-pull.sh \
609 + t7106-reset-unborn-branch.sh \
610 + t7501-commit.sh"
611 + # Bug #225601 - t0004 is not suitable for root perm
612 + # Bug #219839 - t1004 is not suitable for root perm
613 + # t0001-init.sh - check for init notices EPERM* fails
614 + local tests_nonroot="t0001-init.sh \
615 + t0004-unwritable.sh \
616 + t0070-fundamental.sh \
617 + t1004-read-tree-m-u-wf.sh \
618 + t3700-add.sh \
619 + t7300-clean.sh"
620 + # t9100 still fails with symlinks in SVN 1.7
621 + local test_svn="t9100-git-svn-basic.sh"
622 +
623 + # Unzip is used only for the testcase code, not by any normal parts of Git.
624 + if ! has_version app-arch/unzip ; then
625 + einfo "Disabling tar-tree tests"
626 + disabled="${disabled} t5000-tar-tree.sh"
627 + fi
628 +
629 + cvs=0
630 + use cvs && let cvs=$cvs+1
631 + if [[ ${EUID} -eq 0 ]]; then
632 + if [[ $cvs -eq 1 ]]; then
633 + ewarn "Skipping CVS tests because CVS does not work as root!"
634 + ewarn "You should retest with FEATURES=userpriv!"
635 + disabled="${disabled} ${tests_cvs}"
636 + fi
637 + einfo "Skipping other tests that require being non-root"
638 + disabled="${disabled} ${tests_nonroot}"
639 + else
640 + [[ $cvs -gt 0 ]] && \
641 + has_version dev-vcs/cvs && \
642 + let cvs=$cvs+1
643 + [[ $cvs -gt 1 ]] && \
644 + has_version "dev-vcs/cvs[server]" && \
645 + let cvs=$cvs+1
646 + if [[ $cvs -lt 3 ]]; then
647 + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
648 + disabled="${disabled} ${tests_cvs}"
649 + fi
650 + fi
651 +
652 + if ! use perl ; then
653 + einfo "Disabling tests that need Perl"
654 + disabled="${disabled} ${tests_perl}"
655 + fi
656 +
657 + einfo "Disabling tests that fail with SVN 1.7"
658 + disabled="${disabled} ${test_svn}"
659 +
660 + # Reset all previously disabled tests
661 + cd "${S}/t"
662 + for i in *.sh.DISABLED ; do
663 + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
664 + done
665 + einfo "Disabled tests:"
666 + for i in ${disabled} ; do
667 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
668 + done
669 +
670 + # Avoid the test system removing the results because we want them ourselves
671 + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
672 + -i "${S}"/t/Makefile
673 +
674 + # Clean old results first, must always run
675 + cd "${S}/t"
676 + nonfatal git_emake clean
677 +
678 + # Now run the tests, keep going if we hit an error, and don't terminate on
679 + # failure
680 + cd "${S}"
681 + einfo "Start test run"
682 + #MAKEOPTS=-j1
683 + nonfatal git_emake --keep-going test
684 + rc=$?
685 +
686 + # Display nice results, now print the results
687 + cd "${S}/t"
688 + nonfatal git_emake aggregate-results
689 +
690 + # And bail if there was a problem
691 + [ $rc -eq 0 ] || die "tests failed. Please file a bug."
692 +}
693 +
694 +showpkgdeps() {
695 + local pkg=$1
696 + shift
697 + elog " $(printf "%-17s:" ${pkg}) ${@}"
698 +}
699 +
700 +pkg_postinst() {
701 + use emacs && elisp-site-regen
702 + einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
703 + einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
704 + einfo "Note that the prompt bash code is now in that separate script"
705 + elog "These additional scripts need some dependencies:"
706 + echo
707 + showpkgdeps git-quiltimport "dev-util/quilt"
708 + showpkgdeps git-instaweb \
709 + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
710 + echo
711 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
712 +}
713 +
714 +pkg_postrm() {
715 + use emacs && elisp-site-regen
716 +}