/[gentoo-x86]/dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild
Gentoo

Contents of /dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Oct 19 12:23:45 2011 UTC (3 years, 1 month ago) by sbriesen
Branch: MAIN
CVS Tags: HEAD
initial commit

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

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6
7 inherit eutils toolchain-funcs autotools
8
9 DESCRIPTION="MySQL UDFs which provides stemming capability for a variety of languages"
10 HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_stem/"
11 SRC_URI="http://www.mysqludf.org/${PN}/${P}.tar.gz"
12
13 LICENSE="LGPL-2.1"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 DEPEND=">=virtual/mysql-5.1"
19 RDEPEND="${DEPEND}"
20
21 RESTRICT="test"
22
23 pkg_setup() {
24 MYSQL_PLUGINDIR="$(mysql_config --plugindir)"
25 MYSQL_INCLUDE="$(mysql_config --include)"
26 }
27
28 src_prepare() {
29 # add AC_PROG_CXX to configure.ac
30 sed -i -e 's|\(AC_PROG_CC\)|\1\nAC_PROG_CXX|g' configure.ac
31
32 # fix ax_lib_mysql.m4 + ax_mysql_bin.m4
33 epatch "${FILESDIR}/${PN}-mysql_m4.patch"
34
35 # fix and clean libstemmer_c
36 sed -i -e 's|^\(CFLAGS\)=|\1+=-fPIC |g' libstemmer_c/Makefile
37 rm -f -- libstemmer_c/stemwords libstemmer_c/*.{o,a} libstemmer_c/*/*.o
38
39 edos2unix installdb.sql
40 eautoreconf
41 }
42
43 src_configure() {
44 econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}"
45 }
46
47 src_install() {
48 local X
49 emake DESTDIR="${D}" install
50 dodoc libstemmer_c/libstemmer/*.txt
51 [ -f ${PN}.html ] && dohtml ${PN}.html
52 [ -d doc/html ] && dohtml -r doc/html/.
53 for X in API AUTHORS ChangeLog NEWS README *installdb.sql; do
54 [ -s "${X}" ] && dodoc "${X}"
55 done
56
57 # remove obsolete *.la file
58 rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la
59 }
60
61 pkg_postinst() {
62 elog
63 elog "Please have a look at the documentation, how to"
64 elog "enable/disable the UDF functions of ${PN}."
65 elog
66 elog "The documentation is located here:"
67 elog "/usr/share/doc/${PF}"
68 elog
69 }

  ViewVC Help
Powered by ViewVC 1.1.20