From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-vcs/git/Manifest | 37 ++ dev-vcs/git/files/50git-gentoo.el | 13 + dev-vcs/git/files/git-1.8.5-mw-vendor.patch | 39 ++ dev-vcs/git/files/git-2.12.0-optional-cvs.patch | 456 ++++++++++++++ dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch | 11 + .../files/git-2.5.1-freebsd-10.x-no-iconv.patch | 14 + .../git/files/git-2.7.0-mediawiki-500pages.patch | 46 ++ .../git/files/git-2.7.0-mediawiki-namespaces.patch | 97 +++ .../git/files/git-2.7.0-mediawiki-subpages.patch | 48 ++ dev-vcs/git/files/git-daemon-r1.initd | 12 + dev-vcs/git/files/git-daemon.confd | 19 + dev-vcs/git/files/git-daemon.socket | 9 + dev-vcs/git/files/git-daemon.xinetd | 13 + dev-vcs/git/files/git-daemon_at-r1.service | 12 + dev-vcs/git/git-2.13.5.ebuild | 680 ++++++++++++++++++++ dev-vcs/git/git-2.13.6.ebuild | 680 ++++++++++++++++++++ dev-vcs/git/git-2.14.1.ebuild | 692 ++++++++++++++++++++ dev-vcs/git/git-2.14.2.ebuild | 699 +++++++++++++++++++++ dev-vcs/git/git-9999-r1.ebuild | 699 +++++++++++++++++++++ dev-vcs/git/git-9999-r2.ebuild | 699 +++++++++++++++++++++ dev-vcs/git/git-9999-r3.ebuild | 699 +++++++++++++++++++++ dev-vcs/git/git-9999.ebuild | 699 +++++++++++++++++++++ dev-vcs/git/metadata.xml | 40 ++ 23 files changed, 6413 insertions(+) create mode 100644 dev-vcs/git/Manifest create mode 100644 dev-vcs/git/files/50git-gentoo.el create mode 100644 dev-vcs/git/files/git-1.8.5-mw-vendor.patch create mode 100644 dev-vcs/git/files/git-2.12.0-optional-cvs.patch create mode 100644 dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch create mode 100644 dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch create mode 100644 dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch create mode 100644 dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch create mode 100644 dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch create mode 100644 dev-vcs/git/files/git-daemon-r1.initd create mode 100644 dev-vcs/git/files/git-daemon.confd create mode 100644 dev-vcs/git/files/git-daemon.socket create mode 100644 dev-vcs/git/files/git-daemon.xinetd create mode 100644 dev-vcs/git/files/git-daemon_at-r1.service create mode 100644 dev-vcs/git/git-2.13.5.ebuild create mode 100644 dev-vcs/git/git-2.13.6.ebuild create mode 100644 dev-vcs/git/git-2.14.1.ebuild create mode 100644 dev-vcs/git/git-2.14.2.ebuild create mode 100644 dev-vcs/git/git-9999-r1.ebuild create mode 100644 dev-vcs/git/git-9999-r2.ebuild create mode 100644 dev-vcs/git/git-9999-r3.ebuild create mode 100644 dev-vcs/git/git-9999.ebuild create mode 100644 dev-vcs/git/metadata.xml (limited to 'dev-vcs/git') diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest new file mode 100644 index 000000000000..7640f7157f4f --- /dev/null +++ b/dev-vcs/git/Manifest @@ -0,0 +1,37 @@ +AUX 50git-gentoo.el 472 SHA256 7cd37e8db7eaeee8d822d38851eb69771b0f09c79883a8e51309a9add85fdbe2 SHA512 0435d7d67f2b64460a62c6a95c65a722c0f8d5d50d064a81e690de84a761ba518d32db545ee70c0fa3ad7803d77d5dab100689888bc92c9d82f2d6d5073623b3 WHIRLPOOL 887682f79182f6728af3c0fd2ee0e81319d49761a987559684be5e4acae4af579a5b8d1197ddba31452cec179de3c8f5784cc85ad61f78b400e42c204c93f642 +AUX git-1.8.5-mw-vendor.patch 1160 SHA256 e613f8874beec8d11644ad8d12c43cccb6585f96e99485d7d8ead6618321e8c0 SHA512 6513104f28eff36c18840f90e56fb21e8e04055e4e9a304ef15e5d7e1c13c8b45c4be0380b7781e776ce3b8ee9f7371ed2200e01174cc257125a613aef43ac9b WHIRLPOOL 6a5dcb28dc40590cf4e4b1369b0d770b40f1060bf933366f252edafbb9781f39d7f46dc218c16d429f507c7d5a9479bafce2df7309178071bcb782095809ed69 +AUX git-2.12.0-optional-cvs.patch 14388 SHA256 56ab35325847b4ef5f04ac0f5e1d86889190804abffe8a42009a701162ab6c64 SHA512 fb44d17628e0c6d39053c8221296a8d81ccc84cf8cb49a0be13ecffcf79c69902f01c43c3b0ce45d2cb2c880116e2fb6d78d95e9c8d2fe5f19ff37bc4a6f8761 WHIRLPOOL 1ce6db0fc2feed91e517adba11183620fe7bc7d1ef468e164fa725e43811553fd841776e67606c92d64145d91f2cdcad5fd3104741733b5c60c90209fb15d52a +AUX git-2.2.0-svn-fe-linking.patch 418 SHA256 45b89e10bec13fd7b29f7b530bf5ef57d3263581930ff338bf2105b3a96e6df0 SHA512 ac312e7da4c548073d4dfa5d9bb6823ed48ea70a30d7993da190cfc4cc4b17124e15326748d79e59ca0772675619b29221a57c5af45b7b6c7196dae218772ecd WHIRLPOOL d31618b8012b2b9eca5ae5c4317c893a21697b182aa877e236a34eefc17869b0c659c35617d70e7cd316d430de5d093fe18bce947996f8c6aade7cd8c60a4c38 +AUX git-2.5.1-freebsd-10.x-no-iconv.patch 568 SHA256 f5f96e35b9d3138a0806aa2298d00ee0138c453eebd3f325f58ff3d07dabe361 SHA512 9f7334b2c5b69c5a6a94e198a522b176470b0ae9d428694b9a404e4bcf33d269f43c8d2d9b5834e36f9a875d12a7b21f59caaaffad6d05cb6267ab2967e64567 WHIRLPOOL d40617ebd5b7e3ff7b7fd2948178741f427bf505233a3f2d0b3ffa0408218ea39aa5e04c94e2810c4db153ef4a3244ad0af48f8f2b785885f1f2ce81758728eb +AUX git-2.7.0-mediawiki-500pages.patch 1317 SHA256 2a3ca7e73ea0b1575c4646a8cf9b2b7bcac74f5fa9c7c5e6b8fc9d320ee2cc89 SHA512 efe580f288c6fdb6d55b742a3e4335ac32ed96cb12c10b959a5f283e505ab0aeed039d0d19d9dbf148a07ac6c7aec075ecea0c0be68456fdbe23dcad77ca01be WHIRLPOOL e890b6c529e007dc1fbb8f6188b9c23f16856d65a38ce702657eea2f065a4ff52b6ee8bd284726582db765222dfefb31da71c14217b3c15968050e093bc14a6f +AUX git-2.7.0-mediawiki-namespaces.patch 3188 SHA256 7205e94a95c9e9027b2a8472854e0d76dfb3053b8e7f139836d90b3555c62b89 SHA512 f1597fcb8e771917561d92bf428825e28477ed792be7494e34754434c73422dc52fdf99d981656b291f7eb91a199abe54038ae87e9b5229c9a382a4ea88e9d4f WHIRLPOOL 674de2ded34bf2d1d05c3e606b881e00a92ae7958a45e481d51d8766b0429d0054149017a5f21c024f466b62fffb6dddce64c7569caacfc0aa34c3c2b20d3610 +AUX git-2.7.0-mediawiki-subpages.patch 2091 SHA256 322aeee855c163c0e0cd5048b36bf464052fbbbd98fc23257b6e5c525d9057c5 SHA512 e294c0d4588499961632bcc6ea20474984c4bcc7a804ff3cd9d12584cecad3c36f5772c21cf7a884b517370eb7d87542f7bdc3b2c5482c18dbc623abe5e7c73e WHIRLPOOL 3731669811ec1cce64890afb5e0ee3add808d1da8f32a5061ed6d15c7a54aaf0bd4a350f35c4d78565132fe736bf02119fe51ef641fedf02f546e2b3fcc23655 +AUX git-daemon-r1.initd 368 SHA256 c39eff8e0d0156f035b987521444476875852519ddfe6b36ea5c205d93a7f323 SHA512 6fcdefec671ca9b0191e32902663a3400b76cdec82500bdcf65dec1bdecb78a40678c80c7f77b0789a2877284db3400cdf52289c2221f8daa7e3fa7620ec1bfb WHIRLPOOL b90de85619b0da130f463cdbaa774c6489ae6e5eb0618cf9c1b9297cf100f6dac0c7642054842dbf628c5bdd5c57aa694b01280949e73f95704e41345c8e2de0 +AUX git-daemon.confd 710 SHA256 4703ba2372c661fb674a29fea7f64983f8b1b3136d971663509249655bca6e21 SHA512 fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec WHIRLPOOL 1ce085e6f8580824f96517ae8d49f0a22124cb8d6cfa740dc041e0800bfe9541fa6d2a6ddb5dc23f96186ddfe4a539f4a72bb87deded2d7af37569957b52b4e5 +AUX git-daemon.socket 116 SHA256 66a064b67e441306bf765d3d3115ac55bafa2098400af134f852d4aecf8608d7 SHA512 e383d358999ea0c7201c1709015a9b7c4dd9dd71287605640aca837fac1e2ee33a5a1684e1c3414c08742605f185b722f4864afd5be8b79a9f0d8f7ae0f9b701 WHIRLPOOL 1098e46b6d2be3c8d758a087408aed91e0c01625542dfc90fbff80ed8b40d2a54ea4ab45b4d003ef0b0b8ed1411e1146a58076b68096389412a61fe2d09214dd +AUX git-daemon.xinetd 260 SHA256 5025efbceed83835378cada3728448cbf445a1584e7cbd7736f568f4b6b52a67 SHA512 5e0c85004e7e2b89fd191350022b9970a6ca03129b4c913e159570b99b5797ab924f667cd3dc5693a9d4916b7b5cf36814eda015dbdf46a1354eb50d1c081f9c WHIRLPOOL 155bfca2c071d5368de09412d1d937cefd3b5cd28a991b99845551738440b92791c33a67ef41be711dbf06fc4faf4a299cbaf1f410b119fe5deb5a4cd741803d +AUX git-daemon_at-r1.service 340 SHA256 980b2b2234fc672065286244cd4e690c92865d39a02001936801cb013b7d2dce SHA512 073d8752dc224ff1130a5290e0f965a04b19f2a8dbd5d50172101099386ad3af0fd5e1abf57030960b750a2adf36a7ae69d18ddc990bab4e694486e65424cfa9 WHIRLPOOL fd89d61e15bf499404b0a17a2e47257962c671cab09a3af53cb378758cf7a5f979026831a8da2270ea54fa8897e132def17307d03729ef2e30dfe7950c59b1b3 +DIST git-2.13.5.tar.xz 4756436 SHA256 21c9e29caac86d244ac7af78bc3422746dabb903cb3952a1ceefd801020ad1a1 SHA512 4a0b55d19f15cf0ca388d43b650c1ccadbc32964925e5d0a3107ae84c38506af957335ceb0cbb5468ffbe0f5283f8e188aa51c9e915b3249126eb37c304be9ec WHIRLPOOL 7a3c9971f37de366801be6a6d1d28a1d02b2f3fe98a508465c01d600913efd0ae4d241fb690686beb2ae9b0321ba4f7eb5b313ec47fb04eb7d0e0e51170c6750 +DIST git-2.13.6.tar.xz 4756820 SHA256 bce97e403bea34f50378e90ade10c12666b2382cc247551b63dc5604e03b2523 SHA512 ed39784205e1077f886eebdfb34a205fb0433071de29f673a79ea32bca31a2ba9bdabba208c9679ea2f6f295bafad52a7e7852b5bd2ccb1e6c99a1d2e76e8ada WHIRLPOOL aeadb595a3fc9b74b143478436f4511d15735e5e01bbaf84bc60ef6c3bb91d94aa29ea1bd700a08d3aea3341de4cee5c4d5ced0b550a223faaadd37774cd3492 +DIST git-2.14.1.tar.xz 4791876 SHA256 6f724c6d0e9e13114ab35db6f67e1b2c1934b641e89366e6a0e37618231f2cc6 SHA512 bee35ad9c6a0d0588045ec2fe5f6987cb1eeb3961cdf33cd9b51ae52017969131ea4ec09908f9b30944f85b0daa99614fb42c248c9c8dac5f21a90e2866c33b4 WHIRLPOOL 4ca338a3b39f3a787bc4054f26a4510918ef8dd1bad834e6fc0889358b56e22a4eb98a642fe7d96e60e210aa0e946da160d1716a1ee14e8c853ea6af15b609b7 +DIST git-2.14.2.tar.xz 4800208 SHA256 50e9723996114ad1eec4dda89960d9fe34461749ae42031008a261fedd03c7a1 SHA512 fe99486e0aef8d73dace3081bbd62bc6d08bc13868b98c905f7833458fdfc464eea504ae2961f4a2f38892cb0e76b533a50a2cacdf07c9ad9f8106e7ac1c353c WHIRLPOOL af0d166fc00aea8a4a77984e8bf92f6fb3abc854263316961683e5e27c8adbe1d73a3384b4d14c2ce762d75fd95f67da9a95a3fd3eca4d6747eb1850ab7b084e +DIST git-htmldocs-2.13.5.tar.xz 1110236 SHA256 f5f10d821544446547dc91798772f36d7515a824c9a28f22521f0094e1a4dc08 SHA512 0ba006ddc35325052be4d969a3a966ec1be7954dcc1676b9914953720e56f3c9a4522541d964c6ff08a921c35f983213eacd00b99db5d97b97ea8f5c1181ed73 WHIRLPOOL 020963c8544dba6acc4b0e681a844b6a9f332b3b3469c056d678791afacab54f4badd956137b21d3a5d2ea465a83f05d815a2c066f71fade41a58e8f802088bd +DIST git-htmldocs-2.13.6.tar.xz 1110668 SHA256 cdc39ecc8d1ce09f7b865832ebbc466441beb61d1aad4c7796514520220dabf0 SHA512 9eb26f04836620bf4486d3bb2a170ab2b0af319f7f53e2677f4c1445767f5c3521cfdbb274dcc4df2bfd2fc5bf0ca18c6a4a9ca0b9f957c53f66e530684af6cc WHIRLPOOL 126d8ae25c71dc4e6a6eb20ba611cd2eaf94ea8f4f89fde82b2d05044e93f425d9812559db5599b557a1a8f5832cc41d0651b421d265219c257351fe7fb41f2b +DIST git-htmldocs-2.14.1.tar.xz 1115176 SHA256 9c1970c7f87f37c8b3044e01e0500d84d8bc4eb4dfa5ca881c32c351f20769fb SHA512 c4d8de9d402b00c6856936bbd1fffc213e156a7dee09d740159ee5de3231bcc3dee426c640e2dac6c837b7a3f69779be4093664fd55ef18e671f76e2d11280b5 WHIRLPOOL 1a85338c397ddedd5db01a65b0b173f4876551348b7892872c10b706e59419a2eb5937ca43df1018102a56e973ce756b6ca128e3df4e0e99adc1a9ba7719be52 +DIST git-htmldocs-2.14.2.tar.xz 1115940 SHA256 a36661e81e5b21e788cd84e11860bcd0cafa402eff06e6371415a5a0e0b80dfb SHA512 c5dda319713a98b9f655a04fbb4dfcba4cc60fe22586bae73a88111d96cd8da989060b8450549a32a5c5bf5bc8ce735e73055ce72b8bf5d3b4fcec2040fa196b WHIRLPOOL 1b47b798ae00f29e84862b973f4e284076eba84992f52b92903b56d50f0a463aac011fdcb3ea0b4859d2cf8661eb24c5faf4569ed22de952e293df95ca9a0438 +DIST git-manpages-2.13.5.tar.xz 407640 SHA256 1dde688dda9162605ae27e4ad1b55c65c056b3e7cd70972b7e1d6bd2b743394d SHA512 42637b264b4a1a73defe22f314cb8ca0bc171fd722252cd926a9fd74a8f89d129da0648ed85b72f44948795c6ae1f33f4f141f11b07688533c8654be0983fbc0 WHIRLPOOL 9b4a3440c4d1da7089d020e146de7401502cdbae0d82a0052f665cfab84d48de5aa5602d78b8d2f29507e280a16ab4bc2ea4a753fc948a7102eef0240ab3ab2d +DIST git-manpages-2.13.6.tar.xz 407660 SHA256 9c92ed09c3343c770a1afd9dbb1192b00ebb1b3d3e25e21a2dcb1a4e9a494d1d SHA512 b24a96053e348e1d2ebf5c66d968074bc73471f07ac3a680d8b16fd211b69b5fdfad6a087473edf9941ad08493e4d7ff0a916b85ce40ebe19b3e3dad6a4baf5f WHIRLPOOL f25b4b20462806a722067aecb7aa0526f00536630c8f71bd7be1ecc0ff4fec07db2fa79d69d911f3e1a2eaca9fe73ad76e76e7ef7afbb83698db42a540e4cfef +DIST git-manpages-2.14.1.tar.xz 410400 SHA256 7ebce1e0e862af1367e24f14765c7b67f08b63fb01b80949f55479c562d414f2 SHA512 53641232a4fa7c8e5da14f7ba46d84e6cc4281ed8e9979153e9de13ae6550d863e823c3a2f71ab9232a57314fb19b9443913518a3a072d227c2067430d5108f7 WHIRLPOOL 6b4796ebd3070c66404920091298717d1c743403454a62c5e49bd8f8af16b3dc47345a8c8e64fec670b8bd9ed34ddbfa3916f904696e9209522cbc8ae5dcfdb1 +DIST git-manpages-2.14.2.tar.xz 411160 SHA256 6dd350d1e9d00159a549f0fad08a9f954b1d12576fc8d5865fbed9dee15105fc SHA512 64f9e22ed98cde1dec9afb719c2f7254d5da1eceab2e7d3291d37792fa1b9fc83633ac42a4f47961a6721b325d58818e67ffb14085d5e8f9bed1b691f22d79d7 WHIRLPOOL 902889bed82289773c029ac7c9625f4972559e0365cc04dfb661ae14fd7e1757d3820d75b3591d72dded98107ad7a1e2e31590452699858ca3a94fcc375ac0eb +EBUILD git-2.13.5.ebuild 19016 SHA256 60f7549d88e55d94f090293c78c841565b8a11f8db61526abbd2c4de650dbac2 SHA512 4741a465efa6fbdc86775abc4088a9512971658988154a5da2f410e1e243b6f6a1e7c5bece23582f3a47e1ddd587685ebfc32c7b00c8ff325d2e92996e4d840d WHIRLPOOL 1372327523438351e0368978141e4c80d7ab3f0d3f816d9c2b749287caccab69870dd26db28b75f5244b69012fc0951b7894c442d5aae006167435511e5890c9 +EBUILD git-2.13.6.ebuild 19019 SHA256 c9c5d7cdd8d928e906d0c925e001a3783094590796adfd20b649902bdc612f34 SHA512 ca1e07833367a03037009b4e4726c13539dea89a6259245a65ac35165920bd65234168c7ecfba23a816af5521ece1c41d30b78d62078d9d64ca8b1479f23c15a WHIRLPOOL 04263d41376789794bcd1ecfdba3278f4a28666b6ecfeb14096ccf4d3f670f0067db4809a2a41f1022de768e05221e3c1dcad03118fb6c409476207fe5d04b5c +EBUILD git-2.14.1.ebuild 19320 SHA256 1ecc45be91062d9442750bd22c8fdba490b5c7fff54368b4ab1e3d5e935011ec SHA512 a49a979067f1f7c9c207f1faf522229d3b2b4ae0cf04f7881822b486b6a891f2f5464fcbb6dde14b919c71c007f36e2892ef12bcd45e42ccebd82eeb29d28384 WHIRLPOOL e16b1d0ef5c946dfd2001b98dc2e89891dacf152760d2e095d24f10ef6c69193570bcd936fd666bcee7de90d2aa928b3ba7ef87028ddb9bba0360ae3d95402e1 +EBUILD git-2.14.2.ebuild 19492 SHA256 7ffc88887aa46a21a50af75c177e551ef40ffbb1b12b651a9c0c3111d9f3fc6c SHA512 f0dfd54aad567141b2806c0e2bc8a24699b66456f6fe964071a5da78b201b4f27dd7942e75ae320f6b5b4c0c18a948971ad75a339125cbd5f5709ec0780726a8 WHIRLPOOL 332d2dbb55610ca410fd04e2fc595e1e65fc6edd95d9a412d7dad14b266707d2c0e760b2d5aa54fb7dd7d1f0b2d21d19b561d5060418037f1de24c53b32ad52b +EBUILD git-9999-r1.ebuild 19492 SHA256 7ffc88887aa46a21a50af75c177e551ef40ffbb1b12b651a9c0c3111d9f3fc6c SHA512 f0dfd54aad567141b2806c0e2bc8a24699b66456f6fe964071a5da78b201b4f27dd7942e75ae320f6b5b4c0c18a948971ad75a339125cbd5f5709ec0780726a8 WHIRLPOOL 332d2dbb55610ca410fd04e2fc595e1e65fc6edd95d9a412d7dad14b266707d2c0e760b2d5aa54fb7dd7d1f0b2d21d19b561d5060418037f1de24c53b32ad52b +EBUILD git-9999-r2.ebuild 19492 SHA256 7ffc88887aa46a21a50af75c177e551ef40ffbb1b12b651a9c0c3111d9f3fc6c SHA512 f0dfd54aad567141b2806c0e2bc8a24699b66456f6fe964071a5da78b201b4f27dd7942e75ae320f6b5b4c0c18a948971ad75a339125cbd5f5709ec0780726a8 WHIRLPOOL 332d2dbb55610ca410fd04e2fc595e1e65fc6edd95d9a412d7dad14b266707d2c0e760b2d5aa54fb7dd7d1f0b2d21d19b561d5060418037f1de24c53b32ad52b +EBUILD git-9999-r3.ebuild 19492 SHA256 7ffc88887aa46a21a50af75c177e551ef40ffbb1b12b651a9c0c3111d9f3fc6c SHA512 f0dfd54aad567141b2806c0e2bc8a24699b66456f6fe964071a5da78b201b4f27dd7942e75ae320f6b5b4c0c18a948971ad75a339125cbd5f5709ec0780726a8 WHIRLPOOL 332d2dbb55610ca410fd04e2fc595e1e65fc6edd95d9a412d7dad14b266707d2c0e760b2d5aa54fb7dd7d1f0b2d21d19b561d5060418037f1de24c53b32ad52b +EBUILD git-9999.ebuild 19492 SHA256 7ffc88887aa46a21a50af75c177e551ef40ffbb1b12b651a9c0c3111d9f3fc6c SHA512 f0dfd54aad567141b2806c0e2bc8a24699b66456f6fe964071a5da78b201b4f27dd7942e75ae320f6b5b4c0c18a948971ad75a339125cbd5f5709ec0780726a8 WHIRLPOOL 332d2dbb55610ca410fd04e2fc595e1e65fc6edd95d9a412d7dad14b266707d2c0e760b2d5aa54fb7dd7d1f0b2d21d19b561d5060418037f1de24c53b32ad52b +MISC ChangeLog 27994 SHA256 ae0914321ef517b21a377da20d6b504a60d449e16301d416a91ec721f317b82d SHA512 3e005d091140e57221bc63fc801a78bab9442b733948ff61833ed84baa97f5cf5f4a7f4c23fb035ef11a80ae8d897ab5671205e6dbcc9e3473316514bf725079 WHIRLPOOL 3bace4900507085c37196e6543bffa4c6ef8a302332b37a0e5d1821c0205a6258ecbbc69e07bb93821e512dd74a79551d35299f2b1a03ce99fe762536be19106 +MISC ChangeLog-2012 94624 SHA256 7c8c313ea4800194191f7255023cabd205e56bb9761e8877dfab3770024b158c SHA512 f19cae0a29e8598e3bb68f1295baa56ff0edf06b2e3a95081ea2f95c4555d63dd6a0bff5a82345b274a1936104a75a69fe7862d7738a7fa2539ec9a7afd6b28f WHIRLPOOL 059ab6c542757c4524cb20cebb3cfa4bfbbe16d3a66da0805fb972d32f91f2a49bee97d1d73acf74d8e2cf3cc7a552371cf66db0580506d4b1a9e05ee52bdea4 +MISC ChangeLog-2015 29654 SHA256 82cc6b66c218365e83ce2e73618aeab54033aaa197e1a9d41dc8271352eea251 SHA512 2d8c2041e1c2ba5ceaa988b658ac3df5ae3ec333e3718f49147b293f5dc780e9aefc4af22b0ce870178bada6515fd5b2789c49d08337552835c861b3073ae752 WHIRLPOOL 845dea2b0ccec9fc651616c76d9f2821bde837428449dbd30e8dd1bc15bb91d54254a77b03e858f5c1fd3c314c5ad28833dc27dda5404af36191c8149254e27a +MISC metadata.xml 2066 SHA256 a06996cbadeaa36f10a27dcff20dcedc02ddbc7789a96e4086472773af90f923 SHA512 a0018307f19e6695002fa52a7cf898071ea8b7798ed7454f544a3bd15a3448cdab322fac5fcbae7b72e9a9ecf823c56b6ced8de560e68012be0ea6d09b0640bd WHIRLPOOL b4d2efa22147a81ca61760ca2b7b5b71dc6c6c7a55073451d15d3044f8f9e4ec510db9d451ee01a76d3347b1546a55f1c33f342502bd6a184305f553bc2804f5 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-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-2.12.0-optional-cvs.patch b/dev-vcs/git/files/git-2.12.0-optional-cvs.patch new file mode 100644 index 000000000000..d158b65d30a4 --- /dev/null +++ b/dev-vcs/git/files/git-2.12.0-optional-cvs.patch @@ -0,0 +1,456 @@ +From 1e1bacf32568cc24dbd24444ed4025fc80a96ff3 Mon Sep 17 00:00:00 2001 +From: Robin Johnson +Date: Sat, 25 Feb 2017 20:48:14 +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 +Forward-ported from v2.2.2 to v2.8.4 +Forward-ported from v2.8.4 to v2.10.0 +Forward-ported from v2.10.0 to v2.12.0 + +Signed-off-by: Lars Wendler +--- + 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 8e4081e06..f14a4ad37 100644 +--- a/Makefile ++++ b/Makefile +@@ -273,6 +273,8 @@ all:: + # Define SANE_TEXT_GREP to "-a" if you use recent versions of GNU grep + # and egrep that are pickier when their input contains non-ASCII data. + # ++# 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'. +@@ -496,6 +498,7 @@ LIB_OBJS = + PROGRAM_OBJS = + PROGRAMS = + SCRIPT_PERL = ++SCRIPT_PERL_CVS = + SCRIPT_PYTHON = + SCRIPT_SH = + SCRIPT_LIB = +@@ -532,12 +535,13 @@ SCRIPT_LIB += git-sh-i18n + + SCRIPT_PERL += git-add--interactive.perl + SCRIPT_PERL += git-archimport.perl +-SCRIPT_PERL += git-cvsexportcommit.perl +-SCRIPT_PERL += git-cvsimport.perl +-SCRIPT_PERL += git-cvsserver.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 +@@ -545,24 +549,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)' +@@ -571,12 +577,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 + +@@ -1832,10 +1839,24 @@ git.res: git.rc GIT-VERSION-FILE + -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -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 + +@@ -1848,7 +1869,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)' && \ +@@ -1882,14 +1903,18 @@ git-instaweb: git-instaweb.sh 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 +@@ -2125,7 +2150,7 @@ LOCALIZED_SH = $(SCRIPT_SH) + LOCALIZED_SH += git-parse-remote.sh + LOCALIZED_SH += git-rebase--interactive.sh + LOCALIZED_SH += git-sh-setup.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 bb879a527..17be19729 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 432c61d24..6907b3f52 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 84787eee9..eecba8852 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 4c384ff02..d601f32c5 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 <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 827d39f5b..d730a41f6 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 e1db323f5..68f097401 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 c4c3c4954..9b2957d4f 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 86d77c16d..1fb51f149 100644 +--- a/t/test-lib.sh ++++ b/t/test-lib.sh +@@ -1007,6 +1007,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.11.1 + 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.5.1-freebsd-10.x-no-iconv.patch b/dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch new file mode 100644 index 000000000000..a874236dc65c --- /dev/null +++ b/dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch @@ -0,0 +1,14 @@ +diff -Naurp git-2.5.1.orig/config.mak.uname git-2.5.1/config.mak.uname +--- git-2.5.1.orig/config.mak.uname 2015-08-28 15:37:13.000000000 -0400 ++++ git-2.5.1/config.mak.uname 2015-09-06 18:54:28.538437000 -0400 +@@ -189,7 +189,9 @@ ifeq ($(uname_O),Cygwin) + SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield + endif + ifeq ($(uname_S),FreeBSD) +- NEEDS_LIBICONV = YesPlease ++ ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2) ++ NEEDS_LIBICONV = YesPlease ++ endif + OLD_ICONV = YesPlease + NO_MEMMEM = YesPlease + BASIC_CFLAGS += -I/usr/local/include diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch b/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch new file mode 100644 index 000000000000..0ce706db99a6 --- /dev/null +++ b/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch @@ -0,0 +1,46 @@ +Searching for pages using the MediaWiki API returns at most 500 results +(hi Patrick). To get a list of all pages in a larger wiki, we need to run +repeated searches... + +Source: https://github.com/moy/Git-Mediawiki/issues/32 +Author: anarcat https://github.com/anarcat + +diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl +index 8dd74a9..f2ce311 100755 +--- a/contrib/mw-to-git/git-remote-mediawiki.perl ++++ b/contrib/mw-to-git/git-remote-mediawiki.perl +@@ -259,16 +259,29 @@ sub get_mw_tracked_categories { + sub get_mw_all_pages { + my $pages = shift; + # No user-provided list, get the list of pages from the API. +- my $mw_pages = $mediawiki->list({ ++ my $query = { + action => 'query', + list => 'allpages', + aplimit => 'max' +- }); +- if (!defined($mw_pages)) { ++ }; ++ my $curpage; ++ my $oldpage = ''; ++ while (1) { ++ if (defined($curpage)) { ++ if ($oldpage eq $curpage) { ++ last; ++ } ++ $query->{apfrom} = $curpage; ++ $oldpage = $curpage; ++ } ++ my $mw_pages = $mediawiki->list($query); ++ if (!defined($mw_pages)) { + fatal_mw_error("get the list of wiki pages"); +- } +- foreach my $page (@{$mw_pages}) { ++ } ++ foreach my $page (@{$mw_pages}) { + $pages->{$page->{title}} = $page; ++ $curpage = $page->{title}; ++ } + } + return; + } diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch b/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch new file mode 100644 index 000000000000..72ab2126fa9c --- /dev/null +++ b/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch @@ -0,0 +1,97 @@ +source: +https://gist.github.com/anarcat/f821fa285c6b8b6b16a5 +https://github.com/moy/Git-Mediawiki/issues/10 + + +From 147224cfe6143c44b16aec0bb6d6a506a6b96ced Mon Sep 17 00:00:00 2001 +From: Kevin +Date: Fri, 28 Aug 2015 15:53:37 -0500 +Subject: [PATCH] Add namespace support to git-mediawiki + +Signed-off-by: Kevin +--- + contrib/mw-to-git/git-remote-mediawiki.perl | 34 +++++++++++++++++++++++++++-- + 1 file changed, 32 insertions(+), 2 deletions(-) + +diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl +index 8dd74a9..662a5b5 100755 +--- a/contrib/mw-to-git/git-remote-mediawiki.perl ++++ b/contrib/mw-to-git/git-remote-mediawiki.perl +@@ -17,6 +17,7 @@ use Git; + use Git::Mediawiki qw(clean_filename smudge_filename connect_maybe + EMPTY HTTP_CODE_OK); + use DateTime::Format::ISO8601; ++use Scalar::Util; + use warnings; + + # By default, use UTF-8 to communicate with Git and the user +@@ -63,6 +64,10 @@ chomp(@tracked_pages); + my @tracked_categories = split(/[ \n]/, run_git("config --get-all remote.${remotename}.categories")); + chomp(@tracked_categories); + ++# Just like @tracked_categories, but for MediaWiki namespaces. ++my @tracked_namespaces = split(/[ \n]/, run_git("config --get-all remote.${remotename}.namespaces")); ++chomp(@tracked_namespaces); ++ + # Import media files on pull + my $import_media = run_git("config --get --bool remote.${remotename}.mediaimport"); + chomp($import_media); +@@ -256,6 +261,23 @@ sub get_mw_tracked_categories { + return; + } + ++sub get_mw_tracked_namespaces { ++ my $pages = shift; ++ foreach my $local_namespace (@tracked_namespaces) { ++ my $mw_pages = $mediawiki->list( { ++ action => 'query', ++ list => 'allpages', ++ apnamespace => get_mw_namespace_id($local_namespace), ++ aplimit => 'max' } ) ++ || die $mediawiki->{error}->{code} . ': ' ++ . $mediawiki->{error}->{details} . "\n"; ++ foreach my $page (@{$mw_pages}) { ++ $pages->{$page->{title}} = $page; ++ } ++ } ++ return; ++} ++ + sub get_mw_all_pages { + my $pages = shift; + # No user-provided list, get the list of pages from the API. +@@ -319,6 +341,10 @@ sub get_mw_pages { + $user_defined = 1; + get_mw_tracked_categories(\%pages); + } ++ if (@tracked_namespaces) { ++ $user_defined = 1; ++ get_mw_tracked_namespaces(\%pages); ++ } + if (!$user_defined) { + get_mw_all_pages(\%pages); + } +@@ -1263,7 +1289,6 @@ my %cached_mw_namespace_id; + sub get_mw_namespace_id { + $mediawiki = connect_maybe($mediawiki, $remotename, $url); + my $name = shift; +- + if (!exists $namespace_id{$name}) { + # Look at configuration file, if the record for that namespace is + # already cached. Namespaces are stored in form: +@@ -1331,7 +1356,12 @@ sub get_mw_namespace_id { + sub get_mw_namespace_id_for_page { + my $namespace = shift; + if ($namespace =~ /^([^:]*):/) { +- return get_mw_namespace_id($namespace); ++ my ($ns, $id) = split(/:/, $namespace); ++ if (Scalar::Util::looks_like_number($id)) { ++ return get_mw_namespace_id($ns); ++ } else{ ++ return ++ } + } else { + return; + } +-- +2.5.0 diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch b/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch new file mode 100644 index 000000000000..c798a894d3f8 --- /dev/null +++ b/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch @@ -0,0 +1,48 @@ +From 2593304723c6def159c10b9060dafa78a775a057 Mon Sep 17 00:00:00 2001 +From: Lyubomyr Shaydariv +Date: Fri, 11 Sep 2015 00:41:17 +0300 +Subject: [PATCH] git-remote-mediawiki: support subpages as subdirectories + +This is a fix for https://github.com/moy/Git-Mediawiki/issues/22 +The subdirectories option is enabled using -c remote.origin.subpageDirs=true +during the cloning and it is not recommended to be modified in or +removed from .git/config after the cloning. +--- + contrib/mw-to-git/git-remote-mediawiki.perl | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl +index 8dd74a9..f3624be 100755 +--- a/contrib/mw-to-git/git-remote-mediawiki.perl ++++ b/contrib/mw-to-git/git-remote-mediawiki.perl +@@ -63,6 +63,11 @@ + my @tracked_categories = split(/[ \n]/, run_git("config --get-all remote.${remotename}.categories")); + chomp(@tracked_categories); + ++# Use subdirectories for subpages ++my $use_subpage_dirs = run_git("config --get --bool remote.${remotename}.subpageDirs"); ++chomp($use_subpage_dirs); ++$use_subpage_dirs = ($use_subpage_dirs eq 'true'); ++ + # Import media files on pull + my $import_media = run_git("config --get --bool remote.${remotename}.mediaimport"); + chomp($import_media); +@@ -689,6 +694,9 @@ sub fe_escape_path { + $path =~ s/\\/\\\\/g; + $path =~ s/"/\\"/g; + $path =~ s/\n/\\n/g; ++ if ($use_subpage_dirs) { ++ $path =~ s/%2F/\//g; ++ } + return qq("${path}"); + } + +@@ -927,7 +935,7 @@ sub mw_import_revids { + # If this is a revision of the media page for new version + # of a file do one common commit for both file and media page. + # Else do commit only for that page. +- print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision #$rev->{revid} of $commit{title}\n"; ++ print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision #$rev->{revid} of ", fe_escape_path($commit{title}), "\n"; + import_file_revision(\%commit, ($fetch_from == 1), $n_actual, \%mediafile); + } + 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..da315cb3b093 --- /dev/null +++ b/dev-vcs/git/files/git-daemon-r1.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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-r1.service b/dev-vcs/git/files/git-daemon_at-r1.service new file mode 100644 index 000000000000..0a1bd14b16a3 --- /dev/null +++ b/dev-vcs/git/files/git-daemon_at-r1.service @@ -0,0 +1,12 @@ +[Unit] +Description=Git Repositories Server Daemon +Documentation=man:git-daemon(1) + +[Service] +User=nobody +Group=nobody +# 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 +StandardInput=socket +StandardOutput=inherit +StandardError=journal diff --git a/dev-vcs/git/git-2.13.5.ebuild b/dev-vcs/git/git-2.13.5.ebuild new file mode 100644 index 000000000000..5046a24af691 --- /dev/null +++ b/dev-vcs/git/git-2.13.5.ebuild @@ -0,0 +1,680 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +[[ ${PV} == *9999 ]] && SCM="git-r3" +# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. +# See https://git-scm.com/docs/gitworkflows#_graduation +# In order of stability: +# 9999-r0: maint +# 9999-r1: master +# 9999-r2: next +# 9999-r3: pu +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" +EGIT_BRANCH=maint +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN" + +inherit toolchain-funcs eutils elisp-common l10n 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="stupid content tracker: distributed VCS designed for speed and efficiency" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_KORG="mirror://kernel/software/scm/git" + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' + SRC_URI="${SRC_URI_KORG}/${MY_P}.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} + )" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + gnome-keyring? ( app-crypt/libsecret ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + pcre? ( dev-libs/libpcre ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:0= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) +" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + 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? ( ${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 ) + mediawiki-experimental? ( mediawiki ) + subversion? ( perl ) + webdav? ( curl ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +PATCHES=( + # bug #350330 - automagic CVS when we don't want it is bad. + "${FILESDIR}"/git-2.12.0-optional-cvs.patch + + # install mediawiki perl modules also in vendor_dir + # hack, needs better upstream solution + "${FILESDIR}"/git-1.8.5-mw-vendor.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch + + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch +) + +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" + use elibc_musl \ + && myopts+=" NO_REGEX=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" + myopts+=" HAVE_CLOCK_MONOTONIC=1" + myopts+=" HAVE_GETDELIM=1" + 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-r3_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # add experimental patches to improve mediawiki support + # see patches for origin + if use mediawiki-experimental ; then + PATCHES+=( + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch + ) + fi + + default + + 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 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || 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/libsecret + git_emake || die "emake git-credential-libsecret failed" + fi + + cd "${S}"/contrib/subtree || die + git_emake + use doc && git_emake doc + + cd "${S}"/contrib/diff-highlight || die + git_emake + + 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 + if use doc ; then + docinto ${d}/html + dodoc Documentation${d}*.html + fi + 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 + + #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/libsecret + dobin git-credential-libsecret + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # 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 + local contrib_objects=( + buildsystems + fast-import + hg-to-git + hooks + remotes2config.sh + rerere-train.sh + stats + workdir + ) + for i in "${contrib_objects[@]}" ; 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-r1.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # Remove disabled linguas + # we could remove sources in src_prepare, but install does not + # handle missing locale dir well + rm_loc() { + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then + rm -r "${ED}/usr/share/locale/${1}" || die + fi + } + l10n_for_each_disabled_locale_do rm_loc +} + +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 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-vcs/git/git-2.13.6.ebuild b/dev-vcs/git/git-2.13.6.ebuild new file mode 100644 index 000000000000..d1022f3a5abb --- /dev/null +++ b/dev-vcs/git/git-2.13.6.ebuild @@ -0,0 +1,680 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +[[ ${PV} == *9999 ]] && SCM="git-r3" +# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. +# See https://git-scm.com/docs/gitworkflows#_graduation +# In order of stability: +# 9999-r0: maint +# 9999-r1: master +# 9999-r2: next +# 9999-r3: pu +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" +EGIT_BRANCH=maint +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN" + +inherit toolchain-funcs eutils elisp-common l10n 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="stupid content tracker: distributed VCS designed for speed and efficiency" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_KORG="mirror://kernel/software/scm/git" + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' + SRC_URI="${SRC_URI_KORG}/${MY_P}.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} + )" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + gnome-keyring? ( app-crypt/libsecret ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + pcre? ( dev-libs/libpcre ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:0= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) +" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + 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? ( ${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 ) + mediawiki-experimental? ( mediawiki ) + subversion? ( perl ) + webdav? ( curl ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +PATCHES=( + # bug #350330 - automagic CVS when we don't want it is bad. + "${FILESDIR}"/git-2.12.0-optional-cvs.patch + + # install mediawiki perl modules also in vendor_dir + # hack, needs better upstream solution + "${FILESDIR}"/git-1.8.5-mw-vendor.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch + + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch +) + +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" + use elibc_musl \ + && myopts+=" NO_REGEX=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" + myopts+=" HAVE_CLOCK_MONOTONIC=1" + myopts+=" HAVE_GETDELIM=1" + 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-r3_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # add experimental patches to improve mediawiki support + # see patches for origin + if use mediawiki-experimental ; then + PATCHES+=( + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch + ) + fi + + default + + 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 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || 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/libsecret + git_emake || die "emake git-credential-libsecret failed" + fi + + cd "${S}"/contrib/subtree || die + git_emake + use doc && git_emake doc + + cd "${S}"/contrib/diff-highlight || die + git_emake + + 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 + if use doc ; then + docinto ${d}/html + dodoc Documentation${d}*.html + fi + 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 + + #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/libsecret + dobin git-credential-libsecret + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # 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 + local contrib_objects=( + buildsystems + fast-import + hg-to-git + hooks + remotes2config.sh + rerere-train.sh + stats + workdir + ) + for i in "${contrib_objects[@]}" ; 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-r1.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # Remove disabled linguas + # we could remove sources in src_prepare, but install does not + # handle missing locale dir well + rm_loc() { + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then + rm -r "${ED}/usr/share/locale/${1}" || die + fi + } + l10n_for_each_disabled_locale_do rm_loc +} + +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 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-vcs/git/git-2.14.1.ebuild b/dev-vcs/git/git-2.14.1.ebuild new file mode 100644 index 000000000000..f650073b5ca7 --- /dev/null +++ b/dev-vcs/git/git-2.14.1.ebuild @@ -0,0 +1,692 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +[[ ${PV} == *9999 ]] && SCM="git-r3" +# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. +# See https://git-scm.com/docs/gitworkflows#_graduation +# In order of stability: +# 9999-r0: maint +# 9999-r1: master +# 9999-r2: next +# 9999-r3: pu +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" +EGIT_BRANCH=maint +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN" + +inherit toolchain-funcs eutils elisp-common l10n 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="stupid content tracker: distributed VCS designed for speed and efficiency" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_KORG="mirror://kernel/software/scm/git" + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' + SRC_URI="${SRC_URI_KORG}/${MY_P}.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} + )" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + gnome-keyring? ( app-crypt/libsecret ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + pcre? ( + pcre-jit? ( dev-libs/libpcre2[jit(+)] ) + !pcre-jit? ( dev-libs/libpcre ) + ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:0= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) +" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + 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? ( ${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 ) + mediawiki-experimental? ( mediawiki ) + subversion? ( perl ) + webdav? ( curl ) + pcre-jit? ( pcre ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +PATCHES=( + # bug #350330 - automagic CVS when we don't want it is bad. + "${FILESDIR}"/git-2.12.0-optional-cvs.patch + + # install mediawiki perl modules also in vendor_dir + # hack, needs better upstream solution + "${FILESDIR}"/git-1.8.5-mw-vendor.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch + + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch +) + +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 static 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" + if use pcre; then + if use pcre-jit; then + myopts+=" USE_LIBPCRE2=YesPlease" + extlibs+=" -lpcre2-8" + else + myopts+=" USE_LIBPCRE1=YesPlease" + myopts+=" NO_LIBPCRE1_JIT=YesPlease" + extlibs+=" -lpcre" + fi + fi + 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" + use elibc_musl \ + && myopts+=" NO_REGEX=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" + myopts+=" HAVE_CLOCK_MONOTONIC=1" + grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ + myopts+=" HAVE_GETDELIM=1" + 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-r3_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # add experimental patches to improve mediawiki support + # see patches for origin + if use mediawiki-experimental ; then + PATCHES+=( + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch + ) + fi + + default + + 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 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || 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/libsecret + git_emake || die "emake git-credential-libsecret failed" + fi + + cd "${S}"/contrib/subtree || die + git_emake + use doc && git_emake doc + + cd "${S}"/contrib/diff-highlight || die + git_emake + + 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 + if use doc ; then + docinto ${d}/html + dodoc Documentation${d}*.html + fi + 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 + + #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/libsecret + dobin git-credential-libsecret + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # 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 + local contrib_objects=( + buildsystems + fast-import + hg-to-git + hooks + remotes2config.sh + rerere-train.sh + stats + workdir + ) + for i in "${contrib_objects[@]}" ; 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-r1.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # Remove disabled linguas + # we could remove sources in src_prepare, but install does not + # handle missing locale dir well + rm_loc() { + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then + rm -r "${ED}/usr/share/locale/${1}" || die + fi + } + l10n_for_each_disabled_locale_do rm_loc +} + +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 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-vcs/git/git-2.14.2.ebuild b/dev-vcs/git/git-2.14.2.ebuild new file mode 100644 index 000000000000..d079a65a75eb --- /dev/null +++ b/dev-vcs/git/git-2.14.2.ebuild @@ -0,0 +1,699 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN" +if [[ ${PV} == *9999 ]]; then + SCM="git-r3" + EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. + # See https://git-scm.com/docs/gitworkflows#_graduation + # In order of stability: + # 9999-r0: maint + # 9999-r1: master + # 9999-r2: next + # 9999-r3: pu + case "${PVR}" in + 9999) EGIT_BRANCH=maint ;; + 9999-r1) EGIT_BRANCH=master ;; + 9999-r2) EGIT_BRANCH=next;; + 9999-r3) EGIT_BRANCH=pu ;; + esac +fi + +inherit toolchain-funcs eutils elisp-common l10n 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="stupid content tracker: distributed VCS designed for speed and efficiency" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_KORG="mirror://kernel/software/scm/git" + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' + SRC_URI="${SRC_URI_KORG}/${MY_P}.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} + )" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + gnome-keyring? ( app-crypt/libsecret ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + pcre? ( + pcre-jit? ( dev-libs/libpcre2[jit(+)] ) + !pcre-jit? ( dev-libs/libpcre ) + ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:0= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) +" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + 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? ( ${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 ) + mediawiki-experimental? ( mediawiki ) + subversion? ( perl ) + webdav? ( curl ) + pcre-jit? ( pcre ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +PATCHES=( + # bug #350330 - automagic CVS when we don't want it is bad. + "${FILESDIR}"/git-2.12.0-optional-cvs.patch + + # install mediawiki perl modules also in vendor_dir + # hack, needs better upstream solution + "${FILESDIR}"/git-1.8.5-mw-vendor.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch + + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch +) + +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 static 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" + if use pcre; then + if use pcre-jit; then + myopts+=" USE_LIBPCRE2=YesPlease" + extlibs+=" -lpcre2-8" + else + myopts+=" USE_LIBPCRE1=YesPlease" + myopts+=" NO_LIBPCRE1_JIT=YesPlease" + extlibs+=" -lpcre" + fi + fi + 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" + use elibc_musl \ + && myopts+=" NO_REGEX=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" + myopts+=" HAVE_CLOCK_MONOTONIC=1" + grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ + myopts+=" HAVE_GETDELIM=1" + 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-r3_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # add experimental patches to improve mediawiki support + # see patches for origin + if use mediawiki-experimental ; then + PATCHES+=( + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch + ) + fi + + default + + 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 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || 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/libsecret + git_emake || die "emake git-credential-libsecret failed" + fi + + cd "${S}"/contrib/subtree || die + git_emake + use doc && git_emake doc + + cd "${S}"/contrib/diff-highlight || die + git_emake + + 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 + if use doc ; then + docinto ${d}/html + dodoc Documentation${d}*.html + fi + 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 + + #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/libsecret + dobin git-credential-libsecret + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # 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 + local contrib_objects=( + buildsystems + fast-import + hg-to-git + hooks + remotes2config.sh + rerere-train.sh + stats + workdir + ) + for i in "${contrib_objects[@]}" ; 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-r1.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # Remove disabled linguas + # we could remove sources in src_prepare, but install does not + # handle missing locale dir well + rm_loc() { + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then + rm -r "${ED}/usr/share/locale/${1}" || die + fi + } + l10n_for_each_disabled_locale_do rm_loc +} + +src_test() { + local disabled="t9128-git-svn-cmd-branch.sh" + 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 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." +} + +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..d079a65a75eb --- /dev/null +++ b/dev-vcs/git/git-9999-r1.ebuild @@ -0,0 +1,699 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN" +if [[ ${PV} == *9999 ]]; then + SCM="git-r3" + EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. + # See https://git-scm.com/docs/gitworkflows#_graduation + # In order of stability: + # 9999-r0: maint + # 9999-r1: master + # 9999-r2: next + # 9999-r3: pu + case "${PVR}" in + 9999) EGIT_BRANCH=maint ;; + 9999-r1) EGIT_BRANCH=master ;; + 9999-r2) EGIT_BRANCH=next;; + 9999-r3) EGIT_BRANCH=pu ;; + esac +fi + +inherit toolchain-funcs eutils elisp-common l10n 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="stupid content tracker: distributed VCS designed for speed and efficiency" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_KORG="mirror://kernel/software/scm/git" + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' + SRC_URI="${SRC_URI_KORG}/${MY_P}.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} + )" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + gnome-keyring? ( app-crypt/libsecret ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + pcre? ( + pcre-jit? ( dev-libs/libpcre2[jit(+)] ) + !pcre-jit? ( dev-libs/libpcre ) + ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:0= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) +" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + 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? ( ${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 ) + mediawiki-experimental? ( mediawiki ) + subversion? ( perl ) + webdav? ( curl ) + pcre-jit? ( pcre ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +PATCHES=( + # bug #350330 - automagic CVS when we don't want it is bad. + "${FILESDIR}"/git-2.12.0-optional-cvs.patch + + # install mediawiki perl modules also in vendor_dir + # hack, needs better upstream solution + "${FILESDIR}"/git-1.8.5-mw-vendor.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch + + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch +) + +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 static 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" + if use pcre; then + if use pcre-jit; then + myopts+=" USE_LIBPCRE2=YesPlease" + extlibs+=" -lpcre2-8" + else + myopts+=" USE_LIBPCRE1=YesPlease" + myopts+=" NO_LIBPCRE1_JIT=YesPlease" + extlibs+=" -lpcre" + fi + fi + 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" + use elibc_musl \ + && myopts+=" NO_REGEX=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" + myopts+=" HAVE_CLOCK_MONOTONIC=1" + grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ + myopts+=" HAVE_GETDELIM=1" + 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-r3_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # add experimental patches to improve mediawiki support + # see patches for origin + if use mediawiki-experimental ; then + PATCHES+=( + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch + ) + fi + + default + + 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 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || 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/libsecret + git_emake || die "emake git-credential-libsecret failed" + fi + + cd "${S}"/contrib/subtree || die + git_emake + use doc && git_emake doc + + cd "${S}"/contrib/diff-highlight || die + git_emake + + 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 + if use doc ; then + docinto ${d}/html + dodoc Documentation${d}*.html + fi + 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 + + #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/libsecret + dobin git-credential-libsecret + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # 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 + local contrib_objects=( + buildsystems + fast-import + hg-to-git + hooks + remotes2config.sh + rerere-train.sh + stats + workdir + ) + for i in "${contrib_objects[@]}" ; 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-r1.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # Remove disabled linguas + # we could remove sources in src_prepare, but install does not + # handle missing locale dir well + rm_loc() { + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then + rm -r "${ED}/usr/share/locale/${1}" || die + fi + } + l10n_for_each_disabled_locale_do rm_loc +} + +src_test() { + local disabled="t9128-git-svn-cmd-branch.sh" + 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 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." +} + +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..d079a65a75eb --- /dev/null +++ b/dev-vcs/git/git-9999-r2.ebuild @@ -0,0 +1,699 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN" +if [[ ${PV} == *9999 ]]; then + SCM="git-r3" + EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. + # See https://git-scm.com/docs/gitworkflows#_graduation + # In order of stability: + # 9999-r0: maint + # 9999-r1: master + # 9999-r2: next + # 9999-r3: pu + case "${PVR}" in + 9999) EGIT_BRANCH=maint ;; + 9999-r1) EGIT_BRANCH=master ;; + 9999-r2) EGIT_BRANCH=next;; + 9999-r3) EGIT_BRANCH=pu ;; + esac +fi + +inherit toolchain-funcs eutils elisp-common l10n 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="stupid content tracker: distributed VCS designed for speed and efficiency" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_KORG="mirror://kernel/software/scm/git" + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' + SRC_URI="${SRC_URI_KORG}/${MY_P}.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} + )" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + gnome-keyring? ( app-crypt/libsecret ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + pcre? ( + pcre-jit? ( dev-libs/libpcre2[jit(+)] ) + !pcre-jit? ( dev-libs/libpcre ) + ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:0= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) +" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + 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? ( ${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 ) + mediawiki-experimental? ( mediawiki ) + subversion? ( perl ) + webdav? ( curl ) + pcre-jit? ( pcre ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +PATCHES=( + # bug #350330 - automagic CVS when we don't want it is bad. + "${FILESDIR}"/git-2.12.0-optional-cvs.patch + + # install mediawiki perl modules also in vendor_dir + # hack, needs better upstream solution + "${FILESDIR}"/git-1.8.5-mw-vendor.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch + + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch +) + +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 static 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" + if use pcre; then + if use pcre-jit; then + myopts+=" USE_LIBPCRE2=YesPlease" + extlibs+=" -lpcre2-8" + else + myopts+=" USE_LIBPCRE1=YesPlease" + myopts+=" NO_LIBPCRE1_JIT=YesPlease" + extlibs+=" -lpcre" + fi + fi + 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" + use elibc_musl \ + && myopts+=" NO_REGEX=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" + myopts+=" HAVE_CLOCK_MONOTONIC=1" + grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ + myopts+=" HAVE_GETDELIM=1" + 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-r3_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # add experimental patches to improve mediawiki support + # see patches for origin + if use mediawiki-experimental ; then + PATCHES+=( + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch + ) + fi + + default + + 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 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || 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/libsecret + git_emake || die "emake git-credential-libsecret failed" + fi + + cd "${S}"/contrib/subtree || die + git_emake + use doc && git_emake doc + + cd "${S}"/contrib/diff-highlight || die + git_emake + + 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 + if use doc ; then + docinto ${d}/html + dodoc Documentation${d}*.html + fi + 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 + + #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/libsecret + dobin git-credential-libsecret + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # 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 + local contrib_objects=( + buildsystems + fast-import + hg-to-git + hooks + remotes2config.sh + rerere-train.sh + stats + workdir + ) + for i in "${contrib_objects[@]}" ; 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-r1.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # Remove disabled linguas + # we could remove sources in src_prepare, but install does not + # handle missing locale dir well + rm_loc() { + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then + rm -r "${ED}/usr/share/locale/${1}" || die + fi + } + l10n_for_each_disabled_locale_do rm_loc +} + +src_test() { + local disabled="t9128-git-svn-cmd-branch.sh" + 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 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." +} + +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..d079a65a75eb --- /dev/null +++ b/dev-vcs/git/git-9999-r3.ebuild @@ -0,0 +1,699 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN" +if [[ ${PV} == *9999 ]]; then + SCM="git-r3" + EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. + # See https://git-scm.com/docs/gitworkflows#_graduation + # In order of stability: + # 9999-r0: maint + # 9999-r1: master + # 9999-r2: next + # 9999-r3: pu + case "${PVR}" in + 9999) EGIT_BRANCH=maint ;; + 9999-r1) EGIT_BRANCH=master ;; + 9999-r2) EGIT_BRANCH=next;; + 9999-r3) EGIT_BRANCH=pu ;; + esac +fi + +inherit toolchain-funcs eutils elisp-common l10n 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="stupid content tracker: distributed VCS designed for speed and efficiency" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_KORG="mirror://kernel/software/scm/git" + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' + SRC_URI="${SRC_URI_KORG}/${MY_P}.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} + )" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + gnome-keyring? ( app-crypt/libsecret ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + pcre? ( + pcre-jit? ( dev-libs/libpcre2[jit(+)] ) + !pcre-jit? ( dev-libs/libpcre ) + ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:0= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) +" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + 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? ( ${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 ) + mediawiki-experimental? ( mediawiki ) + subversion? ( perl ) + webdav? ( curl ) + pcre-jit? ( pcre ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +PATCHES=( + # bug #350330 - automagic CVS when we don't want it is bad. + "${FILESDIR}"/git-2.12.0-optional-cvs.patch + + # install mediawiki perl modules also in vendor_dir + # hack, needs better upstream solution + "${FILESDIR}"/git-1.8.5-mw-vendor.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch + + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch +) + +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 static 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" + if use pcre; then + if use pcre-jit; then + myopts+=" USE_LIBPCRE2=YesPlease" + extlibs+=" -lpcre2-8" + else + myopts+=" USE_LIBPCRE1=YesPlease" + myopts+=" NO_LIBPCRE1_JIT=YesPlease" + extlibs+=" -lpcre" + fi + fi + 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" + use elibc_musl \ + && myopts+=" NO_REGEX=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" + myopts+=" HAVE_CLOCK_MONOTONIC=1" + grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ + myopts+=" HAVE_GETDELIM=1" + 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-r3_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # add experimental patches to improve mediawiki support + # see patches for origin + if use mediawiki-experimental ; then + PATCHES+=( + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch + ) + fi + + default + + 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 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || 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/libsecret + git_emake || die "emake git-credential-libsecret failed" + fi + + cd "${S}"/contrib/subtree || die + git_emake + use doc && git_emake doc + + cd "${S}"/contrib/diff-highlight || die + git_emake + + 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 + if use doc ; then + docinto ${d}/html + dodoc Documentation${d}*.html + fi + 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 + + #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/libsecret + dobin git-credential-libsecret + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # 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 + local contrib_objects=( + buildsystems + fast-import + hg-to-git + hooks + remotes2config.sh + rerere-train.sh + stats + workdir + ) + for i in "${contrib_objects[@]}" ; 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-r1.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # Remove disabled linguas + # we could remove sources in src_prepare, but install does not + # handle missing locale dir well + rm_loc() { + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then + rm -r "${ED}/usr/share/locale/${1}" || die + fi + } + l10n_for_each_disabled_locale_do rm_loc +} + +src_test() { + local disabled="t9128-git-svn-cmd-branch.sh" + 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 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." +} + +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..d079a65a75eb --- /dev/null +++ b/dev-vcs/git/git-9999.ebuild @@ -0,0 +1,699 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN" +if [[ ${PV} == *9999 ]]; then + SCM="git-r3" + EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. + # See https://git-scm.com/docs/gitworkflows#_graduation + # In order of stability: + # 9999-r0: maint + # 9999-r1: master + # 9999-r2: next + # 9999-r3: pu + case "${PVR}" in + 9999) EGIT_BRANCH=maint ;; + 9999-r1) EGIT_BRANCH=master ;; + 9999-r2) EGIT_BRANCH=next;; + 9999-r3) EGIT_BRANCH=pu ;; + esac +fi + +inherit toolchain-funcs eutils elisp-common l10n 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="stupid content tracker: distributed VCS designed for speed and efficiency" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_KORG="mirror://kernel/software/scm/git" + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing' + SRC_URI="${SRC_URI_KORG}/${MY_P}.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} + )" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + gnome-keyring? ( app-crypt/libsecret ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + sys-libs/zlib + pcre? ( + pcre-jit? ( dev-libs/libpcre2[jit(+)] ) + !pcre-jit? ( dev-libs/libpcre ) + ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:0= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) +" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + 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? ( ${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 ) + mediawiki-experimental? ( mediawiki ) + subversion? ( perl ) + webdav? ( curl ) + pcre-jit? ( pcre ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +PATCHES=( + # bug #350330 - automagic CVS when we don't want it is bad. + "${FILESDIR}"/git-2.12.0-optional-cvs.patch + + # install mediawiki perl modules also in vendor_dir + # hack, needs better upstream solution + "${FILESDIR}"/git-1.8.5-mw-vendor.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch + + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc. + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch +) + +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 static 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" + if use pcre; then + if use pcre-jit; then + myopts+=" USE_LIBPCRE2=YesPlease" + extlibs+=" -lpcre2-8" + else + myopts+=" USE_LIBPCRE1=YesPlease" + myopts+=" NO_LIBPCRE1_JIT=YesPlease" + extlibs+=" -lpcre" + fi + fi + 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" + use elibc_musl \ + && myopts+=" NO_REGEX=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" + myopts+=" HAVE_CLOCK_MONOTONIC=1" + grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ + myopts+=" HAVE_GETDELIM=1" + 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-r3_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # add experimental patches to improve mediawiki support + # see patches for origin + if use mediawiki-experimental ; then + PATCHES+=( + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch + ) + fi + + default + + 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 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || 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/libsecret + git_emake || die "emake git-credential-libsecret failed" + fi + + cd "${S}"/contrib/subtree || die + git_emake + use doc && git_emake doc + + cd "${S}"/contrib/diff-highlight || die + git_emake + + 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 + if use doc ; then + docinto ${d}/html + dodoc Documentation${d}*.html + fi + 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 + + #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/libsecret + dobin git-credential-libsecret + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # 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 + local contrib_objects=( + buildsystems + fast-import + hg-to-git + hooks + remotes2config.sh + rerere-train.sh + stats + workdir + ) + for i in "${contrib_objects[@]}" ; 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-r1.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # Remove disabled linguas + # we could remove sources in src_prepare, but install does not + # handle missing locale dir well + rm_loc() { + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then + rm -r "${ED}/usr/share/locale/${1}" || die + fi + } + l10n_for_each_disabled_locale_do rm_loc +} + +src_test() { + local disabled="t9128-git-svn-cmd-branch.sh" + 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 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed." +} + +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..f76908835574 --- /dev/null +++ b/dev-vcs/git/metadata.xml @@ -0,0 +1,40 @@ + + + + + robbat2@gentoo.org + Robin H. Johnson + + + polynomial-c@gentoo.org + Lars Wendler + + + 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. + + + Use the new optimized SHA1 implementation + Install gitweb too + Support fetching and pushing (requires webdav too) over http:// and https:// protocols + Pull in gnupg for signing -- without gnupg, attempts at signing will fail at runtime! + GitWeb support for app-text/highlight + Support pulling and pushing from MediaWiki + Add experimental patches for improved MediaWiki support + Enable JIT for pcre + Make use of a bundled routine that is optimized for the PPC arch + Include git-svn for dev-vcs/subversion support + Include the 'gitk' and 'git gui' tools + Adds support for push'ing to HTTP/HTTPS repositories via DAV + + -- cgit v1.2.3