diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2013-10-15 20:30:33 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-10-15 20:30:33 +0000 |
commit | 16e48ac9c6e744f4bb5bafdfd83a87d22171f4a6 (patch) | |
tree | a7487aa50b7169f74e6084db4a18e174462b61cd /dev-vcs | |
parent | Version bump (diff) | |
download | historical-16e48ac9c6e744f4bb5bafdfd83a87d22171f4a6.tar.gz historical-16e48ac9c6e744f4bb5bafdfd83a87d22171f4a6.tar.bz2 historical-16e48ac9c6e744f4bb5bafdfd83a87d22171f4a6.zip |
Backport fixes for bug #477096: Fix git-remote-bzr file collision & bug #479628: Fix pthread usage to 1.8.3.
Package-Manager: portage-2.2.0_alpha185/cvs/Linux x86_64
Diffstat (limited to 'dev-vcs')
-rw-r--r-- | dev-vcs/git/ChangeLog | 8 | ||||
-rw-r--r-- | dev-vcs/git/Manifest | 3 | ||||
-rw-r--r-- | dev-vcs/git/git-1.8.3.2-r1.ebuild | 612 |
3 files changed, 621 insertions, 2 deletions
diff --git a/dev-vcs/git/ChangeLog b/dev-vcs/git/ChangeLog index 7d3213d44b9a..a4b3ed0265a5 100644 --- a/dev-vcs/git/ChangeLog +++ b/dev-vcs/git/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-vcs/git # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.215 2013/10/15 19:20:39 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.216 2013/10/15 20:30:28 robbat2 Exp $ + +*git-1.8.3.2-r1 (15 Oct 2013) + + 15 Oct 2013; Robin H. Johnson <robbat2@gentoo.org> +git-1.8.3.2-r1.ebuild: + Backport fixes for bug #477096: Fix git-remote-bzr file collision & bug + #479628: Fix pthread usage to 1.8.3. *git-1.8.4 (15 Oct 2013) diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest index c75d686dd917..7304a174b02b 100644 --- a/dev-vcs/git/Manifest +++ b/dev-vcs/git/Manifest @@ -56,9 +56,10 @@ EBUILD git-1.8.0.2.ebuild 17163 SHA256 931df741e5eeccee8c67048dd07074777228a6cb4 EBUILD git-1.8.1.5-r1.ebuild 17335 SHA256 56609f5a54328691933cabfbf5f5436e6ece42b035e8611e56281b6fed554cb5 SHA512 e35a1346961cadae639c42c4de2d8a53aa86df47d43953a4348554991e662f81feef2f7b695db743993721bb140a147632602190093822d56e5a80c1ec7113c7 WHIRLPOOL c9d2090ec6090d546a70aa9946ba2a09343e950c576140b40c02cc92f19f7d1c59971ceb6b3fa5b3454a71b75f43bac8f08285c98336151e1708b04e898150b4 EBUILD git-1.8.1.5.ebuild 17189 SHA256 bec81381b6dc3763d99fa20f6828c844a6b801aa5df41b6b99e07c87ff7c4a3d SHA512 22ee72cb4efff7ab5ff7ae53db9292b4a7e72ea75566e2664b001a8c8a761e7bfa3a4e28d4a7fa4ec777db497a0b56964ca2efdedd11fc2f34c9d9ab37ea335e WHIRLPOOL a5c025332de62d0a1e3832ec8ed1b873e5a44c16b4be41c05292553a4375b41ed996263e4c5ad1dedb800601790084d6ed6e0e010f35cd0ace41fc04b8360439 EBUILD git-1.8.2.1.ebuild 17612 SHA256 4d80e7d5e92b44281d640770dcc104021494633a6fa945550b5cd8963dd2d733 SHA512 d7de530d0a4cc714c7c11d02af8941912eaefe2e80cc054193e880943ded85a6391e92f38437aadbbaba2623ca789078a776e99ca26e5c98c28a1928e9d1bdc8 WHIRLPOOL 63373a2b5515a02b924c0c811d5dfe67db84b0fc93982d9f5ec4dca81f9d80d15ec4f13fb35d66389cf6234427d736e26b9df85fa8160995cab61c675482e8f8 +EBUILD git-1.8.3.2-r1.ebuild 17546 SHA256 ef330100514bb18cb2ce9575655aafe9dd8b8f523da5ed1b6d82663bb4b91ce3 SHA512 0f020c89c5791e309137a467b196789afc88e875931fd7b459de2233d1587f48ccba7f0acf00b7c24f8912ed3b38186cc88d5f11e3ea5e281d13cebc46737eb6 WHIRLPOOL 83fe5632d213f972e4c6ad0fd03e374c364701a3766f8afb180dc9ddbad125a33446cbcc9d6b3c495e55455217c303a923ff754c279adc486b6db295fa5fb274 EBUILD git-1.8.3.2.ebuild 17390 SHA256 a7b1ae7ebc3a793b43172aa3565f3206fd95a8b6e0dbc8e139a47a290a3c7f7e SHA512 f9f1ac02d7afc81153e1c01b05af9539fdabfae0a51d7caceebdb3ea04843b2a64ca077e0f0caf82cb1f266d4186f4f85d3c81b0a9a9570a8bc1008775603a3c WHIRLPOOL 5a4ecbd1f2df312fbde7490a1da9c7870a470cbf634f3b9bc02781c40e051fb3c1fd7bbf11712b808da04e47289fa9b697bc658db40dd8977e3add88d44f012c EBUILD git-1.8.4.ebuild 17740 SHA256 b2c4f1b5fdeb951dbba632f74ffeb9c0e9ee9099081386973b8691b2767086c0 SHA512 d8dd8a5db92f582017343db49d2afffe273ac51b192eae169f1a98ce751407e97f0fddfe3a685d55ae1aa2bba6b63fe6d96ee26644bf28114406181fdd54fe05 WHIRLPOOL e595b9d34575e87fbac4473b819c7940509b531cbefd6923642732a50a8faa24ab45c0cecccbbd0ad91f76fb6b8fe411d4134853eed3d8a48b7039c4cb9941ac EBUILD git-9999.ebuild 17740 SHA256 3b05675330b96348c3d8cbebb635c87c906233b06043ce1151759d7a3e653fda SHA512 6f1ca8389a2497a30a1cf43716a88f873dfd0db2e1dc227bf73078424089109aea2ab583fd6453a2c77296265e578f1a443112e06254ef274f32e6fec5302e8f WHIRLPOOL bbe4c8001709c7206d7d01204d88d2b9dd713bdeb23f3e90193f374d2f8f5ea4d5ad12fbf938c57327788c2608950988d73d8d0650bff0975dad76459443fcd7 -MISC ChangeLog 7272 SHA256 3dd042f918d95d823814237ae7be81da06bc230ab7ae2fa3f01ab0ec16f9090c SHA512 694b40be6927b09d4b71445affbe20cfa0b70294738b4f6126f7c0c384b2030afd952ea1f61507f4660cdb34caeb912be2d2fc8288d353e4baa29e77140ffa7b WHIRLPOOL 105cd24695e272529b63087816e38fab50ae94dde9e4181e08319d3d72be0bbbd1b9b52b24df53d4f483a176874cc4b45e6cff2749040fa0a12e8f11af799631 +MISC ChangeLog 7494 SHA256 247b47671600545826b2f4b7b0cf042fddb0ab817c269de0d719f619b10dc257 SHA512 69792af843c84cf0f29b9809c658fc6aad02a11141f8829b6a4e7b8c5b188bec5996b90bc36d94ffbea99f83fb4d35f6ad749f248c911f6cebdbbd54e32a88ad WHIRLPOOL 62b08e0dad2975070feb7f9ed426f1df8bde827e2059dc9eaa151be7fca32a3cb560893ec07e63777f9eb2fdcda7f564ef1b73cf84f459317bb6d71d13ab956a MISC ChangeLog-2012 94624 SHA256 7c8c313ea4800194191f7255023cabd205e56bb9761e8877dfab3770024b158c SHA512 f19cae0a29e8598e3bb68f1295baa56ff0edf06b2e3a95081ea2f95c4555d63dd6a0bff5a82345b274a1936104a75a69fe7862d7738a7fa2539ec9a7afd6b28f WHIRLPOOL 059ab6c542757c4524cb20cebb3cfa4bfbbe16d3a66da0805fb972d32f91f2a49bee97d1d73acf74d8e2cf3cc7a552371cf66db0580506d4b1a9e05ee52bdea4 MISC metadata.xml 1821 SHA256 3f0864988fd1d6ca97db612f9157275bf00336143969acb9d82ca6e6523127f5 SHA512 9f2d7adaf973837028f0c7cb305ac9917a88f07490ee172e570fc70860385de5c2b00edd6c22a37c9448d9260f51554e87b32b24e3bbbcc521f9ce5bbcb1fce0 WHIRLPOOL 7c135c44361168708252533d60a05f2c7d4b202c96c212e75d3057fa5ad80928c7d7452359b7e068c7a1f41dd4276c5917ac47ae010ec93821b2a9a3518f7aa9 diff --git a/dev-vcs/git/git-1.8.3.2-r1.ebuild b/dev-vcs/git/git-1.8.3.2-r1.ebuild new file mode 100644 index 000000000000..a72abbf73353 --- /dev/null +++ b/dev-vcs/git/git-1.8.3.2-r1.ebuild @@ -0,0 +1,612 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.8.3.2-r1.ebuild,v 1.1 2013/10/15 20:30:28 robbat2 Exp $ + +EAPI=5 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_COMPAT=( python2_{6,7} ) +[[ ${PV} == *9999 ]] && SCM="git-2" +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" + +inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM} + +MY_PV="${PV/_rc/.rc}" +MY_P="${PN}-${MY_PV}" + +DOC_VER=${MY_PV} + +DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="gz" + SRC_URI_GOOG="http://git-core.googlecode.com/files" + SRC_URI_KORG="mirror://kernel/software/scm/git" + SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + doc? ( + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + )" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +else + SRC_URI="" + KEYWORDS="" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + dev-libs/openssl + sys-libs/zlib + pcre? ( dev-libs/libpcre ) + perl? ( dev-lang/perl[-build(-)] ) + tk? ( dev-lang/tk ) + curl? ( + net-misc/curl + webdav? ( dev-libs/expat ) + ) + emacs? ( virtual/emacs ) + gnome-keyring? ( gnome-base/gnome-keyring )" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + 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 dev-perl/DBI dev-perl/DBD-SQLite ) + subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) + ) + python? ( gtk? + ( + >=dev-python/pygtk-2.8[${PYTHON_USEDEP}] + >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}] + ) + ${PYTHON_DEPS} )" + +# This is how info docs are created with Git: +# .txt/asciidoc --(asciidoc)---------> .xml/docbook +# .xml/docbook --(docbook2texi.pl)--> .texi +# .texi --(makeinfo)---------> .info +DEPEND="${CDEPEND} + app-arch/cpio + doc? ( + app-text/asciidoc + app-text/docbook2X + sys-apps/texinfo + app-text/xmlto + ) + 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 ) + subversion? ( perl ) + webdav? ( curl ) + gtk? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +pkg_setup() { + if use subversion && has_version "dev-vcs/subversion[dso]"; then + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" + ewarn "with USE=dso, there may be weird crashes in git-svn. You" + ewarn "have been warned." + fi + if use python ; then + python-single-r1_pkg_setup + fi +} + +# This is needed because for some obscure reasons future calls to make don't +# pick up these exports if we export them in src_unpack() +exportmakeopts() { + local myopts + + if use blksha1 ; then + myopts="${myopts} BLK_SHA1=YesPlease" + elif use ppcsha1 ; then + myopts="${myopts} PPC_SHA1=YesPlease" + fi + + if use curl ; then + use webdav || myopts="${myopts} NO_EXPAT=YesPlease" + else + myopts="${myopts} NO_CURL=YesPlease" + fi + + # broken assumptions, because of broken build system ... + myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease" + myopts="${myopts} INSTALL=install TAR=tar" + myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh" + myopts="${myopts} SANE_TOOL_PATH=" + myopts="${myopts} OLD_ICONV=" + myopts="${myopts} NO_EXTERNAL_GREP=" + + # For svn-fe + extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')" + + # can't define this to null, since the entire makefile depends on it + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile + + use iconv \ + || myopts="${myopts} NO_ICONV=YesPlease" + use nls \ + || myopts="${myopts} NO_GETTEXT=YesPlease" + use tk \ + || myopts="${myopts} NO_TCLTK=YesPlease" + use pcre \ + && myopts="${myopts} USE_LIBPCRE=yes" \ + && extlibs="${extlibs} -lpcre" + use perl \ + && myopts="${myopts} INSTALLDIRS=vendor" \ + || myopts="${myopts} NO_PERL=YesPlease" + use python \ + || myopts="${myopts} NO_PYTHON=YesPlease" + use subversion \ + || myopts="${myopts} NO_SVN_TESTS=YesPlease" + use threads \ + && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \ + || myopts="${myopts} NO_PTHREADS=YesPlease" + use cvs \ + || myopts="${myopts} NO_CVS=YesPlease" +# Disabled until ~m68k-mint can be keyworded again +# if [[ ${CHOST} == *-mint* ]] ; then +# myopts="${myopts} NO_MMAP=YesPlease" +# myopts="${myopts} NO_IPV6=YesPlease" +# myopts="${myopts} NO_STRLCPY=YesPlease" +# myopts="${myopts} NO_MEMMEM=YesPlease" +# myopts="${myopts} NO_MKDTEMP=YesPlease" +# myopts="${myopts} NO_MKSTEMPS=YesPlease" +# fi + if [[ ${CHOST} == ia64-*-hpux* ]]; then + myopts="${myopts} NO_NSEC=YesPlease" + fi + if [[ ${CHOST} == *-*-aix* ]]; then + myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease" + fi + if [[ ${CHOST} == *-solaris* ]]; then + myopts="${myopts} NEEDS_LIBICONV=YesPlease" + fi + + has_version '>=app-text/asciidoc-8.0' \ + && myopts="${myopts} ASCIIDOC8=YesPlease" + myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease" + + # Bug 290465: + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' + [[ "${CHOST}" == *-uclibc* ]] && \ + myopts="${myopts} NO_NSEC=YesPlease" + + export MY_MAKEOPTS="${myopts}" + export EXTLIBS="${extlibs}" +} + +src_unpack() { + if [[ ${PV} != *9999 ]]; then + unpack ${MY_P}.tar.${SRC_URI_SUFFIX} + cd "${S}" + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + use doc && \ + cd "${S}"/Documentation && \ + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + cd "${S}" + else + git-2_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # bug #350330 - automagic CVS when we don't want it is bad. + epatch "${FILESDIR}"/git-1.8.2-optional-cvs.patch + + sed -i \ + -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \ + -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \ + -e 's:^\(CC = \).*$:\1$(OPTCC):' \ + -e 's:^\(AR = \).*$:\1$(OPTAR):' \ + -e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \ + -e "s:\(PERL_PATH = \)\(.*\)$:\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 -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \ + Documentation/Makefile || die "sed failed" + + # Fix git-subtree missing DESTDIR + sed -i \ + -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \ + -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \ + contrib/subtree/Makefile +} + +git_emake() { + # bug #326625: PERL_PATH, PERL_MM_OPT + # bug #320647: PYTHON_PATH + PYTHON_PATH="" + use python && PYTHON_PATH="${PYTHON}" + emake ${MY_MAKEOPTS} \ + DESTDIR="${D}" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ + OPTCC="$(tc-getCC)" \ + OPTAR="$(tc-getAR)" \ + prefix="${EPREFIX}"/usr \ + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ + sysconfdir="${EPREFIX}"/etc \ + PYTHON_PATH="${PYTHON_PATH}" \ + PERL_MM_OPT="" \ + GIT_TEST_OPTS="--no-color" \ + V=1 \ + "$@" + # This is the fix for bug #326625, but it also causes breakage, see bug + # #352693. + # PERL_PATH="${EPREFIX}/usr/bin/env perl" \ +} + +src_configure() { + exportmakeopts +} + +src_compile() { + if use perl ; then + git_emake perl/PM.stamp || die "emake perl/PM.stamp failed" + git_emake perl/perl.mak || die "emake perl/perl.mak failed" + fi + git_emake || die "emake failed" + + if use emacs ; then + elisp-compile contrib/emacs/git{,-blame}.el + fi + + if use perl && use cgi ; then + git_emake \ + gitweb/gitweb.cgi \ + || die "emake gitweb/gitweb.cgi failed" + fi + + if [[ ${CHOST} == *-darwin* ]]; then + cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain" + git_emake || die "emake credential-osxkeychain" + fi + + cd "${S}"/Documentation + if [[ ${PV} == *9999 ]] ; then + git_emake man \ + || die "emake man failed" + if use doc ; then + git_emake info html \ + || die "emake info html failed" + fi + else + if use doc ; then + git_emake info \ + || die "emake info html failed" + fi + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + git_emake EXTLIBS="${EXTLIBS}" || die "emake svn-fe failed" + if use doc ; then + git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed" + fi + cd "${S}" + fi + + if use gnome-keyring ; then + cd "${S}"/contrib/credential/gnome-keyring + git_emake || die "emake git-credential-gnome-keyring failed" + fi + + cd "${S}"/contrib/subtree + git_emake + use doc && git_emake doc +} + +src_install() { + git_emake \ + install || \ + die "make install failed" + + if [[ ${CHOST} == *-darwin* ]]; then + dobin contrib/credential/osxkeychain/git-credential-osxkeychain + fi + + # Depending on the tarball and manual rebuild of the documentation, the + # manpages may exist in either OR both of these directories. + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] + + dodoc README Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html + for d in / /howto/ /technical/ ; do + docinto ${d} + dodoc Documentation${d}*.txt + use doc && dohtml -p ${d} Documentation${d}*.html + done + docinto / + # Upstream does not ship this pre-built :-( + use doc && doinfo Documentation/{git,gitman}.info + + newbashcomp contrib/completion/git-completion.bash ${PN} + newbashcomp contrib/completion/git-prompt.sh ${PN}-prompt + + 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}" + + # git-diffall + dobin contrib/diffall/git-diffall + newdoc contrib/diffall/README git-diffall.txt + + # diff-highlight + dobin contrib/diff-highlight/diff-highlight + newdoc contrib/diff-highlight/README README.diff-highlight + + # git-jump + exeinto /usr/libexec/git-core/ + doexe contrib/git-jump/git-jump + newdoc contrib/git-jump/README git-jump.txt + + if use gnome-keyring ; then + cd "${S}"/contrib/credential/gnome-keyring + dobin git-credential-gnome-keyring + fi + + if use subversion ; then + cd "${S}"/contrib/svn-fe + dobin svn-fe + dodoc svn-fe.txt + use doc && doman svn-fe.1 && dohtml svn-fe.html + cd "${S}" + fi + + # remote-helpers + if use python ; then + python_scriptinto /usr/libexec/git-core/ + python_doscript "${S}"/contrib/remote-helpers/git-remote-{bzr,hg} + python_optimize + fi + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # credential/gnome-keyring TODO + # diff-highlight - done above + # diffall - done above + # emacs - installed above + # examples - these are stuff that is not used in Git anymore actually + # git-jump - done above + # gitview - installed above + # p4import - excluded because fast-import has a better one + # patches - stuff the Git guys made to go upstream to other places + # persistent-https - TODO + # mw-to-git - TODO + # subtree - build seperately + # svnimport - use git-svn + # thunderbird-patch-inline - fixes thunderbird + for i in \ + blameview buildsystems ciabot continuous convert-objects fast-import \ + hg-to-git hooks remotes2config.sh rerere-train.sh \ + stats vim workdir \ + ; do + cp -rf \ + "${S}"/contrib/${i} \ + "${ED}"/usr/share/${PN}/contrib \ + || die "Failed contrib ${i}" + done + + if use perl && use cgi ; then + # We used to install in /usr/share/${PN}/gitweb + # but upstream installs in /usr/share/gitweb + # so we will install a symlink and use their location for compat with other + # distros + dosym /usr/share/gitweb /usr/share/${PN}/gitweb + + # INSTALL discusses configuration issues, not just installation + docinto / + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb + newdoc "${S}"/gitweb/README README.gitweb + + find "${ED}"/usr/lib64/perl5/ \ + -name .packlist \ + -exec rm \{\} \; + else + rm -rf "${ED}"/usr/share/gitweb + fi + + if ! use subversion ; then + rm -f "${ED}"/usr/libexec/git-core/git-svn \ + "${ED}"/usr/share/man/man1/git-svn.1* + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/git-daemon.xinetd git-daemon + fi + + if use !prefix ; then + newinitd "${FILESDIR}"/git-daemon.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 + + fixlocalpod +} + +src_test() { + local disabled="" + local tests_cvs="t9200-git-cvsexportcommit.sh \ + t9400-git-cvsserver-server.sh \ + t9401-git-cvsserver-crlf.sh \ + t9600-cvsimport.sh \ + t9601-cvsimport-vendor-branch.sh \ + t9602-cvsimport-branches-tags.sh \ + t9603-cvsimport-patchsets.sh" + local tests_perl="t3701-add-interactive.sh \ + t5502-quickfetch.sh \ + t5512-ls-remote.sh \ + t5520-pull.sh \ + t7106-reset-unborn-branch.sh \ + t7501-commit.sh" + # Bug #225601 - t0004 is not suitable for root perm + # Bug #219839 - t1004 is not suitable for root perm + # t0001-init.sh - check for init notices EPERM* fails + local tests_nonroot="t0001-init.sh \ + t0004-unwritable.sh \ + t0070-fundamental.sh \ + t1004-read-tree-m-u-wf.sh \ + t3700-add.sh \ + t7300-clean.sh" + # t9100 still fails with symlinks in SVN 1.7 + local test_svn="t9100-git-svn-basic.sh" + + # Unzip is used only for the testcase code, not by any normal parts of Git. + if ! has_version app-arch/unzip ; then + einfo "Disabling tar-tree tests" + disabled="${disabled} t5000-tar-tree.sh" + fi + + cvs=0 + use cvs && let cvs=$cvs+1 + if [[ ${EUID} -eq 0 ]]; then + if [[ $cvs -eq 1 ]]; then + ewarn "Skipping CVS tests because CVS does not work as root!" + ewarn "You should retest with FEATURES=userpriv!" + disabled="${disabled} ${tests_cvs}" + fi + einfo "Skipping other tests that require being non-root" + disabled="${disabled} ${tests_nonroot}" + else + [[ $cvs -gt 0 ]] && \ + has_version dev-vcs/cvs && \ + let cvs=$cvs+1 + [[ $cvs -gt 1 ]] && \ + has_version "dev-vcs/cvs[server]" && \ + let cvs=$cvs+1 + if [[ $cvs -lt 3 ]]; then + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" + disabled="${disabled} ${tests_cvs}" + fi + fi + + if ! use perl ; then + einfo "Disabling tests that need Perl" + disabled="${disabled} ${tests_perl}" + fi + + einfo "Disabling tests that fail with SVN 1.7" + disabled="${disabled} ${test_svn}" + + # Reset all previously disabled tests + cd "${S}/t" + for i in *.sh.DISABLED ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" + done + einfo "Disabled tests:" + for i in ${disabled} ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" + done + + # Avoid the test system removing the results because we want them ourselves + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \ + -i "${S}"/t/Makefile + + # Clean old results first, must always run + cd "${S}/t" + nonfatal git_emake clean + + # Now run the tests, keep going if we hit an error, and don't terminate on + # failure + cd "${S}" + einfo "Start test run" + #MAKEOPTS=-j1 + nonfatal git_emake --keep-going test + rc=$? + + # Display nice results, now print the results + cd "${S}/t" + nonfatal git_emake aggregate-results + + # And bail if there was a problem + [ $rc -eq 0 ] || die "tests failed. Please file a bug." +} + +showpkgdeps() { + local pkg=$1 + shift + elog " $(printf "%-17s:" ${pkg}) ${@}" +} + +pkg_postinst() { + use emacs && elisp-site-regen + einfo "Please read /usr/share/bash-completion/git for Git bash command completion" + einfo "Please read /usr/share/bash-completion/git-prompt for Git bash prompt" + einfo "Note that the prompt bash code is now in the seperate script" + elog "These additional scripts need some dependencies:" + echo + showpkgdeps git-quiltimport "dev-util/quilt" + showpkgdeps git-instaweb \ + "|| ( www-servers/lighttpd www-servers/apache )" + echo +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |