# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=4 inherit eutils toolchain-funcs MY_PN="lib_mysqludf_preg" DESCRIPTION="MySQL UDFs that provide access to the Perl Compatiable Resular Expressions library" HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_preg/" SRC_URI="http://www.mysqludf.org/lib_mysqludf_preg/${MY_PN}-${PV}.tar.gz" LICENSE="BSD-2" SLOT="0" KEYWORDS="amd64 x86" IUSE="" DEPEND=">=virtual/mysql-5.1 >=dev-libs/libpcre-8.12" RDEPEND="${DEPEND}" S="${WORKDIR}/${MY_PN}-${PV}/" pkg_setup() { MYSQL_PLUGINDIR="$(mysql_config --plugindir)" MYSQL_INCLUDE="$(mysql_config --include)" } src_prepare() { epatch "${FILESDIR}/preg_position_fix.patch" } src_configure() { econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" \ --with-mysql="$(type -p mysql_config)" } src_install() { emake DESTDIR="${D}" install dodoc README dodoc INSTALL newdoc uninstalldb.sql ${PN}-uninstalldb.sql newdoc installdb.sql ${PN}-installdb.sql # remove obsolete *.la file #rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la } pkg_postinst() { elog elog "Please have a look at the documentation, how to" elog "enable/disable the UDF functions of ${PN}." elog elog "The documentation is located here:" elog "/usr/share/doc/${PF}" elog }