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