1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit python flag-o-matic libtool autotools eutils pam user versionator
10 S="${WORKDIR}/${MY_P}"
12 DESCRIPTION="Database optimized for Cloud and Net applications"
13 HOMEPAGE="http://drizzle.org"
14 SRC_URI="https://launchpad.net/drizzle/$(get_version_component_range 1-2)/${PV}/+download/${MY_P}.tar.gz"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="debug tcmalloc doc memcache curl pam gearman +md5 ldap v8"
21 RDEPEND="tcmalloc? ( dev-util/google-perftools )
26 >=dev-libs/libevent-1.4
27 >=dev-libs/protobuf-2.1.0
29 >=dev-libs/boost-1.52.0-r1:=[threads]
30 gearman? ( >=sys-cluster/gearmand-0.12 )
32 curl? ( net-misc/curl )
33 memcache? ( >=dev-libs/libmemcached-0.39 )
34 md5? ( >=dev-libs/libgcrypt-1.4.2:0 )
35 ldap? ( net-nds/openldap )
46 doc? ( app-doc/doxygen )"
49 enewuser drizzle -1 -1 /dev/null nogroup
50 python_set_active_version 2
56 "${FILESDIR}/${PN}-7.2.3-libtool.patch" \
57 "${FILESDIR}/${PN}-7.2.3+automake-1.12.patch" \
58 "${FILESDIR}/${PN}-7.2.4+boost-1.50.patch" \
59 "${FILESDIR}/${P}-fix-boost_thread-detection.patch"
61 python_convert_shebangs -r 2 .
71 append-cppflags -DDEBUG
74 # while I applaud upstreams goal of 0 compiler warnings
75 # the 1412 release didn't achieve it.
76 append-flags -Wno-error
78 # NOTE disable-all and without-all no longer recognized options
79 # NOTE using --enable on some plugins can cause test failures.
80 # --with should be used instead. A discussion about this here:
81 # https://bugs.launchpad.net/drizzle/+bug/598659
83 # $(use_with memcache memcached-stats-plugin) \
84 # $(use_with memcache memcached-functions-plugin) \
88 --disable-dependency-tracking \
90 --without-hello-world-plugin \
91 --disable-rabbitmq-plugin --without-rabbitmq-plugin \
92 --disable-zeromq-plugin --without-zeromq-plugin \
93 --with-auth-test-plugin \
94 --with-auth-file-plugin \
95 --with-simple-user-policy-plugin \
96 --enable-logging-stats-plugin \
97 --with-logging-stats-plugin \
98 --enable-console-plugin \
99 $(use_enable gearman libgearman) \
100 $(use_enable ldap libldap) \
101 $(use_enable memcache libmemcached) \
102 $(use_enable tcmalloc) \
103 $(use_with curl auth-http-plugin) \
104 $(use_with gearman gearman-udf-plugin) \
105 $(use_with gearman logging-gearman-plugin) \
106 $(use_with ldap auth-ldap-plugin) \
107 $(use_with md5 md5-plugin) \
108 $(use_with pam auth-pam-plugin) \
109 $(use_with v8 js-plugin) \
114 emake V=1 all $(use doc && echo doxygen)
117 # currently not working as of 7.2.3
121 if [[ ${EUID} == 0 ]]; then
122 eerror "You cannot run tests as root."
123 eerror "Please enable FEATURES=userpriv before proceeding."
130 DOCS=( AUTHORS NEWS README )
135 find "${D}" -name '*.la' -delete || die
144 newinitd "${FILESDIR}"/drizzle.init.d.2 drizzled
145 newconfd "${FILESDIR}"/drizzle.conf.d drizzled
147 if ! use gearman; then
148 sed -i -e '/need gearmand/d' "${D}"/etc/init.d/drizzled \
149 || die "unable to sed init script (gearman)"
152 if ! use memcache; then
153 sed -i -e '/need memcached/d' "${D}"/etc/init.d/drizzled \
154 || die "unable to sed init script (memcache)"
157 keepdir /var/log/drizzle
158 keepdir /var/lib/drizzle/drizzled
161 fperms 0755 /var/log/drizzle
162 fperms -R 0700 /var/lib/drizzle
164 fowners drizzle:nogroup /var/log/drizzle
165 fowners -R drizzle:nogroup /var/lib/drizzle
167 pamd_mimic system-auth drizzle auth account session