# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
# /var/cvsroot/gentoo-x86/dev-php/php-handlersocket/php-handlersocket-0.3.1.ebuild 2013/05/27 20:50:15  Exp $

EAPI="4"
PHP_EXT_NAME="handlersocket"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"
DOCS="README"

USE_PHP="php5-3"

inherit php-ext-source-r2

KEYWORDS="~amd64 ~x86"

DESCRIPTION="PHP extension for interfacing with MySQL Handler Socket."
LICENSE="PHP-3"
SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
SLOT="0"
IUSE="+native"

DEPEND="${DEPEND}
		dev-lang/php"
RDEPEND="${DEPEND}"

src_unpack() {
	tar -xzf ${DISTDIR}/${P}.tar.gz -C "${WORKDIR}"
	mv "${WORKDIR}/handlersocket" "${WORKDIR}/${P}"
	php-ext-source-r2_src_unpack
}

src_configure() {
	use native && my_conf="${my_conf} --disable-handlersocket-hsclient"
	php-ext-source-r2_src_configure
}