From b279bbe94522565b8feb19b8e5f377d3ea76f157 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 24 Mar 2018 10:19:03 +0000 Subject: gentoo resync : 24.03.2018 --- dev-vcs/git/Manifest | 17 +- .../git/files/git-2.17.0_rc1-optional-cvs.patch | 451 +++++++++++++ dev-vcs/git/git-2.16.3.ebuild | 696 ++++++++++++++++++++ dev-vcs/git/git-2.17.0_rc1.ebuild | 712 +++++++++++++++++++++ dev-vcs/git/git-9999-r1.ebuild | 338 +++++----- dev-vcs/git/git-9999-r2.ebuild | 338 +++++----- dev-vcs/git/git-9999-r3.ebuild | 338 +++++----- dev-vcs/git/git-9999.ebuild | 338 +++++----- 8 files changed, 2580 insertions(+), 648 deletions(-) create mode 100644 dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch create mode 100644 dev-vcs/git/git-2.16.3.ebuild create mode 100644 dev-vcs/git/git-2.17.0_rc1.ebuild (limited to 'dev-vcs/git') diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest index a4001cad8f5e..10ab94eb1e3e 100644 --- a/dev-vcs/git/Manifest +++ b/dev-vcs/git/Manifest @@ -1,6 +1,7 @@ AUX 50git-gentoo.el 472 BLAKE2B b2b7c2c105d2ce3e066b3b617d095c402032549d92fff4a181ec9af6740033b0446f76b9620c97db582e85eff9aee0e3f88749981a135382c7a8d3187da921a5 SHA512 0435d7d67f2b64460a62c6a95c65a722c0f8d5d50d064a81e690de84a761ba518d32db545ee70c0fa3ad7803d77d5dab100689888bc92c9d82f2d6d5073623b3 AUX git-1.8.5-mw-vendor.patch 1160 BLAKE2B 37149c1ac222da71b38525ef6abeec21bc5926859725ec6c5282c5e5bee28e2f5c3e94f7bb9a0412e332c4f807ba8b4ed8544475524e857dc5b87be4128a3b44 SHA512 6513104f28eff36c18840f90e56fb21e8e04055e4e9a304ef15e5d7e1c13c8b45c4be0380b7781e776ce3b8ee9f7371ed2200e01174cc257125a613aef43ac9b AUX git-2.12.0-optional-cvs.patch 14388 BLAKE2B 146bb74bbf6abd2de767b6bf54f9e55fc1bd62fb52ea59800331c169b598853324b5bc3e168dbf344042c087d04436c9a71a2ba768ec21c730db5771067dba88 SHA512 fb44d17628e0c6d39053c8221296a8d81ccc84cf8cb49a0be13ecffcf79c69902f01c43c3b0ce45d2cb2c880116e2fb6d78d95e9c8d2fe5f19ff37bc4a6f8761 +AUX git-2.17.0_rc1-optional-cvs.patch 14142 BLAKE2B 7ecff90fd346bca0eb40faa704a621f5a4d6de4e15bfcd9f43d34cd27f4844dc05771cd8ec16af7f43346900efbeb63e4611579a7eebe2923fab10c50d7e1bce SHA512 3dcf56252f0ea27f8d5fcdfa87e3637fedafcd08f92ae800b2de22276215904916c5f687f931ced74a678717a1199ea8de3ef1587720899bc51b0ced1fce3549 AUX git-2.2.0-svn-fe-linking.patch 418 BLAKE2B 5030e0dfd7fef0157fd4532aa14bfdb4f2ed09a2e35ca960e0133d8e84ea07a472ddc111ea9c0033158be6e90283b76c9880c08cb7af7de53757dbf9b5d79a64 SHA512 ac312e7da4c548073d4dfa5d9bb6823ed48ea70a30d7993da190cfc4cc4b17124e15326748d79e59ca0772675619b29221a57c5af45b7b6c7196dae218772ecd AUX git-2.5.1-freebsd-10.x-no-iconv.patch 568 BLAKE2B 5308052e21e28f07633a4503ee1b3703e49f76fc099703a6bdf9e474200fbb2c68b0dce5f0bc495d5f0118fbb75ee2113da309122cb0c445e93b5abc6ec6830c SHA512 9f7334b2c5b69c5a6a94e198a522b176470b0ae9d428694b9a404e4bcf33d269f43c8d2d9b5834e36f9a875d12a7b21f59caaaffad6d05cb6267ab2967e64567 AUX git-2.7.0-mediawiki-500pages.patch 1317 BLAKE2B fa90ac6f90b7b5b948dc1f9b8f300419df7b2b957aad9c15121f0b8df873d854cd74def68cd80788f085635cbbef65502b40e3eea2b3d8fb35fb02b4a4a1afa5 SHA512 efe580f288c6fdb6d55b742a3e4335ac32ed96cb12c10b959a5f283e505ab0aeed039d0d19d9dbf148a07ac6c7aec075ecea0c0be68456fdbe23dcad77ca01be @@ -13,14 +14,22 @@ AUX git-daemon.xinetd 260 BLAKE2B 594a046b5b2b580b7cfed1b620e014160965046c5e5a42 AUX git-daemon_at-r1.service 340 BLAKE2B 879db8b274d8e1d2995a2ea1e4b1d66cac3d6979006fc24721db8b389395ac98a98444f032eaf7c66d6c02ab394a764e16a9cd3b5446b6be9061b9bdd89cf964 SHA512 073d8752dc224ff1130a5290e0f965a04b19f2a8dbd5d50172101099386ad3af0fd5e1abf57030960b750a2adf36a7ae69d18ddc990bab4e694486e65424cfa9 DIST git-2.16.1.tar.xz 4961656 BLAKE2B d94328da5d027cb82f1f23804a12dfc5df1577bf2c28cc376d4bb5c9e34d317886437f7eee2ac4503b8e2639d2e24c35660ab82a50207f500b7ed6fb104d3624 SHA512 09e30ada7bcf41f78f15784908062c10162d58d2fd7a68ad27e42fd49dc37eb0e82c19ad21db31034a189a8cdd009013a29f943e1ae5d5ab5688c913d2a4d42a DIST git-2.16.2.tar.xz 4963204 BLAKE2B 346405b765bb542f0e51e539163c18c47dbd2ce1d4ccd98cdc4ddd226ec14a4895f7b82168fdca90e1828813421d24d5436fb01e9e9a57eb98a80984bab13bda SHA512 ff1bf4b94c09de26acf85b97003582002c232e5861a896d8c2d8dc011cb3d4966b1eb0e74ef94f80426d50bb465bf6c9b6edda13b1e4143f0eb38ee01f4890e4 +DIST git-2.16.3.tar.xz 4966248 BLAKE2B cd4d2573afd02a23766c4dd0da8397ac36193f68e18c162fc85d60d7595a50da7707f592ccc3a9f00a22fdcb8a8cada82139fe30f97af193fb367a4e392cbaa8 SHA512 73520cf3500b2d13b77eb1e5ec0d60263aad07732d25631732f0d986abd023f97b8a6db4abff64d342cb053018289b5f7a3e32f10b86bd9092a37ee0585adc8a +DIST git-2.17.0.rc1.tar.xz 4998084 BLAKE2B 35ddaf63ee4d19bb8023148359791a844261215617e057156066826cf0322500b4485e7864dbe472c3fab553696709ff622f16466b4df874e60e7307f20c0337 SHA512 9ee9f917ff9a8398ae08cc7767be63605f9edc6a86ccdcd1a2238703b170e14a358e27d43d126317461bdb0f4ba9ad67fdcd77fcae69bf1d82f5341ce59d1bf5 DIST git-htmldocs-2.16.1.tar.xz 1160372 BLAKE2B d426fbc85772e5f04550071dea50a75e6d581fd040e8b37b3b342a8d6569d0dcf456445bab1dec3d84e254e82468c900afff7c6be1ebd6771e7fad5884b92515 SHA512 f2bb8b88ab5aa3d6204874aae583249d5137193c5fe3925df7ae1bcdaec0564b496df9a648c180bebb0c8ff4573f27e330802020d3c9207c2738ddd5c52d99c9 DIST git-htmldocs-2.16.2.tar.xz 1162556 BLAKE2B 71b71b914b438cb3eee417c5bbcb30faa10b0a154efa378e8e3b5521a4902f26a038ab884ffdac1756d07e3afcaeafe915d6c64f9503ff65f1fa58bbbd7fffde SHA512 adc7a95fc7a7a46c92c8735ad5b89f236905b770fa66682e0234addc2107f46de65724c577c8fc512e13cd8d306fff992ad7c6c495100cb645674604836e0768 +DIST git-htmldocs-2.16.3.tar.xz 1164252 BLAKE2B 43d5b0317d3cb181c24347933b6ee3ce586f7be7e38ae30555bc732b369287f080879ff0408601db125a4104b665956f6bcef3f243496008d3ec1601110b06df SHA512 6271ff7780053347ceba47754db00fa8a0a39ff622c490e273ed286faa6ade3f7d6580fa396c913b4485a942b2ad0cdd898de467fde497de1d850fb6d3debd1e +DIST git-htmldocs-2.17.0.rc1.tar.xz 1172580 BLAKE2B d2c27d893faafe92ade9aa0d8bd77b4ff336c9ee8b678feed4e8f3323fcf6daea72a62af556a2f3556d5e21d4107f52d4090a5f5477c03bca50c6ef81656eaaf SHA512 56f47203c1240a82c28d9de47d8d1b5a73b11c9529fd2ddeff303c03d828b738423035803ebcccc4c49459d7056d0b8f3924698ac9966f4083687221d11ae4a3 DIST git-manpages-2.16.1.tar.xz 417188 BLAKE2B 239fb33967d17c8b10efb2e0d1963f7be3404b7f262b49f89b3f4a538135d80268fbe7fe0e561c9cb2d86840eb46b61653ed363d8da27d1169c435d8e1d5e851 SHA512 20c7646b5f1e3c633ce6aae5ee5fcbe4ca1e59fc9253ec9a9e45c7cd8a8ac7a5e71e36258eb747e3bd6d51b3b7971137315dcdbdff493e0f8774ecd3e309735a DIST git-manpages-2.16.2.tar.xz 416500 BLAKE2B af9ccf18280c23e54e11cf76f891d5613db8c8f9ef84394266ad9c614ddb2181acab4cbb3998b4d5d01aa7b0d8f8cfbe090e77bb5b0297e4a7ed341a8d1fb3de SHA512 38d560955a025761f256e598f87c6b1122b474cc7bfeeee8fffb48b353ab3d8d969f6cd55da326daa61a4079dfd68f931b2e0eae11d6e8d5549e69de17c7f537 +DIST git-manpages-2.16.3.tar.xz 417152 BLAKE2B 2719a9a603dc49db1a61a2cec42427bdcdc96fab9d21d16c5a8c70d7dba271a1e5b29f4f83f32c525c4866e3497352017af3777a769893c9543e65d625972375 SHA512 b34a3658412a144fed6f818acc05c0b4be2453ae63f9430dcd53cda750f737bd3da50390bd3f4266e69befa521eddd222985fd531acca1ebd4ca62c6c5b2a85c +DIST git-manpages-2.17.0.rc1.tar.xz 419416 BLAKE2B 5437e60951a552f271e7a3b0d45178a02cec29495ef83cada860e2aa66af9ba40b3a55cebbfc65c0dfafb837610d5984cd0b65cb894301684e29a03584605513 SHA512 456321ca2eabdef08359f22e775729d408843c1f1647dd37f6e1603ba2a6785321b12fb3fbfd320c02743a499ed8bc76fee3da6d53c858e0dabd0855a57ef491 EBUILD git-2.16.1.ebuild 19258 BLAKE2B 35694f144eb0e35e8587e2ce04cce21110df84623faa02b41590c667c2d4607bd93659c8c8cd5934326779fc0f17ad0b24b1b354390d834460a491e63e33c5c5 SHA512 a0702320d6e0e67cd831f18ce4243c1d0f4dc7c432482680476eeba180d5dc005eb2d1ccd9c1058d127d07fb159bf0fcccf571198e9313d91f69244c6817d26c EBUILD git-2.16.2.ebuild 19268 BLAKE2B c5d980343d17117b4a61bd5ea470b507fdc9061ca760b0140f3591a16f8cc5eeb4756db1bf8c1ff8c984bcd85e5b04e4ce251122b26a55282c0381420ee0dfef SHA512 e3fc8dbf927ac71d8e9fc1caa49f5359f2f6fd8999637d30a674793c16a4be0fef5b9249e87273f0b2289e1583efc724ef3d6fd3bc28d8088dab92617dbf6245 -EBUILD git-9999-r1.ebuild 19268 BLAKE2B c5d980343d17117b4a61bd5ea470b507fdc9061ca760b0140f3591a16f8cc5eeb4756db1bf8c1ff8c984bcd85e5b04e4ce251122b26a55282c0381420ee0dfef SHA512 e3fc8dbf927ac71d8e9fc1caa49f5359f2f6fd8999637d30a674793c16a4be0fef5b9249e87273f0b2289e1583efc724ef3d6fd3bc28d8088dab92617dbf6245 -EBUILD git-9999-r2.ebuild 19268 BLAKE2B c5d980343d17117b4a61bd5ea470b507fdc9061ca760b0140f3591a16f8cc5eeb4756db1bf8c1ff8c984bcd85e5b04e4ce251122b26a55282c0381420ee0dfef SHA512 e3fc8dbf927ac71d8e9fc1caa49f5359f2f6fd8999637d30a674793c16a4be0fef5b9249e87273f0b2289e1583efc724ef3d6fd3bc28d8088dab92617dbf6245 -EBUILD git-9999-r3.ebuild 19268 BLAKE2B c5d980343d17117b4a61bd5ea470b507fdc9061ca760b0140f3591a16f8cc5eeb4756db1bf8c1ff8c984bcd85e5b04e4ce251122b26a55282c0381420ee0dfef SHA512 e3fc8dbf927ac71d8e9fc1caa49f5359f2f6fd8999637d30a674793c16a4be0fef5b9249e87273f0b2289e1583efc724ef3d6fd3bc28d8088dab92617dbf6245 -EBUILD git-9999.ebuild 19268 BLAKE2B c5d980343d17117b4a61bd5ea470b507fdc9061ca760b0140f3591a16f8cc5eeb4756db1bf8c1ff8c984bcd85e5b04e4ce251122b26a55282c0381420ee0dfef SHA512 e3fc8dbf927ac71d8e9fc1caa49f5359f2f6fd8999637d30a674793c16a4be0fef5b9249e87273f0b2289e1583efc724ef3d6fd3bc28d8088dab92617dbf6245 +EBUILD git-2.16.3.ebuild 19268 BLAKE2B c5d980343d17117b4a61bd5ea470b507fdc9061ca760b0140f3591a16f8cc5eeb4756db1bf8c1ff8c984bcd85e5b04e4ce251122b26a55282c0381420ee0dfef SHA512 e3fc8dbf927ac71d8e9fc1caa49f5359f2f6fd8999637d30a674793c16a4be0fef5b9249e87273f0b2289e1583efc724ef3d6fd3bc28d8088dab92617dbf6245 +EBUILD git-2.17.0_rc1.ebuild 19230 BLAKE2B b51b3b30b875fe7dab2ab9599f8856a4b1391394c3e310dd936bed55614bb7d06e6a2ac20e60594789ced4744b1f71f5b122e9f664f73673cbc21cf5a4280a42 SHA512 88dc222a96402b98c687cef230215180120e50104f47fc077fbe6c25573e0126e2bdeaa02ff39fd0657ce783196dfc62c259efb862187b32edc287f150034313 +EBUILD git-9999-r1.ebuild 19230 BLAKE2B b51b3b30b875fe7dab2ab9599f8856a4b1391394c3e310dd936bed55614bb7d06e6a2ac20e60594789ced4744b1f71f5b122e9f664f73673cbc21cf5a4280a42 SHA512 88dc222a96402b98c687cef230215180120e50104f47fc077fbe6c25573e0126e2bdeaa02ff39fd0657ce783196dfc62c259efb862187b32edc287f150034313 +EBUILD git-9999-r2.ebuild 19230 BLAKE2B b51b3b30b875fe7dab2ab9599f8856a4b1391394c3e310dd936bed55614bb7d06e6a2ac20e60594789ced4744b1f71f5b122e9f664f73673cbc21cf5a4280a42 SHA512 88dc222a96402b98c687cef230215180120e50104f47fc077fbe6c25573e0126e2bdeaa02ff39fd0657ce783196dfc62c259efb862187b32edc287f150034313 +EBUILD git-9999-r3.ebuild 19230 BLAKE2B b51b3b30b875fe7dab2ab9599f8856a4b1391394c3e310dd936bed55614bb7d06e6a2ac20e60594789ced4744b1f71f5b122e9f664f73673cbc21cf5a4280a42 SHA512 88dc222a96402b98c687cef230215180120e50104f47fc077fbe6c25573e0126e2bdeaa02ff39fd0657ce783196dfc62c259efb862187b32edc287f150034313 +EBUILD git-9999.ebuild 19230 BLAKE2B b51b3b30b875fe7dab2ab9599f8856a4b1391394c3e310dd936bed55614bb7d06e6a2ac20e60594789ced4744b1f71f5b122e9f664f73673cbc21cf5a4280a42 SHA512 88dc222a96402b98c687cef230215180120e50104f47fc077fbe6c25573e0126e2bdeaa02ff39fd0657ce783196dfc62c259efb862187b32edc287f150034313 MISC metadata.xml 2066 BLAKE2B c5a716346a69a971cb78e5b0435f921e218ae8b07a714a4718e2238924a947f9143f10829031237ad74d051106ead5296673d58b99035ef9f77a1c5cd430242a SHA512 a0018307f19e6695002fa52a7cf898071ea8b7798ed7454f544a3bd15a3448cdab322fac5fcbae7b72e9a9ecf823c56b6ced8de560e68012be0ea6d09b0640bd diff --git a/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch b/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch new file mode 100644 index 000000000000..60cebcbb4d64 --- /dev/null +++ b/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch @@ -0,0 +1,451 @@ +From 3baea661143aaddb285f1ac7c50f6e4af76c8aed Mon Sep 17 00:00:00 2001 +From: Robin Johnson +Date: Fri, 23 Mar 2018 10:05:05 +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 +Forward-ported from v2.12.0 to v2.17.0-rc1 + +Signed-off-by: Lars Wendler +--- + Makefile | 50 ++++++++++++++++++++++++++++---------- + 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, 119 insertions(+), 34 deletions(-) + +diff --git a/Makefile b/Makefile +index a1d8775adb..4264475ad1 100644 +--- a/Makefile ++++ b/Makefile +@@ -312,6 +312,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'. +@@ -543,6 +545,7 @@ LIB_OBJS = + PROGRAM_OBJS = + PROGRAMS = + SCRIPT_PERL = ++SCRIPT_PERL_CVS = + SCRIPT_PYTHON = + SCRIPT_SH = + SCRIPT_LIB = +@@ -579,12 +582,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 +@@ -592,24 +596,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)' +@@ -618,12 +624,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 + +@@ -1972,13 +1979,26 @@ 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): ++_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_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ) +-$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE ++$(_SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE + $(QUIET_GEN)$(RM) $@ $@+ && \ + INSTLIBDIR='$(perllibdir_SQ)' && \ + INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \ +@@ -2012,14 +2032,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 +@@ -2258,7 +2282,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 1319415ba8..34ac8e28e2 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 06742748e9..51d474d94b 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 84787eee9a..eecba88527 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 804ce3850f..c53c50e432 100755 +--- a/t/t9600-cvsimport.sh ++++ b/t/t9600-cvsimport.sh +@@ -8,14 +8,25 @@ if ! test_have_prereq NOT_ROOT; then + test_done + fi + +-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 && +@@ -47,23 +58,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, +@@ -91,7 +102,7 @@ EOF + ) + ' + +-test_expect_success PERL 'update git module' ' ++test_expect_success 'update git module' ' + + (cd module-git && + git config cvsimport.trackRevisions true && +@@ -102,7 +113,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^ && +@@ -110,7 +121,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 && +@@ -119,7 +130,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 && +@@ -131,7 +142,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^^ && +@@ -140,7 +151,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 && +@@ -153,12 +164,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 827d39f5bf..d730a41f67 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 e1db323f54..68f097401f 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 c4c3c49546..9b2957d4f0 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 7740d511d2..9b26b78359 100644 +--- a/t/test-lib.sh ++++ b/t/test-lib.sh +@@ -1062,6 +1062,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_PTHREADS" && test_set_prereq PTHREADS + test -z "$NO_PYTHON" && test_set_prereq PYTHON +-- +2.16.3 + diff --git a/dev-vcs/git/git-2.16.3.ebuild b/dev-vcs/git/git-2.16.3.ebuild new file mode 100644 index 000000000000..e9f0c242bcf6 --- /dev/null +++ b/dev-vcs/git/git-2.16.3.ebuild @@ -0,0 +1,696 @@ +# Copyright 1999-2018 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 es 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="https://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 ~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 #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_PATH="${EPREFIX}/usr/bin/perl" \ + PERL_MM_OPT="" \ + GIT_TEST_OPTS="--no-color" \ + V=1 \ + "$@" +} + +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+=" 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+=" ${tests_cvs}" + fi + einfo "Skipping other tests that require being non-root" + 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+=" ${tests_cvs}" + fi + fi + + if ! use perl ; then + einfo "Disabling tests that need Perl" + disabled+=" ${tests_perl}" + fi + + einfo "Disabling tests that fail with SVN 1.7" + 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.17.0_rc1.ebuild b/dev-vcs/git/git-2.17.0_rc1.ebuild new file mode 100644 index 000000000000..9079b03f7b10 --- /dev/null +++ b/dev-vcs/git/git-2.17.0_rc1.ebuild @@ -0,0 +1,712 @@ +# Copyright 1999-2018 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 es 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="https://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 ~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 ) + 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 + ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + dev-perl/HTML-Tree + dev-perl/MediaWiki-API + ) + 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.17.0_rc1-optional-cvs.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=( + ASCIIDOC_NO_ROFF=YesPlease + $(usex cvs '' NO_CVS=YesPlease) + $(usex elibc_musl NO_REGEX=YesPlease '') + $(usex iconv '' NO_ICONV=YesPlease) + $(usex nls '' NO_GETTEXT=YesPlease) + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) + $(usex python '' NO_PYTHON=YesPlease) + $(usex subversion '' NO_SVN_TESTS=YesPlease) + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease) + $(usex tk '' NO_TCLTK=YesPlease) + ) + + 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 + INSTALL=install + TAR=tar + SHELL_PATH="${EPREFIX}/bin/sh" + SANE_TOOL_PATH= + OLD_ICONV= + 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 || die + + if use pcre; then + if use pcre-jit; then + myopts+=( USE_LIBPCRE2=YesPlease ) + extlibs+=" -lpcre2-8" + else + myopts+=( + USE_LIBPCRE1=YesPlease + NO_LIBPCRE1_JIT=YesPlease + ) + extlibs+=" -lpcre" + fi + fi +# Disabled until ~m68k-mint can be keyworded again +# if [[ ${CHOST} == *-mint* ]] ; then +# myopts+=( +# NO_MMAP=YesPlease +# NO_IPV6=YesPlease +# NO_STRLCPY=YesPlease +# NO_MEMMEM=YesPlease +# NO_MKDTEMP=YesPlease +# 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 + 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 ) + + # 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}" || die + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + if use doc ; then + pushd "${S}"/Documentation &>/dev/null || die + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + popd &>/dev/null || die + fi + else + git-r3_src_unpack + #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 + + # Fix docbook2texi command + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ + Documentation/Makefile || die + + # Fix git-subtree missing DESTDIR + sed -i \ + -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ + -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ + contrib/subtree/Makefile || die +} + +git_emake() { + # bug #320647: PYTHON_PATH + local PYTHON_PATH="" + use python && PYTHON_PATH="${PYTHON}" + emake ${MY_MAKEOPTS} \ + prefix="${EPREFIX}"/usr \ + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ + perllibdir="$(perl_get_raw_vendorlib)" \ + sysconfdir="${EPREFIX}"/etc \ + DESTDIR="${D}" \ + GIT_TEST_OPTS="--no-color" \ + OPTAR="$(tc-getAR)" \ + OPTCC="$(tc-getCC)" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ + PERL_PATH="${EPREFIX}/usr/bin/perl" \ + PERL_MM_OPT="" \ + PYTHON_PATH="${PYTHON_PATH}" \ + V=1 \ + "$@" +} + +src_configure() { + exportmakeopts +} + +src_compile() { + 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 + pushd contrib/credential/osxkeychain &>/dev/null || die + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ + || die "emake credential-osxkeychain" + popd &>/dev/null || die + fi + + pushd Documentation &>/dev/null || die + 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 + popd &>/dev/null || die + + if use subversion ; then + pushd contrib/svn-fe &>/dev/null || die + # 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 + popd &>/dev/null || die + fi + + if use gnome-keyring ; then + pushd contrib/credential/libsecret &>/dev/null || die + git_emake || die "emake git-credential-libsecret failed" + popd &>/dev/null || die + fi + + pushd contrib/subtree &>/dev/null || die + git_emake + use doc && git_emake doc + popd &>/dev/null || die + + pushd contrib/diff-highlight &>/dev/null || die + git_emake + popd &>/dev/null || die + + if use mediawiki ; then + pushd contrib/mw-to-git &>/dev/null || die + git_emake + popd &>/dev/null || die + + 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 + pushd contrib/subtree &>/dev/null || die + 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 + popd &>/dev/null || die + + if use mediawiki ; then + pushd contrib/mw-to-git &>/dev/null || die + git_emake install + popd &>/dev/null || die + 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 + pushd contrib/credential/libsecret &>/dev/null || die + dobin git-credential-libsecret + popd &>/dev/null || die + fi + + if use subversion ; then + pushd contrib/svn-fe &>/dev/null || die + dobin svn-fe + dodoc svn-fe.txt + if use doc ; then + doman svn-fe.1 + docinto html + dodoc svn-fe.html + fi + popd &>/dev/null || die + 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 \ + -delete \ + || die + 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+=( t5000-tar-tree.sh ) + fi + + local 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+=( ${tests_cvs[@]} ) + fi + einfo "Skipping other tests that require being non-root" + 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+=( ${tests_cvs[@]} ) + fi + fi + + if ! use perl ; then + einfo "Disabling tests that need Perl" + disabled+=( ${tests_perl[@]} ) + fi + + einfo "Disabling tests that fail with SVN 1.7" + disabled+=( ${test_svn[@]} ) + + # Reset all previously disabled tests + pushd t &>/dev/null || die + local i + 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 Makefile || die + + # Clean old results first, must always run + nonfatal git_emake clean + popd &>/dev/null || die + + # Now run the tests, keep going if we hit an error, and don't terminate on + # failure + local rc + einfo "Start test run" + #MAKEOPTS=-j1 + nonfatal git_emake --keep-going test + rc=$? + + # Display nice results, now print the results + pushd t &>/dev/null || die + 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 index e9f0c242bcf6..9079b03f7b10 100644 --- a/dev-vcs/git/git-9999-r1.ebuild +++ b/dev-vcs/git/git-9999-r1.ebuild @@ -73,18 +73,30 @@ CDEPEND=" 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 + ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + dev-perl/HTML-Tree + dev-perl/MediaWiki-API + ) + subversion? ( + dev-vcs/subversion[-dso,perl] + dev-perl/libwww-perl + dev-perl/TermReadKey + ) ) - 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} ) " @@ -108,7 +120,7 @@ if [[ ${PV} == *9999 ]]; then app-text/asciidoc" fi -SITEFILE=50${PN}-gentoo.el +SITEFILE="50${PN}-gentoo.el" S="${WORKDIR}/${MY_P}" REQUIRED_USE=" @@ -124,11 +136,7 @@ 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.17.0_rc1-optional-cvs.patch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch @@ -150,111 +158,111 @@ pkg_setup() { # 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 + local myopts=( + ASCIIDOC_NO_ROFF=YesPlease + $(usex cvs '' NO_CVS=YesPlease) + $(usex elibc_musl NO_REGEX=YesPlease '') + $(usex iconv '' NO_ICONV=YesPlease) + $(usex nls '' NO_GETTEXT=YesPlease) + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) + $(usex python '' NO_PYTHON=YesPlease) + $(usex subversion '' NO_SVN_TESTS=YesPlease) + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease) + $(usex tk '' NO_TCLTK=YesPlease) + ) if use blksha1 ; then - myopts+=" BLK_SHA1=YesPlease" + myopts+=( BLK_SHA1=YesPlease ) elif use ppcsha1 ; then - myopts+=" PPC_SHA1=YesPlease" + myopts+=( PPC_SHA1=YesPlease ) fi if use curl ; then - use webdav || myopts+=" NO_EXPAT=YesPlease" + use webdav || myopts+=( NO_EXPAT=YesPlease ) else - myopts+=" NO_CURL=YesPlease" + 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=" + myopts+=( + NO_FINK=YesPlease + NO_DARWIN_PORTS=YesPlease + INSTALL=install + TAR=tar + SHELL_PATH="${EPREFIX}/bin/sh" + SANE_TOOL_PATH= + OLD_ICONV= + 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" + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die + if use pcre; then if use pcre-jit; then - myopts+=" USE_LIBPCRE2=YesPlease" + myopts+=( USE_LIBPCRE2=YesPlease ) extlibs+=" -lpcre2-8" else - myopts+=" USE_LIBPCRE1=YesPlease" - myopts+=" NO_LIBPCRE1_JIT=YesPlease" + myopts+=( + USE_LIBPCRE1=YesPlease + 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" +# myopts+=( +# NO_MMAP=YesPlease +# NO_IPV6=YesPlease +# NO_STRLCPY=YesPlease +# NO_MEMMEM=YesPlease +# NO_MKDTEMP=YesPlease +# NO_MKSTEMPS=YesPlease +# ) # fi if [[ ${CHOST} == ia64-*-hpux* ]]; then - myopts+=" NO_NSEC=YesPlease" + myopts+=( NO_NSEC=YesPlease ) fi if [[ ${CHOST} == *-*-aix* ]]; then - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease" + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease ) fi if [[ ${CHOST} == *-solaris* ]]; then - myopts+=" NEEDS_LIBICONV=YesPlease" - myopts+=" HAVE_CLOCK_MONOTONIC=1" + myopts+=( + NEEDS_LIBICONV=YesPlease + HAVE_CLOCK_MONOTONIC=1 + ) grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ - myopts+=" HAVE_GETDELIM=1" + myopts+=( HAVE_GETDELIM=1 ) fi has_version '>=app-text/asciidoc-8.0' \ - && myopts+=" ASCIIDOC8=YesPlease" - myopts+=" ASCIIDOC_NO_ROFF=YesPlease" + && myopts+=( ASCIIDOC8=YesPlease ) # Bug 290465: # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' [[ "${CHOST}" == *-uclibc* ]] && \ - myopts+=" NO_NSEC=YesPlease" + myopts+=( NO_NSEC=YesPlease ) - export MY_MAKEOPTS="${myopts}" + export MY_MAKEOPTS="${myopts[@]}" export EXTLIBS="${extlibs}" } src_unpack() { if [[ ${PV} != *9999 ]]; then unpack ${MY_P}.tar.${SRC_URI_SUFFIX} - cd "${S}" + cd "${S}" || die unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} - use doc && \ - cd "${S}"/Documentation && \ + if use doc ; then + pushd "${S}"/Documentation &>/dev/null || die unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} - cd "${S}" + popd &>/dev/null || die + fi else git-r3_src_unpack - cd "${S}" #cp "${FILESDIR}"/GIT-VERSION-GEN . fi @@ -280,41 +288,37 @@ src_prepare() { -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 + Makefile contrib/svn-fe/Makefile || die # Fix docbook2texi command sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ - Documentation/Makefile || die "sed failed" + Documentation/Makefile || die # Fix git-subtree missing DESTDIR sed -i \ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ - contrib/subtree/Makefile + contrib/subtree/Makefile || die } git_emake() { # bug #320647: PYTHON_PATH - PYTHON_PATH="" + local 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 \ + perllibdir="$(perl_get_raw_vendorlib)" \ sysconfdir="${EPREFIX}"/etc \ - PYTHON_PATH="${PYTHON_PATH}" \ + DESTDIR="${D}" \ + GIT_TEST_OPTS="--no-color" \ + OPTAR="$(tc-getAR)" \ + OPTCC="$(tc-getCC)" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ PERL_PATH="${EPREFIX}/usr/bin/perl" \ PERL_MM_OPT="" \ - GIT_TEST_OPTS="--no-color" \ + PYTHON_PATH="${PYTHON_PATH}" \ V=1 \ "$@" } @@ -324,10 +328,6 @@ src_configure() { } 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 @@ -341,12 +341,13 @@ src_compile() { fi if [[ ${CHOST} == *-darwin* ]]; then - cd "${S}"/contrib/credential/osxkeychain || die + pushd contrib/credential/osxkeychain &>/dev/null || die git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ || die "emake credential-osxkeychain" + popd &>/dev/null || die fi - cd "${S}"/Documentation + pushd Documentation &>/dev/null || die if [[ ${PV} == *9999 ]] ; then git_emake man \ || die "emake man failed" @@ -360,9 +361,10 @@ src_compile() { || die "emake info html failed" fi fi + popd &>/dev/null || die if use subversion ; then - cd "${S}"/contrib/svn-fe + pushd contrib/svn-fe &>/dev/null || die # by defining EXTLIBS we override the detection for libintl and # libiconv, bug #516168 local nlsiconv= @@ -372,24 +374,29 @@ src_compile() { if use doc ; then git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed" fi - cd "${S}" + popd &>/dev/null || die fi if use gnome-keyring ; then - cd "${S}"/contrib/credential/libsecret + pushd contrib/credential/libsecret &>/dev/null || die git_emake || die "emake git-credential-libsecret failed" + popd &>/dev/null || die fi - cd "${S}"/contrib/subtree || die + pushd contrib/subtree &>/dev/null || die git_emake use doc && git_emake doc + popd &>/dev/null || die - cd "${S}"/contrib/diff-highlight || die + pushd contrib/diff-highlight &>/dev/null || die git_emake + popd &>/dev/null || die if use mediawiki ; then - cd "${S}"/contrib/mw-to-git + pushd contrib/mw-to-git &>/dev/null || die git_emake + popd &>/dev/null || die + fi } @@ -444,19 +451,19 @@ src_install() { newexe contrib/git-resurrect.sh git-resurrect # git-subtree - cd "${S}"/contrib/subtree + pushd contrib/subtree &>/dev/null || die 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}" + popd &>/dev/null || die if use mediawiki ; then - cd "${S}"/contrib/mw-to-git + pushd contrib/mw-to-git &>/dev/null || die git_emake install - cd "${S}" + popd &>/dev/null || die fi # diff-highlight @@ -474,12 +481,13 @@ src_install() { dodoc contrib/contacts/git-contacts.txt if use gnome-keyring ; then - cd "${S}"/contrib/credential/libsecret + pushd contrib/credential/libsecret &>/dev/null || die dobin git-credential-libsecret + popd &>/dev/null || die fi if use subversion ; then - cd "${S}"/contrib/svn-fe + pushd contrib/svn-fe &>/dev/null || die dobin svn-fe dodoc svn-fe.txt if use doc ; then @@ -487,7 +495,7 @@ src_install() { docinto html dodoc svn-fe.html fi - cd "${S}" + popd &>/dev/null || die fi dodir /usr/share/${PN}/contrib @@ -518,7 +526,7 @@ src_install() { for i in "${contrib_objects[@]}" ; do cp -rf \ "${S}"/contrib/${i} \ - "${ED}"/usr/share/${PN}/contrib \ + "${ED%/}"/usr/share/${PN}/contrib \ || die "Failed contrib ${i}" done @@ -534,16 +542,17 @@ src_install() { newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb newdoc "${S}"/gitweb/README README.gitweb - find "${ED}"/usr/lib64/perl5/ \ + find "${ED%/}"/usr/lib64/perl5/ \ -name .packlist \ - -exec rm \{\} \; + -delete \ + || die else - rm -rf "${ED}"/usr/share/gitweb + 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* + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \ + "${ED%/}"/usr/share/man/man1/git-svn.1* fi if use xinetd ; then @@ -564,111 +573,118 @@ src_install() { # 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 + 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" + 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" + 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" + 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+=" t5000-tar-tree.sh" + disabled+=( t5000-tar-tree.sh ) fi - cvs=0 - use cvs && let cvs=$cvs+1 + local cvs=0 + use cvs && let cvs=${cvs}+1 if [[ ${EUID} -eq 0 ]]; then - if [[ $cvs -eq 1 ]]; 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+=" ${tests_cvs}" + disabled+=( ${tests_cvs[@]} ) fi einfo "Skipping other tests that require being non-root" - disabled+=" ${tests_nonroot}" + disabled+=( ${tests_nonroot[@]} ) else - [[ $cvs -gt 0 ]] && \ + [[ ${cvs} -gt 0 ]] && \ has_version dev-vcs/cvs && \ - let cvs=$cvs+1 - [[ $cvs -gt 1 ]] && \ + let cvs=${cvs}+1 + [[ ${cvs} -gt 1 ]] && \ has_version "dev-vcs/cvs[server]" && \ - let cvs=$cvs+1 - if [[ $cvs -lt 3 ]]; then + let cvs=${cvs}+1 + if [[ ${cvs} -lt 3 ]]; then einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" - disabled+=" ${tests_cvs}" + disabled+=( ${tests_cvs[@]} ) fi fi if ! use perl ; then einfo "Disabling tests that need Perl" - disabled+=" ${tests_perl}" + disabled+=( ${tests_perl[@]} ) fi einfo "Disabling tests that fail with SVN 1.7" - disabled+=" ${test_svn}" + disabled+=( ${test_svn[@]} ) # Reset all previously disabled tests - cd "${S}/t" + pushd t &>/dev/null || die + local i 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" + 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 + -i Makefile || die # Clean old results first, must always run - cd "${S}/t" nonfatal git_emake clean + popd &>/dev/null || die # Now run the tests, keep going if we hit an error, and don't terminate on # failure - cd "${S}" + local rc einfo "Start test run" #MAKEOPTS=-j1 nonfatal git_emake --keep-going test rc=$? # Display nice results, now print the results - cd "${S}/t" + pushd t &>/dev/null || die nonfatal git_emake aggregate-results # And bail if there was a problem - [ $rc -eq 0 ] || die "tests failed. Please file a bug." + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug." } showpkgdeps() { diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild index e9f0c242bcf6..9079b03f7b10 100644 --- a/dev-vcs/git/git-9999-r2.ebuild +++ b/dev-vcs/git/git-9999-r2.ebuild @@ -73,18 +73,30 @@ CDEPEND=" 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 + ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + dev-perl/HTML-Tree + dev-perl/MediaWiki-API + ) + subversion? ( + dev-vcs/subversion[-dso,perl] + dev-perl/libwww-perl + dev-perl/TermReadKey + ) ) - 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} ) " @@ -108,7 +120,7 @@ if [[ ${PV} == *9999 ]]; then app-text/asciidoc" fi -SITEFILE=50${PN}-gentoo.el +SITEFILE="50${PN}-gentoo.el" S="${WORKDIR}/${MY_P}" REQUIRED_USE=" @@ -124,11 +136,7 @@ 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.17.0_rc1-optional-cvs.patch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch @@ -150,111 +158,111 @@ pkg_setup() { # 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 + local myopts=( + ASCIIDOC_NO_ROFF=YesPlease + $(usex cvs '' NO_CVS=YesPlease) + $(usex elibc_musl NO_REGEX=YesPlease '') + $(usex iconv '' NO_ICONV=YesPlease) + $(usex nls '' NO_GETTEXT=YesPlease) + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) + $(usex python '' NO_PYTHON=YesPlease) + $(usex subversion '' NO_SVN_TESTS=YesPlease) + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease) + $(usex tk '' NO_TCLTK=YesPlease) + ) if use blksha1 ; then - myopts+=" BLK_SHA1=YesPlease" + myopts+=( BLK_SHA1=YesPlease ) elif use ppcsha1 ; then - myopts+=" PPC_SHA1=YesPlease" + myopts+=( PPC_SHA1=YesPlease ) fi if use curl ; then - use webdav || myopts+=" NO_EXPAT=YesPlease" + use webdav || myopts+=( NO_EXPAT=YesPlease ) else - myopts+=" NO_CURL=YesPlease" + 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=" + myopts+=( + NO_FINK=YesPlease + NO_DARWIN_PORTS=YesPlease + INSTALL=install + TAR=tar + SHELL_PATH="${EPREFIX}/bin/sh" + SANE_TOOL_PATH= + OLD_ICONV= + 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" + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die + if use pcre; then if use pcre-jit; then - myopts+=" USE_LIBPCRE2=YesPlease" + myopts+=( USE_LIBPCRE2=YesPlease ) extlibs+=" -lpcre2-8" else - myopts+=" USE_LIBPCRE1=YesPlease" - myopts+=" NO_LIBPCRE1_JIT=YesPlease" + myopts+=( + USE_LIBPCRE1=YesPlease + 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" +# myopts+=( +# NO_MMAP=YesPlease +# NO_IPV6=YesPlease +# NO_STRLCPY=YesPlease +# NO_MEMMEM=YesPlease +# NO_MKDTEMP=YesPlease +# NO_MKSTEMPS=YesPlease +# ) # fi if [[ ${CHOST} == ia64-*-hpux* ]]; then - myopts+=" NO_NSEC=YesPlease" + myopts+=( NO_NSEC=YesPlease ) fi if [[ ${CHOST} == *-*-aix* ]]; then - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease" + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease ) fi if [[ ${CHOST} == *-solaris* ]]; then - myopts+=" NEEDS_LIBICONV=YesPlease" - myopts+=" HAVE_CLOCK_MONOTONIC=1" + myopts+=( + NEEDS_LIBICONV=YesPlease + HAVE_CLOCK_MONOTONIC=1 + ) grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ - myopts+=" HAVE_GETDELIM=1" + myopts+=( HAVE_GETDELIM=1 ) fi has_version '>=app-text/asciidoc-8.0' \ - && myopts+=" ASCIIDOC8=YesPlease" - myopts+=" ASCIIDOC_NO_ROFF=YesPlease" + && myopts+=( ASCIIDOC8=YesPlease ) # Bug 290465: # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' [[ "${CHOST}" == *-uclibc* ]] && \ - myopts+=" NO_NSEC=YesPlease" + myopts+=( NO_NSEC=YesPlease ) - export MY_MAKEOPTS="${myopts}" + export MY_MAKEOPTS="${myopts[@]}" export EXTLIBS="${extlibs}" } src_unpack() { if [[ ${PV} != *9999 ]]; then unpack ${MY_P}.tar.${SRC_URI_SUFFIX} - cd "${S}" + cd "${S}" || die unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} - use doc && \ - cd "${S}"/Documentation && \ + if use doc ; then + pushd "${S}"/Documentation &>/dev/null || die unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} - cd "${S}" + popd &>/dev/null || die + fi else git-r3_src_unpack - cd "${S}" #cp "${FILESDIR}"/GIT-VERSION-GEN . fi @@ -280,41 +288,37 @@ src_prepare() { -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 + Makefile contrib/svn-fe/Makefile || die # Fix docbook2texi command sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ - Documentation/Makefile || die "sed failed" + Documentation/Makefile || die # Fix git-subtree missing DESTDIR sed -i \ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ - contrib/subtree/Makefile + contrib/subtree/Makefile || die } git_emake() { # bug #320647: PYTHON_PATH - PYTHON_PATH="" + local 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 \ + perllibdir="$(perl_get_raw_vendorlib)" \ sysconfdir="${EPREFIX}"/etc \ - PYTHON_PATH="${PYTHON_PATH}" \ + DESTDIR="${D}" \ + GIT_TEST_OPTS="--no-color" \ + OPTAR="$(tc-getAR)" \ + OPTCC="$(tc-getCC)" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ PERL_PATH="${EPREFIX}/usr/bin/perl" \ PERL_MM_OPT="" \ - GIT_TEST_OPTS="--no-color" \ + PYTHON_PATH="${PYTHON_PATH}" \ V=1 \ "$@" } @@ -324,10 +328,6 @@ src_configure() { } 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 @@ -341,12 +341,13 @@ src_compile() { fi if [[ ${CHOST} == *-darwin* ]]; then - cd "${S}"/contrib/credential/osxkeychain || die + pushd contrib/credential/osxkeychain &>/dev/null || die git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ || die "emake credential-osxkeychain" + popd &>/dev/null || die fi - cd "${S}"/Documentation + pushd Documentation &>/dev/null || die if [[ ${PV} == *9999 ]] ; then git_emake man \ || die "emake man failed" @@ -360,9 +361,10 @@ src_compile() { || die "emake info html failed" fi fi + popd &>/dev/null || die if use subversion ; then - cd "${S}"/contrib/svn-fe + pushd contrib/svn-fe &>/dev/null || die # by defining EXTLIBS we override the detection for libintl and # libiconv, bug #516168 local nlsiconv= @@ -372,24 +374,29 @@ src_compile() { if use doc ; then git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed" fi - cd "${S}" + popd &>/dev/null || die fi if use gnome-keyring ; then - cd "${S}"/contrib/credential/libsecret + pushd contrib/credential/libsecret &>/dev/null || die git_emake || die "emake git-credential-libsecret failed" + popd &>/dev/null || die fi - cd "${S}"/contrib/subtree || die + pushd contrib/subtree &>/dev/null || die git_emake use doc && git_emake doc + popd &>/dev/null || die - cd "${S}"/contrib/diff-highlight || die + pushd contrib/diff-highlight &>/dev/null || die git_emake + popd &>/dev/null || die if use mediawiki ; then - cd "${S}"/contrib/mw-to-git + pushd contrib/mw-to-git &>/dev/null || die git_emake + popd &>/dev/null || die + fi } @@ -444,19 +451,19 @@ src_install() { newexe contrib/git-resurrect.sh git-resurrect # git-subtree - cd "${S}"/contrib/subtree + pushd contrib/subtree &>/dev/null || die 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}" + popd &>/dev/null || die if use mediawiki ; then - cd "${S}"/contrib/mw-to-git + pushd contrib/mw-to-git &>/dev/null || die git_emake install - cd "${S}" + popd &>/dev/null || die fi # diff-highlight @@ -474,12 +481,13 @@ src_install() { dodoc contrib/contacts/git-contacts.txt if use gnome-keyring ; then - cd "${S}"/contrib/credential/libsecret + pushd contrib/credential/libsecret &>/dev/null || die dobin git-credential-libsecret + popd &>/dev/null || die fi if use subversion ; then - cd "${S}"/contrib/svn-fe + pushd contrib/svn-fe &>/dev/null || die dobin svn-fe dodoc svn-fe.txt if use doc ; then @@ -487,7 +495,7 @@ src_install() { docinto html dodoc svn-fe.html fi - cd "${S}" + popd &>/dev/null || die fi dodir /usr/share/${PN}/contrib @@ -518,7 +526,7 @@ src_install() { for i in "${contrib_objects[@]}" ; do cp -rf \ "${S}"/contrib/${i} \ - "${ED}"/usr/share/${PN}/contrib \ + "${ED%/}"/usr/share/${PN}/contrib \ || die "Failed contrib ${i}" done @@ -534,16 +542,17 @@ src_install() { newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb newdoc "${S}"/gitweb/README README.gitweb - find "${ED}"/usr/lib64/perl5/ \ + find "${ED%/}"/usr/lib64/perl5/ \ -name .packlist \ - -exec rm \{\} \; + -delete \ + || die else - rm -rf "${ED}"/usr/share/gitweb + 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* + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \ + "${ED%/}"/usr/share/man/man1/git-svn.1* fi if use xinetd ; then @@ -564,111 +573,118 @@ src_install() { # 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 + 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" + 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" + 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" + 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+=" t5000-tar-tree.sh" + disabled+=( t5000-tar-tree.sh ) fi - cvs=0 - use cvs && let cvs=$cvs+1 + local cvs=0 + use cvs && let cvs=${cvs}+1 if [[ ${EUID} -eq 0 ]]; then - if [[ $cvs -eq 1 ]]; 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+=" ${tests_cvs}" + disabled+=( ${tests_cvs[@]} ) fi einfo "Skipping other tests that require being non-root" - disabled+=" ${tests_nonroot}" + disabled+=( ${tests_nonroot[@]} ) else - [[ $cvs -gt 0 ]] && \ + [[ ${cvs} -gt 0 ]] && \ has_version dev-vcs/cvs && \ - let cvs=$cvs+1 - [[ $cvs -gt 1 ]] && \ + let cvs=${cvs}+1 + [[ ${cvs} -gt 1 ]] && \ has_version "dev-vcs/cvs[server]" && \ - let cvs=$cvs+1 - if [[ $cvs -lt 3 ]]; then + let cvs=${cvs}+1 + if [[ ${cvs} -lt 3 ]]; then einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" - disabled+=" ${tests_cvs}" + disabled+=( ${tests_cvs[@]} ) fi fi if ! use perl ; then einfo "Disabling tests that need Perl" - disabled+=" ${tests_perl}" + disabled+=( ${tests_perl[@]} ) fi einfo "Disabling tests that fail with SVN 1.7" - disabled+=" ${test_svn}" + disabled+=( ${test_svn[@]} ) # Reset all previously disabled tests - cd "${S}/t" + pushd t &>/dev/null || die + local i 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" + 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 + -i Makefile || die # Clean old results first, must always run - cd "${S}/t" nonfatal git_emake clean + popd &>/dev/null || die # Now run the tests, keep going if we hit an error, and don't terminate on # failure - cd "${S}" + local rc einfo "Start test run" #MAKEOPTS=-j1 nonfatal git_emake --keep-going test rc=$? # Display nice results, now print the results - cd "${S}/t" + pushd t &>/dev/null || die nonfatal git_emake aggregate-results # And bail if there was a problem - [ $rc -eq 0 ] || die "tests failed. Please file a bug." + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug." } showpkgdeps() { diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild index e9f0c242bcf6..9079b03f7b10 100644 --- a/dev-vcs/git/git-9999-r3.ebuild +++ b/dev-vcs/git/git-9999-r3.ebuild @@ -73,18 +73,30 @@ CDEPEND=" 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 + ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + dev-perl/HTML-Tree + dev-perl/MediaWiki-API + ) + subversion? ( + dev-vcs/subversion[-dso,perl] + dev-perl/libwww-perl + dev-perl/TermReadKey + ) ) - 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} ) " @@ -108,7 +120,7 @@ if [[ ${PV} == *9999 ]]; then app-text/asciidoc" fi -SITEFILE=50${PN}-gentoo.el +SITEFILE="50${PN}-gentoo.el" S="${WORKDIR}/${MY_P}" REQUIRED_USE=" @@ -124,11 +136,7 @@ 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.17.0_rc1-optional-cvs.patch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch @@ -150,111 +158,111 @@ pkg_setup() { # 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 + local myopts=( + ASCIIDOC_NO_ROFF=YesPlease + $(usex cvs '' NO_CVS=YesPlease) + $(usex elibc_musl NO_REGEX=YesPlease '') + $(usex iconv '' NO_ICONV=YesPlease) + $(usex nls '' NO_GETTEXT=YesPlease) + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) + $(usex python '' NO_PYTHON=YesPlease) + $(usex subversion '' NO_SVN_TESTS=YesPlease) + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease) + $(usex tk '' NO_TCLTK=YesPlease) + ) if use blksha1 ; then - myopts+=" BLK_SHA1=YesPlease" + myopts+=( BLK_SHA1=YesPlease ) elif use ppcsha1 ; then - myopts+=" PPC_SHA1=YesPlease" + myopts+=( PPC_SHA1=YesPlease ) fi if use curl ; then - use webdav || myopts+=" NO_EXPAT=YesPlease" + use webdav || myopts+=( NO_EXPAT=YesPlease ) else - myopts+=" NO_CURL=YesPlease" + 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=" + myopts+=( + NO_FINK=YesPlease + NO_DARWIN_PORTS=YesPlease + INSTALL=install + TAR=tar + SHELL_PATH="${EPREFIX}/bin/sh" + SANE_TOOL_PATH= + OLD_ICONV= + 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" + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die + if use pcre; then if use pcre-jit; then - myopts+=" USE_LIBPCRE2=YesPlease" + myopts+=( USE_LIBPCRE2=YesPlease ) extlibs+=" -lpcre2-8" else - myopts+=" USE_LIBPCRE1=YesPlease" - myopts+=" NO_LIBPCRE1_JIT=YesPlease" + myopts+=( + USE_LIBPCRE1=YesPlease + 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" +# myopts+=( +# NO_MMAP=YesPlease +# NO_IPV6=YesPlease +# NO_STRLCPY=YesPlease +# NO_MEMMEM=YesPlease +# NO_MKDTEMP=YesPlease +# NO_MKSTEMPS=YesPlease +# ) # fi if [[ ${CHOST} == ia64-*-hpux* ]]; then - myopts+=" NO_NSEC=YesPlease" + myopts+=( NO_NSEC=YesPlease ) fi if [[ ${CHOST} == *-*-aix* ]]; then - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease" + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease ) fi if [[ ${CHOST} == *-solaris* ]]; then - myopts+=" NEEDS_LIBICONV=YesPlease" - myopts+=" HAVE_CLOCK_MONOTONIC=1" + myopts+=( + NEEDS_LIBICONV=YesPlease + HAVE_CLOCK_MONOTONIC=1 + ) grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ - myopts+=" HAVE_GETDELIM=1" + myopts+=( HAVE_GETDELIM=1 ) fi has_version '>=app-text/asciidoc-8.0' \ - && myopts+=" ASCIIDOC8=YesPlease" - myopts+=" ASCIIDOC_NO_ROFF=YesPlease" + && myopts+=( ASCIIDOC8=YesPlease ) # Bug 290465: # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' [[ "${CHOST}" == *-uclibc* ]] && \ - myopts+=" NO_NSEC=YesPlease" + myopts+=( NO_NSEC=YesPlease ) - export MY_MAKEOPTS="${myopts}" + export MY_MAKEOPTS="${myopts[@]}" export EXTLIBS="${extlibs}" } src_unpack() { if [[ ${PV} != *9999 ]]; then unpack ${MY_P}.tar.${SRC_URI_SUFFIX} - cd "${S}" + cd "${S}" || die unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} - use doc && \ - cd "${S}"/Documentation && \ + if use doc ; then + pushd "${S}"/Documentation &>/dev/null || die unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} - cd "${S}" + popd &>/dev/null || die + fi else git-r3_src_unpack - cd "${S}" #cp "${FILESDIR}"/GIT-VERSION-GEN . fi @@ -280,41 +288,37 @@ src_prepare() { -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 + Makefile contrib/svn-fe/Makefile || die # Fix docbook2texi command sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ - Documentation/Makefile || die "sed failed" + Documentation/Makefile || die # Fix git-subtree missing DESTDIR sed -i \ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ - contrib/subtree/Makefile + contrib/subtree/Makefile || die } git_emake() { # bug #320647: PYTHON_PATH - PYTHON_PATH="" + local 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 \ + perllibdir="$(perl_get_raw_vendorlib)" \ sysconfdir="${EPREFIX}"/etc \ - PYTHON_PATH="${PYTHON_PATH}" \ + DESTDIR="${D}" \ + GIT_TEST_OPTS="--no-color" \ + OPTAR="$(tc-getAR)" \ + OPTCC="$(tc-getCC)" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ PERL_PATH="${EPREFIX}/usr/bin/perl" \ PERL_MM_OPT="" \ - GIT_TEST_OPTS="--no-color" \ + PYTHON_PATH="${PYTHON_PATH}" \ V=1 \ "$@" } @@ -324,10 +328,6 @@ src_configure() { } 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 @@ -341,12 +341,13 @@ src_compile() { fi if [[ ${CHOST} == *-darwin* ]]; then - cd "${S}"/contrib/credential/osxkeychain || die + pushd contrib/credential/osxkeychain &>/dev/null || die git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ || die "emake credential-osxkeychain" + popd &>/dev/null || die fi - cd "${S}"/Documentation + pushd Documentation &>/dev/null || die if [[ ${PV} == *9999 ]] ; then git_emake man \ || die "emake man failed" @@ -360,9 +361,10 @@ src_compile() { || die "emake info html failed" fi fi + popd &>/dev/null || die if use subversion ; then - cd "${S}"/contrib/svn-fe + pushd contrib/svn-fe &>/dev/null || die # by defining EXTLIBS we override the detection for libintl and # libiconv, bug #516168 local nlsiconv= @@ -372,24 +374,29 @@ src_compile() { if use doc ; then git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed" fi - cd "${S}" + popd &>/dev/null || die fi if use gnome-keyring ; then - cd "${S}"/contrib/credential/libsecret + pushd contrib/credential/libsecret &>/dev/null || die git_emake || die "emake git-credential-libsecret failed" + popd &>/dev/null || die fi - cd "${S}"/contrib/subtree || die + pushd contrib/subtree &>/dev/null || die git_emake use doc && git_emake doc + popd &>/dev/null || die - cd "${S}"/contrib/diff-highlight || die + pushd contrib/diff-highlight &>/dev/null || die git_emake + popd &>/dev/null || die if use mediawiki ; then - cd "${S}"/contrib/mw-to-git + pushd contrib/mw-to-git &>/dev/null || die git_emake + popd &>/dev/null || die + fi } @@ -444,19 +451,19 @@ src_install() { newexe contrib/git-resurrect.sh git-resurrect # git-subtree - cd "${S}"/contrib/subtree + pushd contrib/subtree &>/dev/null || die 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}" + popd &>/dev/null || die if use mediawiki ; then - cd "${S}"/contrib/mw-to-git + pushd contrib/mw-to-git &>/dev/null || die git_emake install - cd "${S}" + popd &>/dev/null || die fi # diff-highlight @@ -474,12 +481,13 @@ src_install() { dodoc contrib/contacts/git-contacts.txt if use gnome-keyring ; then - cd "${S}"/contrib/credential/libsecret + pushd contrib/credential/libsecret &>/dev/null || die dobin git-credential-libsecret + popd &>/dev/null || die fi if use subversion ; then - cd "${S}"/contrib/svn-fe + pushd contrib/svn-fe &>/dev/null || die dobin svn-fe dodoc svn-fe.txt if use doc ; then @@ -487,7 +495,7 @@ src_install() { docinto html dodoc svn-fe.html fi - cd "${S}" + popd &>/dev/null || die fi dodir /usr/share/${PN}/contrib @@ -518,7 +526,7 @@ src_install() { for i in "${contrib_objects[@]}" ; do cp -rf \ "${S}"/contrib/${i} \ - "${ED}"/usr/share/${PN}/contrib \ + "${ED%/}"/usr/share/${PN}/contrib \ || die "Failed contrib ${i}" done @@ -534,16 +542,17 @@ src_install() { newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb newdoc "${S}"/gitweb/README README.gitweb - find "${ED}"/usr/lib64/perl5/ \ + find "${ED%/}"/usr/lib64/perl5/ \ -name .packlist \ - -exec rm \{\} \; + -delete \ + || die else - rm -rf "${ED}"/usr/share/gitweb + 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* + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \ + "${ED%/}"/usr/share/man/man1/git-svn.1* fi if use xinetd ; then @@ -564,111 +573,118 @@ src_install() { # 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 + 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" + 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" + 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" + 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+=" t5000-tar-tree.sh" + disabled+=( t5000-tar-tree.sh ) fi - cvs=0 - use cvs && let cvs=$cvs+1 + local cvs=0 + use cvs && let cvs=${cvs}+1 if [[ ${EUID} -eq 0 ]]; then - if [[ $cvs -eq 1 ]]; 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+=" ${tests_cvs}" + disabled+=( ${tests_cvs[@]} ) fi einfo "Skipping other tests that require being non-root" - disabled+=" ${tests_nonroot}" + disabled+=( ${tests_nonroot[@]} ) else - [[ $cvs -gt 0 ]] && \ + [[ ${cvs} -gt 0 ]] && \ has_version dev-vcs/cvs && \ - let cvs=$cvs+1 - [[ $cvs -gt 1 ]] && \ + let cvs=${cvs}+1 + [[ ${cvs} -gt 1 ]] && \ has_version "dev-vcs/cvs[server]" && \ - let cvs=$cvs+1 - if [[ $cvs -lt 3 ]]; then + let cvs=${cvs}+1 + if [[ ${cvs} -lt 3 ]]; then einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" - disabled+=" ${tests_cvs}" + disabled+=( ${tests_cvs[@]} ) fi fi if ! use perl ; then einfo "Disabling tests that need Perl" - disabled+=" ${tests_perl}" + disabled+=( ${tests_perl[@]} ) fi einfo "Disabling tests that fail with SVN 1.7" - disabled+=" ${test_svn}" + disabled+=( ${test_svn[@]} ) # Reset all previously disabled tests - cd "${S}/t" + pushd t &>/dev/null || die + local i 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" + 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 + -i Makefile || die # Clean old results first, must always run - cd "${S}/t" nonfatal git_emake clean + popd &>/dev/null || die # Now run the tests, keep going if we hit an error, and don't terminate on # failure - cd "${S}" + local rc einfo "Start test run" #MAKEOPTS=-j1 nonfatal git_emake --keep-going test rc=$? # Display nice results, now print the results - cd "${S}/t" + pushd t &>/dev/null || die nonfatal git_emake aggregate-results # And bail if there was a problem - [ $rc -eq 0 ] || die "tests failed. Please file a bug." + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug." } showpkgdeps() { diff --git a/dev-vcs/git/git-9999.ebuild b/dev-vcs/git/git-9999.ebuild index e9f0c242bcf6..9079b03f7b10 100644 --- a/dev-vcs/git/git-9999.ebuild +++ b/dev-vcs/git/git-9999.ebuild @@ -73,18 +73,30 @@ CDEPEND=" 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 + ) + mediawiki? ( + dev-perl/DateTime-Format-ISO8601 + dev-perl/HTML-Tree + dev-perl/MediaWiki-API + ) + subversion? ( + dev-vcs/subversion[-dso,perl] + dev-perl/libwww-perl + dev-perl/TermReadKey + ) ) - 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} ) " @@ -108,7 +120,7 @@ if [[ ${PV} == *9999 ]]; then app-text/asciidoc" fi -SITEFILE=50${PN}-gentoo.el +SITEFILE="50${PN}-gentoo.el" S="${WORKDIR}/${MY_P}" REQUIRED_USE=" @@ -124,11 +136,7 @@ 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.17.0_rc1-optional-cvs.patch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch @@ -150,111 +158,111 @@ pkg_setup() { # 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 + local myopts=( + ASCIIDOC_NO_ROFF=YesPlease + $(usex cvs '' NO_CVS=YesPlease) + $(usex elibc_musl NO_REGEX=YesPlease '') + $(usex iconv '' NO_ICONV=YesPlease) + $(usex nls '' NO_GETTEXT=YesPlease) + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) + $(usex python '' NO_PYTHON=YesPlease) + $(usex subversion '' NO_SVN_TESTS=YesPlease) + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease) + $(usex tk '' NO_TCLTK=YesPlease) + ) if use blksha1 ; then - myopts+=" BLK_SHA1=YesPlease" + myopts+=( BLK_SHA1=YesPlease ) elif use ppcsha1 ; then - myopts+=" PPC_SHA1=YesPlease" + myopts+=( PPC_SHA1=YesPlease ) fi if use curl ; then - use webdav || myopts+=" NO_EXPAT=YesPlease" + use webdav || myopts+=( NO_EXPAT=YesPlease ) else - myopts+=" NO_CURL=YesPlease" + 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=" + myopts+=( + NO_FINK=YesPlease + NO_DARWIN_PORTS=YesPlease + INSTALL=install + TAR=tar + SHELL_PATH="${EPREFIX}/bin/sh" + SANE_TOOL_PATH= + OLD_ICONV= + 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" + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die + if use pcre; then if use pcre-jit; then - myopts+=" USE_LIBPCRE2=YesPlease" + myopts+=( USE_LIBPCRE2=YesPlease ) extlibs+=" -lpcre2-8" else - myopts+=" USE_LIBPCRE1=YesPlease" - myopts+=" NO_LIBPCRE1_JIT=YesPlease" + myopts+=( + USE_LIBPCRE1=YesPlease + 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" +# myopts+=( +# NO_MMAP=YesPlease +# NO_IPV6=YesPlease +# NO_STRLCPY=YesPlease +# NO_MEMMEM=YesPlease +# NO_MKDTEMP=YesPlease +# NO_MKSTEMPS=YesPlease +# ) # fi if [[ ${CHOST} == ia64-*-hpux* ]]; then - myopts+=" NO_NSEC=YesPlease" + myopts+=( NO_NSEC=YesPlease ) fi if [[ ${CHOST} == *-*-aix* ]]; then - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease" + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease ) fi if [[ ${CHOST} == *-solaris* ]]; then - myopts+=" NEEDS_LIBICONV=YesPlease" - myopts+=" HAVE_CLOCK_MONOTONIC=1" + myopts+=( + NEEDS_LIBICONV=YesPlease + HAVE_CLOCK_MONOTONIC=1 + ) grep -q getdelim "${ROOT}"/usr/include/stdio.h && \ - myopts+=" HAVE_GETDELIM=1" + myopts+=( HAVE_GETDELIM=1 ) fi has_version '>=app-text/asciidoc-8.0' \ - && myopts+=" ASCIIDOC8=YesPlease" - myopts+=" ASCIIDOC_NO_ROFF=YesPlease" + && myopts+=( ASCIIDOC8=YesPlease ) # Bug 290465: # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' [[ "${CHOST}" == *-uclibc* ]] && \ - myopts+=" NO_NSEC=YesPlease" + myopts+=( NO_NSEC=YesPlease ) - export MY_MAKEOPTS="${myopts}" + export MY_MAKEOPTS="${myopts[@]}" export EXTLIBS="${extlibs}" } src_unpack() { if [[ ${PV} != *9999 ]]; then unpack ${MY_P}.tar.${SRC_URI_SUFFIX} - cd "${S}" + cd "${S}" || die unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} - use doc && \ - cd "${S}"/Documentation && \ + if use doc ; then + pushd "${S}"/Documentation &>/dev/null || die unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} - cd "${S}" + popd &>/dev/null || die + fi else git-r3_src_unpack - cd "${S}" #cp "${FILESDIR}"/GIT-VERSION-GEN . fi @@ -280,41 +288,37 @@ src_prepare() { -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 + Makefile contrib/svn-fe/Makefile || die # Fix docbook2texi command sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ - Documentation/Makefile || die "sed failed" + Documentation/Makefile || die # Fix git-subtree missing DESTDIR sed -i \ -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ - contrib/subtree/Makefile + contrib/subtree/Makefile || die } git_emake() { # bug #320647: PYTHON_PATH - PYTHON_PATH="" + local 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 \ + perllibdir="$(perl_get_raw_vendorlib)" \ sysconfdir="${EPREFIX}"/etc \ - PYTHON_PATH="${PYTHON_PATH}" \ + DESTDIR="${D}" \ + GIT_TEST_OPTS="--no-color" \ + OPTAR="$(tc-getAR)" \ + OPTCC="$(tc-getCC)" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ PERL_PATH="${EPREFIX}/usr/bin/perl" \ PERL_MM_OPT="" \ - GIT_TEST_OPTS="--no-color" \ + PYTHON_PATH="${PYTHON_PATH}" \ V=1 \ "$@" } @@ -324,10 +328,6 @@ src_configure() { } 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 @@ -341,12 +341,13 @@ src_compile() { fi if [[ ${CHOST} == *-darwin* ]]; then - cd "${S}"/contrib/credential/osxkeychain || die + pushd contrib/credential/osxkeychain &>/dev/null || die git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \ || die "emake credential-osxkeychain" + popd &>/dev/null || die fi - cd "${S}"/Documentation + pushd Documentation &>/dev/null || die if [[ ${PV} == *9999 ]] ; then git_emake man \ || die "emake man failed" @@ -360,9 +361,10 @@ src_compile() { || die "emake info html failed" fi fi + popd &>/dev/null || die if use subversion ; then - cd "${S}"/contrib/svn-fe + pushd contrib/svn-fe &>/dev/null || die # by defining EXTLIBS we override the detection for libintl and # libiconv, bug #516168 local nlsiconv= @@ -372,24 +374,29 @@ src_compile() { if use doc ; then git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed" fi - cd "${S}" + popd &>/dev/null || die fi if use gnome-keyring ; then - cd "${S}"/contrib/credential/libsecret + pushd contrib/credential/libsecret &>/dev/null || die git_emake || die "emake git-credential-libsecret failed" + popd &>/dev/null || die fi - cd "${S}"/contrib/subtree || die + pushd contrib/subtree &>/dev/null || die git_emake use doc && git_emake doc + popd &>/dev/null || die - cd "${S}"/contrib/diff-highlight || die + pushd contrib/diff-highlight &>/dev/null || die git_emake + popd &>/dev/null || die if use mediawiki ; then - cd "${S}"/contrib/mw-to-git + pushd contrib/mw-to-git &>/dev/null || die git_emake + popd &>/dev/null || die + fi } @@ -444,19 +451,19 @@ src_install() { newexe contrib/git-resurrect.sh git-resurrect # git-subtree - cd "${S}"/contrib/subtree + pushd contrib/subtree &>/dev/null || die 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}" + popd &>/dev/null || die if use mediawiki ; then - cd "${S}"/contrib/mw-to-git + pushd contrib/mw-to-git &>/dev/null || die git_emake install - cd "${S}" + popd &>/dev/null || die fi # diff-highlight @@ -474,12 +481,13 @@ src_install() { dodoc contrib/contacts/git-contacts.txt if use gnome-keyring ; then - cd "${S}"/contrib/credential/libsecret + pushd contrib/credential/libsecret &>/dev/null || die dobin git-credential-libsecret + popd &>/dev/null || die fi if use subversion ; then - cd "${S}"/contrib/svn-fe + pushd contrib/svn-fe &>/dev/null || die dobin svn-fe dodoc svn-fe.txt if use doc ; then @@ -487,7 +495,7 @@ src_install() { docinto html dodoc svn-fe.html fi - cd "${S}" + popd &>/dev/null || die fi dodir /usr/share/${PN}/contrib @@ -518,7 +526,7 @@ src_install() { for i in "${contrib_objects[@]}" ; do cp -rf \ "${S}"/contrib/${i} \ - "${ED}"/usr/share/${PN}/contrib \ + "${ED%/}"/usr/share/${PN}/contrib \ || die "Failed contrib ${i}" done @@ -534,16 +542,17 @@ src_install() { newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb newdoc "${S}"/gitweb/README README.gitweb - find "${ED}"/usr/lib64/perl5/ \ + find "${ED%/}"/usr/lib64/perl5/ \ -name .packlist \ - -exec rm \{\} \; + -delete \ + || die else - rm -rf "${ED}"/usr/share/gitweb + 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* + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \ + "${ED%/}"/usr/share/man/man1/git-svn.1* fi if use xinetd ; then @@ -564,111 +573,118 @@ src_install() { # 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 + 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" + 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" + 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" + 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+=" t5000-tar-tree.sh" + disabled+=( t5000-tar-tree.sh ) fi - cvs=0 - use cvs && let cvs=$cvs+1 + local cvs=0 + use cvs && let cvs=${cvs}+1 if [[ ${EUID} -eq 0 ]]; then - if [[ $cvs -eq 1 ]]; 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+=" ${tests_cvs}" + disabled+=( ${tests_cvs[@]} ) fi einfo "Skipping other tests that require being non-root" - disabled+=" ${tests_nonroot}" + disabled+=( ${tests_nonroot[@]} ) else - [[ $cvs -gt 0 ]] && \ + [[ ${cvs} -gt 0 ]] && \ has_version dev-vcs/cvs && \ - let cvs=$cvs+1 - [[ $cvs -gt 1 ]] && \ + let cvs=${cvs}+1 + [[ ${cvs} -gt 1 ]] && \ has_version "dev-vcs/cvs[server]" && \ - let cvs=$cvs+1 - if [[ $cvs -lt 3 ]]; then + let cvs=${cvs}+1 + if [[ ${cvs} -lt 3 ]]; then einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" - disabled+=" ${tests_cvs}" + disabled+=( ${tests_cvs[@]} ) fi fi if ! use perl ; then einfo "Disabling tests that need Perl" - disabled+=" ${tests_perl}" + disabled+=( ${tests_perl[@]} ) fi einfo "Disabling tests that fail with SVN 1.7" - disabled+=" ${test_svn}" + disabled+=( ${test_svn[@]} ) # Reset all previously disabled tests - cd "${S}/t" + pushd t &>/dev/null || die + local i 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" + 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 + -i Makefile || die # Clean old results first, must always run - cd "${S}/t" nonfatal git_emake clean + popd &>/dev/null || die # Now run the tests, keep going if we hit an error, and don't terminate on # failure - cd "${S}" + local rc einfo "Start test run" #MAKEOPTS=-j1 nonfatal git_emake --keep-going test rc=$? # Display nice results, now print the results - cd "${S}/t" + pushd t &>/dev/null || die nonfatal git_emake aggregate-results # And bail if there was a problem - [ $rc -eq 0 ] || die "tests failed. Please file a bug." + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug." } showpkgdeps() { -- cgit v1.2.3