/[gentoo-x86]/dev-db/mongodb/mongodb-2.2.0-r1.ebuild
Gentoo

Contents of /dev-db/mongodb/mongodb-2.2.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Nov 22 03:45:06 2012 UTC (21 months ago) by flameeyes
Branch: MAIN
Changes since 1.1: +2 -6 lines
Get rid of boost-utils eclass.

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-2.2.0-r1.ebuild,v 1.1 2012/10/09 18:54:01 axs Exp $
4
5 EAPI=4
6 SCONS_MIN_VERSION="1.2.0"
7 BOOST_MAX_SLOT="1.49"
8 inherit eutils flag-o-matic multilib pax-utils scons-utils user versionator
9
10 MY_P=${PN}-src-r${PV/_rc/-rc}
11
12 DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
13 HOMEPAGE="http://www.mongodb.org"
14 SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz
15 mms-agent? ( http://dev.gentoo.org/~ultrabug/20120830-10gen-mms-agent.zip )"
16
17 LICENSE="AGPL-3 Apache-2.0"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="mms-agent static-libs v8"
21
22 PDEPEND="mms-agent? ( dev-python/pymongo )"
23 RDEPEND="
24 v8? ( dev-lang/v8 )
25 <dev-libs/boost-1.50
26 dev-libs/libpcre[cxx]
27 dev-util/google-perftools
28 net-libs/libpcap
29 app-arch/snappy"
30 DEPEND="${RDEPEND}
31 sys-libs/readline
32 sys-libs/ncurses"
33
34 S=${WORKDIR}/${MY_P}
35
36 pkg_setup() {
37 enewgroup mongodb
38 enewuser mongodb -1 -1 /var/lib/${PN} mongodb
39
40 scons_opts=" --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
41 scons_opts+=" --use-system-tcmalloc"
42 scons_opts+=" --use-system-pcre"
43 scons_opts+=" --use-system-snappy"
44 scons_opts+=" --use-system-boost"
45
46 if use v8; then
47 scons_opts+=" --usev8"
48 else
49 scons_opts+=" --usesm"
50 fi
51 }
52
53 src_prepare() {
54 epatch "${FILESDIR}/${PN}-2.2-r1-fix-scons.patch"
55 epatch "${FILESDIR}/${PN}-2.2-r1-fix-boost.patch"
56
57 # FIXME: apply only this fix [1] on x86 boxes as it breaks /usr/lib symlink
58 # on amd64 machines [2].
59 # [1] https://jira.mongodb.org/browse/SERVER-5575
60 # [2] https://bugs.gentoo.org/show_bug.cgi?id=434664
61 if use !prefix && [[ "$(get_libdir)" == "lib" ]]; then
62 epatch "${FILESDIR}/${PN}-2.2-fix-x86client.patch"
63 fi
64 }
65
66 src_compile() {
67 escons ${scons_opts} all
68 }
69
70 src_install() {
71 escons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr
72
73 use static-libs || rm "${ED}/usr/$(get_libdir)/libmongoclient.a"
74
75 use v8 && pax-mark m "${ED}"/usr/bin/{mongo,mongod}
76
77 for x in /var/{lib,log,run}/${PN}; do
78 keepdir "${x}"
79 fowners mongodb:mongodb "${x}"
80 done
81
82 doman debian/mongo*.1
83 dodoc README docs/building.md
84
85 newinitd "${FILESDIR}/${PN}.initd" ${PN}
86 newconfd "${FILESDIR}/${PN}.confd" ${PN}
87 newinitd "${FILESDIR}/${PN/db/s}.initd" ${PN/db/s}
88 newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s}
89
90 insinto /etc/logrotate.d/
91 newins "${FILESDIR}/${PN}.logrotate" ${PN}
92
93 if use mms-agent; then
94 local MY_PN="mms-agent"
95 local MY_D="/opt/${MY_PN}"
96 insinto ${MY_D}
97 doins "${WORKDIR}/${MY_PN}/"*
98 fowners -R mongodb:mongodb ${MY_D}
99 newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN}
100 newconfd "${FILESDIR}/${MY_PN}.confd" ${MY_PN}
101 fi
102 }
103
104 src_test() {
105 escons ${scons_opts} test
106 "${S}"/test --dbpath=unittest || die
107 }
108
109 pkg_postinst() {
110 if [[ ${REPLACING_VERSIONS} < 1.8 ]]; then
111 ewarn "You just upgraded from a previous version of mongodb !"
112 ewarn "Make sure you run 'mongod --upgrade' before using this version."
113 fi
114 elog "Journaling is now enabled by default, see /etc/conf.d/${PN}"
115 }

  ViewVC Help
Powered by ViewVC 1.1.20