summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2012-04-01 15:42:58 +0000
committerDavide Pesavento <pesa@gentoo.org>2012-04-01 15:42:58 +0000
commit618591a45750d3a2feebf69c4a36eeb799cdeb95 (patch)
treee8770d4ae2d80765f73de4492d32785e87dff9e6 /x11-libs/qt-demo
parentsparc stable wrt #409199 (diff)
downloadgentoo-2-618591a45750d3a2feebf69c4a36eeb799cdeb95.tar.gz
gentoo-2-618591a45750d3a2feebf69c4a36eeb799cdeb95.tar.bz2
gentoo-2-618591a45750d3a2feebf69c4a36eeb799cdeb95.zip
Introduce some USE flags to control building of various examples and demos, fixing also bug 410309.
(Portage version: 2.2.0_alpha97/cvs/Linux x86_64)
Diffstat (limited to 'x11-libs/qt-demo')
-rw-r--r--x11-libs/qt-demo/ChangeLog9
-rw-r--r--x11-libs/qt-demo/metadata.xml12
-rw-r--r--x11-libs/qt-demo/qt-demo-4.8.1-r1.ebuild108
-rw-r--r--x11-libs/qt-demo/qt-demo-4.8.1.ebuild63
4 files changed, 125 insertions, 67 deletions
diff --git a/x11-libs/qt-demo/ChangeLog b/x11-libs/qt-demo/ChangeLog
index c357686ea9b4..045ce8c18f0a 100644
--- a/x11-libs/qt-demo/ChangeLog
+++ b/x11-libs/qt-demo/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for x11-libs/qt-demo
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-demo/ChangeLog,v 1.82 2012/03/29 22:11:13 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-demo/ChangeLog,v 1.83 2012/04/01 15:42:58 pesa Exp $
+
+*qt-demo-4.8.1-r1 (01 Apr 2012)
+
+ 01 Apr 2012; Davide Pesavento <pesa@gentoo.org> +qt-demo-4.8.1-r1.ebuild,
+ -qt-demo-4.8.1.ebuild, metadata.xml:
+ Introduce some USE flags to control building of various examples and demos,
+ fixing also bug 410309.
*qt-demo-4.8.1 (29 Mar 2012)
diff --git a/x11-libs/qt-demo/metadata.xml b/x11-libs/qt-demo/metadata.xml
index 80ed182284bb..9a353bd988dc 100644
--- a/x11-libs/qt-demo/metadata.xml
+++ b/x11-libs/qt-demo/metadata.xml
@@ -3,11 +3,17 @@
<pkgmetadata>
<herd>qt</herd>
<use>
+ <flag name='c++0x'>Build Qt using the C++11 standard</flag>
+ <flag name='dbus'>Build QtDBus examples and demos</flag>
+ <flag name='declarative'>Build QtDeclarative examples and demos</flag>
<flag name='exceptions'>Add support for exceptions - like catching them
inside the event loop (recommended by Nokia)</flag>
- <flag name='qt3support'>Enable the Qt3Support libraries for Qt4. Note that
- this does not mean you can compile pure Qt3 programs with Qt4.</flag>
- <flag name='c++0x'>Build Qt using the C++11 standard</flag>
+ <flag name='multimedia'>Build QtMultimedia examples and demos</flag>
+ <flag name='opengl'>Build QtOpenGL examples and demos</flag>
+ <flag name='openvg'>Build QtOpenVG examples and demos</flag>
<flag name='qpa'>Build a window system agnostic implementation of Qt</flag>
+ <flag name='qt3support'>Build Qt3Support examples and demos</flag>
+ <flag name='webkit'>Build QtWebKit examples and demos</flag>
+ <flag name='xmlpatterns'>Build QtXmlPatterns examples and demos</flag>
</use>
</pkgmetadata>
diff --git a/x11-libs/qt-demo/qt-demo-4.8.1-r1.ebuild b/x11-libs/qt-demo/qt-demo-4.8.1-r1.ebuild
new file mode 100644
index 000000000000..9eb11314f012
--- /dev/null
+++ b/x11-libs/qt-demo/qt-demo-4.8.1-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-demo/qt-demo-4.8.1-r1.ebuild,v 1.1 2012/04/01 15:42:58 pesa Exp $
+
+EAPI=4
+
+inherit qt4-build
+
+DESCRIPTION="Demonstration module of the Qt toolkit"
+SLOT="4"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="dbus declarative kde multimedia opengl openvg qt3support webkit xmlpatterns"
+
+DEPEND="
+ ~x11-libs/qt-core-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?]
+ dbus? ( ~x11-libs/qt-dbus-${PV}:4[aqua=,c++0x=,debug=,qpa=] )
+ declarative? ( ~x11-libs/qt-declarative-${PV}:4[aqua=,c++0x=,debug=,qpa=,webkit?] )
+ ~x11-libs/qt-gui-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?]
+ multimedia? ( ~x11-libs/qt-multimedia-${PV}:4[aqua=,c++0x=,debug=,qpa=] )
+ opengl? ( ~x11-libs/qt-opengl-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?] )
+ openvg? ( ~x11-libs/qt-openvg-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?] )
+ kde? ( media-libs/phonon[aqua=] )
+ !kde? ( || (
+ ~x11-libs/qt-phonon-${PV}:4[aqua=,c++0x=,debug=,qpa=]
+ media-libs/phonon[aqua=]
+ ) )
+ qt3support? ( ~x11-libs/qt-qt3support-${PV}:4[aqua=,c++0x=,debug=,qpa=] )
+ ~x11-libs/qt-script-${PV}:4[aqua=,c++0x=,debug=,qpa=]
+ ~x11-libs/qt-sql-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?]
+ ~x11-libs/qt-svg-${PV}:4[aqua=,c++0x=,debug=,qpa=]
+ ~x11-libs/qt-test-${PV}:4[aqua=,c++0x=,debug=,qpa=]
+ webkit? ( ~x11-libs/qt-webkit-${PV}:4[aqua=,c++0x=,debug=,qpa=] )
+ xmlpatterns? ( ~x11-libs/qt-xmlpatterns-${PV}:4[aqua=,c++0x=,debug=,qpa=] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.6-plugandpaint.patch"
+)
+
+pkg_setup() {
+ QT4_TARGET_DIRECTORIES="
+ demos
+ examples"
+ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ doc/src/images
+ src
+ include
+ tools"
+
+ qt4-build_pkg_setup
+}
+
+src_prepare() {
+ qt4-build_src_prepare
+
+ # Array mapping USE flags to subdirs
+ local flags_subdirs_map=(
+ 'dbus'
+ 'declarative:declarative'
+ 'multimedia:spectrum'
+ 'opengl:boxes|glhypnotizer'
+ 'openvg'
+ 'webkit:browser'
+ 'xmlpatterns'
+ )
+ # Disable unwanted examples/demos
+ for flag in "${flags_subdirs_map[@]}"; do
+ if ! use ${flag%:*}; then
+ einfo "Disabling ${flag%:*} examples"
+ sed -i -e "/SUBDIRS += ${flag%:*}/d" \
+ examples/examples.pro || die
+
+ if [[ ${flag} == *:* ]]; then
+ einfo "Disabling ${flag%:*} demos"
+ sed -i -re "/SUBDIRS \+= demos_(${flag#*:})/d" \
+ demos/demos.pro || die
+ fi
+ fi
+ done
+
+ if ! use qt3support; then
+ einfo "Disabling qt3support examples"
+ sed -i -e '/QT_CONFIG, qt3support/d' \
+ examples/graphicsview/graphicsview.pro || die
+ fi
+}
+
+src_configure() {
+ myconf+="
+ $(qt_use dbus)
+ $(qt_use declarative)
+ $(qt_use multimedia)
+ $(qt_use opengl)
+ $(qt_use openvg)
+ $(qt_use qt3support)
+ $(qt_use webkit)
+ $(qt_use xmlpatterns)"
+
+ qt4-build_src_configure
+}
+
+src_install() {
+ insinto "${QTDOCDIR#${EPREFIX}}"/src
+ doins -r doc/src/images
+
+ qt4-build_src_install
+}
diff --git a/x11-libs/qt-demo/qt-demo-4.8.1.ebuild b/x11-libs/qt-demo/qt-demo-4.8.1.ebuild
deleted file mode 100644
index 549f0512cd3d..000000000000
--- a/x11-libs/qt-demo/qt-demo-4.8.1.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-demo/qt-demo-4.8.1.ebuild,v 1.1 2012/03/29 22:11:13 pesa Exp $
-
-EAPI=4
-
-inherit qt4-build
-
-DESCRIPTION="Demonstration module of the Qt toolkit"
-SLOT="4"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-IUSE="kde qt3support"
-
-DEPEND="
- ~x11-libs/qt-assistant-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
- ~x11-libs/qt-core-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,qt3support=]
- ~x11-libs/qt-dbus-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
- ~x11-libs/qt-declarative-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,webkit]
- ~x11-libs/qt-gui-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,qt3support=]
- ~x11-libs/qt-multimedia-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
- ~x11-libs/qt-opengl-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,qt3support=]
- kde? ( media-libs/phonon[aqua=] )
- !kde? ( || (
- ~x11-libs/qt-phonon-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
- media-libs/phonon[aqua=]
- ) )
- ~x11-libs/qt-script-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
- ~x11-libs/qt-sql-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,qt3support=]
- ~x11-libs/qt-svg-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
- ~x11-libs/qt-test-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
- ~x11-libs/qt-webkit-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
- ~x11-libs/qt-xmlpatterns-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=]
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.6-plugandpaint.patch"
-)
-
-pkg_setup() {
- QT4_TARGET_DIRECTORIES="
- demos
- examples"
- QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
- doc/src/images
- src
- include
- tools"
-
- qt4-build_pkg_setup
-}
-
-src_configure() {
- myconf="${myconf} $(qt_use qt3support)"
- qt4-build_src_configure
-}
-
-src_install() {
- insinto "${QTDOCDIR#${EPREFIX}}"/src
- doins -r "${S}"/doc/src/images
-
- qt4-build_src_install
-}