1 |
commit: bddfb756c360f23b5542c580c750558972c9ce50 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 29 23:28:23 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 29 23:28:23 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bddfb756 |
7 |
|
8 |
dev-vcs/git: Bump to v2.16.4 & v2.17.1 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/656868 |
11 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
12 |
|
13 |
dev-vcs/git/Manifest | 6 + |
14 |
dev-vcs/git/git-2.16.4.ebuild | 699 +++++++++++++++++++++++++++++++++++++++++ |
15 |
dev-vcs/git/git-2.17.1.ebuild | 715 ++++++++++++++++++++++++++++++++++++++++++ |
16 |
3 files changed, 1420 insertions(+) |
17 |
|
18 |
diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest |
19 |
index ba377ad15aa..e6a38a8e599 100644 |
20 |
--- a/dev-vcs/git/Manifest |
21 |
+++ b/dev-vcs/git/Manifest |
22 |
@@ -1,9 +1,15 @@ |
23 |
DIST git-2.16.1.tar.xz 4961656 BLAKE2B d94328da5d027cb82f1f23804a12dfc5df1577bf2c28cc376d4bb5c9e34d317886437f7eee2ac4503b8e2639d2e24c35660ab82a50207f500b7ed6fb104d3624 SHA512 09e30ada7bcf41f78f15784908062c10162d58d2fd7a68ad27e42fd49dc37eb0e82c19ad21db31034a189a8cdd009013a29f943e1ae5d5ab5688c913d2a4d42a |
24 |
DIST git-2.16.3.tar.xz 4966248 BLAKE2B cd4d2573afd02a23766c4dd0da8397ac36193f68e18c162fc85d60d7595a50da7707f592ccc3a9f00a22fdcb8a8cada82139fe30f97af193fb367a4e392cbaa8 SHA512 73520cf3500b2d13b77eb1e5ec0d60263aad07732d25631732f0d986abd023f97b8a6db4abff64d342cb053018289b5f7a3e32f10b86bd9092a37ee0585adc8a |
25 |
+DIST git-2.16.4.tar.xz 4968252 BLAKE2B 77f76408bde02bfacdb99d22baca05893f63c96d1fb7508c7e92541f8f7ec9ced0dad650be788fd28a1e03b5d88b88708652d07a47bedaae60a9cbd4e2eec858 SHA512 f54e431e78289349dcb927ec34873dfb801c49a41cbb3d0138346d603af26bd7d86f9ac95e7a61a4831017f3503f33374510ccf68b0e62b0691fc5a43283f1ac |
26 |
DIST git-2.17.0.tar.xz 5011556 BLAKE2B 73b3ad74d85759704c034b7ab2f604150c08aec45f4b86f5fcfa826801da49f4922599de210d8056b25781f77ff826610ef4a47309dc9e9e3ce18ef97a8e34da SHA512 dab1c1d5d384b36720abc049a66ba60631e17958b214cfbec467be7adc02e82190e5282554da71797892c16bfe52d65b6244a281f504385083125bcb98ec7ee9 |
27 |
+DIST git-2.17.1.tar.xz 5015484 BLAKE2B d3a61023872a15e3176e4dae6df83d4c2369a377244d44dfd7a63a15ecc3a7b145093afd5d6fa72e4eca98ba4f81f7ccd89ac2400c9cf8107ac04fd35d8bf6e4 SHA512 77c27569d40fbae1842130baa0cdda674a02e384631bd8fb1f2ddf67ce372dd4903b2ce6b4283a4ae506cdedd5daa55baa2afe6a6689528511e24e4beb864960 |
28 |
DIST git-htmldocs-2.16.1.tar.xz 1160372 BLAKE2B d426fbc85772e5f04550071dea50a75e6d581fd040e8b37b3b342a8d6569d0dcf456445bab1dec3d84e254e82468c900afff7c6be1ebd6771e7fad5884b92515 SHA512 f2bb8b88ab5aa3d6204874aae583249d5137193c5fe3925df7ae1bcdaec0564b496df9a648c180bebb0c8ff4573f27e330802020d3c9207c2738ddd5c52d99c9 |
29 |
DIST git-htmldocs-2.16.3.tar.xz 1164252 BLAKE2B 43d5b0317d3cb181c24347933b6ee3ce586f7be7e38ae30555bc732b369287f080879ff0408601db125a4104b665956f6bcef3f243496008d3ec1601110b06df SHA512 6271ff7780053347ceba47754db00fa8a0a39ff622c490e273ed286faa6ade3f7d6580fa396c913b4485a942b2ad0cdd898de467fde497de1d850fb6d3debd1e |
30 |
+DIST git-htmldocs-2.16.4.tar.xz 1164256 BLAKE2B 88a7ab5b094f15bc2b6c0f4d4c3eae185f6e6c0f00f4aca75492f0cc964428d1bf53002e0e43468b60b62058af5f13b061231061247e19b32bc70c2c8adb04eb SHA512 8f4a8c51656559af81296fb064ecf0f88444952c7f8ee91b85e5a61b20d200267d7432f720ded12046bab986361cff48cf7a2f5d21e05c1ac7648cc3168a0049 |
31 |
DIST git-htmldocs-2.17.0.tar.xz 1172652 BLAKE2B 9e6ccc120aa45ee98a21ac862a130a964e6cd04cd85d51ddf40cbb34197f699fd8f5046f53265a0685191a96ef5aa0cb398367679b719cb3a2bba0156732d45b SHA512 441d485d42a8b3ba8ef5617e47480be0b587f0f5d35c4288a6cfe8f2b8a84fffcd13a414dcce44855cf580af817b411654999e80502073782c7da38aa40209ba |
32 |
+DIST git-htmldocs-2.17.1.tar.xz 1173296 BLAKE2B 5133a86fb73cd58d6a9d4ed05d32949f642c9a670a49ea67c7170dfb39c4ff3f63d5f220abebcc979f87a360ec2990ccf5a9e3c18e8fcb07082bac111ecb12c7 SHA512 69054b087ffd1c88532672c6edea3cd27e08421f25c09a1a304420ec6aa20806888f71e4ef21aac1bc2fed81a045a64ae164a9dc377eb48d61887bf8d787782c |
33 |
DIST git-manpages-2.16.1.tar.xz 417188 BLAKE2B 239fb33967d17c8b10efb2e0d1963f7be3404b7f262b49f89b3f4a538135d80268fbe7fe0e561c9cb2d86840eb46b61653ed363d8da27d1169c435d8e1d5e851 SHA512 20c7646b5f1e3c633ce6aae5ee5fcbe4ca1e59fc9253ec9a9e45c7cd8a8ac7a5e71e36258eb747e3bd6d51b3b7971137315dcdbdff493e0f8774ecd3e309735a |
34 |
DIST git-manpages-2.16.3.tar.xz 417152 BLAKE2B 2719a9a603dc49db1a61a2cec42427bdcdc96fab9d21d16c5a8c70d7dba271a1e5b29f4f83f32c525c4866e3497352017af3777a769893c9543e65d625972375 SHA512 b34a3658412a144fed6f818acc05c0b4be2453ae63f9430dcd53cda750f737bd3da50390bd3f4266e69befa521eddd222985fd531acca1ebd4ca62c6c5b2a85c |
35 |
+DIST git-manpages-2.16.4.tar.xz 417136 BLAKE2B 9a75913dae62fa2eb31cf48e77e266aa8d91c67b8a753c1740283b1d626dea1e9aa8d7cea06d9b97887f801b4d1f1b927014851105cefd3241ca7ab7330bfc8b SHA512 8029e9fac1eca542e809da1247f4eec3a2c81c0eb12d03aa816dcf120677011d3e409b06c28c8e7dbf41cbbcca873ec93846dc317bc73e57f4d4701ce7abf73d |
36 |
DIST git-manpages-2.17.0.tar.xz 419316 BLAKE2B f8c4e586d376c31e7728e1fb78032249cc8b20d356e2d7c8d42f1c4a6025dc89d5de81548ea2fb1af5c95276bd3b3f9e650379357f30edd773000b98371fcceb SHA512 b2f7734416f5c336cea272baa87efd10b175a357f5f722f20bb5d287b1886bdb213c4fc2f0c6a3b83fa34423e83139bab5eac70dc9669a72c75c2392dbd517f1 |
37 |
+DIST git-manpages-2.17.1.tar.xz 419400 BLAKE2B af8cef1ac43c6b5ee073c7e18c161ba3ebe0669e474833211c95e72b33524050c30ca133ada98e07c8b481ffc4a5cbce1e7d68427b7aeb9bb80534c2ef3623f0 SHA512 fbdd4ef99419d244bc7c03b10cf09e92d1f0894879fe159ee1f53262daebdc7fe72d6c2bbe9e21fe354f8afb26fa06b35788e54b0c078b686706b511bf7c33ee |
38 |
|
39 |
diff --git a/dev-vcs/git/git-2.16.4.ebuild b/dev-vcs/git/git-2.16.4.ebuild |
40 |
new file mode 100644 |
41 |
index 00000000000..d0faf8d3a1f |
42 |
--- /dev/null |
43 |
+++ b/dev-vcs/git/git-2.16.4.ebuild |
44 |
@@ -0,0 +1,699 @@ |
45 |
+# Copyright 1999-2018 Gentoo Foundation |
46 |
+# Distributed under the terms of the GNU General Public License v2 |
47 |
+ |
48 |
+EAPI=6 |
49 |
+ |
50 |
+GENTOO_DEPEND_ON_PERL=no |
51 |
+ |
52 |
+# bug #329479: git-remote-testgit is not multiple-version aware |
53 |
+PYTHON_COMPAT=( python2_7 ) |
54 |
+PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" |
55 |
+if [[ ${PV} == *9999 ]]; then |
56 |
+ SCM="git-r3" |
57 |
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" |
58 |
+ # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. |
59 |
+ # See https://git-scm.com/docs/gitworkflows#_graduation |
60 |
+ # In order of stability: |
61 |
+ # 9999-r0: maint |
62 |
+ # 9999-r1: master |
63 |
+ # 9999-r2: next |
64 |
+ # 9999-r3: pu |
65 |
+ case "${PVR}" in |
66 |
+ 9999) EGIT_BRANCH=maint ;; |
67 |
+ 9999-r1) EGIT_BRANCH=master ;; |
68 |
+ 9999-r2) EGIT_BRANCH=next;; |
69 |
+ 9999-r3) EGIT_BRANCH=pu ;; |
70 |
+ esac |
71 |
+fi |
72 |
+ |
73 |
+inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM} |
74 |
+ |
75 |
+MY_PV="${PV/_rc/.rc}" |
76 |
+MY_P="${PN}-${MY_PV}" |
77 |
+ |
78 |
+DOC_VER=${MY_PV} |
79 |
+ |
80 |
+DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency" |
81 |
+HOMEPAGE="https://www.git-scm.com/" |
82 |
+if [[ ${PV} != *9999 ]]; then |
83 |
+ SRC_URI_SUFFIX="xz" |
84 |
+ SRC_URI_KORG="mirror://kernel/software/scm/git" |
85 |
+ [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' |
86 |
+ SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} |
87 |
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
88 |
+ doc? ( |
89 |
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
90 |
+ )" |
91 |
+ [[ "${PV}" = *_rc* ]] || \ |
92 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
93 |
+fi |
94 |
+ |
95 |
+LICENSE="GPL-2" |
96 |
+SLOT="0" |
97 |
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" |
98 |
+ |
99 |
+# Common to both DEPEND and RDEPEND |
100 |
+CDEPEND=" |
101 |
+ gnome-keyring? ( app-crypt/libsecret ) |
102 |
+ !libressl? ( dev-libs/openssl:0= ) |
103 |
+ libressl? ( dev-libs/libressl:= ) |
104 |
+ sys-libs/zlib |
105 |
+ pcre? ( |
106 |
+ pcre-jit? ( dev-libs/libpcre2[jit(+)] ) |
107 |
+ !pcre-jit? ( dev-libs/libpcre ) |
108 |
+ ) |
109 |
+ perl? ( dev-lang/perl:=[-build(-)] ) |
110 |
+ tk? ( dev-lang/tk:0= ) |
111 |
+ curl? ( |
112 |
+ net-misc/curl |
113 |
+ webdav? ( dev-libs/expat ) |
114 |
+ ) |
115 |
+ emacs? ( virtual/emacs ) |
116 |
+" |
117 |
+ |
118 |
+RDEPEND="${CDEPEND} |
119 |
+ gpg? ( app-crypt/gnupg ) |
120 |
+ mediawiki? ( |
121 |
+ dev-perl/DateTime-Format-ISO8601 |
122 |
+ dev-perl/HTML-Tree |
123 |
+ dev-perl/MediaWiki-API |
124 |
+ ) |
125 |
+ perl? ( dev-perl/Error |
126 |
+ dev-perl/Net-SMTP-SSL |
127 |
+ dev-perl/Authen-SASL |
128 |
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) ) |
129 |
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite ) |
130 |
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) |
131 |
+ ) |
132 |
+ python? ( ${PYTHON_DEPS} ) |
133 |
+" |
134 |
+ |
135 |
+# This is how info docs are created with Git: |
136 |
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook |
137 |
+# .xml/docbook --(docbook2texi.pl)--> .texi |
138 |
+# .texi --(makeinfo)---------> .info |
139 |
+DEPEND="${CDEPEND} |
140 |
+ doc? ( |
141 |
+ app-text/asciidoc |
142 |
+ app-text/docbook2X |
143 |
+ sys-apps/texinfo |
144 |
+ app-text/xmlto |
145 |
+ ) |
146 |
+ nls? ( sys-devel/gettext ) |
147 |
+ test? ( app-crypt/gnupg )" |
148 |
+ |
149 |
+# Live ebuild builds man pages and HTML docs, additionally |
150 |
+if [[ ${PV} == *9999 ]]; then |
151 |
+ DEPEND="${DEPEND} |
152 |
+ app-text/asciidoc" |
153 |
+fi |
154 |
+ |
155 |
+SITEFILE=50${PN}-gentoo.el |
156 |
+S="${WORKDIR}/${MY_P}" |
157 |
+ |
158 |
+REQUIRED_USE=" |
159 |
+ cgi? ( perl ) |
160 |
+ cvs? ( perl ) |
161 |
+ mediawiki? ( perl ) |
162 |
+ mediawiki-experimental? ( mediawiki ) |
163 |
+ subversion? ( perl ) |
164 |
+ webdav? ( curl ) |
165 |
+ pcre-jit? ( pcre ) |
166 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
167 |
+" |
168 |
+ |
169 |
+PATCHES=( |
170 |
+ # bug #350330 - automagic CVS when we don't want it is bad. |
171 |
+ "${FILESDIR}"/git-2.12.0-optional-cvs.patch |
172 |
+ |
173 |
+ # install mediawiki perl modules also in vendor_dir |
174 |
+ # hack, needs better upstream solution |
175 |
+ "${FILESDIR}"/git-1.8.5-mw-vendor.patch |
176 |
+ |
177 |
+ "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch |
178 |
+ |
179 |
+ # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. |
180 |
+ "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch |
181 |
+) |
182 |
+ |
183 |
+pkg_setup() { |
184 |
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then |
185 |
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" |
186 |
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You" |
187 |
+ ewarn "have been warned." |
188 |
+ fi |
189 |
+ if use python ; then |
190 |
+ python-single-r1_pkg_setup |
191 |
+ fi |
192 |
+} |
193 |
+ |
194 |
+# This is needed because for some obscure reasons future calls to make don't |
195 |
+# pick up these exports if we export them in src_unpack() |
196 |
+exportmakeopts() { |
197 |
+ local myopts |
198 |
+ |
199 |
+ if use blksha1 ; then |
200 |
+ myopts+=" BLK_SHA1=YesPlease" |
201 |
+ elif use ppcsha1 ; then |
202 |
+ myopts+=" PPC_SHA1=YesPlease" |
203 |
+ fi |
204 |
+ |
205 |
+ if use curl ; then |
206 |
+ use webdav || myopts+=" NO_EXPAT=YesPlease" |
207 |
+ else |
208 |
+ myopts+=" NO_CURL=YesPlease" |
209 |
+ fi |
210 |
+ |
211 |
+ # broken assumptions, because of static build system ... |
212 |
+ myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease" |
213 |
+ myopts+=" INSTALL=install TAR=tar" |
214 |
+ myopts+=" SHELL_PATH=${EPREFIX}/bin/sh" |
215 |
+ myopts+=" SANE_TOOL_PATH=" |
216 |
+ myopts+=" OLD_ICONV=" |
217 |
+ myopts+=" NO_EXTERNAL_GREP=" |
218 |
+ |
219 |
+ # For svn-fe |
220 |
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')" |
221 |
+ |
222 |
+ # can't define this to null, since the entire makefile depends on it |
223 |
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile |
224 |
+ |
225 |
+ use iconv \ |
226 |
+ || myopts+=" NO_ICONV=YesPlease" |
227 |
+ use nls \ |
228 |
+ || myopts+=" NO_GETTEXT=YesPlease" |
229 |
+ use tk \ |
230 |
+ || myopts+=" NO_TCLTK=YesPlease" |
231 |
+ if use pcre; then |
232 |
+ if use pcre-jit; then |
233 |
+ myopts+=" USE_LIBPCRE2=YesPlease" |
234 |
+ extlibs+=" -lpcre2-8" |
235 |
+ else |
236 |
+ myopts+=" USE_LIBPCRE1=YesPlease" |
237 |
+ myopts+=" NO_LIBPCRE1_JIT=YesPlease" |
238 |
+ extlibs+=" -lpcre" |
239 |
+ fi |
240 |
+ fi |
241 |
+ use perl \ |
242 |
+ && myopts+=" INSTALLDIRS=vendor" \ |
243 |
+ || myopts+=" NO_PERL=YesPlease" |
244 |
+ use python \ |
245 |
+ || myopts+=" NO_PYTHON=YesPlease" |
246 |
+ use subversion \ |
247 |
+ || myopts+=" NO_SVN_TESTS=YesPlease" |
248 |
+ use threads \ |
249 |
+ && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \ |
250 |
+ || myopts+=" NO_PTHREADS=YesPlease" |
251 |
+ use cvs \ |
252 |
+ || myopts+=" NO_CVS=YesPlease" |
253 |
+ use elibc_musl \ |
254 |
+ && myopts+=" NO_REGEX=YesPlease" |
255 |
+# Disabled until ~m68k-mint can be keyworded again |
256 |
+# if [[ ${CHOST} == *-mint* ]] ; then |
257 |
+# myopts+=" NO_MMAP=YesPlease" |
258 |
+# myopts+=" NO_IPV6=YesPlease" |
259 |
+# myopts+=" NO_STRLCPY=YesPlease" |
260 |
+# myopts+=" NO_MEMMEM=YesPlease" |
261 |
+# myopts+=" NO_MKDTEMP=YesPlease" |
262 |
+# myopts+=" NO_MKSTEMPS=YesPlease" |
263 |
+# fi |
264 |
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then |
265 |
+ myopts+=" NO_NSEC=YesPlease" |
266 |
+ fi |
267 |
+ if [[ ${CHOST} == *-*-aix* ]]; then |
268 |
+ myopts+=" NO_FNMATCH_CASEFOLD=YesPlease" |
269 |
+ fi |
270 |
+ if [[ ${CHOST} == *-solaris* ]]; then |
271 |
+ myopts+=" NEEDS_LIBICONV=YesPlease" |
272 |
+ myopts+=" HAVE_CLOCK_MONOTONIC=1" |
273 |
+ grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ |
274 |
+ myopts+=" HAVE_GETDELIM=1" |
275 |
+ fi |
276 |
+ |
277 |
+ has_version '>=app-text/asciidoc-8.0' \ |
278 |
+ && myopts+=" ASCIIDOC8=YesPlease" |
279 |
+ myopts+=" ASCIIDOC_NO_ROFF=YesPlease" |
280 |
+ |
281 |
+ # Bug 290465: |
282 |
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' |
283 |
+ [[ "${CHOST}" == *-uclibc* ]] && \ |
284 |
+ myopts+=" NO_NSEC=YesPlease" |
285 |
+ |
286 |
+ export MY_MAKEOPTS="${myopts}" |
287 |
+ export EXTLIBS="${extlibs}" |
288 |
+} |
289 |
+ |
290 |
+src_unpack() { |
291 |
+ if [[ ${PV} != *9999 ]]; then |
292 |
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX} |
293 |
+ cd "${S}" |
294 |
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
295 |
+ use doc && \ |
296 |
+ cd "${S}"/Documentation && \ |
297 |
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
298 |
+ cd "${S}" |
299 |
+ else |
300 |
+ git-r3_src_unpack |
301 |
+ cd "${S}" |
302 |
+ #cp "${FILESDIR}"/GIT-VERSION-GEN . |
303 |
+ fi |
304 |
+ |
305 |
+} |
306 |
+ |
307 |
+src_prepare() { |
308 |
+ # add experimental patches to improve mediawiki support |
309 |
+ # see patches for origin |
310 |
+ if use mediawiki-experimental ; then |
311 |
+ PATCHES+=( |
312 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch |
313 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch |
314 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch |
315 |
+ ) |
316 |
+ fi |
317 |
+ |
318 |
+ default |
319 |
+ |
320 |
+ sed -i \ |
321 |
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \ |
322 |
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \ |
323 |
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \ |
324 |
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \ |
325 |
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ |
326 |
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ |
327 |
+ Makefile contrib/svn-fe/Makefile || die "sed failed" |
328 |
+ |
329 |
+ # Never install the private copy of Error.pm (bug #296310) |
330 |
+ sed -i \ |
331 |
+ -e '/private-Error.pm/s,^,#,' \ |
332 |
+ perl/Makefile.PL |
333 |
+ |
334 |
+ # Fix docbook2texi command |
335 |
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ |
336 |
+ Documentation/Makefile || die "sed failed" |
337 |
+ |
338 |
+ # Fix git-subtree missing DESTDIR |
339 |
+ sed -i \ |
340 |
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ |
341 |
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ |
342 |
+ contrib/subtree/Makefile |
343 |
+} |
344 |
+ |
345 |
+git_emake() { |
346 |
+ # bug #320647: PYTHON_PATH |
347 |
+ PYTHON_PATH="" |
348 |
+ use python && PYTHON_PATH="${PYTHON}" |
349 |
+ emake ${MY_MAKEOPTS} \ |
350 |
+ DESTDIR="${D}" \ |
351 |
+ OPTCFLAGS="${CFLAGS}" \ |
352 |
+ OPTLDFLAGS="${LDFLAGS}" \ |
353 |
+ OPTCC="$(tc-getCC)" \ |
354 |
+ OPTAR="$(tc-getAR)" \ |
355 |
+ prefix="${EPREFIX}"/usr \ |
356 |
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ |
357 |
+ sysconfdir="${EPREFIX}"/etc \ |
358 |
+ PYTHON_PATH="${PYTHON_PATH}" \ |
359 |
+ PERL_PATH="${EPREFIX}/usr/bin/perl" \ |
360 |
+ PERL_MM_OPT="" \ |
361 |
+ GIT_TEST_OPTS="--no-color" \ |
362 |
+ V=1 \ |
363 |
+ "$@" |
364 |
+} |
365 |
+ |
366 |
+src_configure() { |
367 |
+ exportmakeopts |
368 |
+} |
369 |
+ |
370 |
+src_compile() { |
371 |
+ if use perl ; then |
372 |
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed" |
373 |
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed" |
374 |
+ fi |
375 |
+ git_emake || die "emake failed" |
376 |
+ |
377 |
+ if use emacs ; then |
378 |
+ elisp-compile contrib/emacs/git{,-blame}.el |
379 |
+ fi |
380 |
+ |
381 |
+ if use perl && use cgi ; then |
382 |
+ git_emake \ |
383 |
+ gitweb \ |
384 |
+ || die "emake gitweb (cgi) failed" |
385 |
+ fi |
386 |
+ |
387 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
388 |
+ cd "${S}"/contrib/credential/osxkeychain || die |
389 |
+ git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ |
390 |
+ || die "emake credential-osxkeychain" |
391 |
+ fi |
392 |
+ |
393 |
+ cd "${S}"/Documentation |
394 |
+ if [[ ${PV} == *9999 ]] ; then |
395 |
+ git_emake man \ |
396 |
+ || die "emake man failed" |
397 |
+ if use doc ; then |
398 |
+ git_emake info html \ |
399 |
+ || die "emake info html failed" |
400 |
+ fi |
401 |
+ else |
402 |
+ if use doc ; then |
403 |
+ git_emake info \ |
404 |
+ || die "emake info html failed" |
405 |
+ fi |
406 |
+ fi |
407 |
+ |
408 |
+ if use subversion ; then |
409 |
+ cd "${S}"/contrib/svn-fe |
410 |
+ # by defining EXTLIBS we override the detection for libintl and |
411 |
+ # libiconv, bug #516168 |
412 |
+ local nlsiconv= |
413 |
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl" |
414 |
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv" |
415 |
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed" |
416 |
+ if use doc ; then |
417 |
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed" |
418 |
+ fi |
419 |
+ cd "${S}" |
420 |
+ fi |
421 |
+ |
422 |
+ if use gnome-keyring ; then |
423 |
+ cd "${S}"/contrib/credential/libsecret |
424 |
+ git_emake || die "emake git-credential-libsecret failed" |
425 |
+ fi |
426 |
+ |
427 |
+ cd "${S}"/contrib/subtree || die |
428 |
+ git_emake |
429 |
+ use doc && git_emake doc |
430 |
+ |
431 |
+ cd "${S}"/contrib/diff-highlight || die |
432 |
+ git_emake |
433 |
+ |
434 |
+ if use mediawiki ; then |
435 |
+ cd "${S}"/contrib/mw-to-git |
436 |
+ git_emake |
437 |
+ fi |
438 |
+} |
439 |
+ |
440 |
+src_install() { |
441 |
+ git_emake \ |
442 |
+ install || \ |
443 |
+ die "make install failed" |
444 |
+ |
445 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
446 |
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain |
447 |
+ fi |
448 |
+ |
449 |
+ # Depending on the tarball and manual rebuild of the documentation, the |
450 |
+ # manpages may exist in either OR both of these directories. |
451 |
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] |
452 |
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] |
453 |
+ dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} |
454 |
+ use doc && dodir /usr/share/doc/${PF}/html |
455 |
+ for d in / /howto/ /technical/ ; do |
456 |
+ docinto ${d} |
457 |
+ dodoc Documentation${d}*.txt |
458 |
+ if use doc ; then |
459 |
+ docinto ${d}/html |
460 |
+ dodoc Documentation${d}*.html |
461 |
+ fi |
462 |
+ done |
463 |
+ docinto / |
464 |
+ # Upstream does not ship this pre-built :-( |
465 |
+ use doc && doinfo Documentation/{git,gitman}.info |
466 |
+ |
467 |
+ newbashcomp contrib/completion/git-completion.bash ${PN} |
468 |
+ bashcomp_alias git gitk |
469 |
+ # Not really a bash-completion file (bug #477920) |
470 |
+ # but still needed uncompressed (bug #507480) |
471 |
+ insinto /usr/share/${PN} |
472 |
+ doins contrib/completion/git-prompt.sh |
473 |
+ |
474 |
+ if use emacs ; then |
475 |
+ elisp-install ${PN} contrib/emacs/git.{el,elc} |
476 |
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc} |
477 |
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} |
478 |
+ # don't add automatically to the load-path, so the sitefile |
479 |
+ # can do a conditional loading |
480 |
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch" |
481 |
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE} |
482 |
+ fi |
483 |
+ |
484 |
+ #dobin contrib/fast-import/git-p4 # Moved upstream |
485 |
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream |
486 |
+ newbin contrib/fast-import/import-tars.perl import-tars |
487 |
+ exeinto /usr/libexec/git-core/ |
488 |
+ newexe contrib/git-resurrect.sh git-resurrect |
489 |
+ |
490 |
+ # git-subtree |
491 |
+ cd "${S}"/contrib/subtree |
492 |
+ git_emake install || die "Failed to emake install git-subtree" |
493 |
+ if use doc ; then |
494 |
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree" |
495 |
+ fi |
496 |
+ newdoc README README.git-subtree |
497 |
+ dodoc git-subtree.txt |
498 |
+ cd "${S}" |
499 |
+ |
500 |
+ if use mediawiki ; then |
501 |
+ cd "${S}"/contrib/mw-to-git |
502 |
+ git_emake install |
503 |
+ cd "${S}" |
504 |
+ fi |
505 |
+ |
506 |
+ # diff-highlight |
507 |
+ dobin contrib/diff-highlight/diff-highlight |
508 |
+ newdoc contrib/diff-highlight/README README.diff-highlight |
509 |
+ |
510 |
+ # git-jump |
511 |
+ exeinto /usr/libexec/git-core/ |
512 |
+ doexe contrib/git-jump/git-jump |
513 |
+ newdoc contrib/git-jump/README git-jump.txt |
514 |
+ |
515 |
+ # git-contacts |
516 |
+ exeinto /usr/libexec/git-core/ |
517 |
+ doexe contrib/contacts/git-contacts |
518 |
+ dodoc contrib/contacts/git-contacts.txt |
519 |
+ |
520 |
+ if use gnome-keyring ; then |
521 |
+ cd "${S}"/contrib/credential/libsecret |
522 |
+ dobin git-credential-libsecret |
523 |
+ fi |
524 |
+ |
525 |
+ if use subversion ; then |
526 |
+ cd "${S}"/contrib/svn-fe |
527 |
+ dobin svn-fe |
528 |
+ dodoc svn-fe.txt |
529 |
+ if use doc ; then |
530 |
+ doman svn-fe.1 |
531 |
+ docinto html |
532 |
+ dodoc svn-fe.html |
533 |
+ fi |
534 |
+ cd "${S}" |
535 |
+ fi |
536 |
+ |
537 |
+ dodir /usr/share/${PN}/contrib |
538 |
+ # The following are excluded: |
539 |
+ # completion - installed above |
540 |
+ # diff-highlight - done above |
541 |
+ # emacs - installed above |
542 |
+ # examples - these are stuff that is not used in Git anymore actually |
543 |
+ # git-jump - done above |
544 |
+ # gitview - installed above |
545 |
+ # p4import - excluded because fast-import has a better one |
546 |
+ # patches - stuff the Git guys made to go upstream to other places |
547 |
+ # persistent-https - TODO |
548 |
+ # mw-to-git - TODO |
549 |
+ # subtree - build seperately |
550 |
+ # svnimport - use git-svn |
551 |
+ # thunderbird-patch-inline - fixes thunderbird |
552 |
+ local contrib_objects=( |
553 |
+ buildsystems |
554 |
+ fast-import |
555 |
+ hg-to-git |
556 |
+ hooks |
557 |
+ remotes2config.sh |
558 |
+ rerere-train.sh |
559 |
+ stats |
560 |
+ workdir |
561 |
+ ) |
562 |
+ for i in "${contrib_objects[@]}" ; do |
563 |
+ cp -rf \ |
564 |
+ "${S}"/contrib/${i} \ |
565 |
+ "${ED}"/usr/share/${PN}/contrib \ |
566 |
+ || die "Failed contrib ${i}" |
567 |
+ done |
568 |
+ |
569 |
+ if use perl && use cgi ; then |
570 |
+ # We used to install in /usr/share/${PN}/gitweb |
571 |
+ # but upstream installs in /usr/share/gitweb |
572 |
+ # so we will install a symlink and use their location for compat with other |
573 |
+ # distros |
574 |
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb |
575 |
+ |
576 |
+ # INSTALL discusses configuration issues, not just installation |
577 |
+ docinto / |
578 |
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb |
579 |
+ newdoc "${S}"/gitweb/README README.gitweb |
580 |
+ |
581 |
+ for d in "${ED}"/usr/lib{64,}/perl5/ ; do |
582 |
+ if test -d "$d" ; then find "$d" \ |
583 |
+ -name .packlist \ |
584 |
+ -delete || die |
585 |
+ fi |
586 |
+ done |
587 |
+ else |
588 |
+ rm -rf "${ED}"/usr/share/gitweb |
589 |
+ fi |
590 |
+ |
591 |
+ if ! use subversion ; then |
592 |
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \ |
593 |
+ "${ED}"/usr/share/man/man1/git-svn.1* |
594 |
+ fi |
595 |
+ |
596 |
+ if use xinetd ; then |
597 |
+ insinto /etc/xinetd.d |
598 |
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon |
599 |
+ fi |
600 |
+ |
601 |
+ if use !prefix ; then |
602 |
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon |
603 |
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon |
604 |
+ systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service" |
605 |
+ systemd_dounit "${FILESDIR}/git-daemon.socket" |
606 |
+ fi |
607 |
+ |
608 |
+ perl_delete_localpod |
609 |
+ |
610 |
+ # Remove disabled linguas |
611 |
+ # we could remove sources in src_prepare, but install does not |
612 |
+ # handle missing locale dir well |
613 |
+ rm_loc() { |
614 |
+ if [[ -e "${ED}/usr/share/locale/${1}" ]]; then |
615 |
+ rm -r "${ED}/usr/share/locale/${1}" || die |
616 |
+ fi |
617 |
+ } |
618 |
+ l10n_for_each_disabled_locale_do rm_loc |
619 |
+} |
620 |
+ |
621 |
+src_test() { |
622 |
+ local disabled="" |
623 |
+ local tests_cvs="t9200-git-cvsexportcommit.sh \ |
624 |
+ t9400-git-cvsserver-server.sh \ |
625 |
+ t9401-git-cvsserver-crlf.sh \ |
626 |
+ t9402-git-cvsserver-refs.sh \ |
627 |
+ t9600-cvsimport.sh \ |
628 |
+ t9601-cvsimport-vendor-branch.sh \ |
629 |
+ t9602-cvsimport-branches-tags.sh \ |
630 |
+ t9603-cvsimport-patchsets.sh \ |
631 |
+ t9604-cvsimport-timestamps.sh" |
632 |
+ local tests_perl="t3701-add-interactive.sh \ |
633 |
+ t5502-quickfetch.sh \ |
634 |
+ t5512-ls-remote.sh \ |
635 |
+ t5520-pull.sh \ |
636 |
+ t7106-reset-unborn-branch.sh \ |
637 |
+ t7501-commit.sh" |
638 |
+ # Bug #225601 - t0004 is not suitable for root perm |
639 |
+ # Bug #219839 - t1004 is not suitable for root perm |
640 |
+ # t0001-init.sh - check for init notices EPERM* fails |
641 |
+ local tests_nonroot="t0001-init.sh \ |
642 |
+ t0004-unwritable.sh \ |
643 |
+ t0070-fundamental.sh \ |
644 |
+ t1004-read-tree-m-u-wf.sh \ |
645 |
+ t3700-add.sh \ |
646 |
+ t7300-clean.sh" |
647 |
+ # t9100 still fails with symlinks in SVN 1.7 |
648 |
+ local test_svn="t9100-git-svn-basic.sh" |
649 |
+ |
650 |
+ # Unzip is used only for the testcase code, not by any normal parts of Git. |
651 |
+ if ! has_version app-arch/unzip ; then |
652 |
+ einfo "Disabling tar-tree tests" |
653 |
+ disabled+=" t5000-tar-tree.sh" |
654 |
+ fi |
655 |
+ |
656 |
+ cvs=0 |
657 |
+ use cvs && let cvs=$cvs+1 |
658 |
+ if [[ ${EUID} -eq 0 ]]; then |
659 |
+ if [[ $cvs -eq 1 ]]; then |
660 |
+ ewarn "Skipping CVS tests because CVS does not work as root!" |
661 |
+ ewarn "You should retest with FEATURES=userpriv!" |
662 |
+ disabled+=" ${tests_cvs}" |
663 |
+ fi |
664 |
+ einfo "Skipping other tests that require being non-root" |
665 |
+ disabled+=" ${tests_nonroot}" |
666 |
+ else |
667 |
+ [[ $cvs -gt 0 ]] && \ |
668 |
+ has_version dev-vcs/cvs && \ |
669 |
+ let cvs=$cvs+1 |
670 |
+ [[ $cvs -gt 1 ]] && \ |
671 |
+ has_version "dev-vcs/cvs[server]" && \ |
672 |
+ let cvs=$cvs+1 |
673 |
+ if [[ $cvs -lt 3 ]]; then |
674 |
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" |
675 |
+ disabled+=" ${tests_cvs}" |
676 |
+ fi |
677 |
+ fi |
678 |
+ |
679 |
+ if ! use perl ; then |
680 |
+ einfo "Disabling tests that need Perl" |
681 |
+ disabled+=" ${tests_perl}" |
682 |
+ fi |
683 |
+ |
684 |
+ einfo "Disabling tests that fail with SVN 1.7" |
685 |
+ disabled+=" ${test_svn}" |
686 |
+ |
687 |
+ # Reset all previously disabled tests |
688 |
+ cd "${S}/t" |
689 |
+ for i in *.sh.DISABLED ; do |
690 |
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" |
691 |
+ done |
692 |
+ einfo "Disabled tests:" |
693 |
+ for i in ${disabled} ; do |
694 |
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" |
695 |
+ done |
696 |
+ |
697 |
+ # Avoid the test system removing the results because we want them ourselves |
698 |
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \ |
699 |
+ -i "${S}"/t/Makefile |
700 |
+ |
701 |
+ # Clean old results first, must always run |
702 |
+ cd "${S}/t" |
703 |
+ nonfatal git_emake clean |
704 |
+ |
705 |
+ # Now run the tests, keep going if we hit an error, and don't terminate on |
706 |
+ # failure |
707 |
+ cd "${S}" |
708 |
+ einfo "Start test run" |
709 |
+ #MAKEOPTS=-j1 |
710 |
+ nonfatal git_emake --keep-going test |
711 |
+ rc=$? |
712 |
+ |
713 |
+ # Display nice results, now print the results |
714 |
+ cd "${S}/t" |
715 |
+ nonfatal git_emake aggregate-results |
716 |
+ |
717 |
+ # And bail if there was a problem |
718 |
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug." |
719 |
+} |
720 |
+ |
721 |
+showpkgdeps() { |
722 |
+ local pkg=$1 |
723 |
+ shift |
724 |
+ elog " $(printf "%-17s:" ${pkg}) ${@}" |
725 |
+} |
726 |
+ |
727 |
+pkg_postinst() { |
728 |
+ use emacs && elisp-site-regen |
729 |
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion" |
730 |
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt" |
731 |
+ einfo "Note that the prompt bash code is now in that separate script" |
732 |
+ elog "These additional scripts need some dependencies:" |
733 |
+ echo |
734 |
+ showpkgdeps git-quiltimport "dev-util/quilt" |
735 |
+ showpkgdeps git-instaweb \ |
736 |
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" |
737 |
+ echo |
738 |
+ use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." |
739 |
+} |
740 |
+ |
741 |
+pkg_postrm() { |
742 |
+ use emacs && elisp-site-regen |
743 |
+} |
744 |
|
745 |
diff --git a/dev-vcs/git/git-2.17.1.ebuild b/dev-vcs/git/git-2.17.1.ebuild |
746 |
new file mode 100644 |
747 |
index 00000000000..5f55ce0d640 |
748 |
--- /dev/null |
749 |
+++ b/dev-vcs/git/git-2.17.1.ebuild |
750 |
@@ -0,0 +1,715 @@ |
751 |
+# Copyright 1999-2018 Gentoo Foundation |
752 |
+# Distributed under the terms of the GNU General Public License v2 |
753 |
+ |
754 |
+EAPI=6 |
755 |
+ |
756 |
+GENTOO_DEPEND_ON_PERL=no |
757 |
+ |
758 |
+# bug #329479: git-remote-testgit is not multiple-version aware |
759 |
+PYTHON_COMPAT=( python2_7 ) |
760 |
+PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" |
761 |
+if [[ ${PV} == *9999 ]]; then |
762 |
+ SCM="git-r3" |
763 |
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" |
764 |
+ # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. |
765 |
+ # See https://git-scm.com/docs/gitworkflows#_graduation |
766 |
+ # In order of stability: |
767 |
+ # 9999-r0: maint |
768 |
+ # 9999-r1: master |
769 |
+ # 9999-r2: next |
770 |
+ # 9999-r3: pu |
771 |
+ case "${PVR}" in |
772 |
+ 9999) EGIT_BRANCH=maint ;; |
773 |
+ 9999-r1) EGIT_BRANCH=master ;; |
774 |
+ 9999-r2) EGIT_BRANCH=next;; |
775 |
+ 9999-r3) EGIT_BRANCH=pu ;; |
776 |
+ esac |
777 |
+fi |
778 |
+ |
779 |
+inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM} |
780 |
+ |
781 |
+MY_PV="${PV/_rc/.rc}" |
782 |
+MY_P="${PN}-${MY_PV}" |
783 |
+ |
784 |
+DOC_VER=${MY_PV} |
785 |
+ |
786 |
+DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency" |
787 |
+HOMEPAGE="https://www.git-scm.com/" |
788 |
+if [[ ${PV} != *9999 ]]; then |
789 |
+ SRC_URI_SUFFIX="xz" |
790 |
+ SRC_URI_KORG="mirror://kernel/software/scm/git" |
791 |
+ [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' |
792 |
+ SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} |
793 |
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
794 |
+ doc? ( |
795 |
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
796 |
+ )" |
797 |
+ [[ "${PV}" = *_rc* ]] || \ |
798 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~amd64-fbsd" |
799 |
+fi |
800 |
+ |
801 |
+LICENSE="GPL-2" |
802 |
+SLOT="0" |
803 |
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" |
804 |
+ |
805 |
+# Common to both DEPEND and RDEPEND |
806 |
+CDEPEND=" |
807 |
+ gnome-keyring? ( app-crypt/libsecret ) |
808 |
+ !libressl? ( dev-libs/openssl:0= ) |
809 |
+ libressl? ( dev-libs/libressl:= ) |
810 |
+ sys-libs/zlib |
811 |
+ pcre? ( |
812 |
+ pcre-jit? ( dev-libs/libpcre2[jit(+)] ) |
813 |
+ !pcre-jit? ( dev-libs/libpcre ) |
814 |
+ ) |
815 |
+ perl? ( dev-lang/perl:=[-build(-)] ) |
816 |
+ tk? ( dev-lang/tk:0= ) |
817 |
+ curl? ( |
818 |
+ net-misc/curl |
819 |
+ webdav? ( dev-libs/expat ) |
820 |
+ ) |
821 |
+ emacs? ( virtual/emacs ) |
822 |
+" |
823 |
+ |
824 |
+RDEPEND="${CDEPEND} |
825 |
+ gpg? ( app-crypt/gnupg ) |
826 |
+ perl? ( |
827 |
+ dev-perl/Error |
828 |
+ dev-perl/MailTools |
829 |
+ dev-perl/Net-SMTP-SSL |
830 |
+ dev-perl/Authen-SASL |
831 |
+ cgi? ( |
832 |
+ dev-perl/CGI |
833 |
+ highlight? ( app-text/highlight ) |
834 |
+ ) |
835 |
+ cvs? ( |
836 |
+ >=dev-vcs/cvsps-2.1:0 |
837 |
+ dev-perl/DBI |
838 |
+ dev-perl/DBD-SQLite |
839 |
+ ) |
840 |
+ mediawiki? ( |
841 |
+ dev-perl/DateTime-Format-ISO8601 |
842 |
+ dev-perl/HTML-Tree |
843 |
+ dev-perl/MediaWiki-API |
844 |
+ ) |
845 |
+ subversion? ( |
846 |
+ dev-vcs/subversion[-dso,perl] |
847 |
+ dev-perl/libwww-perl |
848 |
+ dev-perl/TermReadKey |
849 |
+ ) |
850 |
+ ) |
851 |
+ python? ( ${PYTHON_DEPS} ) |
852 |
+" |
853 |
+ |
854 |
+# This is how info docs are created with Git: |
855 |
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook |
856 |
+# .xml/docbook --(docbook2texi.pl)--> .texi |
857 |
+# .texi --(makeinfo)---------> .info |
858 |
+DEPEND="${CDEPEND} |
859 |
+ doc? ( |
860 |
+ app-text/asciidoc |
861 |
+ app-text/docbook2X |
862 |
+ sys-apps/texinfo |
863 |
+ app-text/xmlto |
864 |
+ ) |
865 |
+ nls? ( sys-devel/gettext ) |
866 |
+ test? ( app-crypt/gnupg )" |
867 |
+ |
868 |
+# Live ebuild builds man pages and HTML docs, additionally |
869 |
+if [[ ${PV} == *9999 ]]; then |
870 |
+ DEPEND="${DEPEND} |
871 |
+ app-text/asciidoc" |
872 |
+fi |
873 |
+ |
874 |
+SITEFILE="50${PN}-gentoo.el" |
875 |
+S="${WORKDIR}/${MY_P}" |
876 |
+ |
877 |
+REQUIRED_USE=" |
878 |
+ cgi? ( perl ) |
879 |
+ cvs? ( perl ) |
880 |
+ mediawiki? ( perl ) |
881 |
+ mediawiki-experimental? ( mediawiki ) |
882 |
+ subversion? ( perl ) |
883 |
+ webdav? ( curl ) |
884 |
+ pcre-jit? ( pcre ) |
885 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
886 |
+" |
887 |
+ |
888 |
+PATCHES=( |
889 |
+ # bug #350330 - automagic CVS when we don't want it is bad. |
890 |
+ "${FILESDIR}"/git-2.17.0_rc1-optional-cvs.patch |
891 |
+ |
892 |
+ "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch |
893 |
+ |
894 |
+ # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. |
895 |
+ "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch |
896 |
+) |
897 |
+ |
898 |
+pkg_setup() { |
899 |
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then |
900 |
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" |
901 |
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You" |
902 |
+ ewarn "have been warned." |
903 |
+ fi |
904 |
+ if use python ; then |
905 |
+ python-single-r1_pkg_setup |
906 |
+ fi |
907 |
+} |
908 |
+ |
909 |
+# This is needed because for some obscure reasons future calls to make don't |
910 |
+# pick up these exports if we export them in src_unpack() |
911 |
+exportmakeopts() { |
912 |
+ local myopts=( |
913 |
+ ASCIIDOC_NO_ROFF=YesPlease |
914 |
+ $(usex cvs '' NO_CVS=YesPlease) |
915 |
+ $(usex elibc_musl NO_REGEX=YesPlease '') |
916 |
+ $(usex iconv '' NO_ICONV=YesPlease) |
917 |
+ $(usex nls '' NO_GETTEXT=YesPlease) |
918 |
+ $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) |
919 |
+ $(usex python '' NO_PYTHON=YesPlease) |
920 |
+ $(usex subversion '' NO_SVN_TESTS=YesPlease) |
921 |
+ $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease) |
922 |
+ $(usex tk '' NO_TCLTK=YesPlease) |
923 |
+ ) |
924 |
+ |
925 |
+ if use blksha1 ; then |
926 |
+ myopts+=( BLK_SHA1=YesPlease ) |
927 |
+ elif use ppcsha1 ; then |
928 |
+ myopts+=( PPC_SHA1=YesPlease ) |
929 |
+ fi |
930 |
+ |
931 |
+ if use curl ; then |
932 |
+ use webdav || myopts+=( NO_EXPAT=YesPlease ) |
933 |
+ else |
934 |
+ myopts+=( NO_CURL=YesPlease ) |
935 |
+ fi |
936 |
+ |
937 |
+ # broken assumptions, because of static build system ... |
938 |
+ myopts+=( |
939 |
+ NO_FINK=YesPlease |
940 |
+ NO_DARWIN_PORTS=YesPlease |
941 |
+ INSTALL=install |
942 |
+ TAR=tar |
943 |
+ SHELL_PATH="${EPREFIX}/bin/sh" |
944 |
+ SANE_TOOL_PATH= |
945 |
+ OLD_ICONV= |
946 |
+ NO_EXTERNAL_GREP= |
947 |
+ ) |
948 |
+ |
949 |
+ # For svn-fe |
950 |
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')" |
951 |
+ |
952 |
+ # can't define this to null, since the entire makefile depends on it |
953 |
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die |
954 |
+ |
955 |
+ if use pcre; then |
956 |
+ if use pcre-jit; then |
957 |
+ myopts+=( USE_LIBPCRE2=YesPlease ) |
958 |
+ extlibs+=" -lpcre2-8" |
959 |
+ else |
960 |
+ myopts+=( |
961 |
+ USE_LIBPCRE1=YesPlease |
962 |
+ NO_LIBPCRE1_JIT=YesPlease |
963 |
+ ) |
964 |
+ extlibs+=" -lpcre" |
965 |
+ fi |
966 |
+ fi |
967 |
+# Disabled until ~m68k-mint can be keyworded again |
968 |
+# if [[ ${CHOST} == *-mint* ]] ; then |
969 |
+# myopts+=( |
970 |
+# NO_MMAP=YesPlease |
971 |
+# NO_IPV6=YesPlease |
972 |
+# NO_STRLCPY=YesPlease |
973 |
+# NO_MEMMEM=YesPlease |
974 |
+# NO_MKDTEMP=YesPlease |
975 |
+# NO_MKSTEMPS=YesPlease |
976 |
+# ) |
977 |
+# fi |
978 |
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then |
979 |
+ myopts+=( NO_NSEC=YesPlease ) |
980 |
+ fi |
981 |
+ if [[ ${CHOST} == *-*-aix* ]]; then |
982 |
+ myopts+=( NO_FNMATCH_CASEFOLD=YesPlease ) |
983 |
+ fi |
984 |
+ if [[ ${CHOST} == *-solaris* ]]; then |
985 |
+ myopts+=( |
986 |
+ NEEDS_LIBICONV=YesPlease |
987 |
+ HAVE_CLOCK_MONOTONIC=1 |
988 |
+ ) |
989 |
+ grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ |
990 |
+ myopts+=( HAVE_GETDELIM=1 ) |
991 |
+ fi |
992 |
+ |
993 |
+ has_version '>=app-text/asciidoc-8.0' \ |
994 |
+ && myopts+=( ASCIIDOC8=YesPlease ) |
995 |
+ |
996 |
+ # Bug 290465: |
997 |
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' |
998 |
+ [[ "${CHOST}" == *-uclibc* ]] && \ |
999 |
+ myopts+=( NO_NSEC=YesPlease ) |
1000 |
+ |
1001 |
+ export MY_MAKEOPTS="${myopts[@]}" |
1002 |
+ export EXTLIBS="${extlibs}" |
1003 |
+} |
1004 |
+ |
1005 |
+src_unpack() { |
1006 |
+ if [[ ${PV} != *9999 ]]; then |
1007 |
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX} |
1008 |
+ cd "${S}" || die |
1009 |
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
1010 |
+ if use doc ; then |
1011 |
+ pushd "${S}"/Documentation &>/dev/null || die |
1012 |
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
1013 |
+ popd &>/dev/null || die |
1014 |
+ fi |
1015 |
+ else |
1016 |
+ git-r3_src_unpack |
1017 |
+ #cp "${FILESDIR}"/GIT-VERSION-GEN . |
1018 |
+ fi |
1019 |
+ |
1020 |
+} |
1021 |
+ |
1022 |
+src_prepare() { |
1023 |
+ # add experimental patches to improve mediawiki support |
1024 |
+ # see patches for origin |
1025 |
+ if use mediawiki-experimental ; then |
1026 |
+ PATCHES+=( |
1027 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch |
1028 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch |
1029 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch |
1030 |
+ ) |
1031 |
+ fi |
1032 |
+ |
1033 |
+ default |
1034 |
+ |
1035 |
+ sed -i \ |
1036 |
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \ |
1037 |
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \ |
1038 |
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \ |
1039 |
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \ |
1040 |
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ |
1041 |
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ |
1042 |
+ Makefile contrib/svn-fe/Makefile || die |
1043 |
+ |
1044 |
+ # Fix docbook2texi command |
1045 |
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ |
1046 |
+ Documentation/Makefile || die |
1047 |
+ |
1048 |
+ # Fix git-subtree missing DESTDIR |
1049 |
+ sed -i \ |
1050 |
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ |
1051 |
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ |
1052 |
+ contrib/subtree/Makefile || die |
1053 |
+} |
1054 |
+ |
1055 |
+git_emake() { |
1056 |
+ # bug #320647: PYTHON_PATH |
1057 |
+ local PYTHON_PATH="" |
1058 |
+ use python && PYTHON_PATH="${PYTHON}" |
1059 |
+ emake ${MY_MAKEOPTS} \ |
1060 |
+ prefix="${EPREFIX}"/usr \ |
1061 |
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ |
1062 |
+ perllibdir="$(perl_get_raw_vendorlib)" \ |
1063 |
+ sysconfdir="${EPREFIX}"/etc \ |
1064 |
+ DESTDIR="${D}" \ |
1065 |
+ GIT_TEST_OPTS="--no-color" \ |
1066 |
+ OPTAR="$(tc-getAR)" \ |
1067 |
+ OPTCC="$(tc-getCC)" \ |
1068 |
+ OPTCFLAGS="${CFLAGS}" \ |
1069 |
+ OPTLDFLAGS="${LDFLAGS}" \ |
1070 |
+ PERL_PATH="${EPREFIX}/usr/bin/perl" \ |
1071 |
+ PERL_MM_OPT="" \ |
1072 |
+ PYTHON_PATH="${PYTHON_PATH}" \ |
1073 |
+ V=1 \ |
1074 |
+ "$@" |
1075 |
+} |
1076 |
+ |
1077 |
+src_configure() { |
1078 |
+ exportmakeopts |
1079 |
+} |
1080 |
+ |
1081 |
+src_compile() { |
1082 |
+ git_emake || die "emake failed" |
1083 |
+ |
1084 |
+ if use emacs ; then |
1085 |
+ elisp-compile contrib/emacs/git{,-blame}.el |
1086 |
+ fi |
1087 |
+ |
1088 |
+ if use perl && use cgi ; then |
1089 |
+ git_emake \ |
1090 |
+ gitweb \ |
1091 |
+ || die "emake gitweb (cgi) failed" |
1092 |
+ fi |
1093 |
+ |
1094 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
1095 |
+ pushd contrib/credential/osxkeychain &>/dev/null || die |
1096 |
+ git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ |
1097 |
+ || die "emake credential-osxkeychain" |
1098 |
+ popd &>/dev/null || die |
1099 |
+ fi |
1100 |
+ |
1101 |
+ pushd Documentation &>/dev/null || die |
1102 |
+ if [[ ${PV} == *9999 ]] ; then |
1103 |
+ git_emake man \ |
1104 |
+ || die "emake man failed" |
1105 |
+ if use doc ; then |
1106 |
+ git_emake info html \ |
1107 |
+ || die "emake info html failed" |
1108 |
+ fi |
1109 |
+ else |
1110 |
+ if use doc ; then |
1111 |
+ git_emake info \ |
1112 |
+ || die "emake info html failed" |
1113 |
+ fi |
1114 |
+ fi |
1115 |
+ popd &>/dev/null || die |
1116 |
+ |
1117 |
+ if use subversion ; then |
1118 |
+ pushd contrib/svn-fe &>/dev/null || die |
1119 |
+ # by defining EXTLIBS we override the detection for libintl and |
1120 |
+ # libiconv, bug #516168 |
1121 |
+ local nlsiconv= |
1122 |
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl" |
1123 |
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv" |
1124 |
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed" |
1125 |
+ if use doc ; then |
1126 |
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed" |
1127 |
+ fi |
1128 |
+ popd &>/dev/null || die |
1129 |
+ fi |
1130 |
+ |
1131 |
+ if use gnome-keyring ; then |
1132 |
+ pushd contrib/credential/libsecret &>/dev/null || die |
1133 |
+ git_emake || die "emake git-credential-libsecret failed" |
1134 |
+ popd &>/dev/null || die |
1135 |
+ fi |
1136 |
+ |
1137 |
+ pushd contrib/subtree &>/dev/null || die |
1138 |
+ git_emake |
1139 |
+ use doc && git_emake doc |
1140 |
+ popd &>/dev/null || die |
1141 |
+ |
1142 |
+ pushd contrib/diff-highlight &>/dev/null || die |
1143 |
+ git_emake |
1144 |
+ popd &>/dev/null || die |
1145 |
+ |
1146 |
+ if use mediawiki ; then |
1147 |
+ pushd contrib/mw-to-git &>/dev/null || die |
1148 |
+ git_emake |
1149 |
+ popd &>/dev/null || die |
1150 |
+ |
1151 |
+ fi |
1152 |
+} |
1153 |
+ |
1154 |
+src_install() { |
1155 |
+ git_emake \ |
1156 |
+ install || \ |
1157 |
+ die "make install failed" |
1158 |
+ |
1159 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
1160 |
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain |
1161 |
+ fi |
1162 |
+ |
1163 |
+ # Depending on the tarball and manual rebuild of the documentation, the |
1164 |
+ # manpages may exist in either OR both of these directories. |
1165 |
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] |
1166 |
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] |
1167 |
+ dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} |
1168 |
+ use doc && dodir /usr/share/doc/${PF}/html |
1169 |
+ for d in / /howto/ /technical/ ; do |
1170 |
+ docinto ${d} |
1171 |
+ dodoc Documentation${d}*.txt |
1172 |
+ if use doc ; then |
1173 |
+ docinto ${d}/html |
1174 |
+ dodoc Documentation${d}*.html |
1175 |
+ fi |
1176 |
+ done |
1177 |
+ docinto / |
1178 |
+ # Upstream does not ship this pre-built :-( |
1179 |
+ use doc && doinfo Documentation/{git,gitman}.info |
1180 |
+ |
1181 |
+ newbashcomp contrib/completion/git-completion.bash ${PN} |
1182 |
+ bashcomp_alias git gitk |
1183 |
+ # Not really a bash-completion file (bug #477920) |
1184 |
+ # but still needed uncompressed (bug #507480) |
1185 |
+ insinto /usr/share/${PN} |
1186 |
+ doins contrib/completion/git-prompt.sh |
1187 |
+ |
1188 |
+ if use emacs ; then |
1189 |
+ elisp-install ${PN} contrib/emacs/git.{el,elc} |
1190 |
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc} |
1191 |
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} |
1192 |
+ # don't add automatically to the load-path, so the sitefile |
1193 |
+ # can do a conditional loading |
1194 |
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch" |
1195 |
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE} |
1196 |
+ fi |
1197 |
+ |
1198 |
+ #dobin contrib/fast-import/git-p4 # Moved upstream |
1199 |
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream |
1200 |
+ newbin contrib/fast-import/import-tars.perl import-tars |
1201 |
+ exeinto /usr/libexec/git-core/ |
1202 |
+ newexe contrib/git-resurrect.sh git-resurrect |
1203 |
+ |
1204 |
+ # git-subtree |
1205 |
+ pushd contrib/subtree &>/dev/null || die |
1206 |
+ git_emake install || die "Failed to emake install git-subtree" |
1207 |
+ if use doc ; then |
1208 |
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree" |
1209 |
+ fi |
1210 |
+ newdoc README README.git-subtree |
1211 |
+ dodoc git-subtree.txt |
1212 |
+ popd &>/dev/null || die |
1213 |
+ |
1214 |
+ if use mediawiki ; then |
1215 |
+ pushd contrib/mw-to-git &>/dev/null || die |
1216 |
+ git_emake install |
1217 |
+ popd &>/dev/null || die |
1218 |
+ fi |
1219 |
+ |
1220 |
+ # diff-highlight |
1221 |
+ dobin contrib/diff-highlight/diff-highlight |
1222 |
+ newdoc contrib/diff-highlight/README README.diff-highlight |
1223 |
+ |
1224 |
+ # git-jump |
1225 |
+ exeinto /usr/libexec/git-core/ |
1226 |
+ doexe contrib/git-jump/git-jump |
1227 |
+ newdoc contrib/git-jump/README git-jump.txt |
1228 |
+ |
1229 |
+ # git-contacts |
1230 |
+ exeinto /usr/libexec/git-core/ |
1231 |
+ doexe contrib/contacts/git-contacts |
1232 |
+ dodoc contrib/contacts/git-contacts.txt |
1233 |
+ |
1234 |
+ if use gnome-keyring ; then |
1235 |
+ pushd contrib/credential/libsecret &>/dev/null || die |
1236 |
+ dobin git-credential-libsecret |
1237 |
+ popd &>/dev/null || die |
1238 |
+ fi |
1239 |
+ |
1240 |
+ if use subversion ; then |
1241 |
+ pushd contrib/svn-fe &>/dev/null || die |
1242 |
+ dobin svn-fe |
1243 |
+ dodoc svn-fe.txt |
1244 |
+ if use doc ; then |
1245 |
+ doman svn-fe.1 |
1246 |
+ docinto html |
1247 |
+ dodoc svn-fe.html |
1248 |
+ fi |
1249 |
+ popd &>/dev/null || die |
1250 |
+ fi |
1251 |
+ |
1252 |
+ dodir /usr/share/${PN}/contrib |
1253 |
+ # The following are excluded: |
1254 |
+ # completion - installed above |
1255 |
+ # diff-highlight - done above |
1256 |
+ # emacs - installed above |
1257 |
+ # examples - these are stuff that is not used in Git anymore actually |
1258 |
+ # git-jump - done above |
1259 |
+ # gitview - installed above |
1260 |
+ # p4import - excluded because fast-import has a better one |
1261 |
+ # patches - stuff the Git guys made to go upstream to other places |
1262 |
+ # persistent-https - TODO |
1263 |
+ # mw-to-git - TODO |
1264 |
+ # subtree - build seperately |
1265 |
+ # svnimport - use git-svn |
1266 |
+ # thunderbird-patch-inline - fixes thunderbird |
1267 |
+ local contrib_objects=( |
1268 |
+ buildsystems |
1269 |
+ fast-import |
1270 |
+ hg-to-git |
1271 |
+ hooks |
1272 |
+ remotes2config.sh |
1273 |
+ rerere-train.sh |
1274 |
+ stats |
1275 |
+ workdir |
1276 |
+ ) |
1277 |
+ for i in "${contrib_objects[@]}" ; do |
1278 |
+ cp -rf \ |
1279 |
+ "${S}"/contrib/${i} \ |
1280 |
+ "${ED%/}"/usr/share/${PN}/contrib \ |
1281 |
+ || die "Failed contrib ${i}" |
1282 |
+ done |
1283 |
+ |
1284 |
+ if use perl && use cgi ; then |
1285 |
+ # We used to install in /usr/share/${PN}/gitweb |
1286 |
+ # but upstream installs in /usr/share/gitweb |
1287 |
+ # so we will install a symlink and use their location for compat with other |
1288 |
+ # distros |
1289 |
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb |
1290 |
+ |
1291 |
+ # INSTALL discusses configuration issues, not just installation |
1292 |
+ docinto / |
1293 |
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb |
1294 |
+ newdoc "${S}"/gitweb/README README.gitweb |
1295 |
+ |
1296 |
+ for d in "${ED%/}"/usr/lib{,64}/perl5/ ; do |
1297 |
+ if test -d "$d" ; then find "$d" \ |
1298 |
+ -name .packlist \ |
1299 |
+ -delete || die |
1300 |
+ fi |
1301 |
+ done |
1302 |
+ else |
1303 |
+ rm -rf "${ED%/}"/usr/share/gitweb |
1304 |
+ fi |
1305 |
+ |
1306 |
+ if ! use subversion ; then |
1307 |
+ rm -f "${ED%/}"/usr/libexec/git-core/git-svn \ |
1308 |
+ "${ED%/}"/usr/share/man/man1/git-svn.1* |
1309 |
+ fi |
1310 |
+ |
1311 |
+ if use xinetd ; then |
1312 |
+ insinto /etc/xinetd.d |
1313 |
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon |
1314 |
+ fi |
1315 |
+ |
1316 |
+ if use !prefix ; then |
1317 |
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon |
1318 |
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon |
1319 |
+ systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service" |
1320 |
+ systemd_dounit "${FILESDIR}/git-daemon.socket" |
1321 |
+ fi |
1322 |
+ |
1323 |
+ perl_delete_localpod |
1324 |
+ |
1325 |
+ # Remove disabled linguas |
1326 |
+ # we could remove sources in src_prepare, but install does not |
1327 |
+ # handle missing locale dir well |
1328 |
+ rm_loc() { |
1329 |
+ if [[ -e "${ED%/}/usr/share/locale/${1}" ]]; then |
1330 |
+ rm -r "${ED%/}/usr/share/locale/${1}" || die |
1331 |
+ fi |
1332 |
+ } |
1333 |
+ l10n_for_each_disabled_locale_do rm_loc |
1334 |
+} |
1335 |
+ |
1336 |
+src_test() { |
1337 |
+ local disabled=() |
1338 |
+ local tests_cvs=( |
1339 |
+ t9200-git-cvsexportcommit.sh |
1340 |
+ t9400-git-cvsserver-server.sh |
1341 |
+ t9401-git-cvsserver-crlf.sh |
1342 |
+ t9402-git-cvsserver-refs.sh |
1343 |
+ t9600-cvsimport.sh |
1344 |
+ t9601-cvsimport-vendor-branch.sh |
1345 |
+ t9602-cvsimport-branches-tags.sh |
1346 |
+ t9603-cvsimport-patchsets.sh |
1347 |
+ t9604-cvsimport-timestamps.sh |
1348 |
+ ) |
1349 |
+ local tests_perl=( |
1350 |
+ t3701-add-interactive.sh |
1351 |
+ t5502-quickfetch.sh |
1352 |
+ t5512-ls-remote.sh |
1353 |
+ t5520-pull.sh |
1354 |
+ t7106-reset-unborn-branch.sh |
1355 |
+ t7501-commit.sh |
1356 |
+ ) |
1357 |
+ # Bug #225601 - t0004 is not suitable for root perm |
1358 |
+ # Bug #219839 - t1004 is not suitable for root perm |
1359 |
+ # t0001-init.sh - check for init notices EPERM* fails |
1360 |
+ local tests_nonroot=( |
1361 |
+ t0001-init.sh |
1362 |
+ t0004-unwritable.sh |
1363 |
+ t0070-fundamental.sh |
1364 |
+ t1004-read-tree-m-u-wf.sh |
1365 |
+ t3700-add.sh |
1366 |
+ t7300-clean.sh |
1367 |
+ ) |
1368 |
+ # t9100 still fails with symlinks in SVN 1.7 |
1369 |
+ local test_svn=( t9100-git-svn-basic.sh ) |
1370 |
+ |
1371 |
+ # Unzip is used only for the testcase code, not by any normal parts of Git. |
1372 |
+ if ! has_version app-arch/unzip ; then |
1373 |
+ einfo "Disabling tar-tree tests" |
1374 |
+ disabled+=( t5000-tar-tree.sh ) |
1375 |
+ fi |
1376 |
+ |
1377 |
+ local cvs=0 |
1378 |
+ use cvs && let cvs=${cvs}+1 |
1379 |
+ if [[ ${EUID} -eq 0 ]]; then |
1380 |
+ if [[ ${cvs} -eq 1 ]]; then |
1381 |
+ ewarn "Skipping CVS tests because CVS does not work as root!" |
1382 |
+ ewarn "You should retest with FEATURES=userpriv!" |
1383 |
+ disabled+=( ${tests_cvs[@]} ) |
1384 |
+ fi |
1385 |
+ einfo "Skipping other tests that require being non-root" |
1386 |
+ disabled+=( ${tests_nonroot[@]} ) |
1387 |
+ else |
1388 |
+ [[ ${cvs} -gt 0 ]] && \ |
1389 |
+ has_version dev-vcs/cvs && \ |
1390 |
+ let cvs=${cvs}+1 |
1391 |
+ [[ ${cvs} -gt 1 ]] && \ |
1392 |
+ has_version "dev-vcs/cvs[server]" && \ |
1393 |
+ let cvs=${cvs}+1 |
1394 |
+ if [[ ${cvs} -lt 3 ]]; then |
1395 |
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" |
1396 |
+ disabled+=( ${tests_cvs[@]} ) |
1397 |
+ fi |
1398 |
+ fi |
1399 |
+ |
1400 |
+ if ! use perl ; then |
1401 |
+ einfo "Disabling tests that need Perl" |
1402 |
+ disabled+=( ${tests_perl[@]} ) |
1403 |
+ fi |
1404 |
+ |
1405 |
+ einfo "Disabling tests that fail with SVN 1.7" |
1406 |
+ disabled+=( ${test_svn[@]} ) |
1407 |
+ |
1408 |
+ # Reset all previously disabled tests |
1409 |
+ pushd t &>/dev/null || die |
1410 |
+ local i |
1411 |
+ for i in *.sh.DISABLED ; do |
1412 |
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" |
1413 |
+ done |
1414 |
+ einfo "Disabled tests:" |
1415 |
+ for i in ${disabled[@]} ; do |
1416 |
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}" |
1417 |
+ done |
1418 |
+ |
1419 |
+ # Avoid the test system removing the results because we want them ourselves |
1420 |
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \ |
1421 |
+ -i Makefile || die |
1422 |
+ |
1423 |
+ # Clean old results first, must always run |
1424 |
+ nonfatal git_emake clean |
1425 |
+ popd &>/dev/null || die |
1426 |
+ |
1427 |
+ # Now run the tests, keep going if we hit an error, and don't terminate on |
1428 |
+ # failure |
1429 |
+ local rc |
1430 |
+ einfo "Start test run" |
1431 |
+ #MAKEOPTS=-j1 |
1432 |
+ nonfatal git_emake --keep-going test |
1433 |
+ rc=$? |
1434 |
+ |
1435 |
+ # Display nice results, now print the results |
1436 |
+ pushd t &>/dev/null || die |
1437 |
+ nonfatal git_emake aggregate-results |
1438 |
+ |
1439 |
+ # And bail if there was a problem |
1440 |
+ [ ${rc} -eq 0 ] || die "tests failed. Please file a bug." |
1441 |
+} |
1442 |
+ |
1443 |
+showpkgdeps() { |
1444 |
+ local pkg=$1 |
1445 |
+ shift |
1446 |
+ elog " $(printf "%-17s:" ${pkg}) ${@}" |
1447 |
+} |
1448 |
+ |
1449 |
+pkg_postinst() { |
1450 |
+ use emacs && elisp-site-regen |
1451 |
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion" |
1452 |
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt" |
1453 |
+ einfo "Note that the prompt bash code is now in that separate script" |
1454 |
+ elog "These additional scripts need some dependencies:" |
1455 |
+ echo |
1456 |
+ showpkgdeps git-quiltimport "dev-util/quilt" |
1457 |
+ showpkgdeps git-instaweb \ |
1458 |
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" |
1459 |
+ echo |
1460 |
+ use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." |
1461 |
+} |
1462 |
+ |
1463 |
+pkg_postrm() { |
1464 |
+ use emacs && elisp-site-regen |
1465 |
+} |