/[gentoo-x86]/sci-libs/charm/charm-5.9.ebuild
Gentoo

Contents of /sci-libs/charm/charm-5.9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Nov 10 15:37:20 2005 UTC (14 years, 2 months ago) by markusle
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
removed sci-libs/charm due to move sci-libs/charm to sys-cluster/charm

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/charm/charm-5.9.ebuild,v 1.1 2005/10/05 00:20:19 ribosome Exp $
4
5 inherit eutils toolchain-funcs flag-o-matic
6
7 DESCRIPTION="Charm++ is a message-passing parallel language and runtime system."
8 LICENSE="charm"
9 HOMEPAGE="http://charm.cs.uiuc.edu/"
10 SRC_URI="${P}.tar.gz"
11
12 SLOT="0"
13 KEYWORDS="~x86"
14 IUSE="cmkopt tcp smp doc icc"
15
16 RESTRICT="fetch"
17
18 DEPEND="icc? ( >=dev-lang/icc-8.1 )
19 doc? ( app-text/pdftohtml )
20 doc? ( dev-tex/latex2html )
21 doc? ( virtual/tetex )"
22
23 CHARM_ARCH="net-linux"
24 CHARM_DOWNLOAD="http://charm.cs.uiuc.edu/download/"
25
26
27 pkg_nofetch() {
28 echo
29 einfo "Please download ${P}.tar.gz from"
30 einfo "${CHARM_DOWNLOAD}"
31 einfo "after agreeing to the license and then move it to "
32 einfo "${DISTDIR}"
33 einfo "Be sure to select the ${PV} version!"
34 echo
35 }
36
37 src_unpack() {
38 unpack ${A}
39
40 # add -fPIC to generate PIC code for charm so's
41 epatch "${FILESDIR}"/${PN}-fpic-gentoo.patch
42
43 # for pdf/html docs we need to patch the makefiles
44 if use doc; then
45 epatch "${FILESDIR}"/${PN}-doc-makefile-gentoo.patch
46 fi
47
48 # patch the example Makefiles so they run out of
49 # the box
50 epatch "${FILESDIR}"/${PN}-examples-gentoo.patch
51
52 # enable proper detection of python in configure
53 epatch "${FILESDIR}"/${PN}-python-configure-gentoo.patch
54
55 # TCP instead of default UDP for socket comunication
56 # protocol
57 if use tcp; then
58 CHARM_OPTS="${CHARM_OPTS} tcp"
59 fi
60
61 # enable direct SMP support using shared memory
62 if use smp; then
63 CHARM_OPTS="${CHARM_OPTS} smp"
64 fi
65
66 # compile with icc if requested
67 if use icc; then
68 if [ $(tc-getCC) != "icc" ]; then
69 die "You cannot use $(tc-getCC) with USE='icc'"
70 fi
71 CHARM_OPTS="${CHARM_OPTS} icc"
72 fi
73
74 # CMK optimization
75 if use cmkopt; then
76 append-flags -DCMK_OPTIMIZE=1
77 fi
78 }
79
80 src_compile() {
81 # build charmm++ first
82 cd "${S}"
83 ./build charm++ net-linux ${CHARM_OPTS} ${CFLAGS} || \
84 die "Failed to build charm++"
85
86 # make pdf/html docs
87 if use doc; then
88 cd "${S}"/doc
89 make doc || die "failed to create pdf/html docs"
90 fi
91 }
92
93 src_install() {
94 cd "${S}"
95
96 # make charmc play well with gentoo before
97 # we move it into /usr/bin
98 einfo "Fixing paths in charmc wrapper"
99 epatch "${FILESDIR}"/${PN}-charmc-gentoo.patch
100
101 sed -e "s/gentoo-include/${P}/" -i ./src/scripts/charmc || \
102 die "failed patching charmc script"
103
104 # install binaries
105 cd "${S}"/bin
106 dobin ./charmd ./charmd_faceless ./charmr* ./charmc ./charmxi \
107 ./conv-cpm ./dep.pl || die "Failed to install binaries"
108
109 # install headers
110 cd "${S}"/include
111 insinto /usr/include/${P}
112 doins * || die "failed to install header files"
113
114 # install static libs
115 cd "${S}"/lib
116 dolib.a * || die "failed to install static libs"
117
118 # install shared libs
119 cd "${S}"/lib_so
120 dolib.so * || die "failed to install shared libs"
121
122 # basic docs
123 cd "${S}"
124 dodoc CHANGES README || die "Failed to install docs"
125
126 # install examples
127 insinto /usr/share/doc/${PF}/examples
128 doins -r examples/charm++/*
129
130 # pdf/html docs
131 if use doc; then
132 cd "${S}"/doc
133 # install pdfs
134 insinto /usr/share/doc/${PF}/pdf
135 doins doc/pdf/* || die "failed to install pdf docs"
136 # install html
137 docinto html
138 dohtml -r doc/html/* || die "failed to install html docs"
139 fi
140 }
141
142 pkg_postinst() {
143 echo
144 einfo "Please test your charm installation by copying the"
145 einfo "content of /usr/share/doc/${PF}/examples to a"
146 einfo "temporary location and run 'make test'."
147 echo
148 }

  ViewVC Help
Powered by ViewVC 1.1.20