eclass/qt4-qt-copy.eclass: update to 4.4.0_rc1 patchset 1.2
[gentoo-soor-overlay.git] / eclass / qt4-qt-copy.eclass
blob3ab93b552b4e3cf41ee43411ed08a1017c473162
1 # Copyright 2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI="1"
7 # @ECLASS: qt4-qt-copy.eclass
8 # @MAINTAINER:
9 # Leonardo Valeri Manera <l.valerimanera@gmail.com>
10 # @BLURB: Eclass for Qt4 split ebuilds with qt-copy
11 # @DESCRIPTION:
12 # This eclass contains overlays the standard qt4-build eclass
13 # with an optional function that applies qt-copy patches,
14 # either from a tarball or from svn trunk.
16 inherit eutils qt4-build
18 case ${PVR} in
19 4.4.0_rc1)
20 case ${PN} in
21 qt-core|qt-dbus|qt-gui|qt-qt3support|qt-script)
22 QT_COPY_PV="1.2"
24 esac
27 eerror "Version ${PVR} does not have patchset defined in the qt4-qt-copy eclass!"
28 die "Unsupported version for patchset, something screwed up bad, boss."
30 esac
32 if [[ -n ${QT_COPY_PV} ]]; then
33 IUSE="${IUSE} +qt-copy"
34 SRC_URI="${SRC_URI} qt-copy? ( http://jyujin.de/~creidiki/qt-copy/qt-copy-${PV}-patches-${QT_COPY_PV}.tar.lzma )"
35 DEPEND="qt-copy? ( app-arch/lzma-utils )"
38 qt4_qt-copy() {
39 case ${PVR} in
40 4.4.0_rc1)
41 local patches_corelib_io patches_corelib_kernel \
42 patches_gui_graphicsview patches_gui_image patches_gui_kernel patches_gui_text patches_gui_widgets \
43 patches_qt3support_text
44 patches_corelib_io="
45 0167-fix-group-reading.diff"
46 patches_corelib_kernel="
47 0180-window-role-corelib.diff"
48 patches_gui_graphicsview="
49 0214-fix-qgraphicsproxywidget-tab-crash.diff"
50 patches_gui_image="
51 0223-fix-qpixmap-hasalpha.diff
52 0224-fast-qpixmap-fill.diff"
53 patches_gui_kernel="
54 0180-window-role-gui.diff
55 0195-compositing-properties.diff
56 0220-no-x-recursion-in-xerrhandler.diff"
57 patches_gui_text="
58 0203-qtexthtmlparser-link-color.diff"
59 patches_gui_widgets="
60 0225-invalidate-tabbar-geometry-on-refresh.diff"
61 patches_qt3support_text="
62 0210-fix-crash-q3stylesheet-font-size.diff"
64 local qt_core_patches qt_dbus_patches qt_gui_patches qt_qt3support_patches qt_script_patches
65 qt_core_patches="${patches_corelib_io} ${patches_corelib_kernel}"
66 qt_dbus_patches="${patches_corelib_io} ${patches_corelib_kernel}"
67 qt_gui_patches="${patches_gui_graphicsview} ${patches_gui_image} ${patches_gui_kernel} ${patches_gui_text} ${patches_gui_widgets}"
68 qt_qt3support_patches="${patches_qt3support_text}"
69 qt_script_patches="${patches_corelib_kernel}"
72 eerror "Version ${PVR} is not supported by the qt4-qt-copy eclass!"
73 die "Unsupported version for patching, something screwed up bad, boss."
75 esac
77 local qt_copy_patches qt_copy patch qt_copy_files
78 qt_copy_patches="${PN//-/_}_patches"
79 for qt_copy_patch in ${!qt_copy_patches}; do
80 qt_copy_files="${qt_copy_files} patches/${qt_copy_patch}"
81 done
83 cd "${S}"
85 echo "lzma -dc ${DISTDIR}/qt-copy-${PV}-patches-${QT_COPY_PV}.tar.lzma | tar xf - --no-same-owner ${qt_copy_files}"
86 lzma -dc "${DISTDIR}"/qt-copy-${PV}-patches-${QT_COPY_PV}.tar.lzma | tar xf - --no-same-owner ${qt_copy_files}
88 EPATCH_MULTI_MSG="Applying QT-copy patches ..." \
89 EPATCH_FORCE="yes" EPATCH_SUFFIX="" epatch "${S}"/patches
92 qt4_unpack() {
93 local target targets
94 for target in configure LICENSE.{GPL2,GPL3,QPL} projects.pro \
95 src/{qbase,qt_targets,qt_install}.pri bin config.tests mkspecs qmake \
96 ${QT4_EXTRACT_DIRECTORIES} ${QT4_TARGET_DIRECTORIES}; do
97 targets="${targets} ${MY_P}/${target}"
98 done
100 echo tar xjpf "${DISTDIR}"/${MY_P}.tar.bz2 ${targets}
101 tar xjpf "${DISTDIR}"/${MY_P}.tar.bz2 ${targets}
103 case "${PV}" in
104 4.4.0_rc*)
105 echo tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2
106 tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2
108 esac
110 use qt-copy && qt4_qt-copy
113 qt4-qt-copy_pkg_postinst() {
114 qt4-build_pkg_postinst
115 if use qt-copy; then
116 ewarn
117 ewarn "Do NOT report bugs to Gentoo's bugzilla when built with qt-copy!"
118 ewarn
122 EXPORT_FUNCTIONS pkg_postinst