/[gentoo-x86]/sci-biology/ucsc-genome-browser/ucsc-genome-browser-223.ebuild
Gentoo

Contents of /sci-biology/ucsc-genome-browser/ucsc-genome-browser-223.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Feb 24 21:43:32 2010 UTC (5 years, 3 months ago) by weaver
Branch: MAIN
Changes since 1.1: +5 -5 lines
Re-add parallel make workaround
(Portage version: 2.2_rc30/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-biology/ucsc-genome-browser/ucsc-genome-browser-223.ebuild,v 1.1 2010/02/08 18:36:30 weaver Exp $
4
5 EAPI="2"
6
7 inherit toolchain-funcs flag-o-matic webapp
8
9 DESCRIPTION="The UCSC genome browser suite, also known as Jim Kent's library and GoldenPath"
10 HOMEPAGE="http://genome.ucsc.edu"
11 SRC_URI="http://hgdownload.cse.ucsc.edu/admin/jksrc.v${PV}.zip"
12
13 LICENSE="blat"
14 SLOT="0"
15 WEBAPP_MANUAL_SLOT="yes"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="+mysql +server"
18
19 DEPEND="app-arch/unzip
20 !<sci-biology/ucsc-genome-browser-223
21 mysql? ( virtual/mysql )
22 server? ( virtual/httpd-cgi )" # TODO: test with other webservers
23 RDEPEND="${DEPEND}"
24
25 S="${WORKDIR}/kent"
26
27 src_prepare() {
28 if use server && ! use mysql; then die "USE flag server requires USE flag mysql"; fi
29 use server && webapp_src_preinst
30 sed -i -e 's/-Werror//' \
31 -e "s/CC=gcc/CC=$(tc-getCC) ${CFLAGS}/" \
32 src/inc/common.mk || die
33 find -name makefile -or -name cgi_build_rules.mk \
34 | xargs sed -i -e 's/-${USER}//g' -e 's/-$(USER)//g' || die
35 }
36
37 src_compile() {
38 export MACHTYPE=${MACHTYPE/-*/} \
39 BINDIR="${WORKDIR}/destdir/opt/${PN}/bin" \
40 SCRIPTS="${WORKDIR}/destdir/opt/${PN}/cluster/scripts" \
41 ENCODE_PIPELINE_BIN="${WORKDIR}/destdir/opt/${PN}/cluster/data/encode/pipeline/bin" \
42 PATH="${BINDIR}:${PATH}" \
43 STRIP="echo 'skipping strip' "
44
45 export MYSQLLIBS="none" MYSQLINC="none" DOCUMENTROOT="none" CGI_BIN="none"
46
47 use mysql && export MYSQLLIBS="${ROOT}usr/lib/mysql/libmysqlclient.a -lz -lssl" \
48 MYSQLINC="${ROOT}usr/include/mysql"
49
50 use server && export DOCUMENTROOT="${WORKDIR}/destdir/${MY_HTDOCSDIR}" \
51 CGI_BIN="${WORKDIR}/destdir/${MY_HTDOCSDIR}/cgi-bin"
52
53 mkdir -p "$BINDIR" "$SCRIPTS" "$ENCODE_PIPELINE_BIN" || die
54 use server && mkdir -p "$CGI_BIN" "$DOCUMENTROOT"
55
56 emake -C src clean || die
57 emake -C src/lib || die
58 emake -C src/jkOwnLib || die
59 emake -C src/utils/stringify || die
60 emake -C src blatSuite || die
61 if use mysql; then
62 emake -j1 -C src/hg utils || die
63 emake -j1 -C src utils || die
64 emake -C src libs userApps || die
65 if use server; then
66 emake -j1 -C src/hg || die
67 emake -j1 -C src || die
68 fi
69 fi
70 }
71
72 src_install() {
73 use server && webapp_src_preinst
74 cp -a "${WORKDIR}"/destdir/* "${D}" || die
75 dolib.a src/lib/${MACHTYPE/-*/}/*.a || die
76 echo "PATH=/opt/${PN}/bin" > "${S}/99${PN}"
77 doenvd "${S}/99${PN}"
78
79 use server && webapp_postinst_txt en src/product/README.QuickStart
80 use server && webapp_src_install
81
82 insinto "/usr/include/${PN}"
83 doins src/inc/*.h
84 insinto "/usr/share/${PN}"
85 doins -r src/product
86 keepdir "/usr/share/doc/${PF}"
87 find -name 'README*' -or -name '*.doc' | grep -v test | cpio -padv "${D}/usr/share/doc/${PF}" || die
88 }
89
90 pkg_postinst() {
91 use server && webapp_pkg_postinst
92 }

  ViewVC Help
Powered by ViewVC 1.1.20