summaryrefslogtreecommitdiff
blob: f65d7fd62ba9675f750f51e9d9ae6154662e7868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-php5/php-qt/php-qt-0.9.ebuild,v 1.5 2008/08/11 19:39:31 yngwin Exp $

EAPI=1

PHP_EXT_NAME="php_qt"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"
PHPSAPILIST="cli"
inherit php-ext-base-r1 qt4 eutils depend.php cmake-utils

DESCRIPTION="PHP5 bindings for the Qt4 framework."
HOMEPAGE="http://php-qt.org/"
SRC_URI="mirror://berlios/php-qt/${P}.tar.gz"

LICENSE="GPL-2 BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"

RDEPEND=">=x11-libs/qscintilla-2.1-r1
	!kde-base/smoke" # yes, this IS required, installs a bundled QT4-compatible copy

DEPEND="${RDEPEND}
	>=dev-util/cmake-2.4
	dev-lang/perl"

need_php_by_category

S="${WORKDIR}/${PN/-}"

pkg_setup() {
	require_php_cli
	if built_with_use =${PHP_PKG} threads; then
		eerror "dev-lang/php must be compiled without threads support."
		die "Recompile ${PHP_PKG} with USE=\"-threads\" and try again."
	fi
	if ! built_with_use x11-libs/qscintilla qt4 ; then
		eerror  "x11-libs/qscintilla must be compiled with qt4 support."
		die "Recompile x11-libs/qscintilla with USE=\"qt4\" and try again."
	fi
}

src_unpack() {
	unpack ${A}
	cd "${S}"
	# Bug 208301
	epatch "${FILESDIR}"/${P}-no-qwt.patch
}

src_compile() {
	local mycmakeargs="-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DQSCINTILLA_INCLUDE_DIR=/usr/include/Qsci"
	cmake-utils_src_compile
}

src_install() {
	cmake-utils_src_install
	php-ext-base-r1_src_install

	# COPYING is a dependent license
	dodoc-php COPYING ChangeLog CREDITS README
	insinto /usr/share/doc/${CATEGORY}/${PF}/examples/
	doins -r "${S}"/examples/*
	insinto /usr/share/doc/${CATEGORY}/${PF}/tutorials/
	doins -r "${S}"/tutorials/*
}