Diffstat (limited to 'dev-util/git/git-1.5.2.4.ebuild') (more/less context) (show whitespace changes)
-rw-r--r-- | dev-util/git/git-1.5.2.4.ebuild | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/dev-util/git/git-1.5.2.4.ebuild b/dev-util/git/git-1.5.2.4.ebuild new file mode 100644 index 0000000..ff32c17 --- a/dev/null +++ b/dev-util/git/git-1.5.2.4.ebuild | |||
@@ -0,0 +1,163 @@ | |||
1 | # Copyright 1999-2007 Gentoo Foundation | ||
2 | # Distributed under the terms of the GNU General Public License v2 | ||
3 | # $Header: $ | ||
4 | |||
5 | inherit toolchain-funcs eutils elisp-common perl-module bash-completion | ||
6 | |||
7 | MY_PV="${PV/_rc/.rc}" | ||
8 | MY_P="${PN}-${MY_PV}" | ||
9 | |||
10 | DOC_VER=${MY_PV} | ||
11 | |||
12 | DESCRIPTION="GIT - the stupid content tracker" | ||
13 | HOMEPAGE="http://git.or.cz/" | ||
14 | SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2 | ||
15 | mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2 | ||
16 | doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )" | ||
17 | |||
18 | LICENSE="GPL-2" | ||
19 | SLOT="0" | ||
20 | KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" | ||
21 | IUSE="curl doc elibc_uclibc emacs gtk mozsha1 perl ppcsha1 tk webdav" | ||
22 | |||
23 | DEPEND="dev-libs/openssl | ||
24 | sys-libs/zlib | ||
25 | !app-misc/git | ||
26 | curl? ( net-misc/curl ) | ||
27 | webdav? ( dev-libs/expat ) | ||
28 | emacs? ( virtual/emacs )" | ||
29 | RDEPEND="${DEPEND} | ||
30 | dev-lang/perl | ||
31 | perl? ( dev-perl/Error ) | ||
32 | tk? ( dev-lang/tk ) | ||
33 | gtk? ( >=dev-python/pygtk-2.8 )" | ||
34 | |||
35 | SITEFILE=71${PN}-gentoo.el | ||
36 | S="${WORKDIR}/${MY_P}" | ||
37 | |||
38 | # This is needed because for some obscure reasons future calls to make don't | ||
39 | # pick up these exports if we export them in src_unpack() | ||
40 | exportmakeopts() { | ||
41 | local myopts | ||
42 | |||
43 | if use mozsha1 ; then | ||
44 | myopts="${myopts} MOZILLA_SHA1=YesPlease" | ||
45 | elif use ppcsha1 ; then | ||
46 | myopts="${myopts} PPC_SHA1=YesPlease" | ||
47 | fi | ||
48 | |||
49 | if use curl ; then | ||
50 | use webdav || myopts="${myopts} NO_EXPAT=YesPlease" | ||
51 | else | ||
52 | myopts="${myopts} NO_CURL=YesPlease" | ||
53 | use webdav && ewarn "USE=webdav only matters with USE=curl. Ignoring." | ||
54 | fi | ||
55 | |||
56 | myopts="${myopts} WITH_SEND_EMAIL=YesPlease" | ||
57 | |||
58 | use elibc_uclibc && myopts="${myopts} NO_ICONV=YesPlease" | ||
59 | |||
60 | export MY_MAKEOPTS=${myopts} | ||
61 | } | ||
62 | |||
63 | showpkgdeps() { | ||
64 | local pkg=$1 | ||
65 | shift | ||
66 | elog " $(printf "%-17s:" ${pkg}) ${@}" | ||
67 | } | ||
68 | |||
69 | src_unpack() { | ||
70 | unpack ${A} | ||
71 | cd ${S} | ||
72 | |||
73 | epatch "${FILESDIR}"/${PN}-1.5.0-symlinks.patch | ||
74 | |||
75 | sed -i \ | ||
76 | -e "s:^\(CFLAGS = \).*$:\1${CFLAGS} -Wall:" \ | ||
77 | -e "s:^\(LDFLAGS = \).*$:\1${LDFLAGS}:" \ | ||
78 | -e "s:^\(CC = \).*$:\1$(tc-getCC):" \ | ||
79 | -e "s:^\(AR = \).*$:\1$(tc-getAR):" \ | ||
80 | -e 's:ln :ln -s :g' \ | ||
81 | Makefile || die "sed failed" | ||
82 | |||
83 | exportmakeopts | ||
84 | } | ||
85 | |||
86 | src_compile() { | ||
87 | emake ${MY_MAKEOPTS} DESTDIR="${D}" prefix=/usr || die "make failed" | ||
88 | |||
89 | if use emacs ; then | ||
90 | elisp-compile contrib/emacs/{,vc-}git.el || die "emacs modules failed" | ||
91 | fi | ||
92 | } | ||
93 | |||
94 | src_install() { | ||
95 | emake ${MY_MAKEOPTS} DESTDIR="${D}" prefix=/usr install || \ | ||
96 | die "make install failed" | ||
97 | |||
98 | use tk || rm "${D}"/usr/bin/gitk | ||
99 | |||
100 | doman "${WORKDIR}"/man?/* | ||
101 | |||
102 | dodoc README COPYING Documentation/SubmittingPatches | ||
103 | if use doc ; then | ||
104 | dodoc Documentation/technical/* | ||
105 | dodir /usr/share/doc/${PF}/html | ||
106 | cp -r "${WORKDIR}"/{*.html,howto} "${D}"/usr/share/doc/${PF}/html | ||
107 | fi | ||
108 | |||
109 | dobashcompletion contrib/completion/git-completion.bash ${PN} | ||
110 | |||
111 | if use emacs ; then | ||
112 | elisp-install ${PN} contrib/emacs/{,vc-}git.el* || \ | ||
113 | die "elisp-install failed" | ||
114 | elisp-site-file-install "${FILESDIR}/${SITEFILE}" | ||
115 | fi | ||
116 | |||
117 | if use gtk ; then | ||
118 | dobin contrib/gitview/gitview | ||
119 | use doc && dodoc contrib/gitview/gitview.txt | ||
120 | fi | ||
121 | |||
122 | insinto /etc/xinetd.d | ||
123 | newins "${FILESDIR}"/git-daemon.xinetd git-daemon | ||
124 | |||
125 | newinitd "${FILESDIR}"/git-daemon.initd git-daemon | ||
126 | newconfd "${FILESDIR}"/git-daemon.confd git-daemon | ||
127 | |||
128 | fixlocalpod | ||
129 | } | ||
130 | |||
131 | src_test() { | ||
132 | cd "${S}" | ||
133 | has_version dev-util/subversion || \ | ||
134 | MY_MAKEOPTS="${MY_MAKEOPTS} NO_SVN_TESTS=YesPlease" | ||
135 | has_version app-arch/unzip || \ | ||
136 | rm "${S}"/t/t5000-tar-tree.sh | ||
137 | # Stupid CVS won't let some people commit as root | ||
138 | rm "${S}"/t/t9200-git-cvsexportcommit.sh | ||
139 | emake ${MY_MAKEOPTS} DESTDIR="${D}" prefix=/usr test || die "tests failed" | ||
140 | } | ||
141 | |||
142 | pkg_postinst() { | ||
143 | use emacs && elisp-site-regen | ||
144 | elog "These additional scripts need some dependencies:" | ||
145 | echo | ||
146 | showpkgdeps git-archimport "dev-util/tla" | ||
147 | showpkgdeps git-cvsimport ">=dev-util/cvsps-2.1" | ||
148 | showpkgdeps git-svnimport "dev-util/subversion(USE=perl)" | ||
149 | showpkgdeps git-svn \ | ||
150 | "dev-util/subversion(USE=perl)" \ | ||
151 | "dev-perl/libwww-perl" \ | ||
152 | "dev-perl/TermReadKey" | ||
153 | showpkgdeps git-quiltimport "dev-util/quilt" | ||
154 | showpkgdeps git-cvsserver "dev-perl/DBI" "dev-perl/DBD-SQLite" | ||
155 | showpkgdeps git-instaweb "|| ( www-servers/lighttpd net-www/apache(SLOT=2) )" | ||
156 | showpkgdeps git-send-email "USE=perl" | ||
157 | showpkgdeps git-remote "USE=perl" | ||
158 | echo | ||
159 | } | ||
160 | |||
161 | pkg_postrm() { | ||
162 | use emacs && elisp-site-regen | ||
163 | } | ||