From 9b2a5dea5b2053d930b8acce03893f1d1025f39f Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Thu, 22 Nov 2018 01:04:38 +0100 Subject: dev-vcs/git: Bump to versions 2.19.2 and 2.20.0_rc1 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Lars Wendler --- dev-vcs/git/Manifest | 9 +- dev-vcs/git/git-2.19.2.ebuild | 706 ++++++++++++++++++++++++++++++++++++++ dev-vcs/git/git-2.20.0_rc0.ebuild | 706 -------------------------------------- dev-vcs/git/git-2.20.0_rc1.ebuild | 706 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 1418 insertions(+), 709 deletions(-) create mode 100644 dev-vcs/git/git-2.19.2.ebuild delete mode 100644 dev-vcs/git/git-2.20.0_rc0.ebuild create mode 100644 dev-vcs/git/git-2.20.0_rc1.ebuild (limited to 'dev-vcs') diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest index 45cfd5028085..915161c03867 100644 --- a/dev-vcs/git/Manifest +++ b/dev-vcs/git/Manifest @@ -4,18 +4,21 @@ DIST git-2.18.0.tar.xz 5102264 BLAKE2B 94a8469a0e489d517136233301f1af622a3e61296 DIST git-2.18.1.tar.xz 5102812 BLAKE2B 43ec86d9aebc73a582f2117ef1c26a6dc820f81ff389a6239ed6e3ea5fd2be0bac54766c3ab8ad1cc9730978e5b73997bb20b24b9f3f43d6eef06bea8a9174c3 SHA512 06bdc54c4ff78b77667b917f2aa46a803bd6561236f4177f41b8730785b5f90f8ca705f028131f9365fb0aae2e51cd92c97380141e97c026c96a020e00b992e1 DIST git-2.19.0.tar.xz 5227124 BLAKE2B f917b9ca8325ffbdec7d8614fec3874a09b5d3c421a0179f6c77def7e11f5853d821933b13687087b05791531e194178e1e63f51739ece91e32dddb07a127a0b SHA512 305e51f8e22d96847fcdf4169340795aacaf5f4c5b8052cda860a668059d9ef35bb2840c278b7207f3b9f0e1c32915719649edc20bd3cd33b53e97a06159ceac DIST git-2.19.1.tar.xz 5227908 BLAKE2B 1702662d7eea2ea5fa9d697eece19bee8a451abb1e85b1c7b111b4126e97340ee0c5691faf37c2d9fbe13bdf4ea894d8a3e0e2f7208e7bce111e53d1da81ef5f SHA512 a1bc1032b1de9eb9ea8b7c385cd009f64247e13066e0a91e9682e35400ded05f88c23b523cca4782f57544060d6ba0f9d3bec944399cda5771a4945c38bb9b98 -DIST git-2.20.0.rc0.tar.xz 5315852 BLAKE2B 7fac3c1b9547e6e373d6897d3101c13f9c48c01163323d7f8650b2f939a166c476681917a6d9c5f6518def61ec27fbe83a465c0bc8f97b7d3629a51b91d08bd8 SHA512 cd1862360f31513a7e4c0174d5a30733caa82c8fb61a679983cc5970b9cdd3159e9c8bc6407fcf052387b1b22773dc2fc4d85a8211c319c5621e882e0b86785a +DIST git-2.19.2.tar.xz 5235608 BLAKE2B ece292b8cf41deafc63c00e6176b0de39936f7d840d776192f32c1e293abc06c39119d13ed947d3de6a212fa6973bedb288c06f8bfcfc8144e563d5af40e45da SHA512 1d707c1a7a16fe9399592b0354e9023f701b019f36fe775997c46354d40617a80fa04aacc5330825c4f9301c2910ead8b26274a7f3b92e9d790b4705c0d7aa96 +DIST git-2.20.0.rc1.tar.xz 5318308 BLAKE2B 0297ab2c439ede2098da02a96886c0db67017dc0e18f39e1ffd857cd49d23c54920b478bd2feb03ab8c3fce3eae5ce07e49a8ce3c3dd80868c37070a6f0ed22d SHA512 e00eb0c33dfff8c63170915693032346e52bc6b8410c528b43372d9aef16287e0c2891214d64ce21cab9d393524bda3037961e2f6f07a09532451ef8fa2a63d2 DIST git-htmldocs-2.16.4.tar.xz 1164256 BLAKE2B 88a7ab5b094f15bc2b6c0f4d4c3eae185f6e6c0f00f4aca75492f0cc964428d1bf53002e0e43468b60b62058af5f13b061231061247e19b32bc70c2c8adb04eb SHA512 8f4a8c51656559af81296fb064ecf0f88444952c7f8ee91b85e5a61b20d200267d7432f720ded12046bab986361cff48cf7a2f5d21e05c1ac7648cc3168a0049 DIST git-htmldocs-2.16.5.tar.xz 1164600 BLAKE2B 303f5543a420a78b7731aee7b9977361130edfdcffbf67e3ad652ac1243a22aa13d883337466e95a186977e34a2989f5639af7acd7c0187219b200cf966a83ef SHA512 00ed040e665e817a0543768bb290c47dd553581a18b136a59ca37e656c538f49716e79a533c5063c2a00f16f7ad021a5836f71b805200df07bb8a3923aacddfb DIST git-htmldocs-2.18.0.tar.xz 1201076 BLAKE2B f5d592cadf1eb9a24b6d6fb3c68c1ead385a350e4bfc97eee775f1921c7bf47f8790d1eea803d69cde8e381d7aa0ae4c53aebeda464c32cdd7a6558a46a9c8e7 SHA512 e227673216b67cf0e5d0abacc305a3b2a30844a6fe31aab18e37643f27c0fce7d3628366732f1518784d095eb33c1bb60b4eb00024d9ccc662deca2962db5324 DIST git-htmldocs-2.18.1.tar.xz 1201604 BLAKE2B ae33ac1ec8d2c95f95dbc5965d191f093628633c047c7d52371b7a3142807a4b878be5abcd13a934a453a5b35abb4a7e0ea49823e98c4a682040afc8d7c0817d SHA512 5310a846091bfa66609ce896bdce163bd84f40c14400a53eab662f0c28037b98fef4a8766a716694a5bf9549793a85b57cb665194dff5612277c6603452ea512 DIST git-htmldocs-2.19.0.tar.xz 1221804 BLAKE2B c3c1e91b05bb5fc777f97973941c97b8c093a94d4dc308527bc6bea7b6cc787bb939d4a5a978a69f1476da8e334f17393bf56a8de64b7e5bd88544d32f858f40 SHA512 61c6c1d64affa2f910c0c01a14f19f49ef496e1a09c223f7fb454031a6388dcd96c69c362e0da167a2e4bf1347d4c30e55d9c476076f1ab8e278f9af07053745 DIST git-htmldocs-2.19.1.tar.xz 1222052 BLAKE2B 6d63364e0c5c700011ab0b7bc9c207560bc89e6d58e5f8025f30a188b7c90fa1ca58822e0ee129ff531c0702fc0a64e1612b8ff7b41102e5db21eadd0fd01ab9 SHA512 40417e80b291a935be78f143f070c68a9a865b6825f85cddd57cf926c25649630dd6612e7e52edb3ab4d1433aca31d38e3b9c95ff5d52827452d03c96e50e344 -DIST git-htmldocs-2.20.0.rc0.tar.xz 1225208 BLAKE2B 27bfb547aebccff7fccc5c7eaacfe4ee0740f8cb949493c8fcf3f3059e632bc3d66700532cccf6b9c58590345772ad6cf6ab5562b355429428c9c30d5fb7dac2 SHA512 16f655ebf136c8ca60ea1121a4b253f8a341ec94ab0be5f45c4fe28719a09d5effe690c86eac50056017ba101126a4701f7e6b6f185592ab2dfc88a0f051fe0a +DIST git-htmldocs-2.19.2.tar.xz 1223848 BLAKE2B 6f30192cb101988fdfcce3bb79c684c6d1ac08cdc929caa049102fba10277fa8cc908904fe7472e40d60707c1b23145d95c441c1401c8697c37a81456d79aab8 SHA512 830e780beea10bde750d09a335fd9986c5ffbf47a724cbbeed5a1a2c94bc81d9c9223e415c5888faf81ab6404e460565434988f6635312039b88282a46014634 +DIST git-htmldocs-2.20.0.rc1.tar.xz 1226408 BLAKE2B 8d3d868acb6b5bb1d6aecbf64ef05d481147c926f9a89052cebf1b44f7e4d387442d252ccbdb8bbb4f1311bd2699d24f0524e78b0e5e948682c01846055b2439 SHA512 db2b5d628fa1347a1295680e4d5c525614cbcba1f16fa231b5935f8ad287ee738d95d799d84209b8b14f0141a22719eecc67104fda62303723433a85a16aee14 DIST git-manpages-2.16.4.tar.xz 417136 BLAKE2B 9a75913dae62fa2eb31cf48e77e266aa8d91c67b8a753c1740283b1d626dea1e9aa8d7cea06d9b97887f801b4d1f1b927014851105cefd3241ca7ab7330bfc8b SHA512 8029e9fac1eca542e809da1247f4eec3a2c81c0eb12d03aa816dcf120677011d3e409b06c28c8e7dbf41cbbcca873ec93846dc317bc73e57f4d4701ce7abf73d DIST git-manpages-2.16.5.tar.xz 417140 BLAKE2B f7b3255fe0ac7ea82273e0718d96e045854b7d3c7ad100befac47cd005139415e56b8e0dd85293bca26f2e1ff12f729c46bfd27ede5ecdda08a1533ed43a8b2f SHA512 38ec66e43055f7121bace4655350e9b617b5586271c4ae73d15966e52e56ac38bec2f5f7f128410d004a2a0db3db9954fcfec1d78eb49579a74a46b404b67396 DIST git-manpages-2.18.0.tar.xz 425516 BLAKE2B ff979aa0c99716da279cd4001d5907cec95e93ac93f1f2dc5dd79d456a185e0d8610a121b08b07c3c886132e94334114932881d78c7307ff287c256f993938e5 SHA512 8ae353083288e58752e6e6ff505cde6f4fa0be20465443c0517a87af28867d748eb29fc9d3dcb805b29c4e422cf4eae124b7fec5c339888ab4ebaff6360ada15 DIST git-manpages-2.18.1.tar.xz 425568 BLAKE2B fc0f8aee3d80cba0f84c4ff4cfa342ea3c1ae155f3434b6d1771e03bb14956d5ffd78a5cadfee378534f6cf85265c37eeb1be27eb7801ae798cede249640c478 SHA512 6e6e663d985ef267d556539a43c192138b31dbbc80ffaa4331b8494f6e3e74b5cd4d958c2ae963143946eaa99bfce485ee3726b510b10eaab3599b5284b5fbc1 DIST git-manpages-2.19.0.tar.xz 431832 BLAKE2B b1493e88b3836cfdbd4f709058f7b287764df52237f2dee054668ce5cd9a547553fb36f2f474debd9bc2a511e73a9967307d8a3d174651d261ddd4176a8ec766 SHA512 463cacfc58dc16d69dc9e374fb840cd2859d69e2a74575437be72159e05cc85ad6c9e89dfe2c20963fce962b9add4ad9694e84ab5792b2c30034f68d52648117 DIST git-manpages-2.19.1.tar.xz 431852 BLAKE2B e15be2e1680a28c3c57e7b6e022173ef4b006cf21b5464a32f7f7668ea2b8af2ac7ff7466d98ab627320895b92583840159e2fca613be95817656def2654edaa SHA512 1b42c39e39653906b44fbca65991da04493f08479e2162da5f593bee68dbfd3f3b8180f5a2721f1971e3218b0dc842a8a34918fc7724c032597f4fe4b2f506dc -DIST git-manpages-2.20.0.rc0.tar.xz 438900 BLAKE2B 89cacc19d34133272ba34498f6c459375a8fa51004b26ad455058575117188a5cec1a5b83645e7b806d37823e5e97858c0118db0f54583445bd31c0e386d09f8 SHA512 f4b8ecb0646be1385f41973719ab077c663033304059a733f1b5f0e562b011c6d7ec542cd9d158fb32e112733c686ad0bcf83f92aa211e8e821d5b0e0cf84f9d +DIST git-manpages-2.19.2.tar.xz 432200 BLAKE2B 92b4c87c40e20133c4b6d9b7f3d56952556470855543a329ea0fb7a91382396376755656ded029d68df8291b0ffecc3e6b2b4c6f71cb8694d44c5f02da7357f8 SHA512 329ea9a6de4a5352c57d2ea3df0cf6caf9dcf03728416a3bca5a5ebc5dc133abe1faffd5e5b5ae11cc91412baff93df83ff684f3626bbac0770ca94bc79d2cb1 +DIST git-manpages-2.20.0.rc1.tar.xz 438948 BLAKE2B d2ce985f35fa5626cf306ef049a79fc09c5c2411887d28c27da35c16cba11844e3b89c143fc45308944aaa93b12c7c4dc50575a4581ce2a70351ca53b123b05f SHA512 73a3654b1deab4481fd07615659df2f92ee56a8267a7c24a4733e0a5f57881de4ffb9e593a6104ff4bf6efb55223adada8c4bb09ae9427acfbfdbb63b24e4edd diff --git a/dev-vcs/git/git-2.19.2.ebuild b/dev-vcs/git/git-2.19.2.ebuild new file mode 100644 index 000000000000..6be8c1046a57 --- /dev/null +++ b/dev-vcs/git/git-2.19.2.ebuild @@ -0,0 +1,706 @@ +# Copyright 1999-2018 Gentoo Authors +# 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 ~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/MailTools + 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.18.0_rc1-optional-cvs.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.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 +} + +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 + + for d in "${ED%/}"/usr/lib{,64}/perl5/ ; do + if test -d "$d" ; then find "$d" \ + -name .packlist \ + -delete || die + fi + done + 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 + elog "Please read /usr/share/bash-completion/git for Git bash command completion" + elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" + elog "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.20.0_rc0.ebuild b/dev-vcs/git/git-2.20.0_rc0.ebuild deleted file mode 100644 index 6be8c1046a57..000000000000 --- a/dev-vcs/git/git-2.20.0_rc0.ebuild +++ /dev/null @@ -1,706 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# 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 ~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/MailTools - 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.18.0_rc1-optional-cvs.patch - - "${FILESDIR}"/git-2.2.0-svn-fe-linking.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 -} - -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 - - for d in "${ED%/}"/usr/lib{,64}/perl5/ ; do - if test -d "$d" ; then find "$d" \ - -name .packlist \ - -delete || die - fi - done - 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 - elog "Please read /usr/share/bash-completion/git for Git bash command completion" - elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" - elog "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.20.0_rc1.ebuild b/dev-vcs/git/git-2.20.0_rc1.ebuild new file mode 100644 index 000000000000..6be8c1046a57 --- /dev/null +++ b/dev-vcs/git/git-2.20.0_rc1.ebuild @@ -0,0 +1,706 @@ +# Copyright 1999-2018 Gentoo Authors +# 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 ~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/MailTools + 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.18.0_rc1-optional-cvs.patch + + "${FILESDIR}"/git-2.2.0-svn-fe-linking.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 +} + +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 + + for d in "${ED%/}"/usr/lib{,64}/perl5/ ; do + if test -d "$d" ; then find "$d" \ + -name .packlist \ + -delete || die + fi + done + 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 + elog "Please read /usr/share/bash-completion/git for Git bash command completion" + elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" + elog "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 +} -- cgit v1.2.3-65-gdbad