diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2015-05-30 21:36:37 +0300 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2015-05-30 21:36:37 +0300 |
commit | 49b90de8a5b54365da42526d4883cabe319476cc (patch) | |
tree | 9e08ae3527ac585dd7c392371a3facd615bddf6a | |
parent | 743134cf109e20a8e9e60c49def55aef3eee33e6 (diff) |
[git] added new ebuild
-rw-r--r-- | dev-vcs/git/Manifest | 3 | ||||
-rw-r--r-- | dev-vcs/git/git-2.4.2.ebuild | 647 |
2 files changed, 650 insertions, 0 deletions
diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest index b59e1142..b3c5fad2 100644 --- a/dev-vcs/git/Manifest +++ b/dev-vcs/git/Manifest @@ -4,13 +4,16 @@ DIST git-2.2.2.tar.xz 3592264 SHA256 aa6d2efcc0c7bb9b9edc6d56d90921706b833972f1d DIST git-2.3.0.tar.xz 3608648 SHA256 94b23a14d66df536cfe7de37551f55acf908f8bddf30a0f5325a255bb57b0aca SHA512 4be85d3ba3ffac6c55cce648ab6c0a6fe89164e9657480aeee0def79289dbcba486722756b1729d0cedda6012cd582b88129d483ce916bfe06cde5a423f05bc7 WHIRLPOOL d08762cf37536a347aabb2916dce9d482313c41a180b5c440481d9574e9a6c482eb18e0055410171478010e647ae353d70f7113fa07fd8d74bb77909e327ea75 DIST git-2.3.1.tar.xz 3609908 SHA256 1acc4b051576143eb41d80f5675476629588c7c5fb4e6a1dc2c4590f47c498b7 SHA512 f113a9e8c7f9879088de6fa6bfbe9363f25eac279d5eb218ea1f5186cd1c45609760f498a5c066196b3a6e15dd931960e94dcdc14685e8ef1c5c72524113c0cf WHIRLPOOL f1c15ded4f4785d244a5242c823fcf8d63d1c3408c1a1696c99926fdbcab76e23e40d3ee8225925e786ce8eae7597a73a7f9f6cd8e5f1ef7d599ac8b254f9951 DIST git-2.4.0.tar.xz 3681516 SHA256 b33438dd94659958a74850aacae4a2b3a626baec36d7f29c266130b08045bb24 SHA512 0114c5d0dbfeed46e0ba1c8c0da463c52cae6954238547502f44d9050af0d921906beea96ff2c5f56a7c822200d9daa0f1d040f883c701b88a23ec81ac777138 WHIRLPOOL 1f4667b295e541d4f035de9e415636f317f590e104119a1b212cb321f25120df31e45ba88470ee883d1ea9a0033f2b307981c9d9e5807919475dbc5f81b6b22e +DIST git-2.4.2.tar.xz 3683880 SHA256 4801ec1cd8c2175b58cfdbc721d0bf50d74ae226f36905fceb894c2fb620c9e5 SHA512 0013069b73572fd764489222ad94cf94b9e08fc65223187a300e6662fb56b27dceea0b3a473cf8630793a5bf0c87e3b63264936bc38b66f71c6a548912540326 WHIRLPOOL 52d2fcd44c4da3f0e1f2caa229e1086b92022b992e410f3c20344f527f3cb9a623d3f0b6a8d5d66f3e4f43b9677f0211ebbaaffe85a621b784af1f5bc3f5896c DIST git-htmldocs-2.2.1.tar.xz 975488 SHA256 dee32b06ecf26044169adf40d95cb301c4219416a65c94b89c6513a80f03863b SHA512 68843b883e2fd4f14646ff97ba9e5f3fd4de9f6bbf57a40e9c1bceb6578ebf497e50f2b808fdb4174966e26bf9ac068b44cfdf111652d15796f4f84a7406d336 WHIRLPOOL 771af06f8663eaaa6de4d117277ea05680671c6d72010653ad8e2b037b7a8d77b4a3733b6c48e4775971304b680d0df2596ed1cb4eedbf9948135912ac9509a3 DIST git-htmldocs-2.2.2.tar.xz 976312 SHA256 41179ff0816189d583f290a227a73788002a319c7ff8c5cada970878c50b901d SHA512 b51b7d619e82d83b4f0b90d31bfccc30291a5beb48b2f5e5e59e75e91e5d772e89b560534a683648cd5480f4bf241f733efc87b30062ef5bb003bf0b5dbeed7f WHIRLPOOL c9dc7ac1a40559e4306d7d97a1619a272faf83d8b05c5a11f5f7b010566cd02fe853fee7eb550c6ccf744db446966a9696f9eb6feeee7ce4f976c6aa88b097d2 DIST git-htmldocs-2.3.0.tar.xz 980936 SHA256 e8e202bae7a89f22a815e15753e9742f2e140b3c0ca548e9a831cfdbfad3a873 SHA512 c4d226784d89469c8faa72f29ab87594682ba46b1887769e29f87ce0db1ac241c9568a8b1530e6d28d43a9861acf803f93dddcc1db59cbe97e21d7b9e374c565 WHIRLPOOL 5bb37b7e7b317ffbf842616b00caad54d4594748726063d2b66c2ccc5fc125a88001506ddff63b15ebaccd7e8a96399bad383eec13dbd8bdc40d5cf7f8696e2b DIST git-htmldocs-2.3.1.tar.xz 981748 SHA256 03bfc92c813a5cbbb34b61fdd7b9cf1226ad9b2b8388d24c649d915df3b93dad SHA512 da371b5a2b73a60681cd6f3b5385bee2668e0d617788194e454a531c2dab652c9b70920cb307858eb5ba15fd0c2d24635862e8f432946b0e9dfee8ee3fcb731a WHIRLPOOL 9334037067d797fd02ae0fd9f6d400ee14d68246755ac48e5897b404214923417728b04added2e05cb52cdc345b3ac9975752507e1e1278cedd74a33cac64b1b DIST git-htmldocs-2.4.0.tar.xz 990744 SHA256 70ee1fdb70507c74832ac021e8940c8249d9b69f2b86aeaf0888ae41772e93a7 SHA512 03837e671a08f08ab7bd70676e234995b44a53ce27c648c50a6dd5ff97ba4400beb3d4b7874d6c8bde3a00624a7c2dc15d15299eb7ad9874d7dfd722f2c2256a WHIRLPOOL 4877dd0c5fb94f032d11d5d22a3e90e8352f68afb50400eca8c2f42e72adf40c7b9878c7998cacf16ed2011b85f965bcc5c44ecb3fd931783bd07b75b84b800b +DIST git-htmldocs-2.4.2.tar.xz 992192 SHA256 792cfc6c8236fdb58dfd66e39766c7b8097080361eed28443207bc6c36e07911 SHA512 e9790b698c50a09724ec9c71001a70f2a6a7094b72326f290f3b5c7b274181f331fdbb71cb4e2db9edf1229ae534a715b2974424b89d515b901b074bdeb30b66 WHIRLPOOL ef3de3704e7c0e34174b1e16f0837c52d9ce9d64c0f61c417a52811ca623ae17304a2b9d484457569d635a269b4dedb3e940bf0fa7d3db1bc4f744bf1d392ff1 DIST git-manpages-2.2.1.tar.xz 369796 SHA256 00f8357fd8ab9e3b397dd087b20d405ed141765d04f3f2162e65fdec7cb1e538 SHA512 9fea3a61afa7336c7da9a4c9c130ed4dd05bb3b5b1cc7fe5a3953109085169d9fb92aafd2b932e6b66ad93ac46e3b60ea05c0f311a8178b53bc1c2184773ada5 WHIRLPOOL f5d1f4d47a2bc244beb3a343db37fe6898fc121310cd6bec0d3292a3352a3c86e16b3538b22317419c760870fb511120a3b03c7bc0585bfaa15c1c7418a4e8ac DIST git-manpages-2.2.2.tar.xz 369876 SHA256 d30688bb62763bf1b87f5eaf4c0a66c68999e479ccd2963108a5f6f82138147c SHA512 5c2220bb09f199ad4fe5c1bc20a813a6c62daab5e6e7fa87bf24861d25b7f7e0fdde215c4f59d8895badd7c361ed202e7837de48d2d54a155d24759db39dd4e1 WHIRLPOOL 45acc45663f13faf5b8197516bb934723bf84cd6db929443e2bd9fc3a915baf258ee93e782741e088a5f799115ea4ee6043225fc9ea9ec954feed21ba54c9be4 DIST git-manpages-2.3.0.tar.xz 370864 SHA256 1641d4fb67159961b4c295d2d5a05954bae19ebcaaa67728b6d72b70020b7842 SHA512 aa54b9fd96831a690848ef6df708d45999f03bc45aab3600bf578c998bbb225f54a8999ee5012996cb9d6f28d0d18c97209329cfba557b86d3dd0da7a23b1c1b WHIRLPOOL 817db829cd9e9eba93dc537531fd861278baa410d5a9aca09b2010f299d87c744b8a20d707052c6f8d470a5be74dba7a3bba3d20390915cc2a3eed47e84acb75 DIST git-manpages-2.3.1.tar.xz 370756 SHA256 c58b033af1b26baba78ffc940f4f5a0f16c3491a3f5708375d0bcf0d8031a940 SHA512 391ecf5e38921c9494b5f94e8f59d62f509934d1ef10f3b582632255a2bc62cbc894aa1bcd3018eb619516c1834b95bf7acbab6d73f859dbdcab094588fd4b61 WHIRLPOOL 01ed334a73bbb57c977e7f96fd63a7196b88be5560166df78c7250aa98e04dd48558a9775ddffba34d7c23318bc7d89eb53d06fae38b027349cdaabd39f107f2 DIST git-manpages-2.4.0.tar.xz 372716 SHA256 b616dc6aa02dcac312e6aeae7af148913f76e1f851ba03ba340b4d2db316ecc7 SHA512 158bff66b9f73fc72d3ac6ac3246bebf831551c0ff1e9571913b952f5b891407ab4408ca2daa247869e50d43bb2e951eed6fdb3c39708c769630bbfc618f0efb WHIRLPOOL afed2ad93d6cf3deb571839d268a9aea66d4c2c8571b85a377a6ecd866df8ec8d07d22b65ddb9bc49ec7f16f8c9ecc54e936cd35325f2270264ae8d42e708b01 +DIST git-manpages-2.4.2.tar.xz 372804 SHA256 1b1830e804725e90ff319d801ab25f84ad956564379ef976bdc91bd58b743c32 SHA512 52f28cd537fc9fd34acad8834aa05d7d758e2f639df18b978effb676d5dbb660c99764075eb216c6377adb14b0b2d58584c8b3f635442bd4ded36a31b8757dc4 WHIRLPOOL f30b9293aa594111ce4baa46fee474b114199cc691ae43dea565a346f8ad7eb2cd72574bd6ddf9d5b32af020ad6032778cef3610ccac74d0f94be965b335962f diff --git a/dev-vcs/git/git-2.4.2.ebuild b/dev-vcs/git/git-2.4.2.ebuild new file mode 100644 index 00000000..4b3417c8 --- /dev/null +++ b/dev-vcs/git/git-2.4.2.ebuild @@ -0,0 +1,647 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_7 ) +[[ ${PV} == *9999 ]] && SCM="git-2" +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" +EGIT_MASTER=pu + +SAB_PATCHES_SRC=( "mirror://kogaion/dev-vcs/git/git-2.2.2-Gentoo-patches.tar.gz" ) +inherit sab-patches toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM} + +MY_PV="${PV/_rc/.rc}" +MY_P="${PN}-${MY_PV}" + +DOC_VER=${MY_PV} + +DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="xz" + SRC_URI_GOOG="http://git-core.googlecode.com/files" + SRC_URI_KORG="mirror://kernel/software/scm/git" + SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + doc? ( + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + )" + KEYWORDS="~amd64 ~x86" +fi + +sab-patches_update_SRC_URI + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + dev-libs/openssl:0= + sys-libs/zlib + pcre? ( dev-libs/libpcre ) + perl? ( dev-lang/perl:=[-build(-)] ) + tk? ( dev-lang/tk:= ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) + gnome-keyring? ( gnome-base/libgnome-keyring )" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + mediawiki? ( + dev-perl/HTML-Tree + dev-perl/MediaWiki-API + ) + perl? ( dev-perl/Error + dev-perl/Net-SMTP-SSL + dev-perl/Authen-SASL + cgi? ( virtual/perl-CGI highlight? ( app-text/highlight ) ) + cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite ) + subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) + ) + python? ( gtk? + ( + >=dev-python/pygtk-2.8[${PYTHON_USEDEP}] + >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}] + ) + ${PYTHON_DEPS} )" + +# This is how info docs are created with Git: +# .txt/asciidoc --(asciidoc)---------> .xml/docbook +# .xml/docbook --(docbook2texi.pl)--> .texi +# .texi --(makeinfo)---------> .info +DEPEND="${CDEPEND} + doc? ( + app-text/asciidoc + app-text/docbook2X + sys-apps/texinfo + app-text/xmlto + ) + nls? ( sys-devel/gettext ) + test? ( app-crypt/gnupg )" + +# Live ebuild builds man pages and HTML docs, additionally +if [[ ${PV} == *9999 ]]; then + DEPEND="${DEPEND} + app-text/asciidoc" +fi + +SITEFILE=50${PN}-gentoo.el +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + cgi? ( perl ) + cvs? ( perl ) + mediawiki? ( perl ) + subversion? ( perl ) + webdav? ( curl ) + gtk? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +pkg_setup() { + if use subversion && has_version "dev-vcs/subversion[dso]"; then + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" + ewarn "with USE=dso, there may be weird crashes in git-svn. You" + ewarn "have been warned." + fi + if use python ; then + python-single-r1_pkg_setup + fi +} + +# This is needed because for some obscure reasons future calls to make don't +# pick up these exports if we export them in src_unpack() +exportmakeopts() { + local myopts + + if use blksha1 ; then + myopts+=" BLK_SHA1=YesPlease" + elif use ppcsha1 ; then + myopts+=" PPC_SHA1=YesPlease" + fi + + if use curl ; then + use webdav || myopts+=" NO_EXPAT=YesPlease" + else + myopts+=" NO_CURL=YesPlease" + fi + + # broken assumptions, because of broken build system ... + myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease" + myopts+=" INSTALL=install TAR=tar" + myopts+=" SHELL_PATH=${EPREFIX}/bin/sh" + myopts+=" SANE_TOOL_PATH=" + myopts+=" OLD_ICONV=" + myopts+=" NO_EXTERNAL_GREP=" + + # For svn-fe + extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')" + + # can't define this to null, since the entire makefile depends on it + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile + + use iconv \ + || myopts+=" NO_ICONV=YesPlease" + use nls \ + || myopts+=" NO_GETTEXT=YesPlease" + use tk \ + || myopts+=" NO_TCLTK=YesPlease" + use pcre \ + && myopts+=" USE_LIBPCRE=yes" \ + && extlibs+=" -lpcre" + use perl \ + && myopts+=" INSTALLDIRS=vendor" \ + || myopts+=" NO_PERL=YesPlease" + use python \ + || myopts+=" NO_PYTHON=YesPlease" + use subversion \ + || myopts+=" NO_SVN_TESTS=YesPlease" + use threads \ + && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \ + || myopts+=" NO_PTHREADS=YesPlease" + use cvs \ + || myopts+=" NO_CVS=YesPlease" +# Disabled until ~m68k-mint can be keyworded again +# if [[ ${CHOST} == *-mint* ]] ; then +# myopts+=" NO_MMAP=YesPlease" +# myopts+=" NO_IPV6=YesPlease" +# myopts+=" NO_STRLCPY=YesPlease" +# myopts+=" NO_MEMMEM=YesPlease" +# myopts+=" NO_MKDTEMP=YesPlease" +# myopts+=" NO_MKSTEMPS=YesPlease" +# fi + if [[ ${CHOST} == ia64-*-hpux* ]]; then + myopts+=" NO_NSEC=YesPlease" + fi + if [[ ${CHOST} == *-*-aix* ]]; then + myopts+=" NO_FNMATCH_CASEFOLD=YesPlease" + fi + if [[ ${CHOST} == *-solaris* ]]; then + myopts+=" NEEDS_LIBICONV=YesPlease" + fi + + has_version '>=app-text/asciidoc-8.0' \ + && myopts+=" ASCIIDOC8=YesPlease" + myopts+=" ASCIIDOC_NO_ROFF=YesPlease" + + # Bug 290465: + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' + [[ "${CHOST}" == *-uclibc* ]] && \ + myopts+=" NO_NSEC=YesPlease" + + export MY_MAKEOPTS="${myopts}" + export EXTLIBS="${extlibs}" +} + +src_unpack() { + if [[ ${PV} != *9999 ]]; then + unpack ${MY_P}.tar.${SRC_URI_SUFFIX} + cd "${S}" + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + use doc && \ + cd "${S}"/Documentation && \ + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + cd "${S}" + else + git-2_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + + sab-patches_unpack +} + +src_prepare() { + # bug #350330 - automagic CVS when we don't want it is bad. + # git-...-optional-cvs.patch + + # git-...-mw-vendor.patch + # git-...-svn-fe-linking.patch + sab-patches_apply_all + + epatch_user + + sed -i \ + -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \ + -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \ + -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \ + -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \ + -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ + -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ + Makefile contrib/svn-fe/Makefile || die "sed failed" + + # Never install the private copy of Error.pm (bug #296310) + sed -i \ + -e '/private-Error.pm/s,^,#,' \ + perl/Makefile.PL + + # Fix docbook2texi command + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ + Documentation/Makefile || die "sed failed" + + # Fix git-subtree missing DESTDIR + sed -i \ + -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ + -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ + contrib/subtree/Makefile +} + +git_emake() { + # bug #326625: PERL_PATH, PERL_MM_OPT + # bug #320647: PYTHON_PATH + PYTHON_PATH="" + use python && PYTHON_PATH="${PYTHON}" + emake ${MY_MAKEOPTS} \ + DESTDIR="${D}" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ + OPTCC="$(tc-getCC)" \ + OPTAR="$(tc-getAR)" \ + prefix="${EPREFIX}"/usr \ + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ + sysconfdir="${EPREFIX}"/etc \ + PYTHON_PATH="${PYTHON_PATH}" \ + PERL_MM_OPT="" \ + GIT_TEST_OPTS="--no-color" \ + V=1 \ + "$@" + # This is the fix for bug #326625, but it also causes breakage, see bug + # #352693. + # PERL_PATH="${EPREFIX}/usr/bin/env perl" \ +} + +src_configure() { + exportmakeopts +} + +src_compile() { + if use perl ; then + git_emake perl/PM.stamp || die "emake perl/PM.stamp failed" + git_emake perl/perl.mak || die "emake perl/perl.mak failed" + fi + git_emake || die "emake failed" + + if use emacs ; then + elisp-compile contrib/emacs/git{,-blame}.el + fi + + if use perl && use cgi ; then + git_emake \ + gitweb/gitweb.cgi \ + || die "emake gitweb/gitweb.cgi failed" + fi + + if [[ ${CHOST} == *-darwin* ]]; then + cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain" + git_emake || die "emake credential-osxkeychain" + fi + + cd "${S}"/Documentation + if [[ ${PV} == *9999 ]] ; then + git_emake man \ + || die "emake man failed" + if use doc ; then + git_emake info html \ + || die "emake info html failed" + fi + else + if use doc ; then + git_emake info \ + || die "emake info html failed" + fi + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + # by defining EXTLIBS we override the detection for libintl and + # libiconv, bug #516168 + local nlsiconv= + use nls && use !elibc_glibc && nlsiconv+=" -lintl" + use iconv && use !elibc_glibc && nlsiconv+=" -liconv" + git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed" + if use doc ; then + git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed" + fi + cd "${S}" + fi + + if use gnome-keyring ; then + cd "${S}"/contrib/credential/gnome-keyring + git_emake || die "emake git-credential-gnome-keyring failed" + fi + + cd "${S}"/contrib/subtree + git_emake + use doc && git_emake doc + + if use mediawiki ; then + cd "${S}"/contrib/mw-to-git + git_emake + fi +} + +src_install() { + git_emake \ + install || \ + die "make install failed" + + if [[ ${CHOST} == *-darwin* ]]; then + dobin contrib/credential/osxkeychain/git-credential-osxkeychain + fi + + # Depending on the tarball and manual rebuild of the documentation, the + # manpages may exist in either OR both of these directories. + if ! use cvs; then + find man? -name "*git*cvs*" | xargs rm + fi + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] + + dodoc README Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html + for d in / /howto/ /technical/ ; do + docinto ${d} + dodoc Documentation${d}*.txt + use doc && dohtml -p ${d} Documentation${d}*.html + done + docinto / + # Upstream does not ship this pre-built :-( + use doc && doinfo Documentation/{git,gitman}.info + + newbashcomp contrib/completion/git-completion.bash ${PN} + bashcomp_alias git gitk + # Not really a bash-completion file (bug #477920) + # but still needed uncompressed (bug #507480) + insinto /usr/share/${PN} + doins contrib/completion/git-prompt.sh + + if use emacs ; then + elisp-install ${PN} contrib/emacs/git.{el,elc} + elisp-install ${PN} contrib/emacs/git-blame.{el,elc} + #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} + # don't add automatically to the load-path, so the sitefile + # can do a conditional loading + touch "${ED}${SITELISP}/${PN}/compat/.nosearch" + elisp-site-file-install "${FILESDIR}"/${SITEFILE} + fi + + if use python && use gtk ; then + python_doscript "${S}"/contrib/gitview/gitview + dodoc "${S}"/contrib/gitview/gitview.txt + fi + + #dobin contrib/fast-import/git-p4 # Moved upstream + #dodoc contrib/fast-import/git-p4.txt # Moved upstream + newbin contrib/fast-import/import-tars.perl import-tars + exeinto /usr/libexec/git-core/ + newexe contrib/git-resurrect.sh git-resurrect + + # git-subtree + cd "${S}"/contrib/subtree + git_emake install || die "Failed to emake install git-subtree" + if use doc ; then + git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree" + fi + newdoc README README.git-subtree + dodoc git-subtree.txt + cd "${S}" + + if use mediawiki ; then + cd "${S}"/contrib/mw-to-git + git_emake install + cd "${S}" + fi + + # diff-highlight + dobin contrib/diff-highlight/diff-highlight + newdoc contrib/diff-highlight/README README.diff-highlight + + # git-jump + exeinto /usr/libexec/git-core/ + doexe contrib/git-jump/git-jump + newdoc contrib/git-jump/README git-jump.txt + + # git-contacts + exeinto /usr/libexec/git-core/ + doexe contrib/contacts/git-contacts + dodoc contrib/contacts/git-contacts.txt + + if use gnome-keyring ; then + cd "${S}"/contrib/credential/gnome-keyring + dobin git-credential-gnome-keyring + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + use doc && doman svn-fe.1 && dohtml svn-fe.html + cd "${S}" + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # credential/gnome-keyring TODO + # diff-highlight - done above + # emacs - installed above + # examples - these are stuff that is not used in Git anymore actually + # git-jump - done above + # gitview - installed above + # p4import - excluded because fast-import has a better one + # patches - stuff the Git guys made to go upstream to other places + # persistent-https - TODO + # mw-to-git - TODO + # subtree - build seperately + # svnimport - use git-svn + # thunderbird-patch-inline - fixes thunderbird + for i in \ + buildsystems convert-objects fast-import \ + hg-to-git hooks remotes2config.sh rerere-train.sh \ + stats workdir \ + ; do + cp -rf \ + "${S}"/contrib/${i} \ + "${ED}"/usr/share/${PN}/contrib \ + || die "Failed contrib ${i}" + done + + if use perl && use cgi ; then + # We used to install in /usr/share/${PN}/gitweb + # but upstream installs in /usr/share/gitweb + # so we will install a symlink and use their location for compat with other + # distros + dosym /usr/share/gitweb /usr/share/${PN}/gitweb + + # INSTALL discusses configuration issues, not just installation + docinto / + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb + newdoc "${S}"/gitweb/README README.gitweb + + find "${ED}"/usr/lib64/perl5/ \ + -name .packlist \ + -exec rm \{\} \; + else + rm -rf "${ED}"/usr/share/gitweb + fi + + if ! use subversion ; then + rm -f "${ED}"/usr/libexec/git-core/git-svn \ + "${ED}"/usr/share/man/man1/git-svn.1* + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/git-daemon.xinetd git-daemon + fi + + if use !prefix ; then + newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon + newconfd "${FILESDIR}"/git-daemon.confd git-daemon + systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service" + systemd_dounit "${FILESDIR}/git-daemon.socket" + fi + + perl_delete_localpod + + # burn CVS with fire, see #373439 + if ! use cvs; then + rm -r "${ED}"/usr/bin/git-cvsserver \ + "${ED}"/usr/libexec/git-core/git-cvs* || die + fi +} + +src_test() { + local disabled="" #t7004-tag.sh" #520270 + local tests_cvs="t9200-git-cvsexportcommit.sh \ + t9400-git-cvsserver-server.sh \ + t9401-git-cvsserver-crlf.sh \ + t9402-git-cvsserver-refs.sh \ + t9600-cvsimport.sh \ + t9601-cvsimport-vendor-branch.sh \ + t9602-cvsimport-branches-tags.sh \ + t9603-cvsimport-patchsets.sh \ + t9604-cvsimport-timestamps.sh" + local tests_perl="t3701-add-interactive.sh \ + t5502-quickfetch.sh \ + t5512-ls-remote.sh \ + t5520-pull.sh \ + t7106-reset-unborn-branch.sh \ + t7501-commit.sh" + # Bug #225601 - t0004 is not suitable for root perm + # Bug #219839 - t1004 is not suitable for root perm + # t0001-init.sh - check for init notices EPERM* fails + local tests_nonroot="t0001-init.sh \ + t0004-unwritable.sh \ + t0070-fundamental.sh \ + t1004-read-tree-m-u-wf.sh \ + t3700-add.sh \ + t7300-clean.sh" + # t9100 still fails with symlinks in SVN 1.7 + local test_svn="t9100-git-svn-basic.sh" + + # Unzip is used only for the testcase code, not by any normal parts of Git. + if ! has_version app-arch/unzip ; then + einfo "Disabling tar-tree tests" + disabled="${disabled} t5000-tar-tree.sh" + fi + + cvs=0 + use cvs && let cvs=$cvs+1 + if [[ ${EUID} -eq 0 ]]; then + if [[ $cvs -eq 1 ]]; then + ewarn "Skipping CVS tests because CVS does not work as root!" + ewarn "You should retest with FEATURES=userpriv!" + disabled="${disabled} ${tests_cvs}" + fi + einfo "Skipping other tests that require being non-root" + disabled="${disabled} ${tests_nonroot}" + else + [[ $cvs -gt 0 ]] && \ + has_version dev-vcs/cvs && \ + let cvs=$cvs+1 + [[ $cvs -gt 1 ]] && \ + has_version "dev-vcs/cvs[server]" && \ + let cvs=$cvs+1 + if [[ $cvs -lt 3 ]]; then + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" + disabled="${disabled} ${tests_cvs}" + fi + fi + + if ! use perl ; then + einfo "Disabling tests that need Perl" + disabled="${disabled} ${tests_perl}" + fi + + einfo "Disabling tests that fail with SVN 1.7" + disabled="${disabled} ${test_svn}" + + # Reset all previously disabled tests + cd "${S}/t" + for i in *.sh.DISABLED ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" + done + einfo "Disabled tests:" + for i in ${disabled} ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" + done + + # Avoid the test system removing the results because we want them ourselves + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \ + -i "${S}"/t/Makefile + + # Clean old results first, must always run + cd "${S}/t" + nonfatal git_emake clean + + # Now run the tests, keep going if we hit an error, and don't terminate on + # failure + cd "${S}" + einfo "Start test run" + #MAKEOPTS=-j1 + nonfatal git_emake --keep-going test + rc=$? + + # Display nice results, now print the results + cd "${S}/t" + nonfatal git_emake aggregate-results + + # And bail if there was a problem + [ $rc -eq 0 ] || die "tests failed. Please file a bug." +} + +showpkgdeps() { + local pkg=$1 + shift + elog " $(printf "%-17s:" ${pkg}) ${@}" +} + +pkg_postinst() { + use emacs && elisp-site-regen + einfo "Please read /usr/share/bash-completion/git for Git bash command completion" + einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt" + einfo "Note that the prompt bash code is now in that separate script" + elog "These additional scripts need some dependencies:" + echo + showpkgdeps git-quiltimport "dev-util/quilt" + showpkgdeps git-instaweb \ + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" + echo +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |