/[gentoo-x86]/dev-python/PyQt4/PyQt4-4.11.2-r1.ebuild
Gentoo

Contents of /dev-python/PyQt4/PyQt4-4.11.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sat Nov 1 02:58:19 2014 UTC (5 years, 5 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Bump to 4.11.3 prerelease, which contains upstream fixes for bugs #525392 and #525470. Also switch to out-of-source builds.

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xDADED6B2671CB57D!)

1 pesa 1.1 # Copyright 1999-2014 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 pesa 1.4 # $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/PyQt4-4.11.2-r1.ebuild,v 1.3 2014/10/15 14:48:47 pesa Exp $
4 pesa 1.1
5     EAPI=5
6     PYTHON_COMPAT=( python{2_7,3_3,3_4} )
7    
8     inherit eutils multibuild python-r1 qmake-utils
9    
10     DESCRIPTION="Python bindings for the Qt framework"
11     HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ https://pypi.python.org/pypi/PyQt4"
12    
13     MY_PN="PyQt-x11-gpl"
14     if [[ ${PV} == *_pre* ]]; then
15     MY_P=${MY_PN}-${PV%_pre*}-snapshot-${REVISION}
16     SRC_URI="http://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
17     else
18     MY_P=${MY_PN}-${PV}
19     SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
20     fi
21    
22     LICENSE="|| ( GPL-2 GPL-3 )"
23     SLOT="0"
24     KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
25    
26     IUSE="X dbus debug declarative designer doc examples help kde multimedia
27     opengl phonon script scripttools sql svg testlib webkit xmlpatterns"
28     REQUIRED_USE="
29     ${PYTHON_REQUIRED_USE}
30     sql? ( X )
31     testlib? ( X )
32     "
33    
34     # Minimal supported version of Qt.
35     QT_PV="4.8.5:4"
36    
37     RDEPEND="
38     ${PYTHON_DEPS}
39     >=dev-python/sip-4.16:=[${PYTHON_USEDEP}]
40     >=dev-qt/qtcore-${QT_PV}
41     X? ( >=dev-qt/qtgui-${QT_PV} )
42     dbus? (
43     dev-python/dbus-python[${PYTHON_USEDEP}]
44     >=dev-qt/qtdbus-${QT_PV}
45     )
46     declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
47     designer? ( >=dev-qt/designer-${QT_PV} )
48     help? ( >=dev-qt/qthelp-${QT_PV} )
49     multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
50     opengl? ( >=dev-qt/qtopengl-${QT_PV} )
51     phonon? (
52 pesa 1.2 kde? ( >=media-libs/phonon-4.7[qt4] )
53     !kde? ( || ( >=dev-qt/qtphonon-${QT_PV} >=media-libs/phonon-4.7[qt4] ) )
54 pesa 1.1 )
55     script? ( >=dev-qt/qtscript-${QT_PV} )
56     scripttools? ( >=dev-qt/qtgui-${QT_PV} )
57     sql? ( >=dev-qt/qtsql-${QT_PV} )
58     svg? ( >=dev-qt/qtsvg-${QT_PV} )
59     testlib? ( >=dev-qt/qttest-${QT_PV} )
60     webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
61     xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
62     "
63     DEPEND="${RDEPEND}
64     dbus? ( virtual/pkgconfig )
65     "
66    
67     S=${WORKDIR}/${MY_P}
68    
69     src_prepare() {
70     # Support qreal on arm architecture (bug 322349).
71     use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
72    
73 pesa 1.2 # Allow building against KDE's phonon (bug 525354).
74     epatch "${FILESDIR}/${PN}-4.11.2-phonon.patch"
75    
76 pesa 1.1 if ! use dbus; then
77     sed -i -e '/^\s\+check_dbus(/d' configure-ng.py || die
78     fi
79    
80     python_copy_sources
81    
82     preparation() {
83     if [[ ${EPYTHON} == python3.* ]]; then
84     rm -fr pyuic/uic/port_v2
85     else
86     rm -fr pyuic/uic/port_v3
87     fi
88     }
89     python_foreach_impl run_in_build_dir preparation
90     }
91    
92     pyqt_use_enable() {
93     use $1 && echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
94     }
95    
96     src_configure() {
97     configuration() {
98     local myconf=(
99     "${PYTHON}" configure-ng.py
100     --confirm-license
101     --qmake="${EPREFIX}/usr/bin/qmake"
102     --destdir="$(python_get_sitedir)"
103     --assume-shared
104     --no-timestamp
105     --qsci-api
106     $(use debug && echo --debug)
107     --enable=QtCore
108     --enable=QtNetwork
109     --enable=QtXml
110     $(pyqt_use_enable X QtGui)
111     $(pyqt_use_enable dbus QtDBus)
112     $(pyqt_use_enable declarative)
113     $(pyqt_use_enable designer)
114     $(usex designer '' --no-designer-plugin)
115     $(pyqt_use_enable help)
116     $(pyqt_use_enable multimedia)
117     $(pyqt_use_enable opengl QtOpenGL)
118     $(pyqt_use_enable phonon phonon)
119     $(pyqt_use_enable script)
120     $(pyqt_use_enable scripttools QtScriptTools)
121     $(pyqt_use_enable sql)
122     $(pyqt_use_enable svg)
123     $(pyqt_use_enable testlib QtTest)
124     $(pyqt_use_enable webkit QtWebKit)
125     $(pyqt_use_enable xmlpatterns QtXmlPatterns)
126     )
127     echo "${myconf[@]}"
128     "${myconf[@]}" || die
129    
130     # We need to specify the .pro file name when it doesn't follow
131     # the subdirs naming convention or recursive qmake won't work.
132     sed -i -e '/^SUBDIRS/ {
133 pesa 1.3 s:designer:designer/python.pro:
134 pesa 1.1 s:pylupdate:pylupdate/pylupdate4.pro:
135     s:pyrcc:pyrcc/pyrcc4.pro:
136     }' ${PN}.pro || die
137     eqmake4 -recursive ${PN}.pro
138     }
139     python_parallel_foreach_impl run_in_build_dir configuration
140     }
141    
142     src_compile() {
143     python_foreach_impl run_in_build_dir default
144     }
145    
146     src_install() {
147     installation() {
148     local tmp_root=${D%/}/tmp
149    
150     # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
151     emake DESTDIR="${tmp_root}" INSTALL_ROOT="${tmp_root}" install
152    
153     python_doexe "${tmp_root}${EPREFIX}"/usr/bin/pyuic4
154     rm "${tmp_root}${EPREFIX}"/usr/bin/pyuic4 || die
155    
156     multibuild_merge_root "${tmp_root}" "${D}"
157     python_optimize
158     }
159     python_foreach_impl run_in_build_dir installation
160    
161     dodoc NEWS THANKS
162    
163     if use doc; then
164     dodoc -r doc/html
165     fi
166    
167     if use examples; then
168     insinto /usr/share/doc/${PF}
169     doins -r examples
170     fi
171     }

  ViewVC Help
Powered by ViewVC 1.1.20