1 |
commit: eda4a132e254aa33e1bf3d935f2cc74d754dfa1b |
2 |
Author: Michael Palimaka <kensington <AT> astralcloak <DOT> net> |
3 |
AuthorDate: Sun Apr 1 18:09:29 2012 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> astralcloak <DOT> net> |
5 |
CommitDate: Sun Apr 1 18:09:29 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=eda4a132 |
7 |
|
8 |
[x11-libs/qt-demo] Sync with portage. |
9 |
|
10 |
(Portage version: 2.1.10.53/git/Linux x86_64, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
x11-libs/qt-demo/metadata.xml | 12 +++- |
14 |
x11-libs/qt-demo/qt-demo-4.8.9999.ebuild | 81 +++++++++++++++++++++++------- |
15 |
2 files changed, 72 insertions(+), 21 deletions(-) |
16 |
|
17 |
diff --git a/x11-libs/qt-demo/metadata.xml b/x11-libs/qt-demo/metadata.xml |
18 |
index 80ed182..9a353bd 100644 |
19 |
--- a/x11-libs/qt-demo/metadata.xml |
20 |
+++ b/x11-libs/qt-demo/metadata.xml |
21 |
@@ -3,11 +3,17 @@ |
22 |
<pkgmetadata> |
23 |
<herd>qt</herd> |
24 |
<use> |
25 |
+ <flag name='c++0x'>Build Qt using the C++11 standard</flag> |
26 |
+ <flag name='dbus'>Build QtDBus examples and demos</flag> |
27 |
+ <flag name='declarative'>Build QtDeclarative examples and demos</flag> |
28 |
<flag name='exceptions'>Add support for exceptions - like catching them |
29 |
inside the event loop (recommended by Nokia)</flag> |
30 |
- <flag name='qt3support'>Enable the Qt3Support libraries for Qt4. Note that |
31 |
- this does not mean you can compile pure Qt3 programs with Qt4.</flag> |
32 |
- <flag name='c++0x'>Build Qt using the C++11 standard</flag> |
33 |
+ <flag name='multimedia'>Build QtMultimedia examples and demos</flag> |
34 |
+ <flag name='opengl'>Build QtOpenGL examples and demos</flag> |
35 |
+ <flag name='openvg'>Build QtOpenVG examples and demos</flag> |
36 |
<flag name='qpa'>Build a window system agnostic implementation of Qt</flag> |
37 |
+ <flag name='qt3support'>Build Qt3Support examples and demos</flag> |
38 |
+ <flag name='webkit'>Build QtWebKit examples and demos</flag> |
39 |
+ <flag name='xmlpatterns'>Build QtXmlPatterns examples and demos</flag> |
40 |
</use> |
41 |
</pkgmetadata> |
42 |
|
43 |
diff --git a/x11-libs/qt-demo/qt-demo-4.8.9999.ebuild b/x11-libs/qt-demo/qt-demo-4.8.9999.ebuild |
44 |
index e7188d5..d0d4d0d 100644 |
45 |
--- a/x11-libs/qt-demo/qt-demo-4.8.9999.ebuild |
46 |
+++ b/x11-libs/qt-demo/qt-demo-4.8.9999.ebuild |
47 |
@@ -1,6 +1,6 @@ |
48 |
# Copyright 1999-2012 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
-# $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 $ |
51 |
+# $Header: $ |
52 |
|
53 |
EAPI=4 |
54 |
|
55 |
@@ -13,27 +13,28 @@ if [[ ${QT4_BUILD_TYPE} == live ]]; then |
56 |
else |
57 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
58 |
fi |
59 |
-IUSE="kde qt3support" |
60 |
+IUSE="dbus declarative kde multimedia opengl openvg qt3support webkit xmlpatterns" |
61 |
|
62 |
DEPEND=" |
63 |
- ~x11-libs/qt-assistant-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
64 |
- ~x11-libs/qt-core-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,qt3support=] |
65 |
- ~x11-libs/qt-dbus-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
66 |
- ~x11-libs/qt-declarative-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,webkit] |
67 |
- ~x11-libs/qt-gui-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,qt3support=] |
68 |
- ~x11-libs/qt-multimedia-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
69 |
- ~x11-libs/qt-opengl-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,qt3support=] |
70 |
+ ~x11-libs/qt-core-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?] |
71 |
+ dbus? ( ~x11-libs/qt-dbus-${PV}:4[aqua=,c++0x=,debug=,qpa=] ) |
72 |
+ declarative? ( ~x11-libs/qt-declarative-${PV}:4[aqua=,c++0x=,debug=,qpa=,webkit?] ) |
73 |
+ ~x11-libs/qt-gui-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?] |
74 |
+ multimedia? ( ~x11-libs/qt-multimedia-${PV}:4[aqua=,c++0x=,debug=,qpa=] ) |
75 |
+ opengl? ( ~x11-libs/qt-opengl-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?] ) |
76 |
+ openvg? ( ~x11-libs/qt-openvg-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?] ) |
77 |
kde? ( media-libs/phonon[aqua=] ) |
78 |
!kde? ( || ( |
79 |
- ~x11-libs/qt-phonon-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
80 |
+ ~x11-libs/qt-phonon-${PV}:4[aqua=,c++0x=,debug=,qpa=] |
81 |
media-libs/phonon[aqua=] |
82 |
) ) |
83 |
- ~x11-libs/qt-script-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
84 |
- ~x11-libs/qt-sql-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=,qt3support=] |
85 |
- ~x11-libs/qt-svg-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
86 |
- ~x11-libs/qt-test-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
87 |
- ~x11-libs/qt-webkit-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
88 |
- ~x11-libs/qt-xmlpatterns-${PV}:${SLOT}[aqua=,c++0x=,qpa=,debug=] |
89 |
+ qt3support? ( ~x11-libs/qt-qt3support-${PV}:4[aqua=,c++0x=,debug=,qpa=] ) |
90 |
+ ~x11-libs/qt-script-${PV}:4[aqua=,c++0x=,debug=,qpa=] |
91 |
+ ~x11-libs/qt-sql-${PV}:4[aqua=,c++0x=,debug=,qpa=,qt3support?] |
92 |
+ ~x11-libs/qt-svg-${PV}:4[aqua=,c++0x=,debug=,qpa=] |
93 |
+ ~x11-libs/qt-test-${PV}:4[aqua=,c++0x=,debug=,qpa=] |
94 |
+ webkit? ( ~x11-libs/qt-webkit-${PV}:4[aqua=,c++0x=,debug=,qpa=] ) |
95 |
+ xmlpatterns? ( ~x11-libs/qt-xmlpatterns-${PV}:4[aqua=,c++0x=,debug=,qpa=] ) |
96 |
" |
97 |
RDEPEND="${DEPEND}" |
98 |
|
99 |
@@ -54,14 +55,58 @@ pkg_setup() { |
100 |
qt4-build_pkg_setup |
101 |
} |
102 |
|
103 |
+src_prepare() { |
104 |
+ qt4-build_src_prepare |
105 |
+ |
106 |
+ # Array mapping USE flags to subdirs |
107 |
+ local flags_subdirs_map=( |
108 |
+ 'dbus' |
109 |
+ 'declarative:declarative' |
110 |
+ 'multimedia:spectrum' |
111 |
+ 'opengl:boxes|glhypnotizer' |
112 |
+ 'openvg' |
113 |
+ 'webkit:browser' |
114 |
+ 'xmlpatterns' |
115 |
+ ) |
116 |
+ # Disable unwanted examples/demos |
117 |
+ for flag in "${flags_subdirs_map[@]}"; do |
118 |
+ if ! use ${flag%:*}; then |
119 |
+ einfo "Disabling ${flag%:*} examples" |
120 |
+ sed -i -e "/SUBDIRS += ${flag%:*}/d" \ |
121 |
+ examples/examples.pro || die |
122 |
+ |
123 |
+ if [[ ${flag} == *:* ]]; then |
124 |
+ einfo "Disabling ${flag%:*} demos" |
125 |
+ sed -i -re "/SUBDIRS \+= demos_(${flag#*:})/d" \ |
126 |
+ demos/demos.pro || die |
127 |
+ fi |
128 |
+ fi |
129 |
+ done |
130 |
+ |
131 |
+ if ! use qt3support; then |
132 |
+ einfo "Disabling qt3support examples" |
133 |
+ sed -i -e '/QT_CONFIG, qt3support/d' \ |
134 |
+ examples/graphicsview/graphicsview.pro || die |
135 |
+ fi |
136 |
+} |
137 |
+ |
138 |
src_configure() { |
139 |
- myconf="${myconf} $(qt_use qt3support)" |
140 |
+ myconf+=" |
141 |
+ $(qt_use dbus) |
142 |
+ $(qt_use declarative) |
143 |
+ $(qt_use multimedia) |
144 |
+ $(qt_use opengl) |
145 |
+ $(qt_use openvg) |
146 |
+ $(qt_use qt3support) |
147 |
+ $(qt_use webkit) |
148 |
+ $(qt_use xmlpatterns)" |
149 |
+ |
150 |
qt4-build_src_configure |
151 |
} |
152 |
|
153 |
src_install() { |
154 |
insinto "${QTDOCDIR#${EPREFIX}}"/src |
155 |
- doins -r "${S}"/doc/src/images |
156 |
+ doins -r doc/src/images |
157 |
|
158 |
qt4-build_src_install |
159 |
} |