1 |
commit: 14c6b806e3b091aaba9c41bf1fe24ff56fdf23e6 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 9 09:02:48 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 9 09:20:52 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14c6b806 |
7 |
|
8 |
dev-vcs/git: Bump to version 2.30.1 |
9 |
|
10 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
dev-vcs/git/Manifest | 3 + |
14 |
dev-vcs/git/git-2.30.1.ebuild | 676 ++++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 679 insertions(+) |
16 |
|
17 |
diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest |
18 |
index 84704c8f94d..b5507515c56 100644 |
19 |
--- a/dev-vcs/git/Manifest |
20 |
+++ b/dev-vcs/git/Manifest |
21 |
@@ -2,11 +2,14 @@ DIST git-2.26.2.tar.xz 6007864 BLAKE2B efce003a95e24dbb6e14feebd35874c9ed1a5c06d |
22 |
DIST git-2.28.0.tar.xz 6117608 BLAKE2B 81c834dfda5b8e3065d098e411eb2408a1e7ccfde9c447a4164c131c9c2c32dcfd888980bcd180952435c05976a4fa18c155830432170deff70aa1aa2989cd2a SHA512 a6159c0a15e3c5f9603157d4010664a6d74e7d65b9fe97a03b36fac12607248ed57980d96565841e88eae343001c167222232737d3af812608c8db011941df1a |
23 |
DIST git-2.29.2.tar.xz 6187988 BLAKE2B 15c2446a266d7cc3032e4b3bd32f57a2c2ff3d377848f307225ea585883c993ed835c8ffe02202386360b94f5a1f4bd3124322f0034c0d65ed15aa28b7e45ffa SHA512 34117628c6d43ac0940c43bffaa1bda7f12af863728f391492725a3e57d1bbda523cf7734e90f463fe9a9ae4e70fc1cc2523643dbb3c27377d98dc4736b0ea62 |
24 |
DIST git-2.30.0.tar.xz 6325652 BLAKE2B c5a67ccb7790f1747d714b402f22de6bd5cf783de8765fade7af0ad51ac780c80d43ab22b33431b57db246a11ef073dfd291961476a3c9414339f133221cbea6 SHA512 2ce154d6e224e78d7da2ea9b954d8cf56bdfe43636b93dd5045a950a7362d3943866b4949eb5ed03528d6e5f0466c33c233b502d84430ed9d90326bcc696101d |
25 |
+DIST git-2.30.1.tar.xz 6327976 BLAKE2B 3b459d10a2b8d601e0882da8346bba1c0fb9aa01823e9cf9f6d50557d7cd6b6b89eea17209a5b3bfb199c37ae8bf33b730784686a166d7ed9ef36dd0975d5624 SHA512 b3567d251c73807857f05f46cae3acb4e0d876590d122229c05509d5eb17fc3eee0ba97a1b2068070b399085f7a92aa2493c4833b98f65b8ef15fc279798caa3 |
26 |
DIST git-htmldocs-2.26.2.tar.xz 1304788 BLAKE2B e0de88c5c41646d5fb9b54e2ee873c7904e1b85c67f971499f0227eb2dd59cabd4ffc58c468cf8a7a7466920af972dbc7f95d78003e487edac9a15a9c49b80a2 SHA512 b577693180b4fc035af211e3b83e98ad5e1bfbb98706924858df6558383b82ca05f870bdae90f8a14c8bf664f091ee928af52dcdebdfb98dc7387fdfe2e3a396 |
27 |
DIST git-htmldocs-2.28.0.tar.xz 1347596 BLAKE2B 9c447f951cc31eb306841d12a94aefd3bb9699f374f2919f7eed0789f6b49cd54df74ecddaa1475203a5dca33140787f53272774f71ccbb48e5da5f1ab6bfbde SHA512 bbe7a7c221d1bb8d9852d5210a80b3d60c5b66f159591971abb2d9a08570cb7bf85686c7eba8cf37e04d37d63702906b308692a68c05fdbd0e3f3d60322003f0 |
28 |
DIST git-htmldocs-2.29.2.tar.xz 1364856 BLAKE2B 76498ef5bfdc058ad1e7c3b2c0c5ba715fa2682c7429db837cfeb7abe64ae3561e8b3f2dc032dd193514778271a040b1b120071d12ae5082a415db5084c7b6aa SHA512 d7223160af9bc97201bff59b94c8c09d331cdb9f979c878698230bb579b3f4751b6a455d8413ce09a507799744d7e3c77a2ad4d265386de7ef3ba9e11fb20445 |
29 |
DIST git-htmldocs-2.30.0.tar.xz 1340536 BLAKE2B 2204b276b941497e0ff5f1710c55b42f573b4eebd96619041db7afabb5a5d36252b2582b29e3d083abaf5da478810d056df83bdfa1d08c5396ffe03d0d858820 SHA512 3fc53a508497621c8af5ea26337407ed9489e768160c7063cfcc4bb53f51631ef968057f1498e37a901313aa08b4153533ca15a9bdfcbd04d2ed11256007db3e |
30 |
+DIST git-htmldocs-2.30.1.tar.xz 1341796 BLAKE2B b282d16af234256ccb4e1099d42800d674b5ff4ea1e365557aa6672aac573b4e98e43ddbeb02291cd6925bfd217d2e8e99aae47e9f46fd06ad013fec87b8d3fe SHA512 e2debb0dde49f1e6a5944ed35dfa62d6d2e6f71d745e6f6adfb477513f21004f04cd5de8e8444d4a24d9818c3cb85f5720848991a763fbc3541e89cfdf21dd49 |
31 |
DIST git-manpages-2.26.2.tar.xz 462052 BLAKE2B 27fc44360c9f890e9f7754e8423f5596548f076f5fec5dfc6c752e8b3caa5f64ba182c1566b67878b19fbb115297e08def1bf9d2711c7334cbb8e1b20fc039a1 SHA512 9591e94683a6b49d8b9f2afddc826576023fdfa6de6db4af3a28a2af00b175d5be710d86a31d0f1b8320cc38b6f27698e17fb3e8c1f2b0c5ced37296ef1109b6 |
32 |
DIST git-manpages-2.28.0.tar.xz 472524 BLAKE2B 84752bee094eb879be8905dd561593e9f2a71d91971be7be83ed421bdeef83f7165f9506297bf23127a46a1d05c718999dab6b3ac3bda0ce0fba95ca64145de8 SHA512 ba4d41c2c2efd1eb5ab8ccf00efcebbc2fbbd31ab325da66b05181d15f677c2fc97c9eefd58c3b1c75a07276b399214f398df8d084c1a5092f982ce392876a2f |
33 |
DIST git-manpages-2.29.2.tar.xz 478516 BLAKE2B d9a9840a8c869e2f7f9dade12c780032a7eeff59314b4d45c8c65e3f076e0335f0674c484fe7cebbc70d13b51a17b5fcf69b1bd51dca7ff226d76b1fed33d8bf SHA512 f2af31f8b2242961a0633258dd4668dbf21b26eff440e302608bc5bee2ed45a3e573528cdd0f11503d0ac4745e03cb457d99f5529fc96c105ce441ece07e4fe8 |
34 |
DIST git-manpages-2.30.0.tar.xz 481792 BLAKE2B 9f6273e36e06a0296506d43b25a826cef9e459fdd25ad2f844de323b998fe9b5a7e5181b21257e7b297ea4ce2e16cfaacf7f1c7486ce26b59e39e643361d4745 SHA512 9593d9bef8b3bdcd5645cf89e0f0c53989342414363ce85cfd46da181750c92e8f6dbd860c6badc9d871b383bb9cf273b4fb3af7f6d46a8df6b95fddeab578ae |
35 |
+DIST git-manpages-2.30.1.tar.xz 482128 BLAKE2B 2e7f3943b5e95a3b00dda95f74c519889218e908aa3872f5ae93d88ac9602ad389e9be9df99ec7daafb0a324c03a3a50c7f3c697a1a7e9f35f795682ba85fb4c SHA512 1cd535fff2a658d9ecb99c1f26663e2b37df429dfcff417c298e00fb5de107ef54848447ad63c2f78d8621f431f8f8b92bc871474a701db48deff04a0b595d07 |
36 |
|
37 |
diff --git a/dev-vcs/git/git-2.30.1.ebuild b/dev-vcs/git/git-2.30.1.ebuild |
38 |
new file mode 100644 |
39 |
index 00000000000..7b5b5846318 |
40 |
--- /dev/null |
41 |
+++ b/dev-vcs/git/git-2.30.1.ebuild |
42 |
@@ -0,0 +1,676 @@ |
43 |
+# Copyright 1999-2021 Gentoo Authors |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+ |
46 |
+EAPI=7 |
47 |
+ |
48 |
+GENTOO_DEPEND_ON_PERL=no |
49 |
+ |
50 |
+# bug #329479: git-remote-testgit is not multiple-version aware |
51 |
+PYTHON_COMPAT=( python3_{7,8} ) |
52 |
+ |
53 |
+inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd |
54 |
+ |
55 |
+PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" |
56 |
+if [[ ${PV} == *9999 ]]; then |
57 |
+ inherit git-r3 |
58 |
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" |
59 |
+ # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. |
60 |
+ # See https://git-scm.com/docs/gitworkflows#_graduation |
61 |
+ # In order of stability: |
62 |
+ # 9999-r0: maint |
63 |
+ # 9999-r1: master |
64 |
+ # 9999-r2: next |
65 |
+ # 9999-r3: pu |
66 |
+ case "${PVR}" in |
67 |
+ 9999) EGIT_BRANCH=maint ;; |
68 |
+ 9999-r1) EGIT_BRANCH=master ;; |
69 |
+ 9999-r2) EGIT_BRANCH=next;; |
70 |
+ 9999-r3) EGIT_BRANCH=pu ;; |
71 |
+ esac |
72 |
+fi |
73 |
+ |
74 |
+MY_PV="${PV/_rc/.rc}" |
75 |
+MY_P="${PN}-${MY_PV}" |
76 |
+ |
77 |
+DOC_VER="${MY_PV}" |
78 |
+ |
79 |
+DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency" |
80 |
+HOMEPAGE="https://www.git-scm.com/" |
81 |
+if [[ ${PV} != *9999 ]]; then |
82 |
+ SRC_URI_SUFFIX="xz" |
83 |
+ SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git" |
84 |
+ [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' |
85 |
+ SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} |
86 |
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
87 |
+ doc? ( |
88 |
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
89 |
+ )" |
90 |
+ [[ "${PV}" == *_rc* ]] || \ |
91 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
92 |
+fi |
93 |
+ |
94 |
+LICENSE="GPL-2" |
95 |
+SLOT="0" |
96 |
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 subversion tk +threads +webdav xinetd cvs test" |
97 |
+ |
98 |
+# Common to both DEPEND and RDEPEND |
99 |
+DEPEND=" |
100 |
+ gnome-keyring? ( app-crypt/libsecret ) |
101 |
+ !libressl? ( dev-libs/openssl:0= ) |
102 |
+ libressl? ( dev-libs/libressl:= ) |
103 |
+ sys-libs/zlib |
104 |
+ pcre? ( |
105 |
+ pcre-jit? ( dev-libs/libpcre2[jit(+)] ) |
106 |
+ !pcre-jit? ( dev-libs/libpcre ) |
107 |
+ ) |
108 |
+ perl? ( dev-lang/perl:=[-build(-)] ) |
109 |
+ tk? ( dev-lang/tk:0= ) |
110 |
+ curl? ( |
111 |
+ net-misc/curl |
112 |
+ webdav? ( dev-libs/expat ) |
113 |
+ ) |
114 |
+ emacs? ( >=app-editors/emacs-23.1:* ) |
115 |
+ iconv? ( virtual/libiconv ) |
116 |
+" |
117 |
+ |
118 |
+RDEPEND="${DEPEND} |
119 |
+ gpg? ( app-crypt/gnupg ) |
120 |
+ perl? ( |
121 |
+ dev-perl/Error |
122 |
+ dev-perl/MailTools |
123 |
+ dev-perl/Authen-SASL |
124 |
+ >=virtual/perl-libnet-3.110.0-r4[ssl] |
125 |
+ cgi? ( |
126 |
+ dev-perl/CGI |
127 |
+ highlight? ( app-text/highlight ) |
128 |
+ ) |
129 |
+ cvs? ( |
130 |
+ >=dev-vcs/cvsps-2.1:0 |
131 |
+ dev-perl/DBI |
132 |
+ dev-perl/DBD-SQLite |
133 |
+ ) |
134 |
+ mediawiki? ( |
135 |
+ dev-perl/DateTime-Format-ISO8601 |
136 |
+ dev-perl/HTML-Tree |
137 |
+ dev-perl/MediaWiki-API |
138 |
+ ) |
139 |
+ subversion? ( |
140 |
+ dev-vcs/subversion[-dso(-),perl] |
141 |
+ dev-perl/libwww-perl |
142 |
+ dev-perl/TermReadKey |
143 |
+ ) |
144 |
+ ) |
145 |
+ perforce? ( ${PYTHON_DEPS} ) |
146 |
+" |
147 |
+ |
148 |
+# This is how info docs are created with Git: |
149 |
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook |
150 |
+# .xml/docbook --(docbook2texi.pl)--> .texi |
151 |
+# .texi --(makeinfo)---------> .info |
152 |
+BDEPEND=" |
153 |
+ doc? ( |
154 |
+ app-text/asciidoc |
155 |
+ app-text/docbook2X |
156 |
+ app-text/xmlto |
157 |
+ sys-apps/texinfo |
158 |
+ ) |
159 |
+ nls? ( sys-devel/gettext ) |
160 |
+ test? ( app-crypt/gnupg ) |
161 |
+" |
162 |
+ |
163 |
+# Live ebuild builds man pages and HTML docs, additionally |
164 |
+if [[ ${PV} == *9999 ]]; then |
165 |
+ BDEPEND="${BDEPEND} |
166 |
+ app-text/asciidoc" |
167 |
+fi |
168 |
+ |
169 |
+SITEFILE="50${PN}-gentoo.el" |
170 |
+S="${WORKDIR}/${MY_P}" |
171 |
+ |
172 |
+REQUIRED_USE=" |
173 |
+ cgi? ( perl ) |
174 |
+ cvs? ( perl ) |
175 |
+ mediawiki? ( perl ) |
176 |
+ mediawiki-experimental? ( mediawiki ) |
177 |
+ pcre-jit? ( pcre ) |
178 |
+ perforce? ( ${PYTHON_REQUIRED_USE} ) |
179 |
+ subversion? ( perl ) |
180 |
+ webdav? ( curl ) |
181 |
+" |
182 |
+ |
183 |
+RESTRICT="!test? ( test )" |
184 |
+ |
185 |
+PATCHES=( |
186 |
+ # bug #350330 - automagic CVS when we don't want it is bad. |
187 |
+ "${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch |
188 |
+ |
189 |
+ # Make submodule output quiet |
190 |
+ "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch |
191 |
+) |
192 |
+ |
193 |
+pkg_setup() { |
194 |
+ if use subversion && has_version "dev-vcs/subversion[dso]" ; then |
195 |
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" |
196 |
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You" |
197 |
+ ewarn "have been warned." |
198 |
+ fi |
199 |
+ |
200 |
+ if use perforce ; then |
201 |
+ python-single-r1_pkg_setup |
202 |
+ fi |
203 |
+} |
204 |
+ |
205 |
+# This is needed because for some obscure reasons future calls to make don't |
206 |
+# pick up these exports if we export them in src_unpack() |
207 |
+exportmakeopts() { |
208 |
+ local extlibs myopts |
209 |
+ |
210 |
+ myopts=( |
211 |
+ ASCIIDOC_NO_ROFF=YesPlease |
212 |
+ $(usex cvs '' NO_CVS=YesPlease) |
213 |
+ $(usex elibc_musl NO_REGEX=YesPlease '') |
214 |
+ $(usex iconv '' NO_ICONV=YesPlease) |
215 |
+ $(usex nls '' NO_GETTEXT=YesPlease) |
216 |
+ $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) |
217 |
+ $(usex perforce '' NO_PYTHON=YesPlease) |
218 |
+ $(usex subversion '' NO_SVN_TESTS=YesPlease) |
219 |
+ $(usex threads '' NO_PTHREADS=YesPlease) |
220 |
+ $(usex tk '' NO_TCLTK=YesPlease) |
221 |
+ ) |
222 |
+ |
223 |
+ if use blksha1 ; then |
224 |
+ myopts+=( BLK_SHA1=YesPlease ) |
225 |
+ elif use ppcsha1 ; then |
226 |
+ myopts+=( PPC_SHA1=YesPlease ) |
227 |
+ fi |
228 |
+ |
229 |
+ if use curl ; then |
230 |
+ use webdav || myopts+=( NO_EXPAT=YesPlease ) |
231 |
+ else |
232 |
+ myopts+=( NO_CURL=YesPlease ) |
233 |
+ fi |
234 |
+ |
235 |
+ # broken assumptions, because of static build system ... |
236 |
+ myopts+=( |
237 |
+ NO_FINK=YesPlease |
238 |
+ NO_DARWIN_PORTS=YesPlease |
239 |
+ INSTALL=install |
240 |
+ TAR=tar |
241 |
+ SHELL_PATH="${EPREFIX}/bin/sh" |
242 |
+ SANE_TOOL_PATH= |
243 |
+ OLD_ICONV= |
244 |
+ NO_EXTERNAL_GREP= |
245 |
+ ) |
246 |
+ |
247 |
+ # can't define this to null, since the entire makefile depends on it |
248 |
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die |
249 |
+ |
250 |
+ if use pcre; then |
251 |
+ if use pcre-jit; then |
252 |
+ myopts+=( USE_LIBPCRE2=YesPlease ) |
253 |
+ extlibs+=( -lpcre2-8 ) |
254 |
+ else |
255 |
+ myopts+=( |
256 |
+ USE_LIBPCRE1=YesPlease |
257 |
+ NO_LIBPCRE1_JIT=YesPlease |
258 |
+ ) |
259 |
+ extlibs+=( -lpcre ) |
260 |
+ fi |
261 |
+ fi |
262 |
+ if [[ ${CHOST} == *-solaris* ]]; then |
263 |
+ myopts+=( |
264 |
+ NEEDS_LIBICONV=YesPlease |
265 |
+ HAVE_CLOCK_MONOTONIC=1 |
266 |
+ ) |
267 |
+ if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then |
268 |
+ myopts+=( HAVE_GETDELIM=1 ) |
269 |
+ fi |
270 |
+ fi |
271 |
+ |
272 |
+ if has_version '>=app-text/asciidoc-8.0' ; then |
273 |
+ myopts+=( ASCIIDOC8=YesPlease ) |
274 |
+ fi |
275 |
+ |
276 |
+ # Bug 290465: |
277 |
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' |
278 |
+ if [[ "${CHOST}" == *-uclibc* ]] ; then |
279 |
+ myopts+=( NO_NSEC=YesPlease ) |
280 |
+ use iconv && myopts+=( NEEDS_LIBICONV=YesPlease ) |
281 |
+ fi |
282 |
+ |
283 |
+ export MY_MAKEOPTS="${myopts[@]}" |
284 |
+ export EXTLIBS="${extlibs[@]}" |
285 |
+} |
286 |
+ |
287 |
+src_unpack() { |
288 |
+ if [[ ${PV} != *9999 ]]; then |
289 |
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX} |
290 |
+ cd "${S}" || die |
291 |
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
292 |
+ if use doc ; then |
293 |
+ pushd "${S}"/Documentation &>/dev/null || die |
294 |
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} |
295 |
+ popd &>/dev/null || die |
296 |
+ fi |
297 |
+ else |
298 |
+ git-r3_src_unpack |
299 |
+ #cp "${FILESDIR}"/GIT-VERSION-GEN . |
300 |
+ fi |
301 |
+ |
302 |
+} |
303 |
+ |
304 |
+src_prepare() { |
305 |
+ # add experimental patches to improve mediawiki support |
306 |
+ # see patches for origin |
307 |
+ if use mediawiki-experimental ; then |
308 |
+ PATCHES+=( |
309 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch |
310 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch |
311 |
+ "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch |
312 |
+ ) |
313 |
+ fi |
314 |
+ |
315 |
+ default |
316 |
+ |
317 |
+ sed -i \ |
318 |
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \ |
319 |
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \ |
320 |
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \ |
321 |
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \ |
322 |
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ |
323 |
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ |
324 |
+ Makefile || die |
325 |
+ |
326 |
+ # Fix docbook2texi command |
327 |
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ |
328 |
+ Documentation/Makefile || die |
329 |
+} |
330 |
+ |
331 |
+git_emake() { |
332 |
+ # bug #320647: PYTHON_PATH |
333 |
+ local PYTHON_PATH="" |
334 |
+ use perforce && PYTHON_PATH="${PYTHON}" |
335 |
+ emake ${MY_MAKEOPTS} \ |
336 |
+ prefix="${EPREFIX}"/usr \ |
337 |
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ |
338 |
+ perllibdir="$(use perl && perl_get_raw_vendorlib)" \ |
339 |
+ sysconfdir="${EPREFIX}"/etc \ |
340 |
+ DESTDIR="${D}" \ |
341 |
+ GIT_TEST_OPTS="--no-color" \ |
342 |
+ OPTAR="$(tc-getAR)" \ |
343 |
+ OPTCC="$(tc-getCC)" \ |
344 |
+ OPTCFLAGS="${CFLAGS}" \ |
345 |
+ OPTLDFLAGS="${LDFLAGS}" \ |
346 |
+ PERL_PATH="${EPREFIX}/usr/bin/perl" \ |
347 |
+ PERL_MM_OPT="" \ |
348 |
+ PYTHON_PATH="${PYTHON_PATH}" \ |
349 |
+ V=1 \ |
350 |
+ "$@" |
351 |
+} |
352 |
+ |
353 |
+src_configure() { |
354 |
+ exportmakeopts |
355 |
+} |
356 |
+ |
357 |
+src_compile() { |
358 |
+ git_emake || die "emake failed" |
359 |
+ |
360 |
+ if use emacs ; then |
361 |
+ elisp-compile contrib/emacs/git{,-blame}.el |
362 |
+ fi |
363 |
+ |
364 |
+ if use perl && use cgi ; then |
365 |
+ git_emake \ |
366 |
+ gitweb \ |
367 |
+ || die "emake gitweb (cgi) failed" |
368 |
+ fi |
369 |
+ |
370 |
+ if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then |
371 |
+ pushd contrib/credential/osxkeychain &>/dev/null || die |
372 |
+ git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ |
373 |
+ || die "emake credential-osxkeychain" |
374 |
+ popd &>/dev/null || die |
375 |
+ fi |
376 |
+ |
377 |
+ pushd Documentation &>/dev/null || die |
378 |
+ if [[ ${PV} == *9999 ]] ; then |
379 |
+ git_emake man \ |
380 |
+ || die "emake man failed" |
381 |
+ if use doc ; then |
382 |
+ git_emake info html \ |
383 |
+ || die "emake info html failed" |
384 |
+ fi |
385 |
+ else |
386 |
+ if use doc ; then |
387 |
+ git_emake info \ |
388 |
+ || die "emake info html failed" |
389 |
+ fi |
390 |
+ fi |
391 |
+ popd &>/dev/null || die |
392 |
+ |
393 |
+ if use gnome-keyring ; then |
394 |
+ pushd contrib/credential/libsecret &>/dev/null || die |
395 |
+ git_emake || die "emake git-credential-libsecret failed" |
396 |
+ popd &>/dev/null || die |
397 |
+ fi |
398 |
+ |
399 |
+ pushd contrib/subtree &>/dev/null || die |
400 |
+ git_emake git-subtree |
401 |
+ # git-subtree.1 requires the full USE=doc dependency stack |
402 |
+ use doc && git_emake git-subtree.html git-subtree.1 |
403 |
+ popd &>/dev/null || die |
404 |
+ |
405 |
+ pushd contrib/diff-highlight &>/dev/null || die |
406 |
+ git_emake |
407 |
+ popd &>/dev/null || die |
408 |
+ |
409 |
+ if use mediawiki ; then |
410 |
+ pushd contrib/mw-to-git &>/dev/null || die |
411 |
+ git_emake |
412 |
+ popd &>/dev/null || die |
413 |
+ |
414 |
+ fi |
415 |
+} |
416 |
+ |
417 |
+src_install() { |
418 |
+ git_emake install || die "make install failed" |
419 |
+ |
420 |
+ if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then |
421 |
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain |
422 |
+ fi |
423 |
+ |
424 |
+ # Depending on the tarball and manual rebuild of the documentation, the |
425 |
+ # manpages may exist in either OR both of these directories. |
426 |
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] |
427 |
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] |
428 |
+ dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} |
429 |
+ use doc && dodir /usr/share/doc/${PF}/html |
430 |
+ local d |
431 |
+ for d in / /howto/ /technical/ ; do |
432 |
+ docinto ${d} |
433 |
+ dodoc Documentation${d}*.txt |
434 |
+ if use doc ; then |
435 |
+ docinto ${d}/html |
436 |
+ dodoc Documentation${d}*.html |
437 |
+ fi |
438 |
+ done |
439 |
+ docinto / |
440 |
+ # Upstream does not ship this pre-built :-( |
441 |
+ use doc && doinfo Documentation/{git,gitman}.info |
442 |
+ |
443 |
+ newbashcomp contrib/completion/git-completion.bash ${PN} |
444 |
+ bashcomp_alias git gitk |
445 |
+ # Not really a bash-completion file (bug #477920) |
446 |
+ # but still needed uncompressed (bug #507480) |
447 |
+ insinto /usr/share/${PN} |
448 |
+ doins contrib/completion/git-prompt.sh |
449 |
+ |
450 |
+ if use emacs ; then |
451 |
+ elisp-install ${PN} contrib/emacs/git.{el,elc} |
452 |
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc} |
453 |
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} |
454 |
+ # don't add automatically to the load-path, so the sitefile |
455 |
+ # can do a conditional loading |
456 |
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch" |
457 |
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE} |
458 |
+ fi |
459 |
+ |
460 |
+ #dobin contrib/fast-import/git-p4 # Moved upstream |
461 |
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream |
462 |
+ newbin contrib/fast-import/import-tars.perl import-tars |
463 |
+ exeinto /usr/libexec/git-core/ |
464 |
+ newexe contrib/git-resurrect.sh git-resurrect |
465 |
+ |
466 |
+ # git-subtree |
467 |
+ pushd contrib/subtree &>/dev/null || die |
468 |
+ git_emake install || die "Failed to emake install for git-subtree" |
469 |
+ if use doc ; then |
470 |
+ # Do not move git subtree install-man outside USE=doc! |
471 |
+ git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree" |
472 |
+ fi |
473 |
+ newdoc README README.git-subtree |
474 |
+ dodoc git-subtree.txt |
475 |
+ popd &>/dev/null || die |
476 |
+ |
477 |
+ if use mediawiki ; then |
478 |
+ pushd contrib/mw-to-git &>/dev/null || die |
479 |
+ git_emake install |
480 |
+ popd &>/dev/null || die |
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 gnome-keyring ; then |
498 |
+ pushd contrib/credential/libsecret &>/dev/null || die |
499 |
+ dobin git-credential-libsecret |
500 |
+ popd &>/dev/null || die |
501 |
+ fi |
502 |
+ |
503 |
+ dodir /usr/share/${PN}/contrib |
504 |
+ # The following are excluded: |
505 |
+ # completion - installed above |
506 |
+ # diff-highlight - done above |
507 |
+ # emacs - installed above |
508 |
+ # examples - these are stuff that is not used in Git anymore actually |
509 |
+ # git-jump - done above |
510 |
+ # gitview - installed above |
511 |
+ # p4import - excluded because fast-import has a better one |
512 |
+ # patches - stuff the Git guys made to go upstream to other places |
513 |
+ # persistent-https - TODO |
514 |
+ # mw-to-git - TODO |
515 |
+ # subtree - build seperately |
516 |
+ # svnimport - use git-svn |
517 |
+ # thunderbird-patch-inline - fixes thunderbird |
518 |
+ local contrib_objects=( |
519 |
+ buildsystems |
520 |
+ fast-import |
521 |
+ hg-to-git |
522 |
+ hooks |
523 |
+ remotes2config.sh |
524 |
+ rerere-train.sh |
525 |
+ stats |
526 |
+ workdir |
527 |
+ ) |
528 |
+ local i |
529 |
+ for i in "${contrib_objects[@]}" ; do |
530 |
+ cp -rf \ |
531 |
+ "${S}"/contrib/${i} \ |
532 |
+ "${ED}"/usr/share/${PN}/contrib \ |
533 |
+ || die "Failed contrib ${i}" |
534 |
+ done |
535 |
+ |
536 |
+ if use perl && use cgi ; then |
537 |
+ # We used to install in /usr/share/${PN}/gitweb |
538 |
+ # but upstream installs in /usr/share/gitweb |
539 |
+ # so we will install a symlink and use their location for compat with other |
540 |
+ # distros |
541 |
+ dosym ../gitweb /usr/share/${PN}/gitweb |
542 |
+ |
543 |
+ # INSTALL discusses configuration issues, not just installation |
544 |
+ docinto / |
545 |
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb |
546 |
+ newdoc "${S}"/gitweb/README README.gitweb |
547 |
+ |
548 |
+ for d in "${ED}"/usr/lib{,64}/perl5/ ; do |
549 |
+ if test -d "${d}" ; then find "${d}" \ |
550 |
+ -name .packlist \ |
551 |
+ -delete || die |
552 |
+ fi |
553 |
+ done |
554 |
+ else |
555 |
+ rm -rf "${ED}"/usr/share/gitweb |
556 |
+ fi |
557 |
+ |
558 |
+ if ! use subversion ; then |
559 |
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \ |
560 |
+ "${ED}"/usr/share/man/man1/git-svn.1* |
561 |
+ fi |
562 |
+ |
563 |
+ if use xinetd ; then |
564 |
+ insinto /etc/xinetd.d |
565 |
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon |
566 |
+ fi |
567 |
+ |
568 |
+ if use !prefix ; then |
569 |
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon |
570 |
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon |
571 |
+ systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service" |
572 |
+ systemd_dounit "${FILESDIR}/git-daemon.socket" |
573 |
+ fi |
574 |
+ |
575 |
+ perl_delete_localpod |
576 |
+ |
577 |
+ # Remove disabled linguas |
578 |
+ # we could remove sources in src_prepare, but install does not |
579 |
+ # handle missing locale dir well |
580 |
+ rm_loc() { |
581 |
+ if [[ -e "${ED}/usr/share/locale/${1}" ]]; then |
582 |
+ rm -r "${ED}/usr/share/locale/${1}" || die |
583 |
+ fi |
584 |
+ } |
585 |
+ l10n_for_each_disabled_locale_do rm_loc |
586 |
+} |
587 |
+ |
588 |
+src_test() { |
589 |
+ local disabled=() |
590 |
+ local tests_cvs=( |
591 |
+ t9200-git-cvsexportcommit.sh |
592 |
+ t9400-git-cvsserver-server.sh |
593 |
+ t9401-git-cvsserver-crlf.sh |
594 |
+ t9402-git-cvsserver-refs.sh |
595 |
+ t9600-cvsimport.sh |
596 |
+ t9601-cvsimport-vendor-branch.sh |
597 |
+ t9602-cvsimport-branches-tags.sh |
598 |
+ t9603-cvsimport-patchsets.sh |
599 |
+ t9604-cvsimport-timestamps.sh |
600 |
+ ) |
601 |
+ local tests_perl=( |
602 |
+ t3701-add-interactive.sh |
603 |
+ t5502-quickfetch.sh |
604 |
+ t5512-ls-remote.sh |
605 |
+ t5520-pull.sh |
606 |
+ t7106-reset-unborn-branch.sh |
607 |
+ t7501-commit.sh |
608 |
+ ) |
609 |
+ # Bug #225601 - t0004 is not suitable for root perm |
610 |
+ # Bug #219839 - t1004 is not suitable for root perm |
611 |
+ # t0001-init.sh - check for init notices EPERM* fails |
612 |
+ local tests_nonroot=( |
613 |
+ t0001-init.sh |
614 |
+ t0004-unwritable.sh |
615 |
+ t0070-fundamental.sh |
616 |
+ t1004-read-tree-m-u-wf.sh |
617 |
+ t3700-add.sh |
618 |
+ t7300-clean.sh |
619 |
+ ) |
620 |
+ # t9100 still fails with symlinks in SVN 1.7 |
621 |
+ local test_svn=( t9100-git-svn-basic.sh ) |
622 |
+ |
623 |
+ # Unzip is used only for the testcase code, not by any normal parts of Git. |
624 |
+ if ! has_version app-arch/unzip ; then |
625 |
+ einfo "Disabling tar-tree tests" |
626 |
+ disabled+=( t5000-tar-tree.sh ) |
627 |
+ fi |
628 |
+ |
629 |
+ local cvs=0 |
630 |
+ use cvs && let cvs=${cvs}+1 |
631 |
+ if [[ ${EUID} -eq 0 ]]; then |
632 |
+ if [[ ${cvs} -eq 1 ]]; then |
633 |
+ ewarn "Skipping CVS tests because CVS does not work as root!" |
634 |
+ ewarn "You should retest with FEATURES=userpriv!" |
635 |
+ disabled+=( ${tests_cvs[@]} ) |
636 |
+ fi |
637 |
+ einfo "Skipping other tests that require being non-root" |
638 |
+ disabled+=( ${tests_nonroot[@]} ) |
639 |
+ else |
640 |
+ [[ ${cvs} -gt 0 ]] && \ |
641 |
+ has_version dev-vcs/cvs && \ |
642 |
+ let cvs=${cvs}+1 |
643 |
+ [[ ${cvs} -gt 1 ]] && \ |
644 |
+ has_version "dev-vcs/cvs[server]" && \ |
645 |
+ let cvs=${cvs}+1 |
646 |
+ if [[ ${cvs} -lt 3 ]]; then |
647 |
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" |
648 |
+ disabled+=( ${tests_cvs[@]} ) |
649 |
+ fi |
650 |
+ fi |
651 |
+ |
652 |
+ if ! use perl ; then |
653 |
+ einfo "Disabling tests that need Perl" |
654 |
+ disabled+=( ${tests_perl[@]} ) |
655 |
+ fi |
656 |
+ |
657 |
+ einfo "Disabling tests that fail with SVN 1.7" |
658 |
+ disabled+=( ${test_svn[@]} ) |
659 |
+ |
660 |
+ # Reset all previously disabled tests |
661 |
+ pushd t &>/dev/null || die |
662 |
+ local i |
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 Makefile || die |
674 |
+ |
675 |
+ # Clean old results first, must always run |
676 |
+ nonfatal git_emake clean |
677 |
+ popd &>/dev/null || die |
678 |
+ |
679 |
+ # Now run the tests, keep going if we hit an error, and don't terminate on |
680 |
+ # failure |
681 |
+ local rc |
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 |
+ pushd t &>/dev/null || die |
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 |
+ elog "Please read /usr/share/bash-completion/completions/git for Git bash command" |
704 |
+ elog "completion." |
705 |
+ elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" |
706 |
+ elog "Note that the prompt bash code is now in that separate script" |
707 |
+ elog "These additional scripts need some dependencies:" |
708 |
+ echo |
709 |
+ showpkgdeps git-quiltimport "dev-util/quilt" |
710 |
+ showpkgdeps git-instaweb \ |
711 |
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" |
712 |
+ echo |
713 |
+ use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." |
714 |
+} |
715 |
+ |
716 |
+pkg_postrm() { |
717 |
+ use emacs && elisp-site-regen |
718 |
+} |