eclass/qt4-qt-copy.eclass: this is going to be a major pain, but i have a cunning...
[gentoo-soor-overlay.git] / eclass / qt4-qt-copy.eclass
blobaba09ca8e247961c9fef13ab065680f8cc4be4d8
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 multilib toolchain-funcs flag-o-matic subversion qt4-build
18 IUSE="${IUSE} +qt-copy"
20 case ${PV} in
21 4.4.0_rc1)
22 QT_COPY_PV="1.0"
24 esac
26 SRC_URI="${SRC_URI} qt-copy? ( http://jyujin.de/~creidiki/qt-copy/qt-copy-${PV}-patches-${QT_COPY_PV}.tar.lzma )"
27 DEPEND="${DEPEND} qt-copy? ( app-arch/lzma-utils )"
29 qt4_qt-copy() {
30 #for x in $(ls "${S}"); do
31 #mv -vi ${x} $(echo ${x} | sed -e 's:[0-9]*:&_all_:' -e 's:_all_-:_all_:')
32 #done
34 cd "${S}"
36 echo "lzma -dc ${DISTDIR}/qt-copy-${PV}-patches-${QT_COPY_PV}.tar.lzma | tar xf - --no-same-owner"
37 lzma -dc "${DISTDIR}"/qt-copy-${PV}-patches-${QT_COPY_PV}.tar.lzma | tar xf - --no-same-owner
39 EPATCH_EXCLUDE=""
40 case ${PN},${PVR} in
41 qt-core,4.4.0_rc1*)
42 EPATCH_EXCLUDE="${EPATCH_EXCLUDE} 0180_all_window-role-gui.diff"
44 esac
46 EPATCH_SOURCE="${S}/patches"
47 EPATCH_MULTI_MSG="Applying Qt-copy patches ..."
48 EPATCH_SUFFIX="diff" epatch
51 qt4-qt-copy_src_unpack() {
52 qt4-build_src_unpack
53 use qt-copy && qt4_qt-copy
56 qt4-qt-copy_pkg_postinst() {
57 qt4-build_pkg_postinst
58 if use qt-copy; then
59 ewarn "Do NOT report bugs to Gentoo's bugzilla when built with qt-copy!"
63 EXPORT_FUNCTIONS src_unpack pkg_postinst