summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-vcs/git
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-vcs/git')
-rw-r--r--dev-vcs/git/Manifest33
-rw-r--r--dev-vcs/git/files/50git-gentoo.el13
-rw-r--r--dev-vcs/git/files/git-1.8.5-mw-destdir.patch37
-rw-r--r--dev-vcs/git/files/git-1.8.5-mw-vendor.patch39
-rw-r--r--dev-vcs/git/files/git-1.8.5-optional-cvs.patch362
-rw-r--r--dev-vcs/git/files/git-1.9.0_rc3-optional-cvs.patch372
-rw-r--r--dev-vcs/git/files/git-2.0.0-r2-optional-cvs.patch375
-rw-r--r--dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch11
-rw-r--r--dev-vcs/git/files/git-2.2.2-optional-cvs.patch454
-rw-r--r--dev-vcs/git/files/git-daemon-r1.initd13
-rw-r--r--dev-vcs/git/files/git-daemon.confd19
-rw-r--r--dev-vcs/git/files/git-daemon.socket9
-rw-r--r--dev-vcs/git/files/git-daemon.xinetd13
-rw-r--r--dev-vcs/git/files/git-daemon_at.service13
-rw-r--r--dev-vcs/git/git-1.8.5.6.ebuild641
-rw-r--r--dev-vcs/git/git-1.9.5.ebuild640
-rw-r--r--dev-vcs/git/git-2.0.5.ebuild639
-rw-r--r--dev-vcs/git/git-2.1.4.ebuild635
-rw-r--r--dev-vcs/git/git-2.2.2.ebuild637
-rw-r--r--dev-vcs/git/git-2.3.6.ebuild636
-rw-r--r--dev-vcs/git/git-2.3.8.ebuild636
-rw-r--r--dev-vcs/git/git-2.4.6.ebuild636
-rw-r--r--dev-vcs/git/git-2.4.7.ebuild636
-rw-r--r--dev-vcs/git/git-2.4.8.ebuild636
-rw-r--r--dev-vcs/git/git-2.5.0.ebuild636
-rw-r--r--dev-vcs/git/git-9999-r1.ebuild637
-rw-r--r--dev-vcs/git/git-9999-r2.ebuild637
-rw-r--r--dev-vcs/git/git-9999-r3.ebuild637
-rw-r--r--dev-vcs/git/git-9999.ebuild637
-rw-r--r--dev-vcs/git/metadata.xml38
30 files changed, 11357 insertions, 0 deletions
diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
new file mode 100644
index 000000000000..2fa775dd0dc3
--- /dev/null
+++ b/dev-vcs/git/Manifest
@@ -0,0 +1,33 @@
+DIST git-1.8.5.6.tar.gz 4765390 SHA256 6a68455cc0cb96aa9cae44ac7afcb5b63a47e9da7c0ff6012bb78d184be41af5 SHA512 fd004a5a99e8ff80556e669ef6e297a4eea9c9f9c58ef9162eef1c66580c4156165c81371ff5832e56ad729d6ed3fb1459a14d682cfd2b8c37c9ceb298be2ef3 WHIRLPOOL 665c9380314abc85cb1e3a114fd60a4f535d7a8aa25437c8c3ff8bc0a3ebedaeef4aa7a6259108ab2f79c3344810b5c2f86f85546fc9015d031c89762bfc4f33
+DIST git-1.9.5.tar.gz 4851532 SHA256 44efbc76edb50103e0d1b549dac006ee6f275fbd62491d7473e21127601f55c1 SHA512 0fa0a1fd636ed29ef54885ecbacc239c2b6edd4820a633fd88a8f62dd7e50ead1676aa0c3cf0df88a49dd5e1364f6b8da3ec9c115d1bc55bba4bf413539bedb0 WHIRLPOOL a860d6b194e27d9a5ba086d665c0b31870d4fc71380a44ec55f0b7f19c6bf973ab0d628e531c175138fce54dfa7d799ed9ab276dffaf9bec66c45cd885e324f2
+DIST git-2.0.5.tar.xz 3437996 SHA256 f5a63f5073c7f10d0676d0dabb46df48f2af77624fe24e1c6047b0e047af8ca1 SHA512 a2de101462cb7cf79ae596a5c7a77746fca430d6ae819731eb025a784b38b48b98964aca3db251e1a598ff17ff26b3711b044bd9c579d01346a8e1e77f7aa6de WHIRLPOOL b317f7b57a8a568b8a63ddbb44d6734dce01034c1b50491e3aedbb8a4ad2dc0f781b9edfad07e73ff050684f05734ee5f8b5483646967cbcd0a3cf7c600394eb
+DIST git-2.1.4.tar.xz 3544804 SHA256 a04968b9b10cbcb31a7054aa3a0d11ac47c83556ecd270ddef1987df5d3d053e SHA512 17333eda9600287be1f366271f314619354f6bc9b7f867d59a9493441e71a963340cedf728b5954ac6311f5426a928a2beacfa7775e1a4d439b58e0dcf310a0b WHIRLPOOL fc20c64e0d494a13834c71ffa5c727018fc3940f4dc65ae4eda6ba14af2faf2864d779e706b503c69a16858ca051878e27bcfe1883c3c206dda6129a1bc5aceb
+DIST git-2.2.2.tar.xz 3592264 SHA256 aa6d2efcc0c7bb9b9edc6d56d90921706b833972f1d2abe70f71be7838f22d05 SHA512 e3ca6f40de04ed940f521fff4c7e92446e40ad1627acc5b4c090ebf114dcf279d4b1f3efe1189ffa43192fce412165621fc12ea90e2f7d02a6a9ccda655dc69b WHIRLPOOL 9e20def83bbb9b11cb5982fc5f19b09767657ff80f02a237dff6ddaddd3209b4cfb9288bec1b6dc80c6a6db1869cfcaa90e2374279012fc8215771c1a58a1fc2
+DIST git-2.3.6.tar.xz 3621716 SHA256 3ce01c54e92b47366756f57742280e052412efde65344e31f51ad8a48a7c60fc SHA512 53ad21db0fa6bb48ee24302c35ee929b1bd1fae3b646845523e7105b8539700cef23e2425170dec0311c7e746c41b743cfd78f192613b586291e44b49c3c284d WHIRLPOOL 12cf33fc19efea4f885a9b5c6d7099893b92742ffaad8e407016abfc5232ddd4763db95fc657a185830e2f904cdb2b04e8ad1c4305f09d77ff8f7db07c139799
+DIST git-2.3.8.tar.xz 3622512 SHA256 cb4d9228f63b7a9500d55383878bb4bbb60b80deb7ae1a5858c7103ba14de5a6 SHA512 bf693fbe7fc16a240470501af2a7736ebfdbf027c0cc8adbd601d2b1c98ec7d968959e06dd8a3d0e206dc351e83a161475191d59d76f9e2da3e13b4de8716fb4 WHIRLPOOL 93aa2d832e57181de25035952a566c9d3330105e277930f088eb10e2073120c296b6dd87375437c9e9b7880c9b56e2c0de0fda5f77f0da9d2f96840c2fe8eda8
+DIST git-2.4.6.tar.xz 3690432 SHA256 bdd944571c03474517b6c9941d6f1fd735eccbb164e59fd133d38644b69453b6 SHA512 2c95a00af81d6fbd8f4984e89d7cb23396caacadd684466aeb5a11f1b3acfbc625f832060cbef5aee0748e36c1fddcd88b3b9c26c4d7aec1d185e5f7311346ef WHIRLPOOL 1ae191666bf27a7e18686b910cbe610f85b5b7a43266232359615fa2a22b80bc659277b71b21394eab53df0c912d9ad911c7793c2a041cd6c7d768a5f0416f5b
+DIST git-2.4.7.tar.xz 3691752 SHA256 6763f5ad1dfe29770aa0c523e08d53a0c7b9d32989bfbf2f39f368c7f61094de SHA512 7772d6e6466b6f835f506def455399fdfc81153975d9b259b1572cd332444187d61a19216f88476300c2030ff7a8baef794b6fe06203776e25f3f702bd31e5de WHIRLPOOL 75e630a448f6a94b179841e072900a68b57d6d9025535ff7a9e31db1591fd3290c4dda3a1a65a4ec91ad8f48fd9ad40b669a67d2d2ce0aff78831e6b41eda93d
+DIST git-2.4.8.tar.xz 3692460 SHA256 c7d2019d3c3b742862b252dcabb3d870b649e1af3fc8a132a0c0149f9e91dfcb SHA512 b1af6bf03dec006ed99601e66dda5b70e576c47d755d8fe5ca3cd974acc33cf2a6b76901549b56f6b4d3d3697f43c84dca35fc21c2cf5e8daad026f1bcc5b263 WHIRLPOOL e00d8e04c86ba611457547c71fb22ebef04b3a7e4316145b29cf073e4e58849bb62963b41660176f6d4e78b492c3b2ac513e80e8db42a91a4dcc31207718f012
+DIST git-2.5.0.tar.xz 3740620 SHA256 cc59b1bac6c1c67a9159872863f6c5bbe0d9404cac2a85c3e9d9fa49923ce45c SHA512 ef7538c9f5ba5b2ac08962401c30e5fd51323b54b9fb5315d259adccec346e8fae9362815832dc2b5ce63a259b315c40e419bb2385dde04d84b992e62f6789b6 WHIRLPOOL 653e7aeb966dec44631bbd257a41935b2e957be9324311a4fd91f3a0ba6f1f674e2e59b4c564d70c4eeaea3788f0af9273a1d0a753b3bc820e687f0d63bddf5d
+DIST git-htmldocs-1.8.5.6.tar.gz 2242475 SHA256 7c8e955d0798686fa030ba7b7b384a2eab2b74d5bd695d82faecac2e247bd211 SHA512 c9b2752bcdd7f8f817b14e99ab2743d153e3e7549bffb2aa98999e46d1e965d045850ec6a3e9f6bc83e6e4820ce20f281c33f946ebd2be16d275b85a5ddaee36 WHIRLPOOL 7db3fb74e6b51618890acfef8fb89ab09adf653d3196e82624671194bdb2b564b903429ffecf68b28faf96ce3ebb83b534459738d48ace048d873c158621d31c
+DIST git-htmldocs-1.9.5.tar.gz 2262251 SHA256 4fa289e259d6b922a51d11a687203612aa1aad5696eb83b4e67c0de8a785700f SHA512 2df975c33d3411a97ab5a684b03998b7cd188d05bae6813c753fe2092b0acf463dec49a7a546d315f520fd9c71281da41998d0f36f64f48d4f95507a034a083b WHIRLPOOL edc252ce58b31f001c0d225f0b40b3689028bd34b1cbbdd889d645d37a2931e9039f76f12e5a0f918579a0b9c5dd1f3171af2bb58ee42972411ca33ec0ebe8f2
+DIST git-htmldocs-2.0.5.tar.xz 944792 SHA256 90eaf745d6ee197718fdde9c98919918ad1e4e3576608e4522b84c612cd9ef2a SHA512 e9b3d92d466762c9c7e164e9c30ff0046b262bf4707ea057e3a682f7b15a4f8149a9aaf2630f117dc3b508744cd688c6c0087cc94ff3477e7f3b85513160d7f3 WHIRLPOOL 35970d099304a5ab174fc93f8496a0c651a259dcaa3d23a2dd0233f8db214ae94a26e28044a87460d4654e61440427d331ceeac290335d6ae3fcf0423175bba9
+DIST git-htmldocs-2.1.4.tar.xz 959144 SHA256 7665daecd77c2f9be8b316eb69a1fda3f383f759e71d346a137c8cf39501d886 SHA512 7734d671ab6ca8374f54546b0987821d0c66d136d50f9cbb1ff7c06da25330e46a10ede41d10a60c80847afa68999298c2f90dfe99d51bd862590f02344e1cbd WHIRLPOOL 97326a00a1f613cf95dbeaf8938842855299d21e6963e2040b3bf9ee02a745c8156ea552e2b87248a98d5f0ecd6560a546a4a49b6635ca034ff2e92504bbb00a
+DIST git-htmldocs-2.2.2.tar.xz 976312 SHA256 41179ff0816189d583f290a227a73788002a319c7ff8c5cada970878c50b901d SHA512 b51b7d619e82d83b4f0b90d31bfccc30291a5beb48b2f5e5e59e75e91e5d772e89b560534a683648cd5480f4bf241f733efc87b30062ef5bb003bf0b5dbeed7f WHIRLPOOL c9dc7ac1a40559e4306d7d97a1619a272faf83d8b05c5a11f5f7b010566cd02fe853fee7eb550c6ccf744db446966a9696f9eb6feeee7ce4f976c6aa88b097d2
+DIST git-htmldocs-2.3.6.tar.xz 987292 SHA256 b37439087ae465534588a65380e3acb66d3e6949904ede720febeed1dc5d8b49 SHA512 ccb836c3df4bfb96174500295c630aa1ac3bea475460434e4d097c3e178bec5a0b5037ff17281fe6a6bc7bb3ae6bcac03ee4009611bb222eccaebc3ae6aac81f WHIRLPOOL 8c58f108d1ea95bf552604b956e727dcf7a8f0eed8979239b0b6ab931aceffc76434137b5f76054563a09985bcaad0a03359da8791469adae71a3a8821084d58
+DIST git-htmldocs-2.3.8.tar.xz 987840 SHA256 54b8d98e34bceeac906ffa8b7c93e8a2cd2cf3c7f4d0c0334e9d5e0c704ca23f SHA512 7aa72d55a6a2687a3ecb26f9db76f69e4003c87864b8239068b029a9d63f99a023bf76ec3ea60952ecf11608d2d684f4ad1b2ac76942cd44ec67bdf8f497330f WHIRLPOOL 60145b5a48a6780b0edb3a7ef50b3649193818e3aa8199de94dd9bf1cca110d7411902c8e7e3df881eec77aa59208780b60b946aeb5f13960de954af6fd88fbe
+DIST git-htmldocs-2.4.6.tar.xz 994712 SHA256 5213e8b882293ec3cda247dabbc75c6ee5243b9d330a8fafec004952fae91a88 SHA512 782fbc38a611380c0af2631bd6123d568b02159fb46159c763d97d75bd84debe43105d83ac3f321cd8383e1334806857bce1a48563fd0c19b43f527fe18615a8 WHIRLPOOL 170e4ecc8255e6d5d562274e6e3fb75c2fc62e415586d61498b680a076c74248664fca35bb7c532009f7f22be4ad14d1fe047e14791991fa32373bd7053e0396
+DIST git-htmldocs-2.4.7.tar.xz 995972 SHA256 ce0d1603f097b89c895613c864a7ac1ed8be36283b98298fff4fcafc2133dbc1 SHA512 1ea356f57299f41cfcb54baac17faf4f12ebb0b992769b0bf36dece800cb07d0b15b5b059d29a7e2469e885da1fa53f899e31e3c9cf58fd7fde4b2168ae19c41 WHIRLPOOL 3ffa7fc366e3a0855ecd6cc3af4577635072082236affc2079caaae2273d0965b0ea2e7fe2fb0d2bbc6b1c44b295325ca19065a4b9ba811bfc95bae94323245d
+DIST git-htmldocs-2.4.8.tar.xz 996004 SHA256 73c9ac3b42da1d3427bfa91c3266c6b7df332137d6ce92217c43db8f479a74ea SHA512 fcd93a76b19bd559ccb28829fa78ae0a2840a70e0c59a2709b2f089f1127b8452ee2f4e8e74128766f50eeeb560d924248d73336f2b5746305823834a9311db2 WHIRLPOOL 249390556106b13e4c02112085bd527720edcb67c85c61e429bea67bc252e7be3b6f4f641534bc342e534d154a9531379e3717d32e5109e48f886174022dce02
+DIST git-htmldocs-2.5.0.tar.xz 1008428 SHA256 0924b290834e2a361a489cbc845a9bf04e56117597dc9c1a40e879cce655e4e2 SHA512 921ae8dd482719912f79f5affb6fa239290a954fb40625ac9fae2edf902989e5126ae7ca5c367b2b55c5387fb3cc3035ddf4e8b360743dbdee0f1b55ec33653c WHIRLPOOL e355781b06fba48d9ada859fe6fb515ddbfbac5a1d5c0918e8570e4566f68d644456606b5b0eb8e3e4cdc7c8b27a96b72cc1907008dff567cae71f0953968843
+DIST git-manpages-1.8.5.6.tar.gz 569061 SHA256 58ef7cb3121639b8d78e2e4c4f7f886bab57af9e9e137b10f372dfad573872c1 SHA512 a524a1c7e8bdc73ffe04bebb5c7050a18c8649b98714bf255c8e3c32a2443d8d5abf33e3ca2eb108d601f01e0bda50fed1e134ffdae87bcf6f551cbbd250c4ba WHIRLPOOL 2db62b96e972dbcbec1ac59d7244bf2c2ff7140c941d1d3c6b9062bd79b80541d7fa3982c5a3bc55a18fc9112ab3fa648966be5c3e1135ab7b5c89080bee82b6
+DIST git-manpages-1.9.5.tar.gz 571625 SHA256 37cc735c4ced6574e8e93349d52d30372fc6f9fe3de3d6b9934a14857d6aade8 SHA512 e3df3e933fed6ff2845989a0146b28789452e9583bc19dd4a9ad335f64b15feffbdc4dd7cdb9d6b5216f7f85837318cf9b10df033f8022777f91c2b0894fb231 WHIRLPOOL e25d77fd8d9cacb92d45fd50640bc65189d02d7e23b276ccaf3b35ba1fe64ab0c49045d1fb8983b7b2b5bd996e767508446ac76506b074ded10feef1f9256918
+DIST git-manpages-2.0.5.tar.xz 359000 SHA256 3cf1581da2a19c0651df445ee5f801e108619befe8965e01d61faa46ca57b642 SHA512 b3981565a34a203283801b86717386971ef53c2f5c47bdde290aa0df4d62045ecbcab1ff1b4d1d8ddf7d489e74d65b0208d87ace7ca8c8be9525be548e445425 WHIRLPOOL e8c78eb38cb3192455ccb991a4ce5cd3988d06f1f06cdf0722e4ce6fb1d4e57f618058cf07d312bcab4f5821a1b1dfc016c03626d4f3429d3e5ef089607a2801
+DIST git-manpages-2.1.4.tar.xz 361252 SHA256 01070bc96e88231f6f279b031fed2919efea8b442fe724f37349ad951d010b04 SHA512 35fe0dd9e0fe9547362abc0e9c5b066abc13a4137b4ea62569fa5b1ae93831da0686e8783be946a9b87274fbc2322ef93425b9d3fc1257023176c772b21b79b2 WHIRLPOOL 9f199eb94657149b51cb20fb55878cb1cf83fa3741906ce37a66b0157df9ca4dae66754fe264019e6bd8e7d286040fec718b89ca4b40b803c059c46521a5cc61
+DIST git-manpages-2.2.2.tar.xz 369876 SHA256 d30688bb62763bf1b87f5eaf4c0a66c68999e479ccd2963108a5f6f82138147c SHA512 5c2220bb09f199ad4fe5c1bc20a813a6c62daab5e6e7fa87bf24861d25b7f7e0fdde215c4f59d8895badd7c361ed202e7837de48d2d54a155d24759db39dd4e1 WHIRLPOOL 45acc45663f13faf5b8197516bb934723bf84cd6db929443e2bd9fc3a915baf258ee93e782741e088a5f799115ea4ee6043225fc9ea9ec954feed21ba54c9be4
+DIST git-manpages-2.3.6.tar.xz 371620 SHA256 b1356f5cb3e7bf53445b08f24ea6950ef1f80031aedd6cd90e3ec60ff1f06b02 SHA512 c7ff2e6aea8c0c12009f29724c899e606b6620e7d408ee3c536fb5239ebcaa0b790a6ee1287dccd88df8776fbc2e72e799124426dbacd82e12f05e3f9f3c909a WHIRLPOOL 7117ba84d888ea448807f3bf51f958b86de011afed1bbad78abf4390c1a77f799f77781f4d9bf1e9287ab903b912b7ca270433c1f4a1f112a4cb4840dde3d400
+DIST git-manpages-2.3.8.tar.xz 371528 SHA256 4d38de9decf80864480fcd5cc58783e3bff4e22383b281193acd82ffa3751fe2 SHA512 8c6aaf60e4b6505ae6789fa658ff15534cf5dfa51c03fdf47a624723b75a8448d71faa9f4ee61c5c243b775c4047dd2ffffc664b37e7f38b60c90fc56252ed93 WHIRLPOOL c6068de21f53e20ec17cd724059d91781e81abf617c2169c1099997afdeac371a59927d9db0b98c1f64c66b3de016b351b08a2f37a43038a924137f6f139a72e
+DIST git-manpages-2.4.6.tar.xz 373408 SHA256 f32d267bdaab75812dbd116d2b329d6dc7287a974e929e380e8cbf96e3822b8e SHA512 fa0562b8cc3e0421f7b45940f8cd4b58a5e58a1eb8571e2de85babf8ffd932fd210baa82aefe3c6090cb7dc51f64f299143be51beaacb37be97832b4a8e2a869 WHIRLPOOL 595beed93c621ffd9b7e0b507fc2941156975190eca8b638826ac32b6ea761bbb08f05e152dc88a7a3dbd168ab083a0128d61e72fae51cd0e94a8c91a1adb3ee
+DIST git-manpages-2.4.7.tar.xz 373568 SHA256 cbf3171d93edea466325809c26c6946716402f7f9ae32e31e97384b2a96377f9 SHA512 e3c59ef02824d553257d5cc78e727ceca75cf1c6ba68375fe6482812ec5ff8684319ada2c38c00574509958bff0f3af732c509726f02e48517c6a8f84ea4f154 WHIRLPOOL 1be4ef465d3446ec8ae4c5ddb25f2fe66ec4b9d116a5789176e83513606cbcd70ecf07038d86903acc93a52a187d99a7c62d3593bc0d7b43a4a7af4ccac6c7ac
+DIST git-manpages-2.4.8.tar.xz 373596 SHA256 47558ec88776e66e6f3e3625b7efdaf2e8ad447cb7af199d60d0788d7f4438c4 SHA512 bb5dc6d7a9af05f2f5a3665f0bac29e5a08919412d69cc756981c88eaa6cf5b8cbe93e04e1aa10d2a48706178eb33a547f416ee191bdb8d25483212aa7e30e5e WHIRLPOOL 0b4ab3099b6604f17a6ff741a9d752c76772ca4f7a02e55db4cbff1e14878c3bdcb25d5e4a71dd2f7a81525475aea35d9ef09d203d949984d95ef02f9865f33c
+DIST git-manpages-2.5.0.tar.xz 377856 SHA256 1a6ea7220b1693eb384af0978a990ea8c0c634a7869d1ef63a2c8e427fc7f6ea SHA512 b3a5f2e8107c529ce81c1570a82472195e205ff1a8ddc75f4f0cbbf25f37a916700156df4418888c8a8a153ab58d5507a31027fb31faadeb5d4ba242847ab28d WHIRLPOOL 09f13622fff6a2b04a8ad584dab54c0b17cbfc6e803ca9e2deadab18071e50b50b37e395bb4746aff2e013f5b0025f8cdb1d439d8e6f3a659fad32646b30f4c7
diff --git a/dev-vcs/git/files/50git-gentoo.el b/dev-vcs/git/files/50git-gentoo.el
new file mode 100644
index 000000000000..1646a391c53c
--- /dev/null
+++ b/dev-vcs/git/files/50git-gentoo.el
@@ -0,0 +1,13 @@
+
+;;; dev-vcs/git site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'git-status "git" "Entry point into git-status mode." t)
+;;(autoload 'git-blame-mode "git-blame"
+;; "Minor mode for incremental blame for Git." t)
+
+;; GNU Emacs >=22.2 already includes vc-git.el.
+;; Enable the following only if Emacs has no GIT support.
+(unless (fboundp 'vc-git-registered)
+ (add-to-list 'load-path "@SITELISP@/compat")
+ (add-to-list 'vc-handled-backends 'GIT))
diff --git a/dev-vcs/git/files/git-1.8.5-mw-destdir.patch b/dev-vcs/git/files/git-1.8.5-mw-destdir.patch
new file mode 100644
index 000000000000..ea4f1758059f
--- /dev/null
+++ b/dev-vcs/git/files/git-1.8.5-mw-destdir.patch
@@ -0,0 +1,37 @@
+diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
+index f206f96..a4b6f7a 100644
+--- a/contrib/mw-to-git/Makefile
++++ b/contrib/mw-to-git/Makefile
+@@ -18,9 +18,13 @@ SCRIPT_PERL+=git-mw.perl
+ GIT_ROOT_DIR=../..
+ HERE=contrib/mw-to-git/
+
++INSTALL = install
++
+ SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
+ INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
+ -s --no-print-directory instlibdir)
++DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
++INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
+
+ all: build
+
+@@ -30,7 +34,9 @@ test: all
+ check: perlcritic test
+
+ install_pm:
+- install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
++ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'
++ $(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \
++ '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'
+
+ build:
+ $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
+@@ -43,7 +49,6 @@ install: install_pm
+ clean:
+ $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
+ clean-perl-script
+- rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
+
+ perlcritic:
+ perlcritic -5 $(SCRIPT_PERL)
diff --git a/dev-vcs/git/files/git-1.8.5-mw-vendor.patch b/dev-vcs/git/files/git-1.8.5-mw-vendor.patch
new file mode 100644
index 000000000000..54302ef26c91
--- /dev/null
+++ b/dev-vcs/git/files/git-1.8.5-mw-vendor.patch
@@ -0,0 +1,39 @@
+diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
+index a4b6f7a..d83df2c 100644
+--- a/contrib/mw-to-git/Makefile
++++ b/contrib/mw-to-git/Makefile
+@@ -22,7 +22,7 @@ INSTALL = install
+
+ SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
+ INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
+- -s --no-print-directory instlibdir)
++ -s --no-print-directory instvendorlibdir)
+ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
+ INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
+
+diff --git a/perl/Makefile b/perl/Makefile
+index 15d96fc..91348c6 100644
+--- a/perl/Makefile
++++ b/perl/Makefile
+@@ -12,7 +12,7 @@ ifndef V
+ QUIET = @
+ endif
+
+-all install instlibdir: $(makfile)
++all install instlibdir instvendorlibdir: $(makfile)
+ $(QUIET)$(MAKE) -f $(makfile) $@
+
+ clean:
+diff --git a/perl/Makefile.PL b/perl/Makefile.PL
+index 3f29ba9..c0b3508 100644
+--- a/perl/Makefile.PL
++++ b/perl/Makefile.PL
+@@ -17,6 +17,8 @@ sub MY::postamble {
+ return <<'MAKE_FRAG';
+ instlibdir:
+ @echo '$(INSTALLSITELIB)'
++instvendorlibdir:
++ @echo '$(INSTALLVENDORLIB)'
+
+ ifneq (,$(DESTDIR))
+ ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
diff --git a/dev-vcs/git/files/git-1.8.5-optional-cvs.patch b/dev-vcs/git/files/git-1.8.5-optional-cvs.patch
new file mode 100644
index 000000000000..aef03d842183
--- /dev/null
+++ b/dev-vcs/git/files/git-1.8.5-optional-cvs.patch
@@ -0,0 +1,362 @@
+From eadb20b065c33d46b49c8c95d8cde0c9fe7c62a4 Mon Sep 17 00:00:00 2001
+From: Robin Johnson <robbat2@gentoo.org>
+Date: Wed, 22 Aug 2012 04:25:06 +0000
+Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
+ utilities
+
+Forward-ported from 1.7.12 to current git.git v1.8.4
+Forward-ported from v1.8.4 to v1.8.5.1
+
+--- git-1.8.5.1/Makefile
++++ git-1.8.5.1/Makefile
+@@ -263,6 +263,8 @@
+ #
+ # Define NO_TCLTK if you do not want Tcl/Tk GUI.
+ #
++# Define NO_CVS if you do not want any CVS interface utilities.
++#
+ # The TCL_PATH variable governs the location of the Tcl interpreter
+ # used to optimize git-gui for your system. Only used if NO_TCLTK
+ # is not set. Defaults to the bare 'tclsh'.
+@@ -437,6 +439,7 @@
+ PROGRAM_OBJS =
+ PROGRAMS =
+ SCRIPT_PERL =
++SCRIPT_PERL_CVS =
+ SCRIPT_PYTHON =
+ SCRIPT_SH =
+ SCRIPT_LIB =
+@@ -477,20 +480,21 @@
+ SCRIPT_PERL += git-add--interactive.perl
+ SCRIPT_PERL += git-difftool.perl
+ SCRIPT_PERL += git-archimport.perl
+-SCRIPT_PERL += git-cvsexportcommit.perl
+-SCRIPT_PERL += git-cvsimport.perl
+-SCRIPT_PERL += git-cvsserver.perl
+ SCRIPT_PERL += git-relink.perl
+ SCRIPT_PERL += git-send-email.perl
+ SCRIPT_PERL += git-svn.perl
+
++SCRIPT_PERL_CVS += git-cvsexportcommit.perl
++SCRIPT_PERL_CVS += git-cvsimport.perl
++SCRIPT_PERL_CVS += git-cvsserver.perl
++
+ SCRIPT_PYTHON += git-p4.py
+
+ NO_INSTALL += git-remote-testgit
+
+ # Generated files for scripts
+ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
+-SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
++SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL) $(SCRIPT_PERL_CVS))
+ SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
+
+ SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))
+@@ -1779,8 +1783,18 @@
+ $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
+ -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
+
++_SCRIPT_PERL_BUILD =
++_SCRIPT_PERL_NOBUILD =
++
+ ifndef NO_PERL
+-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
++
++_SCRIPT_PERL_BUILD += $(SCRIPT_PERL)
++
++ifndef NO_CVS
++_SCRIPT_PERL_BUILD += $(SCRIPT_PERL_CVS)
++else # NO_CVS
++_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL_CVS)
++endif # NO_CVS
+
+ perl/perl.mak: perl/PM.stamp
+
+@@ -1792,7 +1806,7 @@
+ perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
+ $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
+
+-$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE
++$(patsubst %.perl,%,$(_SCRIPT_PERL_BUILD)): % : %.perl GIT-VERSION-FILE
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
+ sed -e '1{' \
+@@ -1817,14 +1831,17 @@
+ chmod +x $@+ && \
+ mv $@+ $@
+ else # NO_PERL
+-$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
++_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL) $(SCRIPT_PERL_CVS) git-instaweb
++endif # NO_PERL
++
++# This is any perl scripts that were disabled it might be empty...
++$(patsubst %.perl,%,$(_SCRIPT_PERL_NOBUILD)): % : unimplemented.sh
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+ -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
+ unimplemented.sh >$@+ && \
+ chmod +x $@+ && \
+ mv $@+ $@
+-endif # NO_PERL
+
+ ifndef NO_PYTHON
+ $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
+--- git-1.8.5.1/t/t9200-git-cvsexportcommit.sh
++++ git-1.8.5.1/t/t9200-git-cvsexportcommit.sh
+@@ -12,6 +12,11 @@
+ test_done
+ fi
+
++if ! test_have_prereq CVS; then
++ skip_all='skipping git cvsexportcommit tests, cvs not available'
++ test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+--- git-1.8.5.1/t/t9400-git-cvsserver-server.sh
++++ git-1.8.5.1/t/t9400-git-cvsserver-server.sh
+@@ -11,9 +11,15 @@
+ . ./test-lib.sh
+
+ if ! test_have_prereq PERL; then
+- skip_all='skipping git cvsserver tests, perl not available'
++ skip_all='skipping git-cvsserver tests, perl not available'
+ test_done
+ fi
++
++if ! test_have_prereq CVS; then
++ skip_all='skipping git-cvsserver tests, cvs not available'
++ test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+--- git-1.8.5.1/t/t9401-git-cvsserver-crlf.sh
++++ git-1.8.5.1/t/t9401-git-cvsserver-crlf.sh
+@@ -57,15 +57,20 @@
+ return $stat
+ }
+
+-cvs >/dev/null 2>&1
+-if test $? -ne 1
++if ! test_have_prereq PERL
+ then
+- skip_all='skipping git-cvsserver tests, cvs not found'
++ skip_all='skipping git-cvsserver tests, perl not available'
+ test_done
+ fi
+-if ! test_have_prereq PERL
++if ! test_have_prereq CVS
+ then
+- skip_all='skipping git-cvsserver tests, perl not available'
++ skip_all='skipping git-cvsserver tests, cvs not available'
++ test_done
++fi
++cvs >/dev/null 2>&1
++if test $? -ne 1
++then
++ skip_all='skipping git-cvsserver tests, cvs not found'
+ test_done
+ fi
+ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+--- git-1.8.5.1/t/t9600-cvsimport.sh
++++ git-1.8.5.1/t/t9600-cvsimport.sh
+@@ -3,14 +3,25 @@
+ test_description='git cvsimport basic tests'
+ . ./lib-cvs.sh
+
+-test_expect_success PERL 'setup cvsroot environment' '
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
++test_expect_success 'setup cvsroot environment' '
+ CVSROOT=$(pwd)/cvsroot &&
+ export CVSROOT
+ '
+
+-test_expect_success PERL 'setup cvsroot' '$CVS init'
++test_expect_success 'setup cvsroot' '$CVS init'
+
+-test_expect_success PERL 'setup a cvs module' '
++test_expect_success 'setup a cvs module' '
+
+ mkdir "$CVSROOT/module" &&
+ $CVS co -d module-cvs module &&
+@@ -42,23 +53,23 @@
+ )
+ '
+
+-test_expect_success PERL 'import a trivial module' '
++test_expect_success 'import a trivial module' '
+
+ git cvsimport -a -R -z 0 -C module-git module &&
+ test_cmp module-cvs/o_fortuna module-git/o_fortuna
+
+ '
+
+-test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
++test_expect_success 'pack refs' '(cd module-git && git gc)'
+
+-test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
++test_expect_success 'initial import has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1) > expected &&
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+ (cd module-cvs &&
+ cat <<EOF >o_fortuna &&
+ O Fortune,
+@@ -86,7 +97,7 @@
+ )
+ '
+
+-test_expect_success PERL 'update git module' '
++test_expect_success 'update git module' '
+
+ (cd module-git &&
+ git config cvsimport.trackRevisions true &&
+@@ -97,7 +108,7 @@
+
+ '
+
+-test_expect_success PERL 'update has correct .git/cvs-revisions' '
++test_expect_success 'update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
+@@ -105,7 +116,7 @@
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+
+ (cd module-cvs &&
+ echo 1 >tick &&
+@@ -114,7 +125,7 @@
+ )
+ '
+
+-test_expect_success PERL 'cvsimport.module config works' '
++test_expect_success 'cvsimport.module config works' '
+
+ (cd module-git &&
+ git config cvsimport.module module &&
+@@ -126,7 +137,7 @@
+
+ '
+
+-test_expect_success PERL 'second update has correct .git/cvs-revisions' '
++test_expect_success 'second update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
+@@ -135,7 +146,7 @@
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'import from a CVS working tree' '
++test_expect_success 'import from a CVS working tree' '
+
+ $CVS co -d import-from-wt module &&
+ (cd import-from-wt &&
+@@ -148,12 +159,12 @@
+
+ '
+
+-test_expect_success PERL 'no .git/cvs-revisions created by default' '
++test_expect_success 'no .git/cvs-revisions created by default' '
+
+ ! test -e import-from-wt/.git/cvs-revisions
+
+ '
+
+-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
++test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
+
+ test_done
+--- git-1.8.5.1/t/t9601-cvsimport-vendor-branch.sh
++++ git-1.8.5.1/t/t9601-cvsimport-vendor-branch.sh
+@@ -34,6 +34,17 @@
+ test_description='git cvsimport handling of vendor branches'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9601
+
+ test_expect_success PERL 'import a module with a vendor branch' '
+--- git-1.8.5.1/t/t9602-cvsimport-branches-tags.sh
++++ git-1.8.5.1/t/t9602-cvsimport-branches-tags.sh
+@@ -6,6 +6,17 @@
+ test_description='git cvsimport handling of branches and tags'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9602
+
+ test_expect_success PERL 'import module' '
+--- git-1.8.5.1/t/t9603-cvsimport-patchsets.sh
++++ git-1.8.5.1/t/t9603-cvsimport-patchsets.sh
+@@ -14,6 +14,17 @@
+ test_description='git cvsimport testing for correct patchset estimation'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9603
+
+ test_expect_failure 'import with criss cross times on revisions' '
+--- git-1.8.5.1/t/test-lib.sh
++++ git-1.8.5.1/t/test-lib.sh
+@@ -772,6 +772,7 @@
+ esac
+
+ ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
++test -z "$NO_CVS" && test_set_prereq CVS
+ test -z "$NO_PERL" && test_set_prereq PERL
+ test -z "$NO_PYTHON" && test_set_prereq PYTHON
+ test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE
diff --git a/dev-vcs/git/files/git-1.9.0_rc3-optional-cvs.patch b/dev-vcs/git/files/git-1.9.0_rc3-optional-cvs.patch
new file mode 100644
index 000000000000..1f0796083230
--- /dev/null
+++ b/dev-vcs/git/files/git-1.9.0_rc3-optional-cvs.patch
@@ -0,0 +1,372 @@
+From eadb20b065c33d46b49c8c95d8cde0c9fe7c62a4 Mon Sep 17 00:00:00 2001
+From: Robin Johnson <robbat2@gentoo.org>
+Date: Wed, 22 Aug 2012 04:25:06 +0000
+Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
+ utilities
+
+Forward-ported from 1.7.12 to current git.git v1.8.4
+Forward-ported from v1.8.4 to v1.8.5.1
+Forward-ported from v1.8.5.3 to v1.9.0_rc3
+
+diff -Nuar git-1.9.0.rc3.orig/Makefile git-1.9.0.rc3/Makefile
+--- git-1.9.0.rc3.orig/Makefile 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/Makefile 2014-02-08 11:50:21.219488765 -0800
+@@ -263,6 +263,8 @@
+ #
+ # Define NO_TCLTK if you do not want Tcl/Tk GUI.
+ #
++# Define NO_CVS if you do not want any CVS interface utilities.
++#
+ # The TCL_PATH variable governs the location of the Tcl interpreter
+ # used to optimize git-gui for your system. Only used if NO_TCLTK
+ # is not set. Defaults to the bare 'tclsh'.
+@@ -437,6 +439,7 @@
+ PROGRAM_OBJS =
+ PROGRAMS =
+ SCRIPT_PERL =
++SCRIPT_PERL_CVS =
+ SCRIPT_PYTHON =
+ SCRIPT_SH =
+ SCRIPT_LIB =
+@@ -476,20 +479,21 @@
+ SCRIPT_PERL += git-add--interactive.perl
+ SCRIPT_PERL += git-difftool.perl
+ SCRIPT_PERL += git-archimport.perl
+-SCRIPT_PERL += git-cvsexportcommit.perl
+-SCRIPT_PERL += git-cvsimport.perl
+-SCRIPT_PERL += git-cvsserver.perl
+ SCRIPT_PERL += git-relink.perl
+ SCRIPT_PERL += git-send-email.perl
+ SCRIPT_PERL += git-svn.perl
+
++SCRIPT_PERL_CVS += git-cvsexportcommit.perl
++SCRIPT_PERL_CVS += git-cvsimport.perl
++SCRIPT_PERL_CVS += git-cvsserver.perl
++
+ SCRIPT_PYTHON += git-p4.py
+
+ NO_INSTALL += git-remote-testgit
+
+ # Generated files for scripts
+ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
+-SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
++SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL) $(SCRIPT_PERL_CVS))
+ SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
+
+ SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))
+@@ -1776,8 +1780,18 @@
+ $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
+ -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
+
++_SCRIPT_PERL_BUILD =
++_SCRIPT_PERL_NOBUILD =
++
+ ifndef NO_PERL
+-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
++
++_SCRIPT_PERL_BUILD += $(SCRIPT_PERL)
++
++ifndef NO_CVS
++_SCRIPT_PERL_BUILD += $(SCRIPT_PERL_CVS)
++else # NO_CVS
++_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL_CVS)
++endif # NO_CVS
+
+ perl/perl.mak: perl/PM.stamp
+
+@@ -1790,7 +1804,7 @@
+ $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
+
+ PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
+-$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
++$(patsubst %.perl,%,$(_SCRIPT_PERL_BUILD)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
+ INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
+@@ -1824,14 +1838,17 @@
+ chmod +x $@+ && \
+ mv $@+ $@
+ else # NO_PERL
+-$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
++_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL) $(SCRIPT_PERL_CVS) git-instaweb
++endif # NO_PERL
++
++# This is any perl scripts that were disabled it might be empty...
++$(patsubst %.perl,%,$(_SCRIPT_PERL_NOBUILD)): % : unimplemented.sh
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+ -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
+ unimplemented.sh >$@+ && \
+ chmod +x $@+ && \
+ mv $@+ $@
+-endif # NO_PERL
+
+ ifndef NO_PYTHON
+ $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
+diff -Nuar git-1.9.0.rc3.orig/t/t9200-git-cvsexportcommit.sh git-1.9.0.rc3/t/t9200-git-cvsexportcommit.sh
+--- git-1.9.0.rc3.orig/t/t9200-git-cvsexportcommit.sh 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/t/t9200-git-cvsexportcommit.sh 2014-02-08 11:49:12.243179483 -0800
+@@ -11,6 +11,11 @@
+ test_done
+ fi
+
++if ! test_have_prereq CVS; then
++ skip_all='skipping git cvsexportcommit tests, cvs not available'
++ test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff -Nuar git-1.9.0.rc3.orig/t/t9400-git-cvsserver-server.sh git-1.9.0.rc3/t/t9400-git-cvsserver-server.sh
+--- git-1.9.0.rc3.orig/t/t9400-git-cvsserver-server.sh 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/t/t9400-git-cvsserver-server.sh 2014-02-08 11:49:12.244179502 -0800
+@@ -11,9 +11,15 @@
+ . ./test-lib.sh
+
+ if ! test_have_prereq PERL; then
+- skip_all='skipping git cvsserver tests, perl not available'
++ skip_all='skipping git-cvsserver tests, perl not available'
+ test_done
+ fi
++
++if ! test_have_prereq CVS; then
++ skip_all='skipping git-cvsserver tests, cvs not available'
++ test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff -Nuar git-1.9.0.rc3.orig/t/t9401-git-cvsserver-crlf.sh git-1.9.0.rc3/t/t9401-git-cvsserver-crlf.sh
+--- git-1.9.0.rc3.orig/t/t9401-git-cvsserver-crlf.sh 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/t/t9401-git-cvsserver-crlf.sh 2014-02-08 11:49:12.244179502 -0800
+@@ -57,15 +57,20 @@
+ return $stat
+ }
+
+-cvs >/dev/null 2>&1
+-if test $? -ne 1
++if ! test_have_prereq PERL
+ then
+- skip_all='skipping git-cvsserver tests, cvs not found'
++ skip_all='skipping git-cvsserver tests, perl not available'
+ test_done
+ fi
+-if ! test_have_prereq PERL
++if ! test_have_prereq CVS
+ then
+- skip_all='skipping git-cvsserver tests, perl not available'
++ skip_all='skipping git-cvsserver tests, cvs not available'
++ test_done
++fi
++cvs >/dev/null 2>&1
++if test $? -ne 1
++then
++ skip_all='skipping git-cvsserver tests, cvs not found'
+ test_done
+ fi
+ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+diff -Nuar git-1.9.0.rc3.orig/t/t9600-cvsimport.sh git-1.9.0.rc3/t/t9600-cvsimport.sh
+--- git-1.9.0.rc3.orig/t/t9600-cvsimport.sh 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/t/t9600-cvsimport.sh 2014-02-08 11:49:12.244179502 -0800
+@@ -3,14 +3,25 @@
+ test_description='git cvsimport basic tests'
+ . ./lib-cvs.sh
+
+-test_expect_success PERL 'setup cvsroot environment' '
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
++test_expect_success 'setup cvsroot environment' '
+ CVSROOT=$(pwd)/cvsroot &&
+ export CVSROOT
+ '
+
+-test_expect_success PERL 'setup cvsroot' '$CVS init'
++test_expect_success 'setup cvsroot' '$CVS init'
+
+-test_expect_success PERL 'setup a cvs module' '
++test_expect_success 'setup a cvs module' '
+
+ mkdir "$CVSROOT/module" &&
+ $CVS co -d module-cvs module &&
+@@ -42,23 +53,23 @@
+ )
+ '
+
+-test_expect_success PERL 'import a trivial module' '
++test_expect_success 'import a trivial module' '
+
+ git cvsimport -a -R -z 0 -C module-git module &&
+ test_cmp module-cvs/o_fortuna module-git/o_fortuna
+
+ '
+
+-test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
++test_expect_success 'pack refs' '(cd module-git && git gc)'
+
+-test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
++test_expect_success 'initial import has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1) > expected &&
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+ (cd module-cvs &&
+ cat <<EOF >o_fortuna &&
+ O Fortune,
+@@ -86,7 +97,7 @@
+ )
+ '
+
+-test_expect_success PERL 'update git module' '
++test_expect_success 'update git module' '
+
+ (cd module-git &&
+ git config cvsimport.trackRevisions true &&
+@@ -97,7 +108,7 @@
+
+ '
+
+-test_expect_success PERL 'update has correct .git/cvs-revisions' '
++test_expect_success 'update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
+@@ -105,7 +116,7 @@
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+
+ (cd module-cvs &&
+ echo 1 >tick &&
+@@ -114,7 +125,7 @@
+ )
+ '
+
+-test_expect_success PERL 'cvsimport.module config works' '
++test_expect_success 'cvsimport.module config works' '
+
+ (cd module-git &&
+ git config cvsimport.module module &&
+@@ -126,7 +137,7 @@
+
+ '
+
+-test_expect_success PERL 'second update has correct .git/cvs-revisions' '
++test_expect_success 'second update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
+@@ -135,7 +146,7 @@
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'import from a CVS working tree' '
++test_expect_success 'import from a CVS working tree' '
+
+ $CVS co -d import-from-wt module &&
+ (cd import-from-wt &&
+@@ -148,12 +159,12 @@
+
+ '
+
+-test_expect_success PERL 'no .git/cvs-revisions created by default' '
++test_expect_success 'no .git/cvs-revisions created by default' '
+
+ ! test -e import-from-wt/.git/cvs-revisions
+
+ '
+
+-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
++test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
+
+ test_done
+diff -Nuar git-1.9.0.rc3.orig/t/t9601-cvsimport-vendor-branch.sh git-1.9.0.rc3/t/t9601-cvsimport-vendor-branch.sh
+--- git-1.9.0.rc3.orig/t/t9601-cvsimport-vendor-branch.sh 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/t/t9601-cvsimport-vendor-branch.sh 2014-02-08 11:49:12.244179502 -0800
+@@ -34,6 +34,17 @@
+ test_description='git cvsimport handling of vendor branches'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9601
+
+ test_expect_success PERL 'import a module with a vendor branch' '
+diff -Nuar git-1.9.0.rc3.orig/t/t9602-cvsimport-branches-tags.sh git-1.9.0.rc3/t/t9602-cvsimport-branches-tags.sh
+--- git-1.9.0.rc3.orig/t/t9602-cvsimport-branches-tags.sh 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/t/t9602-cvsimport-branches-tags.sh 2014-02-08 11:49:12.244179502 -0800
+@@ -6,6 +6,17 @@
+ test_description='git cvsimport handling of branches and tags'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9602
+
+ test_expect_success PERL 'import module' '
+diff -Nuar git-1.9.0.rc3.orig/t/t9603-cvsimport-patchsets.sh git-1.9.0.rc3/t/t9603-cvsimport-patchsets.sh
+--- git-1.9.0.rc3.orig/t/t9603-cvsimport-patchsets.sh 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/t/t9603-cvsimport-patchsets.sh 2014-02-08 11:49:12.244179502 -0800
+@@ -14,6 +14,17 @@
+ test_description='git cvsimport testing for correct patchset estimation'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9603
+
+ test_expect_failure 'import with criss cross times on revisions' '
+diff -Nuar git-1.9.0.rc3.orig/t/test-lib.sh git-1.9.0.rc3/t/test-lib.sh
+--- git-1.9.0.rc3.orig/t/test-lib.sh 2014-02-07 12:45:45.000000000 -0800
++++ git-1.9.0.rc3/t/test-lib.sh 2014-02-08 11:49:12.244179502 -0800
+@@ -772,6 +772,7 @@
+ esac
+
+ ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
++test -z "$NO_CVS" && test_set_prereq CVS
+ test -z "$NO_PERL" && test_set_prereq PERL
+ test -z "$NO_PYTHON" && test_set_prereq PYTHON
+ test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE
diff --git a/dev-vcs/git/files/git-2.0.0-r2-optional-cvs.patch b/dev-vcs/git/files/git-2.0.0-r2-optional-cvs.patch
new file mode 100644
index 000000000000..b2d8e5c01c85
--- /dev/null
+++ b/dev-vcs/git/files/git-2.0.0-r2-optional-cvs.patch
@@ -0,0 +1,375 @@
+From e19ad5a8492d83db79a09b459cb17ccee78e0001 Mon Sep 17 00:00:00 2001
+From: Robin Johnson <robbat2@gentoo.org>
+Date: Fri, 25 Apr 2014 12:30:42 +0200
+Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
+ utilities
+
+Forward-ported from 1.7.12 to current git.git v1.8.4
+Forward-ported from v1.8.4 to v1.8.5.1
+Forward-ported from v1.8.5.3 to v1.9.0_rc3
+Forward-ported from 1.9.0_rc3 to current git.git v2.0.0_rc0
+Forward-ported from v2.0.0_rc0 to v2.0.0
+
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/Makefile git-2.0.0/Makefile
+--- git-2.0.0.orig/Makefile 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/Makefile 2014-05-28 16:50:10.148376954 -0700
+@@ -255,6 +255,8 @@
+ #
+ # Define NO_TCLTK if you do not want Tcl/Tk GUI.
+ #
++# Define NO_CVS if you do not want any CVS interface utilities.
++#
+ # The TCL_PATH variable governs the location of the Tcl interpreter
+ # used to optimize git-gui for your system. Only used if NO_TCLTK
+ # is not set. Defaults to the bare 'tclsh'.
+@@ -436,6 +438,7 @@
+ PROGRAM_OBJS =
+ PROGRAMS =
+ SCRIPT_PERL =
++SCRIPT_PERL_CVS =
+ SCRIPT_PYTHON =
+ SCRIPT_SH =
+ SCRIPT_LIB =
+@@ -475,20 +478,21 @@
+ SCRIPT_PERL += git-add--interactive.perl
+ SCRIPT_PERL += git-difftool.perl
+ SCRIPT_PERL += git-archimport.perl
+-SCRIPT_PERL += git-cvsexportcommit.perl
+-SCRIPT_PERL += git-cvsimport.perl
+-SCRIPT_PERL += git-cvsserver.perl
+ SCRIPT_PERL += git-relink.perl
+ SCRIPT_PERL += git-send-email.perl
+ SCRIPT_PERL += git-svn.perl
+
++SCRIPT_PERL_CVS += git-cvsexportcommit.perl
++SCRIPT_PERL_CVS += git-cvsimport.perl
++SCRIPT_PERL_CVS += git-cvsserver.perl
++
+ SCRIPT_PYTHON += git-p4.py
+
+ NO_INSTALL += git-remote-testgit
+
+ # Generated files for scripts
+ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
+-SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
++SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL) $(SCRIPT_PERL_CVS))
+ SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
+
+ SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))
+@@ -1779,8 +1783,18 @@
+ $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
+ -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
+
++_SCRIPT_PERL_BUILD =
++_SCRIPT_PERL_NOBUILD =
++
+ ifndef NO_PERL
+-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
++
++_SCRIPT_PERL_BUILD += $(SCRIPT_PERL)
++
++ifndef NO_CVS
++_SCRIPT_PERL_BUILD += $(SCRIPT_PERL_CVS)
++else # NO_CVS
++_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL_CVS)
++endif # NO_CVS
+
+ perl/perl.mak: perl/PM.stamp
+
+@@ -1793,7 +1807,7 @@
+ $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
+
+ PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
+-$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
++$(patsubst %.perl,%,$(_SCRIPT_PERL_BUILD)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
+ INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
+@@ -1826,15 +1840,18 @@
+ $(QUIET_GEN)$(cmd_munge_script) && \
+ chmod +x $@+ && \
+ mv $@+ $@
+ else # NO_PERL
+-$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
++_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL) $(SCRIPT_PERL_CVS) git-instaweb
++endif # NO_PERL
++
++# This is any perl scripts that were disabled it might be empty...
++$(patsubst %.perl,%,$(_SCRIPT_PERL_NOBUILD)): % : unimplemented.sh
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+ -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
+ unimplemented.sh >$@+ && \
+ chmod +x $@+ && \
+ mv $@+ $@
+-endif # NO_PERL
+
+ ifndef NO_PYTHON
+ $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/t/t9200-git-cvsexportcommit.sh git-2.0.0/t/t9200-git-cvsexportcommit.sh
+--- git-2.0.0.orig/t/t9200-git-cvsexportcommit.sh 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/t/t9200-git-cvsexportcommit.sh 2014-05-28 16:47:41.812727825 -0700
+@@ -11,6 +11,11 @@
+ test_done
+ fi
+
++if ! test_have_prereq CVS; then
++ skip_all='skipping git cvsexportcommit tests, cvs not available'
++ test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/t/t9400-git-cvsserver-server.sh git-2.0.0/t/t9400-git-cvsserver-server.sh
+--- git-2.0.0.orig/t/t9400-git-cvsserver-server.sh 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/t/t9400-git-cvsserver-server.sh 2014-05-28 16:47:41.812727825 -0700
+@@ -11,9 +11,15 @@
+ . ./test-lib.sh
+
+ if ! test_have_prereq PERL; then
+- skip_all='skipping git cvsserver tests, perl not available'
++ skip_all='skipping git-cvsserver tests, perl not available'
+ test_done
+ fi
++
++if ! test_have_prereq CVS; then
++ skip_all='skipping git-cvsserver tests, cvs not available'
++ test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/t/t9401-git-cvsserver-crlf.sh git-2.0.0/t/t9401-git-cvsserver-crlf.sh
+--- git-2.0.0.orig/t/t9401-git-cvsserver-crlf.sh 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/t/t9401-git-cvsserver-crlf.sh 2014-05-28 16:47:41.812727825 -0700
+@@ -57,15 +57,20 @@
+ return $stat
+ }
+
+-cvs >/dev/null 2>&1
+-if test $? -ne 1
++if ! test_have_prereq PERL
+ then
+- skip_all='skipping git-cvsserver tests, cvs not found'
++ skip_all='skipping git-cvsserver tests, perl not available'
+ test_done
+ fi
+-if ! test_have_prereq PERL
++if ! test_have_prereq CVS
+ then
+- skip_all='skipping git-cvsserver tests, perl not available'
++ skip_all='skipping git-cvsserver tests, cvs not available'
++ test_done
++fi
++cvs >/dev/null 2>&1
++if test $? -ne 1
++then
++ skip_all='skipping git-cvsserver tests, cvs not found'
+ test_done
+ fi
+ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/t/t9600-cvsimport.sh git-2.0.0/t/t9600-cvsimport.sh
+--- git-2.0.0.orig/t/t9600-cvsimport.sh 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/t/t9600-cvsimport.sh 2014-05-28 16:47:41.813727843 -0700
+@@ -3,14 +3,25 @@
+ test_description='git cvsimport basic tests'
+ . ./lib-cvs.sh
+
+-test_expect_success PERL 'setup cvsroot environment' '
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
++test_expect_success 'setup cvsroot environment' '
+ CVSROOT=$(pwd)/cvsroot &&
+ export CVSROOT
+ '
+
+-test_expect_success PERL 'setup cvsroot' '$CVS init'
++test_expect_success 'setup cvsroot' '$CVS init'
+
+-test_expect_success PERL 'setup a cvs module' '
++test_expect_success 'setup a cvs module' '
+
+ mkdir "$CVSROOT/module" &&
+ $CVS co -d module-cvs module &&
+@@ -42,23 +53,23 @@
+ )
+ '
+
+-test_expect_success PERL 'import a trivial module' '
++test_expect_success 'import a trivial module' '
+
+ git cvsimport -a -R -z 0 -C module-git module &&
+ test_cmp module-cvs/o_fortuna module-git/o_fortuna
+
+ '
+
+-test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
++test_expect_success 'pack refs' '(cd module-git && git gc)'
+
+-test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
++test_expect_success 'initial import has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1) > expected &&
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+ (cd module-cvs &&
+ cat <<EOF >o_fortuna &&
+ O Fortune,
+@@ -86,7 +97,7 @@
+ )
+ '
+
+-test_expect_success PERL 'update git module' '
++test_expect_success 'update git module' '
+
+ (cd module-git &&
+ git config cvsimport.trackRevisions true &&
+@@ -97,7 +108,7 @@
+
+ '
+
+-test_expect_success PERL 'update has correct .git/cvs-revisions' '
++test_expect_success 'update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
+@@ -105,7 +116,7 @@
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+
+ (cd module-cvs &&
+ echo 1 >tick &&
+@@ -114,7 +125,7 @@
+ )
+ '
+
+-test_expect_success PERL 'cvsimport.module config works' '
++test_expect_success 'cvsimport.module config works' '
+
+ (cd module-git &&
+ git config cvsimport.module module &&
+@@ -126,7 +137,7 @@
+
+ '
+
+-test_expect_success PERL 'second update has correct .git/cvs-revisions' '
++test_expect_success 'second update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
+@@ -135,7 +146,7 @@
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'import from a CVS working tree' '
++test_expect_success 'import from a CVS working tree' '
+
+ $CVS co -d import-from-wt module &&
+ (cd import-from-wt &&
+@@ -148,12 +159,12 @@
+
+ '
+
+-test_expect_success PERL 'no .git/cvs-revisions created by default' '
++test_expect_success 'no .git/cvs-revisions created by default' '
+
+ ! test -e import-from-wt/.git/cvs-revisions
+
+ '
+
+-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
++test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
+
+ test_done
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/t/t9601-cvsimport-vendor-branch.sh git-2.0.0/t/t9601-cvsimport-vendor-branch.sh
+--- git-2.0.0.orig/t/t9601-cvsimport-vendor-branch.sh 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/t/t9601-cvsimport-vendor-branch.sh 2014-05-28 16:47:41.813727843 -0700
+@@ -34,6 +34,17 @@
+ test_description='git cvsimport handling of vendor branches'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9601
+
+ test_expect_success PERL 'import a module with a vendor branch' '
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/t/t9602-cvsimport-branches-tags.sh git-2.0.0/t/t9602-cvsimport-branches-tags.sh
+--- git-2.0.0.orig/t/t9602-cvsimport-branches-tags.sh 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/t/t9602-cvsimport-branches-tags.sh 2014-05-28 16:47:41.813727843 -0700
+@@ -6,6 +6,17 @@
+ test_description='git cvsimport handling of branches and tags'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9602
+
+ test_expect_success PERL 'import module' '
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/t/t9603-cvsimport-patchsets.sh git-2.0.0/t/t9603-cvsimport-patchsets.sh
+--- git-2.0.0.orig/t/t9603-cvsimport-patchsets.sh 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/t/t9603-cvsimport-patchsets.sh 2014-05-28 16:47:41.813727843 -0700
+@@ -14,6 +14,17 @@
+ test_description='git cvsimport testing for correct patchset estimation'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9603
+
+ test_expect_failure 'import with criss cross times on revisions' '
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-2.0.0.orig/t/test-lib.sh git-2.0.0/t/test-lib.sh
+--- git-2.0.0.orig/t/test-lib.sh 2014-05-28 12:10:36.000000000 -0700
++++ git-2.0.0/t/test-lib.sh 2014-05-28 16:47:41.813727843 -0700
+@@ -777,6 +777,7 @@
+ esac
+
+ ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
++test -z "$NO_CVS" && test_set_prereq CVS
+ test -z "$NO_PERL" && test_set_prereq PERL
+ test -z "$NO_PYTHON" && test_set_prereq PYTHON
+ test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE
diff --git a/dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch b/dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch
new file mode 100644
index 000000000000..b20b889110eb
--- /dev/null
+++ b/dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch
@@ -0,0 +1,11 @@
+--- git-2.2.0/contrib/svn-fe/Makefile
++++ git-2.2.0/contrib/svn-fe/Makefile
+@@ -74,7 +74,7 @@
+ endif
+
+ svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)
+- $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)
++ $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ svn-fe.o $(LIBS) $(EXTLIBS)
+
+ svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h
+ $(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<
diff --git a/dev-vcs/git/files/git-2.2.2-optional-cvs.patch b/dev-vcs/git/files/git-2.2.2-optional-cvs.patch
new file mode 100644
index 000000000000..af815e239480
--- /dev/null
+++ b/dev-vcs/git/files/git-2.2.2-optional-cvs.patch
@@ -0,0 +1,454 @@
+From 12b82e03b971da618f19d0194dcf19a77b273766 Mon Sep 17 00:00:00 2001
+From: Robin Johnson <robbat2@gentoo.org>
+Date: Wed, 21 Jan 2015 20:48:03 +0100
+Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
+ utilities
+
+Forward-ported from 1.7.12 to current git.git v1.8.4
+Forward-ported from v1.8.4 to v1.8.5.1
+Forward-ported from v1.8.5.3 to v1.9.0_rc3
+Forward-ported from 1.9.0_rc3 to current git.git v2.0.0_rc0
+Forward-ported from v2.0.0_rc0 to v2.0.0
+Forward-ported from v2.0.0 to v2.2.2
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ Makefile | 51 ++++++++++++++++++++++++++++----------
+ t/t9200-git-cvsexportcommit.sh | 5 ++++
+ t/t9400-git-cvsserver-server.sh | 8 +++++-
+ t/t9401-git-cvsserver-crlf.sh | 15 +++++++----
+ t/t9600-cvsimport.sh | 41 +++++++++++++++++++-----------
+ t/t9601-cvsimport-vendor-branch.sh | 11 ++++++++
+ t/t9602-cvsimport-branches-tags.sh | 11 ++++++++
+ t/t9603-cvsimport-patchsets.sh | 11 ++++++++
+ t/test-lib.sh | 1 +
+ 9 files changed, 120 insertions(+), 34 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 7482a4d..a644c8d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -254,6 +254,8 @@ all::
+ #
+ # Define NO_TCLTK if you do not want Tcl/Tk GUI.
+ #
++# Define NO_CVS if you do not want any CVS interface utilities.
++#
+ # The TCL_PATH variable governs the location of the Tcl interpreter
+ # used to optimize git-gui for your system. Only used if NO_TCLTK
+ # is not set. Defaults to the bare 'tclsh'.
+@@ -433,6 +435,7 @@ LIB_OBJS =
+ PROGRAM_OBJS =
+ PROGRAMS =
+ SCRIPT_PERL =
++SCRIPT_PERL_CVS =
+ SCRIPT_PYTHON =
+ SCRIPT_SH =
+ SCRIPT_LIB =
+@@ -472,13 +475,14 @@ SCRIPT_LIB += git-sh-i18n
+ SCRIPT_PERL += git-add--interactive.perl
+ SCRIPT_PERL += git-difftool.perl
+ SCRIPT_PERL += git-archimport.perl
+-SCRIPT_PERL += git-cvsexportcommit.perl
+-SCRIPT_PERL += git-cvsimport.perl
+-SCRIPT_PERL += git-cvsserver.perl
+ SCRIPT_PERL += git-relink.perl
+ SCRIPT_PERL += git-send-email.perl
+ SCRIPT_PERL += git-svn.perl
+
++SCRIPT_PERL_CVS += git-cvsexportcommit.perl
++SCRIPT_PERL_CVS += git-cvsimport.perl
++SCRIPT_PERL_CVS += git-cvsserver.perl
++
+ SCRIPT_PYTHON += git-p4.py
+
+ NO_INSTALL += git-remote-testgit
+@@ -486,24 +490,26 @@ NO_INSTALL += git-remote-testgit
+ # Generated files for scripts
+ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
+ SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
++SCRIPT_PERL_CVS_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL_CVS))
+ SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
+
+ SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))
+ SCRIPT_PERL_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_GEN))
++SCRIPT_PERL_CVS_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_CVS_GEN))
+ SCRIPT_PYTHON_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PYTHON_GEN))
+
+ # Individual rules to allow e.g.
+ # "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script"
+ # from subdirectories like contrib/*/
+ .PHONY: build-perl-script build-sh-script build-python-script
+-build-perl-script: $(SCRIPT_PERL_GEN)
++build-perl-script: $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
+ build-sh-script: $(SCRIPT_SH_GEN)
+ build-python-script: $(SCRIPT_PYTHON_GEN)
+
+ .PHONY: install-perl-script install-sh-script install-python-script
+ install-sh-script: $(SCRIPT_SH_INS)
+ $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+-install-perl-script: $(SCRIPT_PERL_INS)
++install-perl-script: $(SCRIPT_PERL_INS) $(SCRIPT_PERL_CVS_INS)
+ $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+ install-python-script: $(SCRIPT_PYTHON_INS)
+ $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+@@ -512,12 +518,13 @@ install-python-script: $(SCRIPT_PYTHON_INS)
+ clean-sh-script:
+ $(RM) $(SCRIPT_SH_GEN)
+ clean-perl-script:
+- $(RM) $(SCRIPT_PERL_GEN)
++ $(RM) $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
+ clean-python-script:
+ $(RM) $(SCRIPT_PYTHON_GEN)
+
+ SCRIPTS = $(SCRIPT_SH_INS) \
+ $(SCRIPT_PERL_INS) \
++ $(SCRIPT_PERL_CVS_INS) \
+ $(SCRIPT_PYTHON_INS) \
+ git-instaweb
+
+@@ -1677,10 +1684,24 @@ git.res: git.rc GIT-VERSION-FILE
+ -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
+
+ # This makes sure we depend on the NO_PERL setting itself.
+-$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
++$(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN): GIT-BUILD-OPTIONS
++
++_SCRIPT_PERL_GEN =
++_SCRIPT_PERL_NOGEN =
+
+ ifndef NO_PERL
+-$(SCRIPT_PERL_GEN): perl/perl.mak
++
++_SCRIPT_PERL_GEN = $(SCRIPT_PERL_GEN)
++
++ifndef NO_CVS
++_SCRIPT_PERL_GEN += $(SCRIPT_PERL_CVS_GEN)
++else
++_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_CVS_GEN)
++_REASON = NO_CVS
++_REASON_CONTENT = $(NO_CVS)
++endif # NO_CVS
++
++$(_SCRIPT_PERL_GEN): perl/perl.mak
+
+ perl/perl.mak: perl/PM.stamp
+
+@@ -1693,7 +1714,7 @@ perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
+ $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
+
+ PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
+-$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
++$(_SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
+ INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
+@@ -1727,14 +1748,18 @@ git-instaweb: git-instaweb.sh gitweb GIT-SCRIPT-DEFINES
+ chmod +x $@+ && \
+ mv $@+ $@
+ else # NO_PERL
+-$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
++_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN) git-instaweb
++_REASON = NO_PERL
++_REASON_CONTENT = $(NO_PERL)
++endif # NO_PERL
++
++$(_SCRIPT_PERL_NOGEN): % : unimplemented.sh
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+- -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
++ -e 's|@@REASON@@|$(_REASON)=$(_REASON_CONTENT)|g' \
+ unimplemented.sh >$@+ && \
+ chmod +x $@+ && \
+ mv $@+ $@
+-endif # NO_PERL
+
+ # This makes sure we depend on the NO_PYTHON setting itself.
+ $(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
+@@ -1964,7 +1989,7 @@ XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \
+ XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl
+ LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
+ LOCALIZED_SH = $(SCRIPT_SH)
+-LOCALIZED_PERL = $(SCRIPT_PERL)
++LOCALIZED_PERL = $(SCRIPT_PERL) $(SCRIPT_PERL_CVS)
+
+ ifdef XGETTEXT_INCLUDE_TESTS
+ LOCALIZED_C += t/t0200/test.c
+diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
+index 812c9cd..906532a 100755
+--- a/t/t9200-git-cvsexportcommit.sh
++++ b/t/t9200-git-cvsexportcommit.sh
+@@ -11,6 +11,11 @@ if ! test_have_prereq PERL; then
+ test_done
+ fi
+
++if ! test_have_prereq CVS; then
++ skip_all='skipping git cvsexportcommit tests, cvs not available'
++ test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
+index 6146c3f..2a675e3 100755
+--- a/t/t9400-git-cvsserver-server.sh
++++ b/t/t9400-git-cvsserver-server.sh
+@@ -11,9 +11,15 @@ cvs CLI client via git-cvsserver server'
+ . ./test-lib.sh
+
+ if ! test_have_prereq PERL; then
+- skip_all='skipping git cvsserver tests, perl not available'
++ skip_all='skipping git-cvsserver tests, perl not available'
+ test_done
+ fi
++
++if ! test_have_prereq CVS; then
++ skip_all='skipping git-cvsserver tests, cvs not available'
++ test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
+index 5a4ed28..04814cb 100755
+--- a/t/t9401-git-cvsserver-crlf.sh
++++ b/t/t9401-git-cvsserver-crlf.sh
+@@ -57,15 +57,20 @@ check_status_options() {
+ return $stat
+ }
+
+-cvs >/dev/null 2>&1
+-if test $? -ne 1
++if ! test_have_prereq PERL
+ then
+- skip_all='skipping git-cvsserver tests, cvs not found'
++ skip_all='skipping git-cvsserver tests, perl not available'
+ test_done
+ fi
+-if ! test_have_prereq PERL
++if ! test_have_prereq CVS
+ then
+- skip_all='skipping git-cvsserver tests, perl not available'
++ skip_all='skipping git-cvsserver tests, cvs not available'
++ test_done
++fi
++cvs >/dev/null 2>&1
++if test $? -ne 1
++then
++ skip_all='skipping git-cvsserver tests, cvs not found'
+ test_done
+ fi
+ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
+index 4c384ff..d601f32 100755
+--- a/t/t9600-cvsimport.sh
++++ b/t/t9600-cvsimport.sh
+@@ -3,14 +3,25 @@
+ test_description='git cvsimport basic tests'
+ . ./lib-cvs.sh
+
+-test_expect_success PERL 'setup cvsroot environment' '
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
++test_expect_success 'setup cvsroot environment' '
+ CVSROOT=$(pwd)/cvsroot &&
+ export CVSROOT
+ '
+
+-test_expect_success PERL 'setup cvsroot' '$CVS init'
++test_expect_success 'setup cvsroot' '$CVS init'
+
+-test_expect_success PERL 'setup a cvs module' '
++test_expect_success 'setup a cvs module' '
+
+ mkdir "$CVSROOT/module" &&
+ $CVS co -d module-cvs module &&
+@@ -42,23 +53,23 @@ EOF
+ )
+ '
+
+-test_expect_success PERL 'import a trivial module' '
++test_expect_success 'import a trivial module' '
+
+ git cvsimport -a -R -z 0 -C module-git module &&
+ test_cmp module-cvs/o_fortuna module-git/o_fortuna
+
+ '
+
+-test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
++test_expect_success 'pack refs' '(cd module-git && git gc)'
+
+-test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
++test_expect_success 'initial import has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1) > expected &&
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+ (cd module-cvs &&
+ cat <<EOF >o_fortuna &&
+ O Fortune,
+@@ -86,7 +97,7 @@ EOF
+ )
+ '
+
+-test_expect_success PERL 'update git module' '
++test_expect_success 'update git module' '
+
+ (cd module-git &&
+ git config cvsimport.trackRevisions true &&
+@@ -97,7 +108,7 @@ test_expect_success PERL 'update git module' '
+
+ '
+
+-test_expect_success PERL 'update has correct .git/cvs-revisions' '
++test_expect_success 'update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
+@@ -105,7 +116,7 @@ test_expect_success PERL 'update has correct .git/cvs-revisions' '
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+
+ (cd module-cvs &&
+ echo 1 >tick &&
+@@ -114,7 +125,7 @@ test_expect_success PERL 'update cvs module' '
+ )
+ '
+
+-test_expect_success PERL 'cvsimport.module config works' '
++test_expect_success 'cvsimport.module config works' '
+
+ (cd module-git &&
+ git config cvsimport.module module &&
+@@ -126,7 +137,7 @@ test_expect_success PERL 'cvsimport.module config works' '
+
+ '
+
+-test_expect_success PERL 'second update has correct .git/cvs-revisions' '
++test_expect_success 'second update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
+@@ -135,7 +146,7 @@ test_expect_success PERL 'second update has correct .git/cvs-revisions' '
+ test_cmp expected module-git/.git/cvs-revisions
+ '
+
+-test_expect_success PERL 'import from a CVS working tree' '
++test_expect_success 'import from a CVS working tree' '
+
+ $CVS co -d import-from-wt module &&
+ (cd import-from-wt &&
+@@ -148,12 +159,12 @@ test_expect_success PERL 'import from a CVS working tree' '
+
+ '
+
+-test_expect_success PERL 'no .git/cvs-revisions created by default' '
++test_expect_success 'no .git/cvs-revisions created by default' '
+
+ ! test -e import-from-wt/.git/cvs-revisions
+
+ '
+
+-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
++test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
+
+ test_done
+diff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh
+index 827d39f..d730a41 100755
+--- a/t/t9601-cvsimport-vendor-branch.sh
++++ b/t/t9601-cvsimport-vendor-branch.sh
+@@ -34,6 +34,17 @@
+ test_description='git cvsimport handling of vendor branches'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9601
+
+ test_expect_success PERL 'import a module with a vendor branch' '
+diff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh
+index e1db323..68f0974 100755
+--- a/t/t9602-cvsimport-branches-tags.sh
++++ b/t/t9602-cvsimport-branches-tags.sh
+@@ -6,6 +6,17 @@
+ test_description='git cvsimport handling of branches and tags'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9602
+
+ test_expect_success PERL 'import module' '
+diff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh
+index c4c3c49..9b2957d 100755
+--- a/t/t9603-cvsimport-patchsets.sh
++++ b/t/t9603-cvsimport-patchsets.sh
+@@ -14,6 +14,17 @@
+ test_description='git cvsimport testing for correct patchset estimation'
+ . ./lib-cvs.sh
+
++if ! test_have_prereq PERL
++then
++ skip_all='skipping git cvsimport tests, perl not available'
++ test_done
++fi
++if ! test_have_prereq CVS
++then
++ skip_all='skipping git cvsimport tests, cvs not available'
++ test_done
++fi
++
+ setup_cvs_test_repository t9603
+
+ test_expect_failure PERL 'import with criss cross times on revisions' '
+diff --git a/t/test-lib.sh b/t/test-lib.sh
+index 79e8a33..c7c4b48 100644
+--- a/t/test-lib.sh
++++ b/t/test-lib.sh
+@@ -929,6 +929,7 @@ case $(uname -s) in
+ esac
+
+ ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
++test -z "$NO_CVS" && test_set_prereq CVS
+ test -z "$NO_PERL" && test_set_prereq PERL
+ test -z "$NO_PYTHON" && test_set_prereq PYTHON
+ test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE
+--
+2.2.1
+
diff --git a/dev-vcs/git/files/git-daemon-r1.initd b/dev-vcs/git/files/git-daemon-r1.initd
new file mode 100644
index 000000000000..b6ecfd9c508c
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon-r1.initd
@@ -0,0 +1,13 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/git-daemon.pid"
+command="/usr/bin/git"
+command_args="daemon ${GITDAEMON_OPTS}"
+start_stop_daemon_args="-e HOME= -e XDG_CONFIG_HOME= -b -m -p ${pidfile} -u ${GIT_USER:-nobody}:${GIT_GROUP:-nobody}"
+
+depend() {
+ use logger
+}
diff --git a/dev-vcs/git/files/git-daemon.confd b/dev-vcs/git/files/git-daemon.confd
new file mode 100644
index 000000000000..69b209ff18cc
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon.confd
@@ -0,0 +1,19 @@
+# conf.d file for git-daemon
+#
+# Please check man 1 git-daemon for more information about the options
+# git-daemon accepts. You MUST edit this to include your repositories you wish
+# to serve.
+#
+# Some of the meaningful options are:
+# --syslog --- Enables syslog logging
+# --verbose --- Enables verbose logging
+# --export-all --- Exports all repositories
+# --port=XXXX --- Starts in port XXXX instead of 9418
+#
+GITDAEMON_OPTS="--syslog --base-path=/var/git"
+
+# To run an anonymous git safely, the following user should be able to only
+# read your Git repositories. It should not be able to write to anywhere on
+# your system, esp. not the repositories.
+GIT_USER="nobody"
+GIT_GROUP="nobody"
diff --git a/dev-vcs/git/files/git-daemon.socket b/dev-vcs/git/files/git-daemon.socket
new file mode 100644
index 000000000000..3dec01d21653
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Git Activation Socket
+
+[Socket]
+ListenStream=9418
+Accept=true
+
+[Install]
+WantedBy=sockets.target
diff --git a/dev-vcs/git/files/git-daemon.xinetd b/dev-vcs/git/files/git-daemon.xinetd
new file mode 100644
index 000000000000..02c938d4bd6c
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon.xinetd
@@ -0,0 +1,13 @@
+service git-daemon
+{
+ disable = yes
+ socket_type = stream
+ wait = no
+ user = nobody
+ type = UNLISTED
+ protocol = tcp
+ log_on_failure += USERID
+ port = 9418
+ server = /usr/bin/git
+ server_args = daemon --inetd --syslog --export-all --base-path=/var/git
+}
diff --git a/dev-vcs/git/files/git-daemon_at.service b/dev-vcs/git/files/git-daemon_at.service
new file mode 100644
index 000000000000..2a080d4e7d8f
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon_at.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Git Repositories Server Daemon
+Documentation=man:git-daemon(1)
+
+[Service]
+User=nobody
+Group=nobody
+EnvironmentFile=/etc/conf.d/git-daemon
+# Ignore non-zero exit status, access error makes git-daemon return them
+ExecStart=-/usr/libexec/git-core/git-daemon --inetd --base-path=/var/git --verbose $GITDAEMON_OPTS
+StandardInput=socket
+StandardOutput=inherit
+StandardError=journal
diff --git a/dev-vcs/git/git-1.8.5.6.ebuild b/dev-vcs/git/git-1.8.5.6.ebuild
new file mode 100644
index 000000000000..35cb3cba4fb3
--- /dev/null
+++ b/dev-vcs/git/git-1.8.5.6.ebuild
@@ -0,0 +1,641 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="gz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts="${myopts} BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts="${myopts} INSTALL=install TAR=tar"
+ myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts="${myopts} SANE_TOOL_PATH="
+ myopts="${myopts} OLD_ICONV="
+ myopts="${myopts} NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts="${myopts} NO_ICONV=YesPlease"
+ use nls \
+ || myopts="${myopts} NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts="${myopts} NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts="${myopts} USE_LIBPCRE=yes" \
+ && extlibs="${extlibs} -lpcre"
+ use perl \
+ && myopts="${myopts} INSTALLDIRS=vendor" \
+ || myopts="${myopts} NO_PERL=YesPlease"
+ use python \
+ || myopts="${myopts} NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts="${myopts} NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts="${myopts} NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts="${myopts} NO_MMAP=YesPlease"
+# myopts="${myopts} NO_IPV6=YesPlease"
+# myopts="${myopts} NO_STRLCPY=YesPlease"
+# myopts="${myopts} NO_MEMMEM=YesPlease"
+# myopts="${myopts} NO_MKDTEMP=YesPlease"
+# myopts="${myopts} NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts="${myopts} NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts="${myopts} NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts="${myopts} ASCIIDOC8=YesPlease"
+ myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts="${myopts} NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-1.8.5-optional-cvs.patch
+
+ # honor and correctly quote DISTDIR (from upstream git master)
+ epatch "${FILESDIR}"/git-1.8.5-mw-destdir.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ git_emake EXTLIBS="${EXTLIBS}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ # Not really a bash-completion file (bug #477920)
+ dodoc contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # git-diffall
+ dobin contrib/diffall/git-diffall
+ newdoc contrib/diffall/README git-diffall.txt
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ # remote-helpers
+ if use python ; then
+ python_scriptinto /usr/libexec/git-core/
+ python_doscript "${S}"/contrib/remote-helpers/git-remote-{bzr,hg}
+ python_optimize
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # diffall - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats vim workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled=""
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/bash-completion/git-prompt for Git bash prompt"
+ einfo "Note that the prompt bash code is now in the seperate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-1.9.5.ebuild b/dev-vcs/git/git-1.9.5.ebuild
new file mode 100644
index 000000000000..a6dbd35c558c
--- /dev/null
+++ b/dev-vcs/git/git-1.9.5.ebuild
@@ -0,0 +1,640 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="gz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts="${myopts} BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts="${myopts} INSTALL=install TAR=tar"
+ myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts="${myopts} SANE_TOOL_PATH="
+ myopts="${myopts} OLD_ICONV="
+ myopts="${myopts} NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts="${myopts} NO_ICONV=YesPlease"
+ use nls \
+ || myopts="${myopts} NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts="${myopts} NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts="${myopts} USE_LIBPCRE=yes" \
+ && extlibs="${extlibs} -lpcre"
+ use perl \
+ && myopts="${myopts} INSTALLDIRS=vendor" \
+ || myopts="${myopts} NO_PERL=YesPlease"
+ use python \
+ || myopts="${myopts} NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts="${myopts} NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts="${myopts} NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts="${myopts} NO_MMAP=YesPlease"
+# myopts="${myopts} NO_IPV6=YesPlease"
+# myopts="${myopts} NO_STRLCPY=YesPlease"
+# myopts="${myopts} NO_MEMMEM=YesPlease"
+# myopts="${myopts} NO_MKDTEMP=YesPlease"
+# myopts="${myopts} NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts="${myopts} NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts="${myopts} NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts="${myopts} ASCIIDOC8=YesPlease"
+ myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts="${myopts} NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-1.9.0_rc3-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ git_emake EXTLIBS="${EXTLIBS}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # git-diffall
+ dobin contrib/diffall/git-diffall
+ newdoc contrib/diffall/README git-diffall.txt
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ # remote-helpers
+ if use python ; then
+ python_scriptinto /usr/libexec/git-core/
+ python_doscript "${S}"/contrib/remote-helpers/git-remote-{bzr,hg}
+ python_optimize
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # diffall - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats vim workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled=""
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.0.5.ebuild b/dev-vcs/git/git-2.0.5.ebuild
new file mode 100644
index 000000000000..5f98b89b2706
--- /dev/null
+++ b/dev-vcs/git/git-2.0.5.ebuild
@@ -0,0 +1,639 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts="${myopts} BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts="${myopts} INSTALL=install TAR=tar"
+ myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts="${myopts} SANE_TOOL_PATH="
+ myopts="${myopts} OLD_ICONV="
+ myopts="${myopts} NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts="${myopts} NO_ICONV=YesPlease"
+ use nls \
+ || myopts="${myopts} NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts="${myopts} NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts="${myopts} USE_LIBPCRE=yes" \
+ && extlibs="${extlibs} -lpcre"
+ use perl \
+ && myopts="${myopts} INSTALLDIRS=vendor" \
+ || myopts="${myopts} NO_PERL=YesPlease"
+ use python \
+ || myopts="${myopts} NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts="${myopts} NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts="${myopts} NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts="${myopts} NO_MMAP=YesPlease"
+# myopts="${myopts} NO_IPV6=YesPlease"
+# myopts="${myopts} NO_STRLCPY=YesPlease"
+# myopts="${myopts} NO_MEMMEM=YesPlease"
+# myopts="${myopts} NO_MKDTEMP=YesPlease"
+# myopts="${myopts} NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts="${myopts} NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts="${myopts} NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts="${myopts} ASCIIDOC8=YesPlease"
+ myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts="${myopts} NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.0.0-r2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # git-diffall
+ dobin contrib/diffall/git-diffall
+ newdoc contrib/diffall/README git-diffall.txt
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # diffall - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats vim workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled=""
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.1.4.ebuild b/dev-vcs/git/git-2.1.4.ebuild
new file mode 100644
index 000000000000..99af16d8ff14
--- /dev/null
+++ b/dev-vcs/git/git-2.1.4.ebuild
@@ -0,0 +1,635 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts="${myopts} BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts="${myopts} INSTALL=install TAR=tar"
+ myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts="${myopts} SANE_TOOL_PATH="
+ myopts="${myopts} OLD_ICONV="
+ myopts="${myopts} NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts="${myopts} NO_ICONV=YesPlease"
+ use nls \
+ || myopts="${myopts} NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts="${myopts} NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts="${myopts} USE_LIBPCRE=yes" \
+ && extlibs="${extlibs} -lpcre"
+ use perl \
+ && myopts="${myopts} INSTALLDIRS=vendor" \
+ || myopts="${myopts} NO_PERL=YesPlease"
+ use python \
+ || myopts="${myopts} NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts="${myopts} NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts="${myopts} NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts="${myopts} NO_MMAP=YesPlease"
+# myopts="${myopts} NO_IPV6=YesPlease"
+# myopts="${myopts} NO_STRLCPY=YesPlease"
+# myopts="${myopts} NO_MEMMEM=YesPlease"
+# myopts="${myopts} NO_MKDTEMP=YesPlease"
+# myopts="${myopts} NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts="${myopts} NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts="${myopts} NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts="${myopts} ASCIIDOC8=YesPlease"
+ myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts="${myopts} NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.0.0-r2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled="t7004-tag.sh" #520270
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.2.2.ebuild b/dev-vcs/git/git-2.2.2.ebuild
new file mode 100644
index 000000000000..e08073637cb2
--- /dev/null
+++ b/dev-vcs/git/git-2.2.2.ebuild
@@ -0,0 +1,637 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts+=" BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts+=" PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts+=" NO_EXPAT=YesPlease"
+ else
+ myopts+=" NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts+=" INSTALL=install TAR=tar"
+ myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts+=" SANE_TOOL_PATH="
+ myopts+=" OLD_ICONV="
+ myopts+=" NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts+=" NO_ICONV=YesPlease"
+ use nls \
+ || myopts+=" NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts+=" NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts+=" USE_LIBPCRE=yes" \
+ && extlibs+=" -lpcre"
+ use perl \
+ && myopts+=" INSTALLDIRS=vendor" \
+ || myopts+=" NO_PERL=YesPlease"
+ use python \
+ || myopts+=" NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts+=" NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts+=" NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts+=" NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts+=" NO_MMAP=YesPlease"
+# myopts+=" NO_IPV6=YesPlease"
+# myopts+=" NO_STRLCPY=YesPlease"
+# myopts+=" NO_MEMMEM=YesPlease"
+# myopts+=" NO_MKDTEMP=YesPlease"
+# myopts+=" NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts+=" NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts+=" NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts+=" ASCIIDOC8=YesPlease"
+ myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts+=" NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled="" #t7004-tag.sh" #520270
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.3.6.ebuild b/dev-vcs/git/git-2.3.6.ebuild
new file mode 100644
index 000000000000..a9e214a5586b
--- /dev/null
+++ b/dev-vcs/git/git-2.3.6.ebuild
@@ -0,0 +1,636 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl:0=
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk:= )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts+=" BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts+=" PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts+=" NO_EXPAT=YesPlease"
+ else
+ myopts+=" NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts+=" INSTALL=install TAR=tar"
+ myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts+=" SANE_TOOL_PATH="
+ myopts+=" OLD_ICONV="
+ myopts+=" NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts+=" NO_ICONV=YesPlease"
+ use nls \
+ || myopts+=" NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts+=" NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts+=" USE_LIBPCRE=yes" \
+ && extlibs+=" -lpcre"
+ use perl \
+ && myopts+=" INSTALLDIRS=vendor" \
+ || myopts+=" NO_PERL=YesPlease"
+ use python \
+ || myopts+=" NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts+=" NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts+=" NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts+=" NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts+=" NO_MMAP=YesPlease"
+# myopts+=" NO_IPV6=YesPlease"
+# myopts+=" NO_STRLCPY=YesPlease"
+# myopts+=" NO_MEMMEM=YesPlease"
+# myopts+=" NO_MKDTEMP=YesPlease"
+# myopts+=" NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts+=" NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts+=" NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts+=" ASCIIDOC8=YesPlease"
+ myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts+=" NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled="" #t7004-tag.sh" #520270
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.3.8.ebuild b/dev-vcs/git/git-2.3.8.ebuild
new file mode 100644
index 000000000000..57119c41ba27
--- /dev/null
+++ b/dev-vcs/git/git-2.3.8.ebuild
@@ -0,0 +1,636 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl:0=
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk:= )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts+=" BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts+=" PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts+=" NO_EXPAT=YesPlease"
+ else
+ myopts+=" NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts+=" INSTALL=install TAR=tar"
+ myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts+=" SANE_TOOL_PATH="
+ myopts+=" OLD_ICONV="
+ myopts+=" NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts+=" NO_ICONV=YesPlease"
+ use nls \
+ || myopts+=" NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts+=" NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts+=" USE_LIBPCRE=yes" \
+ && extlibs+=" -lpcre"
+ use perl \
+ && myopts+=" INSTALLDIRS=vendor" \
+ || myopts+=" NO_PERL=YesPlease"
+ use python \
+ || myopts+=" NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts+=" NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts+=" NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts+=" NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts+=" NO_MMAP=YesPlease"
+# myopts+=" NO_IPV6=YesPlease"
+# myopts+=" NO_STRLCPY=YesPlease"
+# myopts+=" NO_MEMMEM=YesPlease"
+# myopts+=" NO_MKDTEMP=YesPlease"
+# myopts+=" NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts+=" NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts+=" NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts+=" ASCIIDOC8=YesPlease"
+ myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts+=" NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled="" #t7004-tag.sh" #520270
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.4.6.ebuild b/dev-vcs/git/git-2.4.6.ebuild
new file mode 100644
index 000000000000..353af845b602
--- /dev/null
+++ b/dev-vcs/git/git-2.4.6.ebuild
@@ -0,0 +1,636 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl:0=
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk:= )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts+=" BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts+=" PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts+=" NO_EXPAT=YesPlease"
+ else
+ myopts+=" NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts+=" INSTALL=install TAR=tar"
+ myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts+=" SANE_TOOL_PATH="
+ myopts+=" OLD_ICONV="
+ myopts+=" NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts+=" NO_ICONV=YesPlease"
+ use nls \
+ || myopts+=" NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts+=" NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts+=" USE_LIBPCRE=yes" \
+ && extlibs+=" -lpcre"
+ use perl \
+ && myopts+=" INSTALLDIRS=vendor" \
+ || myopts+=" NO_PERL=YesPlease"
+ use python \
+ || myopts+=" NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts+=" NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts+=" NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts+=" NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts+=" NO_MMAP=YesPlease"
+# myopts+=" NO_IPV6=YesPlease"
+# myopts+=" NO_STRLCPY=YesPlease"
+# myopts+=" NO_MEMMEM=YesPlease"
+# myopts+=" NO_MKDTEMP=YesPlease"
+# myopts+=" NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts+=" NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts+=" NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts+=" ASCIIDOC8=YesPlease"
+ myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts+=" NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb \
+ || die "emake gitweb (cgi) failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled="" #t7004-tag.sh" #520270
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.4.7.ebuild b/dev-vcs/git/git-2.4.7.ebuild
new file mode 100644
index 000000000000..51d72b78d133
--- /dev/null
+++ b/dev-vcs/git/git-2.4.7.ebuild
@@ -0,0 +1,636 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl:0=
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk:= )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts+=" BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts+=" PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts+=" NO_EXPAT=YesPlease"
+ else
+ myopts+=" NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts+=" INSTALL=install TAR=tar"
+ myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts+=" SANE_TOOL_PATH="
+ myopts+=" OLD_ICONV="
+ myopts+=" NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts+=" NO_ICONV=YesPlease"
+ use nls \
+ || myopts+=" NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts+=" NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts+=" USE_LIBPCRE=yes" \
+ && extlibs+=" -lpcre"
+ use perl \
+ && myopts+=" INSTALLDIRS=vendor" \
+ || myopts+=" NO_PERL=YesPlease"
+ use python \
+ || myopts+=" NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts+=" NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts+=" NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts+=" NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts+=" NO_MMAP=YesPlease"
+# myopts+=" NO_IPV6=YesPlease"
+# myopts+=" NO_STRLCPY=YesPlease"
+# myopts+=" NO_MEMMEM=YesPlease"
+# myopts+=" NO_MKDTEMP=YesPlease"
+# myopts+=" NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts+=" NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts+=" NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts+=" ASCIIDOC8=YesPlease"
+ myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts+=" NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb \
+ || die "emake gitweb (cgi) failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled="" #t7004-tag.sh" #520270
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.4.8.ebuild b/dev-vcs/git/git-2.4.8.ebuild
new file mode 100644
index 000000000000..51d72b78d133
--- /dev/null
+++ b/dev-vcs/git/git-2.4.8.ebuild
@@ -0,0 +1,636 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl:0=
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk:= )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts+=" BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts+=" PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts+=" NO_EXPAT=YesPlease"
+ else
+ myopts+=" NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts+=" INSTALL=install TAR=tar"
+ myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts+=" SANE_TOOL_PATH="
+ myopts+=" OLD_ICONV="
+ myopts+=" NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts+=" NO_ICONV=YesPlease"
+ use nls \
+ || myopts+=" NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts+=" NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts+=" USE_LIBPCRE=yes" \
+ && extlibs+=" -lpcre"
+ use perl \
+ && myopts+=" INSTALLDIRS=vendor" \
+ || myopts+=" NO_PERL=YesPlease"
+ use python \
+ || myopts+=" NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts+=" NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts+=" NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts+=" NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts+=" NO_MMAP=YesPlease"
+# myopts+=" NO_IPV6=YesPlease"
+# myopts+=" NO_STRLCPY=YesPlease"
+# myopts+=" NO_MEMMEM=YesPlease"
+# myopts+=" NO_MKDTEMP=YesPlease"
+# myopts+=" NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts+=" NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts+=" NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts+=" ASCIIDOC8=YesPlease"
+ myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts+=" NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb \
+ || die "emake gitweb (cgi) failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled="" #t7004-tag.sh" #520270
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-2.5.0.ebuild b/dev-vcs/git/git-2.5.0.ebuild
new file mode 100644
index 000000000000..51d72b78d133
--- /dev/null
+++ b/dev-vcs/git/git-2.5.0.ebuild
@@ -0,0 +1,636 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl:0=
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk:= )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts+=" BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts+=" PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts+=" NO_EXPAT=YesPlease"
+ else
+ myopts+=" NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts+=" INSTALL=install TAR=tar"
+ myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts+=" SANE_TOOL_PATH="
+ myopts+=" OLD_ICONV="
+ myopts+=" NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts+=" NO_ICONV=YesPlease"
+ use nls \
+ || myopts+=" NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts+=" NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts+=" USE_LIBPCRE=yes" \
+ && extlibs+=" -lpcre"
+ use perl \
+ && myopts+=" INSTALLDIRS=vendor" \
+ || myopts+=" NO_PERL=YesPlease"
+ use python \
+ || myopts+=" NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts+=" NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts+=" NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts+=" NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts+=" NO_MMAP=YesPlease"
+# myopts+=" NO_IPV6=YesPlease"
+# myopts+=" NO_STRLCPY=YesPlease"
+# myopts+=" NO_MEMMEM=YesPlease"
+# myopts+=" NO_MKDTEMP=YesPlease"
+# myopts+=" NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts+=" NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts+=" NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts+=" ASCIIDOC8=YesPlease"
+ myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts+=" NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb \
+ || die "emake gitweb (cgi) failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled="" #t7004-tag.sh" #520270
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-9999-r1.ebuild b/dev-vcs/git/git-9999-r1.ebuild
new file mode 100644
index 000000000000..33e56c7af66d
--- /dev/null
+++ b/dev-vcs/git/git-9999-r1.ebuild
@@ -0,0 +1,637 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=maint
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts="${myopts} BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts="${myopts} INSTALL=install TAR=tar"
+ myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts="${myopts} SANE_TOOL_PATH="
+ myopts="${myopts} OLD_ICONV="
+ myopts="${myopts} NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts="${myopts} NO_ICONV=YesPlease"
+ use nls \
+ || myopts="${myopts} NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts="${myopts} NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts="${myopts} USE_LIBPCRE=yes" \
+ && extlibs="${extlibs} -lpcre"
+ use perl \
+ && myopts="${myopts} INSTALLDIRS=vendor" \
+ || myopts="${myopts} NO_PERL=YesPlease"
+ use python \
+ || myopts="${myopts} NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts="${myopts} NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts="${myopts} NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts="${myopts} NO_MMAP=YesPlease"
+# myopts="${myopts} NO_IPV6=YesPlease"
+# myopts="${myopts} NO_STRLCPY=YesPlease"
+# myopts="${myopts} NO_MEMMEM=YesPlease"
+# myopts="${myopts} NO_MKDTEMP=YesPlease"
+# myopts="${myopts} NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts="${myopts} NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts="${myopts} NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts="${myopts} ASCIIDOC8=YesPlease"
+ myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts="${myopts} NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled=""
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild
new file mode 100644
index 000000000000..1de365110da5
--- /dev/null
+++ b/dev-vcs/git/git-9999-r2.ebuild
@@ -0,0 +1,637 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=next
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts="${myopts} BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts="${myopts} INSTALL=install TAR=tar"
+ myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts="${myopts} SANE_TOOL_PATH="
+ myopts="${myopts} OLD_ICONV="
+ myopts="${myopts} NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts="${myopts} NO_ICONV=YesPlease"
+ use nls \
+ || myopts="${myopts} NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts="${myopts} NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts="${myopts} USE_LIBPCRE=yes" \
+ && extlibs="${extlibs} -lpcre"
+ use perl \
+ && myopts="${myopts} INSTALLDIRS=vendor" \
+ || myopts="${myopts} NO_PERL=YesPlease"
+ use python \
+ || myopts="${myopts} NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts="${myopts} NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts="${myopts} NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts="${myopts} NO_MMAP=YesPlease"
+# myopts="${myopts} NO_IPV6=YesPlease"
+# myopts="${myopts} NO_STRLCPY=YesPlease"
+# myopts="${myopts} NO_MEMMEM=YesPlease"
+# myopts="${myopts} NO_MKDTEMP=YesPlease"
+# myopts="${myopts} NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts="${myopts} NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts="${myopts} NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts="${myopts} ASCIIDOC8=YesPlease"
+ myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts="${myopts} NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/${PN}-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled=""
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild
new file mode 100644
index 000000000000..ce40cc021598
--- /dev/null
+++ b/dev-vcs/git/git-9999-r3.ebuild
@@ -0,0 +1,637 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=pu
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts="${myopts} BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts="${myopts} INSTALL=install TAR=tar"
+ myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts="${myopts} SANE_TOOL_PATH="
+ myopts="${myopts} OLD_ICONV="
+ myopts="${myopts} NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts="${myopts} NO_ICONV=YesPlease"
+ use nls \
+ || myopts="${myopts} NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts="${myopts} NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts="${myopts} USE_LIBPCRE=yes" \
+ && extlibs="${extlibs} -lpcre"
+ use perl \
+ && myopts="${myopts} INSTALLDIRS=vendor" \
+ || myopts="${myopts} NO_PERL=YesPlease"
+ use python \
+ || myopts="${myopts} NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts="${myopts} NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts="${myopts} NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts="${myopts} NO_MMAP=YesPlease"
+# myopts="${myopts} NO_IPV6=YesPlease"
+# myopts="${myopts} NO_STRLCPY=YesPlease"
+# myopts="${myopts} NO_MEMMEM=YesPlease"
+# myopts="${myopts} NO_MKDTEMP=YesPlease"
+# myopts="${myopts} NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts="${myopts} NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts="${myopts} NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts="${myopts} ASCIIDOC8=YesPlease"
+ myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts="${myopts} NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled=""
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-9999.ebuild b/dev-vcs/git/git-9999.ebuild
new file mode 100644
index 000000000000..af5415ec077e
--- /dev/null
+++ b/dev-vcs/git/git-9999.ebuild
@@ -0,0 +1,637 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_MASTER=master
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI_SUFFIX="xz"
+ SRC_URI_GOOG="http://git-core.googlecode.com/files"
+ SRC_URI_KORG="mirror://kernel/software/scm/git"
+ SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ doc? (
+ ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ )"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ pcre? ( dev-libs/libpcre )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )
+ gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+RDEPEND="${CDEPEND}
+ gpg? ( app-crypt/gnupg )
+ mediawiki? (
+ dev-perl/HTML-Tree
+ dev-perl/MediaWiki-API
+ )
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+ cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ python? ( gtk?
+ (
+ >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+ >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+ )
+ ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+# .txt/asciidoc --(asciidoc)---------> .xml/docbook
+# .xml/docbook --(docbook2texi.pl)--> .texi
+# .texi --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+ app-arch/cpio
+ doc? (
+ app-text/asciidoc
+ app-text/docbook2X
+ sys-apps/texinfo
+ app-text/xmlto
+ )
+ nls? ( sys-devel/gettext )
+ test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+ DEPEND="${DEPEND}
+ app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ cgi? ( perl )
+ cvs? ( perl )
+ mediawiki? ( perl )
+ subversion? ( perl )
+ webdav? ( curl )
+ gtk? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+ if use subversion && has_version "dev-vcs/subversion[dso]"; then
+ ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+ ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+ ewarn "have been warned."
+ fi
+ if use python ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use blksha1 ; then
+ myopts="${myopts} BLK_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ # broken assumptions, because of broken build system ...
+ myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+ myopts="${myopts} INSTALL=install TAR=tar"
+ myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
+ myopts="${myopts} SANE_TOOL_PATH="
+ myopts="${myopts} OLD_ICONV="
+ myopts="${myopts} NO_EXTERNAL_GREP="
+
+ # For svn-fe
+ extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+ # can't define this to null, since the entire makefile depends on it
+ sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+ use iconv \
+ || myopts="${myopts} NO_ICONV=YesPlease"
+ use nls \
+ || myopts="${myopts} NO_GETTEXT=YesPlease"
+ use tk \
+ || myopts="${myopts} NO_TCLTK=YesPlease"
+ use pcre \
+ && myopts="${myopts} USE_LIBPCRE=yes" \
+ && extlibs="${extlibs} -lpcre"
+ use perl \
+ && myopts="${myopts} INSTALLDIRS=vendor" \
+ || myopts="${myopts} NO_PERL=YesPlease"
+ use python \
+ || myopts="${myopts} NO_PYTHON=YesPlease"
+ use subversion \
+ || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+ use threads \
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+ || myopts="${myopts} NO_PTHREADS=YesPlease"
+ use cvs \
+ || myopts="${myopts} NO_CVS=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+# if [[ ${CHOST} == *-mint* ]] ; then
+# myopts="${myopts} NO_MMAP=YesPlease"
+# myopts="${myopts} NO_IPV6=YesPlease"
+# myopts="${myopts} NO_STRLCPY=YesPlease"
+# myopts="${myopts} NO_MEMMEM=YesPlease"
+# myopts="${myopts} NO_MKDTEMP=YesPlease"
+# myopts="${myopts} NO_MKSTEMPS=YesPlease"
+# fi
+ if [[ ${CHOST} == ia64-*-hpux* ]]; then
+ myopts="${myopts} NO_NSEC=YesPlease"
+ fi
+ if [[ ${CHOST} == *-*-aix* ]]; then
+ myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
+ fi
+ if [[ ${CHOST} == *-solaris* ]]; then
+ myopts="${myopts} NEEDS_LIBICONV=YesPlease"
+ fi
+
+ has_version '>=app-text/asciidoc-8.0' \
+ && myopts="${myopts} ASCIIDOC8=YesPlease"
+ myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
+
+ # Bug 290465:
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
+ [[ "${CHOST}" == *-uclibc* ]] && \
+ myopts="${myopts} NO_NSEC=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+ export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ #cp "${FILESDIR}"/GIT-VERSION-GEN .
+ fi
+
+}
+
+src_prepare() {
+ # bug #350330 - automagic CVS when we don't want it is bad.
+ epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
+
+ # install mediawiki perl modules also in vendor_dir
+ # hack, needs better upstream solution
+ epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+ epatch "${FILESDIR}"/${PN}-2.2.0-svn-fe-linking.patch
+
+ epatch_user
+
+ sed -i \
+ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+ -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+ -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+ -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+ Makefile contrib/svn-fe/Makefile || die "sed failed"
+
+ # Never install the private copy of Error.pm (bug #296310)
+ sed -i \
+ -e '/private-Error.pm/s,^,#,' \
+ perl/Makefile.PL
+
+ # Fix docbook2texi command
+ sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+ Documentation/Makefile || die "sed failed"
+
+ # Fix git-subtree missing DESTDIR
+ sed -i \
+ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
+ contrib/subtree/Makefile
+}
+
+git_emake() {
+ # bug #326625: PERL_PATH, PERL_MM_OPT
+ # bug #320647: PYTHON_PATH
+ PYTHON_PATH=""
+ use python && PYTHON_PATH="${PYTHON}"
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ OPTCFLAGS="${CFLAGS}" \
+ OPTLDFLAGS="${LDFLAGS}" \
+ OPTCC="$(tc-getCC)" \
+ OPTAR="$(tc-getAR)" \
+ prefix="${EPREFIX}"/usr \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ sysconfdir="${EPREFIX}"/etc \
+ PYTHON_PATH="${PYTHON_PATH}" \
+ PERL_MM_OPT="" \
+ GIT_TEST_OPTS="--no-color" \
+ V=1 \
+ "$@"
+ # This is the fix for bug #326625, but it also causes breakage, see bug
+ # #352693.
+ # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+ exportmakeopts
+}
+
+src_compile() {
+ if use perl ; then
+ git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+ git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+ fi
+ git_emake || die "emake failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/git{,-blame}.el
+ fi
+
+ if use perl && use cgi ; then
+ git_emake \
+ gitweb/gitweb.cgi \
+ || die "emake gitweb/gitweb.cgi failed"
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
+ git_emake || die "emake credential-osxkeychain"
+ fi
+
+ cd "${S}"/Documentation
+ if [[ ${PV} == *9999 ]] ; then
+ git_emake man \
+ || die "emake man failed"
+ if use doc ; then
+ git_emake info html \
+ || die "emake info html failed"
+ fi
+ else
+ if use doc ; then
+ git_emake info \
+ || die "emake info html failed"
+ fi
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ # by defining EXTLIBS we override the detection for libintl and
+ # libiconv, bug #516168
+ local nlsiconv=
+ use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+ use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+ git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
+ if use doc ; then
+ git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
+ fi
+ cd "${S}"
+ fi
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ git_emake || die "emake git-credential-gnome-keyring failed"
+ fi
+
+ cd "${S}"/contrib/subtree
+ git_emake
+ use doc && git_emake doc
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake
+ fi
+}
+
+src_install() {
+ git_emake \
+ install || \
+ die "make install failed"
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+ fi
+
+ # Depending on the tarball and manual rebuild of the documentation, the
+ # manpages may exist in either OR both of these directories.
+ find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+ find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+ # Upstream does not ship this pre-built :-(
+ use doc && doinfo Documentation/{git,gitman}.info
+
+ newbashcomp contrib/completion/git-completion.bash ${PN}
+ bashcomp_alias git gitk
+ # Not really a bash-completion file (bug #477920)
+ # but still needed uncompressed (bug #507480)
+ insinto /usr/share/${PN}
+ doins contrib/completion/git-prompt.sh
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc}
+ elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+ #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+
+ if use python && use gtk ; then
+ python_doscript "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ #dobin contrib/fast-import/git-p4 # Moved upstream
+ #dodoc contrib/fast-import/git-p4.txt # Moved upstream
+ newbin contrib/fast-import/import-tars.perl import-tars
+ exeinto /usr/libexec/git-core/
+ newexe contrib/git-resurrect.sh git-resurrect
+
+ # git-subtree
+ cd "${S}"/contrib/subtree
+ git_emake install || die "Failed to emake install git-subtree"
+ if use doc ; then
+ git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
+ fi
+ newdoc README README.git-subtree
+ dodoc git-subtree.txt
+ cd "${S}"
+
+ if use mediawiki ; then
+ cd "${S}"/contrib/mw-to-git
+ git_emake install
+ cd "${S}"
+ fi
+
+ # diff-highlight
+ dobin contrib/diff-highlight/diff-highlight
+ newdoc contrib/diff-highlight/README README.diff-highlight
+
+ # git-jump
+ exeinto /usr/libexec/git-core/
+ doexe contrib/git-jump/git-jump
+ newdoc contrib/git-jump/README git-jump.txt
+
+ # git-contacts
+ exeinto /usr/libexec/git-core/
+ doexe contrib/contacts/git-contacts
+ dodoc contrib/contacts/git-contacts.txt
+
+ if use gnome-keyring ; then
+ cd "${S}"/contrib/credential/gnome-keyring
+ dobin git-credential-gnome-keyring
+ fi
+
+ if use subversion ; then
+ cd "${S}"/contrib/svn-fe
+ dobin svn-fe
+ dodoc svn-fe.txt
+ use doc && doman svn-fe.1 && dohtml svn-fe.html
+ cd "${S}"
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # completion - installed above
+ # credential/gnome-keyring TODO
+ # diff-highlight - done above
+ # emacs - installed above
+ # examples - these are stuff that is not used in Git anymore actually
+ # git-jump - done above
+ # gitview - installed above
+ # p4import - excluded because fast-import has a better one
+ # patches - stuff the Git guys made to go upstream to other places
+ # persistent-https - TODO
+ # mw-to-git - TODO
+ # subtree - build seperately
+ # svnimport - use git-svn
+ # thunderbird-patch-inline - fixes thunderbird
+ for i in \
+ buildsystems convert-objects fast-import \
+ hg-to-git hooks remotes2config.sh rerere-train.sh \
+ stats workdir \
+ ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${ED}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ # We used to install in /usr/share/${PN}/gitweb
+ # but upstream installs in /usr/share/gitweb
+ # so we will install a symlink and use their location for compat with other
+ # distros
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+
+ find "${ED}"/usr/lib64/perl5/ \
+ -name .packlist \
+ -exec rm \{\} \;
+ else
+ rm -rf "${ED}"/usr/share/gitweb
+ fi
+
+ if ! use subversion ; then
+ rm -f "${ED}"/usr/libexec/git-core/git-svn \
+ "${ED}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ if use !prefix ; then
+ newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+ systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
+ systemd_dounit "${FILESDIR}/git-daemon.socket"
+ fi
+
+ perl_delete_localpod
+}
+
+src_test() {
+ local disabled=""
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9401-git-cvsserver-crlf.sh \
+ t9402-git-cvsserver-refs.sh \
+ t9600-cvsimport.sh \
+ t9601-cvsimport-vendor-branch.sh \
+ t9602-cvsimport-branches-tags.sh \
+ t9603-cvsimport-patchsets.sh \
+ t9604-cvsimport-timestamps.sh"
+ local tests_perl="t3701-add-interactive.sh \
+ t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh \
+ t7106-reset-unborn-branch.sh \
+ t7501-commit.sh"
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ # t0001-init.sh - check for init notices EPERM* fails
+ local tests_nonroot="t0001-init.sh \
+ t0004-unwritable.sh \
+ t0070-fundamental.sh \
+ t1004-read-tree-m-u-wf.sh \
+ t3700-add.sh \
+ t7300-clean.sh"
+ # t9100 still fails with symlinks in SVN 1.7
+ local test_svn="t9100-git-svn-basic.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if [[ ${EUID} -eq 0 ]]; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ einfo "Skipping other tests that require being non-root"
+ disabled="${disabled} ${tests_nonroot}"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-vcs/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 1 ]] && \
+ has_version "dev-vcs/cvs[server]" && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ einfo "Disabling tests that fail with SVN 1.7"
+ disabled="${disabled} ${test_svn}"
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+
+ # Avoid the test system removing the results because we want them ourselves
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+ -i "${S}"/t/Makefile
+
+ # Clean old results first, must always run
+ cd "${S}/t"
+ nonfatal git_emake clean
+
+ # Now run the tests, keep going if we hit an error, and don't terminate on
+ # failure
+ cd "${S}"
+ einfo "Start test run"
+ #MAKEOPTS=-j1
+ nonfatal git_emake --keep-going test
+ rc=$?
+
+ # Display nice results, now print the results
+ cd "${S}/t"
+ nonfatal git_emake aggregate-results
+
+ # And bail if there was a problem
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
+ einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+ einfo "Note that the prompt bash code is now in that separate script"
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/metadata.xml b/dev-vcs/git/metadata.xml
new file mode 100644
index 000000000000..8eca331017fa
--- /dev/null
+++ b/dev-vcs/git/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <longdescription lang="en">
+ Git - Fast Version Control System. Official titled
+ "GIT - the stupid content tracker".
+
+ Git is a popular version control system designed to handle very large
+ projects with speed and efficiency; it is used mainly for various open
+ source projects, most notably the Linux kernel.
+
+ Git falls in the category of distributed source code management tools,
+ similar to e.g. GNU Arch or Monotone (or BitKeeper in the proprietary
+ world). Every Git working directory is a full-fledged repository with full
+ revision tracking capabilities, not dependent on network access or a central
+ server.
+ </longdescription>
+ <use>
+ <flag name="blksha1">Use the new optimized SHA1 implementation</flag>
+ <flag name="cgi">Install gitweb too</flag>
+ <flag name="curl">Support fetching and pushing (requires webdav too) over http:// and https:// protocols</flag>
+ <flag name="gpg">Pull in gnupg for signing -- without gnupg, attempts at signing will fail at runtime!</flag>
+ <flag name="gtk">Include the gitview contrib tool</flag>
+ <flag name="highlight">GitWeb support for app-text/highlight</flag>
+ <flag name="mediawiki">Support pulling and pushing from MediaWiki</flag>
+ <flag name="ppcsha1">Make use of a bundled routine that is optimized for the PPC arch</flag>
+ <flag name="subversion">Include git-svn for <pkg>dev-vcs/subversion</pkg> support</flag>
+ <flag name="webdav">Adds support for push'ing to HTTP/HTTPS repositories via DAV</flag>
+ </use>
+</pkgmetadata>