Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: dev-vcs/git/
Date: Sun, 25 Dec 2016 17:34:03
Message-Id: 1482687099.8be5bb0b19e3064aa9db6e553846a1c6e5455476.lluixhi@gentoo
1 commit: 8be5bb0b19e3064aa9db6e553846a1c6e5455476
2 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
3 AuthorDate: Sun Dec 25 17:31:39 2016 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Sun Dec 25 17:31:39 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=8be5bb0b
7
8 dev-vcs/git: Add 2.10.2
9
10 dev-vcs/git/Manifest | 4 +
11 dev-vcs/git/git-2.10.2.ebuild | 680 ++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 684 insertions(+)
13
14 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
15 index 67b569e..8dce5c9 100644
16 --- a/dev-vcs/git/Manifest
17 +++ b/dev-vcs/git/Manifest
18 @@ -11,8 +11,12 @@ AUX git-daemon.confd 710 SHA256 4703ba2372c661fb674a29fea7f64983f8b1b3136d971663
19 AUX git-daemon.socket 116 SHA256 66a064b67e441306bf765d3d3115ac55bafa2098400af134f852d4aecf8608d7 SHA512 e383d358999ea0c7201c1709015a9b7c4dd9dd71287605640aca837fac1e2ee33a5a1684e1c3414c08742605f185b722f4864afd5be8b79a9f0d8f7ae0f9b701 WHIRLPOOL 1098e46b6d2be3c8d758a087408aed91e0c01625542dfc90fbff80ed8b40d2a54ea4ab45b4d003ef0b0b8ed1411e1146a58076b68096389412a61fe2d09214dd
20 AUX git-daemon.xinetd 260 SHA256 5025efbceed83835378cada3728448cbf445a1584e7cbd7736f568f4b6b52a67 SHA512 5e0c85004e7e2b89fd191350022b9970a6ca03129b4c913e159570b99b5797ab924f667cd3dc5693a9d4916b7b5cf36814eda015dbdf46a1354eb50d1c081f9c WHIRLPOOL 155bfca2c071d5368de09412d1d937cefd3b5cd28a991b99845551738440b92791c33a67ef41be711dbf06fc4faf4a299cbaf1f410b119fe5deb5a4cd741803d
21 AUX git-daemon_at-r1.service 340 SHA256 980b2b2234fc672065286244cd4e690c92865d39a02001936801cb013b7d2dce SHA512 073d8752dc224ff1130a5290e0f965a04b19f2a8dbd5d50172101099386ad3af0fd5e1abf57030960b750a2adf36a7ae69d18ddc990bab4e694486e65424cfa9 WHIRLPOOL fd89d61e15bf499404b0a17a2e47257962c671cab09a3af53cb378758cf7a5f979026831a8da2270ea54fa8897e132def17307d03729ef2e30dfe7950c59b1b3
22 +DIST git-2.10.2.tar.xz 4106108 SHA256 94802903dd707d85ca3b9a2be35e936a54ce86375f52c6a789efe7ce7e238671 SHA512 0ab09de481dbb31c3304382afaa5d3fc9f861115c9954c65b11a8a1c34b939118c7ed3ff60ac329145888596388e3e4d2b2fb677fe109d33a57206d531b5ee6a WHIRLPOOL 808404fa13f908d149028f64aaf5b73400448fff6393dabfaa874d750065e86ff5dae4903724cbca4e59fb74b3ff30b8b8f0a0f1435a0a90c18267c7a0550de6
23 DIST git-2.11.0.tar.xz 4197984 SHA256 7e7e8d69d494892373b87007674be5820a4bc1ef596a0117d03ea3169119fd0b SHA512 f9588dfcb4ae38adc46300b8ef65ee51343fc4685f9e43bffff10839a492e6a54c7f7a774687fef3ebb8a30108775aa472cda2378aa202905f8555bfb9d4ede2 WHIRLPOOL 73ce3c2cb083906b1e55245935a01b27881be48d2c4c3cace8353a4c2baf87fe3ce338553f66407cb629fa9c8c63d396ef09f4d6aa18803d487af4dd3fef8f10
24 +DIST git-htmldocs-2.10.2.tar.xz 1068436 SHA256 dd43111c3518a92a7fe64ac5cd32a5d4d77d49c67f7d89dce3e8293bc3d6b491 SHA512 8ef57218d7eef285ac427414d92bd5e8eba5c85c2a2a9ec0e423705ee2cb6f26dd33ad780d1b4237e7534dbe5cc3b4d8eea5780d0acc49066d78fc1893df2525 WHIRLPOOL 160fe3446d959d0f2315c9b2be182925619a4d89343602038e92283abdb393805eb5252799c502b83641d9e23a157332033baaa1ef2f1d9401cbbf372d8e86d7
25 DIST git-htmldocs-2.11.0.tar.xz 1080584 SHA256 3975399f1be3d959edf0fded03eab8fbf94787bfd0318b7644c77cf61e4a7b48 SHA512 50250028030b1b277c17f27bc8bc0aa35938e7ae690d59bfff0a2d1f91c60564b254ce5b242f9ca081bfae60a9fb70cef538586abc0878bab6105e904748ee63 WHIRLPOOL 0839629b8f2fa08e22b69fe3638d67ae08d78dceaa008d8f35932ff361a1c1d8dbcd1262d4e469b5cd511a5dfb1848061d8e3491051188d0f90a6f0f98fa8003
26 +DIST git-manpages-2.10.2.tar.xz 395556 SHA256 83b0a317f6039ad95ef6af6a182cf659c2d053eed5d8f70b06710eb787f8aa6f SHA512 0dc5df8441601865511983b85762102396cbf7c704fd831eb6666ef7b7639252b971f6b4080b8a57226a86124edcdd77acf24374da22047bd315769a09109bef WHIRLPOOL e1d6b9cb4479b584c16a25a4f3b0528d96d483307e768efea3d7bd8156d74e1c59b61a641dfe5671f4cb01a02f10322262d133cb76f85194ac97ee74c6195d0e
27 DIST git-manpages-2.11.0.tar.xz 399992 SHA256 b3d3e78829c0b69b727aaca407ecfe239a46db3f354f16189f7a7c10af9528d8 SHA512 5b72b2dd7e151bde0fdc5ca5044391ebd9943ee8313133fdea1e0cb13b90ddd9164ee46f9c49ca2a70f636da7bcb54651a6389ed1c0a8693cf8eb31bfea49079 WHIRLPOOL 93fd5b6819ab0942421368d9c0e4723d6f5d2650e94ad8cab225499bb616f162e754a5e08a8f7f0ec74e378069cec0109047c72b67fa9d5c2d244399127b942a
28 +EBUILD git-2.10.2.ebuild 19217 SHA256 962ee04dbcbab1deca9f16943ffca4728bef1bd0d3b76f5e9a3ea14dc084fc7c SHA512 83c397738745afe612fe45d8ae477b7d7aae0e2912471f77b032b608406c361402ef8fabe938a3f0882865d3f57863b5c8e733325c7f405b83c51d7cecbf6792 WHIRLPOOL c2f9e09599ce636b32c7adf3275ad7b3a04e27aa90fa34a5dcf7a99bc7084b1025a8092ccd61c85b19b734eefdf0e39fc83def5527865fa0bfd58751095887fb
29 EBUILD git-2.11.0.ebuild 19282 SHA256 fb82646406bba1b87cc95b8195c5e40d8bae02d91d7c0dfcfae4db024fae86b1 SHA512 943bbebea028d626288281f79721dbf1c4f156de6e20c0a1569685ea74a627a3fe9a26b66417df9608a2593cba5b3737cb3bd64e1c8fb0bb28d3a30f2653298d WHIRLPOOL d2b61a18a2f052ccee092896c2a2d45272b3cd38ab8838315fd7fd241493ef5f13a6b6a4d6fb37085064b704f78ae09569a5cc9f555b7bd8a43dd2d5a6652d14
30 MISC metadata.xml 2074 SHA256 e1527bc0d2dc4c23f6c757ee229240f979ee7af2aabb2dd5a49f13f7112c9fc5 SHA512 f5f040ea6db33e7e325c995994c82f92d727d2a6a5f7841a9fb3e28d1ac66fea3d153b09d3a66122ba6365bf7e76a2cb411757f5a706b5525414bda4f504b635 WHIRLPOOL ceff2ccac4564156e3c333b36c056129ea28ef30890d0be4394caa8f734d9e987e33a89a6903dd29d6b010a36b09bc87fa0303c905aff3bb4224b6860e10f283
31
32 diff --git a/dev-vcs/git/git-2.10.2.ebuild b/dev-vcs/git/git-2.10.2.ebuild
33 new file mode 100644
34 index 0000000..ce7c471
35 --- /dev/null
36 +++ b/dev-vcs/git/git-2.10.2.ebuild
37 @@ -0,0 +1,680 @@
38 +# Copyright 1999-2016 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +# $Id$
41 +
42 +EAPI=6
43 +
44 +GENTOO_DEPEND_ON_PERL=no
45 +
46 +# bug #329479: git-remote-testgit is not multiple-version aware
47 +PYTHON_COMPAT=( python2_7 )
48 +[[ ${PV} == *9999 ]] && SCM="git-r3"
49 +# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
50 +# See https://git-scm.com/docs/gitworkflows#_graduation
51 +# In order of stability:
52 +# 9999-r0: maint
53 +# 9999-r1: master
54 +# 9999-r2: next
55 +# 9999-r3: pu
56 +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
57 +EGIT_BRANCH=maint
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="stupid content tracker: distributed VCS designed for speed and efficiency"
68 +HOMEPAGE="http://www.git-scm.com/"
69 +if [[ ${PV} != *9999 ]]; then
70 + SRC_URI_SUFFIX="xz"
71 + SRC_URI_KORG="mirror://kernel/software/scm/git"
72 + SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
73 + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
74 + doc? (
75 + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
76 + )"
77 + 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"
78 +fi
79 +
80 +LICENSE="GPL-2"
81 +SLOT="0"
82 +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"
83 +
84 +# Common to both DEPEND and RDEPEND
85 +CDEPEND="
86 + !libressl? ( dev-libs/openssl:0= )
87 + libressl? ( dev-libs/libressl:= )
88 + sys-libs/zlib
89 + pcre? ( dev-libs/libpcre )
90 + perl? ( dev-lang/perl:=[-build(-)] )
91 + tk? ( dev-lang/tk:0= )
92 + curl? (
93 + net-misc/curl
94 + webdav? ( dev-libs/expat )
95 + )
96 + emacs? ( virtual/emacs )
97 + gnome-keyring? ( gnome-base/libgnome-keyring )"
98 +
99 +RDEPEND="${CDEPEND}
100 + gpg? ( app-crypt/gnupg )
101 + mediawiki? (
102 + dev-perl/DateTime-Format-ISO8601
103 + dev-perl/HTML-Tree
104 + dev-perl/MediaWiki-API
105 + )
106 + perl? ( dev-perl/Error
107 + dev-perl/Net-SMTP-SSL
108 + dev-perl/Authen-SASL
109 + cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
110 + cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
111 + subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
112 + )
113 + python? ( gtk?
114 + (
115 + >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
116 + >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
117 + )
118 + ${PYTHON_DEPS} )"
119 +
120 +# This is how info docs are created with Git:
121 +# .txt/asciidoc --(asciidoc)---------> .xml/docbook
122 +# .xml/docbook --(docbook2texi.pl)--> .texi
123 +# .texi --(makeinfo)---------> .info
124 +DEPEND="${CDEPEND}
125 + doc? (
126 + app-text/asciidoc
127 + app-text/docbook2X
128 + sys-apps/texinfo
129 + app-text/xmlto
130 + )
131 + nls? ( sys-devel/gettext )
132 + test? ( app-crypt/gnupg )"
133 +
134 +# Live ebuild builds man pages and HTML docs, additionally
135 +if [[ ${PV} == *9999 ]]; then
136 + DEPEND="${DEPEND}
137 + app-text/asciidoc"
138 +fi
139 +
140 +SITEFILE=50${PN}-gentoo.el
141 +S="${WORKDIR}/${MY_P}"
142 +
143 +REQUIRED_USE="
144 + cgi? ( perl )
145 + cvs? ( perl )
146 + mediawiki? ( perl )
147 + mediawiki-experimental? ( mediawiki )
148 + subversion? ( perl )
149 + webdav? ( curl )
150 + gtk? ( python )
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.10.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_glibc \
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 gnome-keyring ; then
403 + cd "${S}"/contrib/credential/gnome-keyring
404 + git_emake || die "emake git-credential-gnome-keyring failed"
405 + fi
406 +
407 + cd "${S}"/contrib/subtree
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 + if use python && use gtk ; then
462 + python_doscript "${S}"/contrib/gitview/gitview
463 + dodoc "${S}"/contrib/gitview/gitview.txt
464 + fi
465 +
466 + #dobin contrib/fast-import/git-p4 # Moved upstream
467 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
468 + newbin contrib/fast-import/import-tars.perl import-tars
469 + exeinto /usr/libexec/git-core/
470 + newexe contrib/git-resurrect.sh git-resurrect
471 +
472 + # git-subtree
473 + cd "${S}"/contrib/subtree
474 + git_emake install || die "Failed to emake install git-subtree"
475 + if use doc ; then
476 + git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
477 + fi
478 + newdoc README README.git-subtree
479 + dodoc git-subtree.txt
480 + cd "${S}"
481 +
482 + if use mediawiki ; then
483 + cd "${S}"/contrib/mw-to-git
484 + git_emake install
485 + cd "${S}"
486 + fi
487 +
488 + # diff-highlight
489 + dobin contrib/diff-highlight/diff-highlight
490 + newdoc contrib/diff-highlight/README README.diff-highlight
491 +
492 + # git-jump
493 + exeinto /usr/libexec/git-core/
494 + doexe contrib/git-jump/git-jump
495 + newdoc contrib/git-jump/README git-jump.txt
496 +
497 + # git-contacts
498 + exeinto /usr/libexec/git-core/
499 + doexe contrib/contacts/git-contacts
500 + dodoc contrib/contacts/git-contacts.txt
501 +
502 + if use gnome-keyring ; then
503 + cd "${S}"/contrib/credential/gnome-keyring
504 + dobin git-credential-gnome-keyring
505 + fi
506 +
507 + if use subversion ; then
508 + cd "${S}"/contrib/svn-fe
509 + dobin svn-fe
510 + dodoc svn-fe.txt
511 + if use doc ; then
512 + doman svn-fe.1
513 + docinto html
514 + dodoc svn-fe.html
515 + fi
516 + cd "${S}"
517 + fi
518 +
519 + dodir /usr/share/${PN}/contrib
520 + # The following are excluded:
521 + # completion - installed above
522 + # credential/gnome-keyring TODO
523 + # diff-highlight - done above
524 + # emacs - installed above
525 + # examples - these are stuff that is not used in Git anymore actually
526 + # git-jump - done above
527 + # gitview - installed above
528 + # p4import - excluded because fast-import has a better one
529 + # patches - stuff the Git guys made to go upstream to other places
530 + # persistent-https - TODO
531 + # mw-to-git - TODO
532 + # subtree - build seperately
533 + # svnimport - use git-svn
534 + # thunderbird-patch-inline - fixes thunderbird
535 + for i in \
536 + buildsystems convert-objects fast-import \
537 + hg-to-git hooks remotes2config.sh rerere-train.sh \
538 + stats workdir \
539 + ; 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=""
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 +}