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: Mon, 27 Mar 2017 06:28:05
Message-Id: 1490596040.d277870564bfdc5f0bffaaa4ad92804e75fdac91.polynomial-c@gentoo
1 commit: d277870564bfdc5f0bffaaa4ad92804e75fdac91
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 27 06:27:20 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 27 06:27:20 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2778705
7
8 dev-vcs/git: Bump to version 2.12.2
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 dev-vcs/git/Manifest | 3 +
13 dev-vcs/git/git-2.12.2.ebuild | 676 ++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 679 insertions(+)
15
16 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
17 index b473e615a89..04cb8eaa33a 100644
18 --- a/dev-vcs/git/Manifest
19 +++ b/dev-vcs/git/Manifest
20 @@ -2,11 +2,14 @@ DIST git-2.10.2.tar.xz 4106108 SHA256 94802903dd707d85ca3b9a2be35e936a54ce86375f
21 DIST git-2.11.1.tar.xz 4208132 SHA256 c0a779cae325d48a1d5ba08b6ee1febcc31d0657a6da01fd1dec1c6e10976415 SHA512 c9d4196ad9c4f656b5a25fe688c06248bfce4fadac38e9bc835e5e9063ab95e3d4b3db4174acea0b3b64c5455adc93d39870f2b6009d2dd6aa0edb5a5f5bda40 WHIRLPOOL c91d7d096348cacd5a691d12406acb98d7fd703ac06e4d4fc31d85eead29c87860a96d43df06c1e3610837b4eb34adccb5b7b259531e064d495347fd2b14914e
22 DIST git-2.12.0.tar.xz 4269944 SHA256 1821766479062d052cc1897d0ded95212e81e5c7f1039786bc4aec2225a32027 SHA512 8696de600f6800748096de9ccb54a0ba59a9128617fc6c9a5bc48857798a775209b99ad484aef777d5d6b5c3ac172e5e5071740d073e0ac8d52c54561a9bed0b WHIRLPOOL 58b31af59bd63ee0bed3c65815822eb86cee515d5ca34ee83e7d4096b2b199259933c8051abc27bd978cbc7c3d669503bc6b491a82dd696ee7d8b567b003755a
23 DIST git-2.12.1.tar.xz 4271828 SHA256 db11674364b764e101966d829a2e271c9b9d2a8bd4d8ecb4221a1dcdc9a3ada2 SHA512 4f7203782f018e74c7ff273bb4290887524d67f34e794b26ef8f2d4cb98e57d6c95e29e2da7dd92a626228aad3d02befed9a0b5c9f97f43fe1ba52dad6ff5adb WHIRLPOOL be2d67d925c05bb50b610b4e5eed24b317e95400d0ed3d0c362116da2a2e5c768b7973d66e57cab6cd1e96da00a4f6e526d0d71dcc1b03e7c7195da7ae53c58e
24 +DIST git-2.12.2.tar.xz 4273748 SHA256 d21a9e23506e618d561fb25a8a7bd6134f927b86147930103487117a7a678c4a SHA512 0e980ea6932b43c87892c0628d23bce62dc8fa8be3510e6e8bbd14605526e3b13c8a32ea9fbe8a74c286c4fe0e1fa34e85922edf743a9405a31d5657804b4b8d WHIRLPOOL 45b60d67aa930f1e298ef9b02d95b8cfe7caa806716ba3bbfdb3a0b7736dc16631e1888d50844d5dba8ffe4c7a4216006edd32f1ddda0ed0f770472befa6bb8c
25 DIST git-htmldocs-2.10.2.tar.xz 1068436 SHA256 dd43111c3518a92a7fe64ac5cd32a5d4d77d49c67f7d89dce3e8293bc3d6b491 SHA512 8ef57218d7eef285ac427414d92bd5e8eba5c85c2a2a9ec0e423705ee2cb6f26dd33ad780d1b4237e7534dbe5cc3b4d8eea5780d0acc49066d78fc1893df2525 WHIRLPOOL 160fe3446d959d0f2315c9b2be182925619a4d89343602038e92283abdb393805eb5252799c502b83641d9e23a157332033baaa1ef2f1d9401cbbf372d8e86d7
26 DIST git-htmldocs-2.11.1.tar.xz 1083264 SHA256 1a5f1e4a5eadad89b0783efa08bb1f7e3802d4a4d0a135bf5f61fd672ea3846e SHA512 dee37cfa0870f7289c66c3c58bb86d01324bfd30f4d4a05dedebef98ddb38339c7937bb2caee0e1d35ef579de414e5f280d5fd9f48fb427f497fe2f7d62f7d2a WHIRLPOOL 0ec4856405dbbc89547ab6d7236a787516fb7b8a8d2a3ff190b310c6b83cccfd080a5e9bac0523c99b34849b14a0eb96ffc16348643f65b38ebcdc3c8d8cd17e
27 DIST git-htmldocs-2.12.0.tar.xz 1091612 SHA256 bd548faa2c9e63403e528ce4f4e87561e78949a0349a9e2a27e0d6e581d3a8bd SHA512 818e9ea13195aaa61768b5f3257591a178b4bc4eb25cf9b426b2b2ce6a1b97956eef5f1d4a99fbd5b730f7cf813d29b0a8a019793b9ff1383b607179eaf3089f WHIRLPOOL d49d17177477e9e4fb3e5e4f4526dec86903b150626f67cc50e25c86870b7d7fec91cc9b61d5e2def0fbb26d9b39f129363eb2d9fc48bc9659dc5d65c315cce7
28 DIST git-htmldocs-2.12.1.tar.xz 1091792 SHA256 10598f2f2693e066b58e8d269c3d682595a99340f29e8e7a66dda5e226fd181e SHA512 76c830360692cff09b36da2ac81572cd660a84f06f3b12360022a268bbd88c48c0f4d29b6b097b6b7459548012d419f53418dfd0cbebc0c7b23db78dc135d208 WHIRLPOOL 967bb04ea942cc94206403aad4e98ea092bfc215a70f435ea0cc3b78cea9c9c178f5b509976f861c1b7f2ef69414e376e98b82b45e73fc136861412494324134
29 +DIST git-htmldocs-2.12.2.tar.xz 1092716 SHA256 6f656085c2fdca94df1cc3eb8624c38099f920318c428e34ef0333ecf7f4cd59 SHA512 225aa58becc5d45a8f39333a68b4078147f3d8e31b1653eea181b83f5650c07b10c917596c6ca62b22e812932145fcde6932fa116a9731fda3c263e66f9a560f WHIRLPOOL 562a3f9ebd39563f92420274a02464cd1a4dfdcba7d01906d8e03f1f853d272e1edcf29969a76662e83fb7f11da502e0617ef7a30c961c23b881f889d63766d3
30 DIST git-manpages-2.10.2.tar.xz 395556 SHA256 83b0a317f6039ad95ef6af6a182cf659c2d053eed5d8f70b06710eb787f8aa6f SHA512 0dc5df8441601865511983b85762102396cbf7c704fd831eb6666ef7b7639252b971f6b4080b8a57226a86124edcdd77acf24374da22047bd315769a09109bef WHIRLPOOL e1d6b9cb4479b584c16a25a4f3b0528d96d483307e768efea3d7bd8156d74e1c59b61a641dfe5671f4cb01a02f10322262d133cb76f85194ac97ee74c6195d0e
31 DIST git-manpages-2.11.1.tar.xz 400812 SHA256 69486ed339ee0591001ae83d43c888aa26351b9680b6ceb59e06b593051bca31 SHA512 ffa197ed163031f14882f85124399a7de3b1cadee089cb3d85a6b936215b23243102fd99fdf877f0a8b9d660711e994022cce8893ae27c0295a12dceb41c7f6b WHIRLPOOL 072416db28149c4531f05183ad515bc030611d68c1e7975dcf3f173aeedfb96607262ed120fcf8bea74a1c95b18ec98580cc2ae5e825b8f359e9b24021de7218
32 DIST git-manpages-2.12.0.tar.xz 403112 SHA256 8b8356f8d50eff6499c5d05e87c106a7b1b48bd16de1742fa022631909804773 SHA512 07e7e85bc165b8c128d9a0192f3a75b36346dd45e0f2d17604e0df83dece79f300141d8c798059a15da441f62cb535d3e2da7c15a975c34d3557542e6f608298 WHIRLPOOL cc66c9a62ef682b8d249061697287cacb0a96f89eca87c8053f78c5616d436a0ecfd2f2e2ab5daad282e1b0c27ce36c097b7681cfe2458bd22684a4d15e6a0f5
33 DIST git-manpages-2.12.1.tar.xz 402644 SHA256 fbf5c34dde4385b04a0266444cda6834a97e6a589fc0a510c220da87f3d2a0ce SHA512 d06ad96aa368d2dadf9aeafaa50cefcf8015dcfb2aa0f356c5d70233470aee6aa1e831427e4a05ec8b1646ec8e1b9940d5f70cc331caecbda67e4811c79e1e94 WHIRLPOOL af2600e4157569c4a103a93811d6c7b320063f0d946620849ca55a2ce6f85447add6d065cee234afe9143f8612c3d593c7547a311795e2977054848af2136126
34 +DIST git-manpages-2.12.2.tar.xz 402804 SHA256 7ed1da04e6b0f7fb54a3c7546c6a30fe999b5c8ffcf5e3418521e7550b7f9558 SHA512 98991bc14248f95fe837d1fb9f3e451b48825fa2b1cef94cc016dbf796f5e4293c295a7bf1c35244d835d0d66b7008855c475dd3aa7fcabd5be1e382a4ff0c91 WHIRLPOOL 33d216bfdce99b0083abdcc175286fdfb189e729c38a8df1589757555bba2b7ac33e5cf9a3f927fc44d14caec590e4d6c9872dec0e4c7b3f5675fcbe07312895
35
36 diff --git a/dev-vcs/git/git-2.12.2.ebuild b/dev-vcs/git/git-2.12.2.ebuild
37 new file mode 100644
38 index 00000000000..2b9db07f35d
39 --- /dev/null
40 +++ b/dev-vcs/git/git-2.12.2.ebuild
41 @@ -0,0 +1,676 @@
42 +# Copyright 1999-2017 Gentoo Foundation
43 +# Distributed under the terms of the GNU General Public License v2
44 +
45 +EAPI=6
46 +
47 +GENTOO_DEPEND_ON_PERL=no
48 +
49 +# bug #329479: git-remote-testgit is not multiple-version aware
50 +PYTHON_COMPAT=( python2_7 )
51 +[[ ${PV} == *9999 ]] && SCM="git-r3"
52 +# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
53 +# See https://git-scm.com/docs/gitworkflows#_graduation
54 +# In order of stability:
55 +# 9999-r0: maint
56 +# 9999-r1: master
57 +# 9999-r2: next
58 +# 9999-r3: pu
59 +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
60 +EGIT_BRANCH=maint
61 +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN"
62 +
63 +inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
64 +
65 +MY_PV="${PV/_rc/.rc}"
66 +MY_P="${PN}-${MY_PV}"
67 +
68 +DOC_VER=${MY_PV}
69 +
70 +DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
71 +HOMEPAGE="http://www.git-scm.com/"
72 +if [[ ${PV} != *9999 ]]; then
73 + SRC_URI_SUFFIX="xz"
74 + SRC_URI_KORG="mirror://kernel/software/scm/git"
75 + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
76 + SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
77 + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
78 + doc? (
79 + ${SRC_URI_KORG}/${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 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-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 +gpg highlight +iconv libressl libsecret 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 + libsecret? ( app-crypt/libsecret )
93 + sys-libs/zlib
94 + pcre? ( dev-libs/libpcre )
95 + perl? ( dev-lang/perl:=[-build(-)] )
96 + tk? ( dev-lang/tk:0= )
97 + curl? (
98 + net-misc/curl
99 + webdav? ( dev-libs/expat )
100 + )
101 + emacs? ( virtual/emacs )
102 +"
103 +
104 +RDEPEND="${CDEPEND}
105 + gpg? ( app-crypt/gnupg )
106 + mediawiki? (
107 + dev-perl/DateTime-Format-ISO8601
108 + dev-perl/HTML-Tree
109 + dev-perl/MediaWiki-API
110 + )
111 + perl? ( dev-perl/Error
112 + dev-perl/Net-SMTP-SSL
113 + dev-perl/Authen-SASL
114 + cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
115 + cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
116 + subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
117 + )
118 + python? ( ${PYTHON_DEPS} )
119 +"
120 +
121 +# This is how info docs are created with Git:
122 +# .txt/asciidoc --(asciidoc)---------> .xml/docbook
123 +# .xml/docbook --(docbook2texi.pl)--> .texi
124 +# .texi --(makeinfo)---------> .info
125 +DEPEND="${CDEPEND}
126 + doc? (
127 + app-text/asciidoc
128 + app-text/docbook2X
129 + sys-apps/texinfo
130 + app-text/xmlto
131 + )
132 + nls? ( sys-devel/gettext )
133 + test? ( app-crypt/gnupg )"
134 +
135 +# Live ebuild builds man pages and HTML docs, additionally
136 +if [[ ${PV} == *9999 ]]; then
137 + DEPEND="${DEPEND}
138 + app-text/asciidoc"
139 +fi
140 +
141 +SITEFILE=50${PN}-gentoo.el
142 +S="${WORKDIR}/${MY_P}"
143 +
144 +REQUIRED_USE="
145 + cgi? ( perl )
146 + cvs? ( perl )
147 + mediawiki? ( perl )
148 + mediawiki-experimental? ( mediawiki )
149 + subversion? ( perl )
150 + webdav? ( curl )
151 + python? ( ${PYTHON_REQUIRED_USE} )
152 +"
153 +
154 +PATCHES=(
155 + # bug #350330 - automagic CVS when we don't want it is bad.
156 + "${FILESDIR}"/git-2.12.0-optional-cvs.patch
157 +
158 + # install mediawiki perl modules also in vendor_dir
159 + # hack, needs better upstream solution
160 + "${FILESDIR}"/git-1.8.5-mw-vendor.patch
161 +
162 + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
163 +
164 + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc.
165 + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch
166 +)
167 +
168 +pkg_setup() {
169 + if use subversion && has_version "dev-vcs/subversion[dso]"; then
170 + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
171 + ewarn "with USE=dso, there may be weird crashes in git-svn. You"
172 + ewarn "have been warned."
173 + fi
174 + if use python ; then
175 + python-single-r1_pkg_setup
176 + fi
177 +}
178 +
179 +# This is needed because for some obscure reasons future calls to make don't
180 +# pick up these exports if we export them in src_unpack()
181 +exportmakeopts() {
182 + local myopts
183 +
184 + if use blksha1 ; then
185 + myopts+=" BLK_SHA1=YesPlease"
186 + elif use ppcsha1 ; then
187 + myopts+=" PPC_SHA1=YesPlease"
188 + fi
189 +
190 + if use curl ; then
191 + use webdav || myopts+=" NO_EXPAT=YesPlease"
192 + else
193 + myopts+=" NO_CURL=YesPlease"
194 + fi
195 +
196 + # broken assumptions, because of broken build system ...
197 + myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
198 + myopts+=" INSTALL=install TAR=tar"
199 + myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
200 + myopts+=" SANE_TOOL_PATH="
201 + myopts+=" OLD_ICONV="
202 + myopts+=" NO_EXTERNAL_GREP="
203 +
204 + # For svn-fe
205 + extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
206 +
207 + # can't define this to null, since the entire makefile depends on it
208 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
209 +
210 + use iconv \
211 + || myopts+=" NO_ICONV=YesPlease"
212 + use nls \
213 + || myopts+=" NO_GETTEXT=YesPlease"
214 + use tk \
215 + || myopts+=" NO_TCLTK=YesPlease"
216 + use pcre \
217 + && myopts+=" USE_LIBPCRE=yes" \
218 + && extlibs+=" -lpcre"
219 + use perl \
220 + && myopts+=" INSTALLDIRS=vendor" \
221 + || myopts+=" NO_PERL=YesPlease"
222 + use python \
223 + || myopts+=" NO_PYTHON=YesPlease"
224 + use subversion \
225 + || myopts+=" NO_SVN_TESTS=YesPlease"
226 + use threads \
227 + && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
228 + || myopts+=" NO_PTHREADS=YesPlease"
229 + use cvs \
230 + || myopts+=" NO_CVS=YesPlease"
231 + use elibc_musl \
232 + && myopts+=" NO_REGEX=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 + myopts+=" HAVE_CLOCK_MONOTONIC=1"
251 + myopts+=" HAVE_GETDELIM=1"
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-r3_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
369 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
370 + || die "emake credential-osxkeychain"
371 + fi
372 +
373 + cd "${S}"/Documentation
374 + if [[ ${PV} == *9999 ]] ; then
375 + git_emake man \
376 + || die "emake man failed"
377 + if use doc ; then
378 + git_emake info html \
379 + || die "emake info html failed"
380 + fi
381 + else
382 + if use doc ; then
383 + git_emake info \
384 + || die "emake info html failed"
385 + fi
386 + fi
387 +
388 + if use subversion ; then
389 + cd "${S}"/contrib/svn-fe
390 + # by defining EXTLIBS we override the detection for libintl and
391 + # libiconv, bug #516168
392 + local nlsiconv=
393 + use nls && use !elibc_glibc && nlsiconv+=" -lintl"
394 + use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
395 + git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
396 + if use doc ; then
397 + git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
398 + fi
399 + cd "${S}"
400 + fi
401 +
402 + if use libsecret ; then
403 + cd "${S}"/contrib/credential/libsecret
404 + git_emake || die "emake git-credential-libsecret failed"
405 + fi
406 +
407 + cd "${S}"/contrib/subtree || die
408 + git_emake
409 + use doc && git_emake doc
410 +
411 + if use mediawiki ; then
412 + cd "${S}"/contrib/mw-to-git
413 + git_emake
414 + fi
415 +}
416 +
417 +src_install() {
418 + git_emake \
419 + install || \
420 + die "make install failed"
421 +
422 + if [[ ${CHOST} == *-darwin* ]]; then
423 + dobin contrib/credential/osxkeychain/git-credential-osxkeychain
424 + fi
425 +
426 + # Depending on the tarball and manual rebuild of the documentation, the
427 + # manpages may exist in either OR both of these directories.
428 + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
429 + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
430 + dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
431 + use doc && dodir /usr/share/doc/${PF}/html
432 + for d in / /howto/ /technical/ ; do
433 + docinto ${d}
434 + dodoc Documentation${d}*.txt
435 + if use doc ; then
436 + docinto ${d}/html
437 + dodoc Documentation${d}*.html
438 + fi
439 + done
440 + docinto /
441 + # Upstream does not ship this pre-built :-(
442 + use doc && doinfo Documentation/{git,gitman}.info
443 +
444 + newbashcomp contrib/completion/git-completion.bash ${PN}
445 + bashcomp_alias git gitk
446 + # Not really a bash-completion file (bug #477920)
447 + # but still needed uncompressed (bug #507480)
448 + insinto /usr/share/${PN}
449 + doins contrib/completion/git-prompt.sh
450 +
451 + if use emacs ; then
452 + elisp-install ${PN} contrib/emacs/git.{el,elc}
453 + elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
454 + #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
455 + # don't add automatically to the load-path, so the sitefile
456 + # can do a conditional loading
457 + touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
458 + elisp-site-file-install "${FILESDIR}"/${SITEFILE}
459 + fi
460 +
461 + #dobin contrib/fast-import/git-p4 # Moved upstream
462 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
463 + newbin contrib/fast-import/import-tars.perl import-tars
464 + exeinto /usr/libexec/git-core/
465 + newexe contrib/git-resurrect.sh git-resurrect
466 +
467 + # git-subtree
468 + cd "${S}"/contrib/subtree
469 + git_emake install || die "Failed to emake install git-subtree"
470 + if use doc ; then
471 + git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
472 + fi
473 + newdoc README README.git-subtree
474 + dodoc git-subtree.txt
475 + cd "${S}"
476 +
477 + if use mediawiki ; then
478 + cd "${S}"/contrib/mw-to-git
479 + git_emake install
480 + cd "${S}"
481 + fi
482 +
483 + # diff-highlight
484 + dobin contrib/diff-highlight/diff-highlight
485 + newdoc contrib/diff-highlight/README README.diff-highlight
486 +
487 + # git-jump
488 + exeinto /usr/libexec/git-core/
489 + doexe contrib/git-jump/git-jump
490 + newdoc contrib/git-jump/README git-jump.txt
491 +
492 + # git-contacts
493 + exeinto /usr/libexec/git-core/
494 + doexe contrib/contacts/git-contacts
495 + dodoc contrib/contacts/git-contacts.txt
496 +
497 + if use libsecret ; then
498 + cd "${S}"/contrib/credential/libsecret
499 + dobin git-credential-libsecret
500 + fi
501 +
502 + if use subversion ; then
503 + cd "${S}"/contrib/svn-fe
504 + dobin svn-fe
505 + dodoc svn-fe.txt
506 + if use doc ; then
507 + doman svn-fe.1
508 + docinto html
509 + dodoc svn-fe.html
510 + fi
511 + cd "${S}"
512 + fi
513 +
514 + dodir /usr/share/${PN}/contrib
515 + # The following are excluded:
516 + # completion - installed above
517 + # diff-highlight - done above
518 + # emacs - installed above
519 + # examples - these are stuff that is not used in Git anymore actually
520 + # git-jump - done above
521 + # gitview - installed above
522 + # p4import - excluded because fast-import has a better one
523 + # patches - stuff the Git guys made to go upstream to other places
524 + # persistent-https - TODO
525 + # mw-to-git - TODO
526 + # subtree - build seperately
527 + # svnimport - use git-svn
528 + # thunderbird-patch-inline - fixes thunderbird
529 + local contrib_objects=(
530 + buildsystems
531 + fast-import
532 + hg-to-git
533 + hooks
534 + remotes2config.sh
535 + rerere-train.sh
536 + stats
537 + workdir
538 + )
539 + for i in "${contrib_objects[@]}" ; do
540 + cp -rf \
541 + "${S}"/contrib/${i} \
542 + "${ED}"/usr/share/${PN}/contrib \
543 + || die "Failed contrib ${i}"
544 + done
545 +
546 + if use perl && use cgi ; then
547 + # We used to install in /usr/share/${PN}/gitweb
548 + # but upstream installs in /usr/share/gitweb
549 + # so we will install a symlink and use their location for compat with other
550 + # distros
551 + dosym /usr/share/gitweb /usr/share/${PN}/gitweb
552 +
553 + # INSTALL discusses configuration issues, not just installation
554 + docinto /
555 + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
556 + newdoc "${S}"/gitweb/README README.gitweb
557 +
558 + find "${ED}"/usr/lib64/perl5/ \
559 + -name .packlist \
560 + -exec rm \{\} \;
561 + else
562 + rm -rf "${ED}"/usr/share/gitweb
563 + fi
564 +
565 + if ! use subversion ; then
566 + rm -f "${ED}"/usr/libexec/git-core/git-svn \
567 + "${ED}"/usr/share/man/man1/git-svn.1*
568 + fi
569 +
570 + if use xinetd ; then
571 + insinto /etc/xinetd.d
572 + newins "${FILESDIR}"/git-daemon.xinetd git-daemon
573 + fi
574 +
575 + if use !prefix ; then
576 + newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
577 + newconfd "${FILESDIR}"/git-daemon.confd git-daemon
578 + systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
579 + systemd_dounit "${FILESDIR}/git-daemon.socket"
580 + fi
581 +
582 + perl_delete_localpod
583 +
584 + # Remove disabled linguas
585 + # we could remove sources in src_prepare, but install does not
586 + # handle missing locale dir well
587 + rm_loc() {
588 + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
589 + rm -r "${ED}/usr/share/locale/${1}" || die
590 + fi
591 + }
592 + l10n_for_each_disabled_locale_do rm_loc
593 +}
594 +
595 +src_test() {
596 + local disabled="t9128-git-svn-cmd-branch.sh"
597 + local tests_cvs="t9200-git-cvsexportcommit.sh \
598 + t9400-git-cvsserver-server.sh \
599 + t9401-git-cvsserver-crlf.sh \
600 + t9402-git-cvsserver-refs.sh \
601 + t9600-cvsimport.sh \
602 + t9601-cvsimport-vendor-branch.sh \
603 + t9602-cvsimport-branches-tags.sh \
604 + t9603-cvsimport-patchsets.sh \
605 + t9604-cvsimport-timestamps.sh"
606 + local tests_perl="t3701-add-interactive.sh \
607 + t5502-quickfetch.sh \
608 + t5512-ls-remote.sh \
609 + t5520-pull.sh \
610 + t7106-reset-unborn-branch.sh \
611 + t7501-commit.sh"
612 + # Bug #225601 - t0004 is not suitable for root perm
613 + # Bug #219839 - t1004 is not suitable for root perm
614 + # t0001-init.sh - check for init notices EPERM* fails
615 + local tests_nonroot="t0001-init.sh \
616 + t0004-unwritable.sh \
617 + t0070-fundamental.sh \
618 + t1004-read-tree-m-u-wf.sh \
619 + t3700-add.sh \
620 + t7300-clean.sh"
621 + # t9100 still fails with symlinks in SVN 1.7
622 + local test_svn="t9100-git-svn-basic.sh"
623 +
624 + # Unzip is used only for the testcase code, not by any normal parts of Git.
625 + if ! has_version app-arch/unzip ; then
626 + einfo "Disabling tar-tree tests"
627 + disabled="${disabled} t5000-tar-tree.sh"
628 + fi
629 +
630 + cvs=0
631 + use cvs && let cvs=$cvs+1
632 + if [[ ${EUID} -eq 0 ]]; then
633 + if [[ $cvs -eq 1 ]]; then
634 + ewarn "Skipping CVS tests because CVS does not work as root!"
635 + ewarn "You should retest with FEATURES=userpriv!"
636 + disabled="${disabled} ${tests_cvs}"
637 + fi
638 + einfo "Skipping other tests that require being non-root"
639 + disabled="${disabled} ${tests_nonroot}"
640 + else
641 + [[ $cvs -gt 0 ]] && \
642 + has_version dev-vcs/cvs && \
643 + let cvs=$cvs+1
644 + [[ $cvs -gt 1 ]] && \
645 + has_version "dev-vcs/cvs[server]" && \
646 + let cvs=$cvs+1
647 + if [[ $cvs -lt 3 ]]; then
648 + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
649 + disabled="${disabled} ${tests_cvs}"
650 + fi
651 + fi
652 +
653 + if ! use perl ; then
654 + einfo "Disabling tests that need Perl"
655 + disabled="${disabled} ${tests_perl}"
656 + fi
657 +
658 + einfo "Disabling tests that fail with SVN 1.7"
659 + disabled="${disabled} ${test_svn}"
660 +
661 + # Reset all previously disabled tests
662 + cd "${S}/t"
663 + for i in *.sh.DISABLED ; do
664 + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
665 + done
666 + einfo "Disabled tests:"
667 + for i in ${disabled} ; do
668 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
669 + done
670 +
671 + # Avoid the test system removing the results because we want them ourselves
672 + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
673 + -i "${S}"/t/Makefile
674 +
675 + # Clean old results first, must always run
676 + cd "${S}/t"
677 + nonfatal git_emake clean
678 +
679 + # Now run the tests, keep going if we hit an error, and don't terminate on
680 + # failure
681 + cd "${S}"
682 + einfo "Start test run"
683 + #MAKEOPTS=-j1
684 + nonfatal git_emake --keep-going test
685 + rc=$?
686 +
687 + # Display nice results, now print the results
688 + cd "${S}/t"
689 + nonfatal git_emake aggregate-results
690 +
691 + # And bail if there was a problem
692 + [ $rc -eq 0 ] || die "tests failed. Please file a bug."
693 +}
694 +
695 +showpkgdeps() {
696 + local pkg=$1
697 + shift
698 + elog " $(printf "%-17s:" ${pkg}) ${@}"
699 +}
700 +
701 +pkg_postinst() {
702 + use emacs && elisp-site-regen
703 + einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
704 + einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
705 + einfo "Note that the prompt bash code is now in that separate script"
706 + elog "These additional scripts need some dependencies:"
707 + echo
708 + showpkgdeps git-quiltimport "dev-util/quilt"
709 + showpkgdeps git-instaweb \
710 + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
711 + echo
712 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
713 +}
714 +
715 +pkg_postrm() {
716 + use emacs && elisp-site-regen
717 +}