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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Dec 27 09:39:04 2011 UTC (2 years, 3 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Version Bump, move to EAPI=4, handled static-libs, respect mostly everywhere LDFALGS

(Portage version: 2.2.0_alpha83/cvs/Linux x86_64)

1 # Copyright 1999-2011 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.2 2010/02/24 21:43:32 weaver Exp $
4
5 EAPI=4
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 KEYWORDS="~amd64 ~x86"
16 IUSE="+mysql +server static-libs"
17
18 REQUIRED_USE="server? ( mysql )"
19
20 WEBAPP_MANUAL_SLOT="yes"
21
22 DEPEND="
23 app-arch/unzip
24 !<sci-biology/ucsc-genome-browser-223
25 mysql? ( virtual/mysql )
26 server? ( virtual/httpd-cgi )" # TODO: test with other webservers
27 RDEPEND="${DEPEND}"
28
29 S="${WORKDIR}/kent"
30
31 src_prepare() {
32 use server && webapp_src_preinst
33 sed \
34 -e 's/-Werror//' \
35 -e "/COPT/s:=.*$:=${LDFLAGS}:g" \
36 -e "s/CC=gcc/CC=$(tc-getCC) ${CFLAGS}/" \
37 -e 's:${CC} ${COPT} ${CFLAGS}:${CC} ${CFLAGS}:g' \
38 -i src/inc/common.mk src/hg/lib/makefile || die
39 find -name makefile -or -name cgi_build_rules.mk \
40 | xargs sed -i \
41 -e 's/-${USER}//g' \
42 -e 's/-$(USER)//g' \
43 -e 's:-O2::g' \
44 -e 's:-ggdb::g' \
45 -e 's:-pipe::g' || die
46 sed \
47 -e 's:${DISTDIR}${BINDIR}:${BINDIR}:g' \
48 -i src/hg/genePredToMafFrames/makefile || die
49 }
50
51 src_compile() {
52 export MACHTYPE=${MACHTYPE/-*/} \
53 BINDIR="${WORKDIR}/destdir/opt/${PN}/bin" \
54 SCRIPTS="${WORKDIR}/destdir/opt/${PN}/cluster/scripts" \
55 ENCODE_PIPELINE_BIN="${WORKDIR}/destdir/opt/${PN}/cluster/data/encode/pipeline/bin" \
56 PATH="${BINDIR}:${PATH}" \
57 STRIP="echo 'skipping strip' "
58
59 export MYSQLLIBS="none" MYSQLINC="none" DOCUMENTROOT="none" CGI_BIN="none"
60
61 use mysql && export MYSQLLIBS="-L${EROOT}usr/$(get_libdir)/mysql/ -lmysqlclient -lz -lssl" \
62 MYSQLINC="${ROOT}usr/include/mysql"
63
64 use server && export DOCUMENTROOT="${WORKDIR}/destdir/${MY_HTDOCSDIR}" \
65 CGI_BIN="${WORKDIR}/destdir/${MY_HTDOCSDIR}/cgi-bin"
66
67 mkdir -p "$BINDIR" "$SCRIPTS" "$ENCODE_PIPELINE_BIN" || die
68 use server && mkdir -p "$CGI_BIN" "$DOCUMENTROOT"
69
70 emake -C src clean
71 emake -C src/lib
72 emake -C src/jkOwnLib
73 emake -C src/utils/stringify
74 emake -C src blatSuite
75 if use mysql; then
76 emake -j1 -C src/hg utils
77 emake -j1 -C src utils
78 emake -C src libs userApps
79 if use server; then
80 emake -j1 -C src/hg
81 emake -j1 -C src
82 fi
83 fi
84 }
85
86 src_install() {
87 use server && webapp_src_preinst
88 cp -ad "${WORKDIR}"/destdir/* "${D}" || die
89 use static-libs && dolib.a src/lib/${MACHTYPE/-*/}/*.a
90 echo "PATH=${EPREFIX}/opt/${PN}/bin" > "${S}/98${PN}"
91 doenvd "${S}/98${PN}"
92
93 use server && webapp_postinst_txt en src/product/README.QuickStart
94 use server && webapp_src_install
95
96 insinto "/usr/include/${PN}"
97 doins src/inc/*.h
98 insinto "/usr/share/${PN}"
99 doins -r src/product
100 keepdir "/usr/share/doc/${PF}"
101 find -name 'README*' -or -name '*.doc' | grep -v test | cpio -padv "${ED}/usr/share/doc/${PF}" || die
102 }
103
104 pkg_postinst() {
105 use server && webapp_pkg_postinst
106 }

  ViewVC Help
Powered by ViewVC 1.1.20