Gentoo Archives: gentoo-commits

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