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

Contents of /dev-python/PyQt4/PyQt4-4.11.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (hide annotations) (download)
Sat Jul 25 00:00:51 2015 UTC (4 years, 7 months ago) by pesa
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +3 -2 lines
Update HOMEPAGE.

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

1 ago 1.11 # Copyright 1999-2015 Gentoo Foundation
2 pesa 1.1 # Distributed under the terms of the GNU General Public License v2
3 pesa 1.15 # $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/PyQt4-4.11.1.ebuild,v 1.14 2015/04/14 12:36:33 ago Exp $
4 pesa 1.1
5     EAPI=5
6 pesa 1.3 PYTHON_COMPAT=( python{2_7,3_3,3_4} )
7 pesa 1.1
8     inherit eutils multibuild python-r1 qmake-utils toolchain-funcs
9    
10     DESCRIPTION="Python bindings for the Qt toolkit"
11 pesa 1.15 HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/intro
12     https://pypi.python.org/pypi/PyQt4"
13 pesa 1.1
14     if [[ ${PV} == *_pre* ]]; then
15     MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
16     SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.gz"
17     else
18     MY_P="PyQt-x11-gpl-${PV}"
19     SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
20     fi
21    
22     LICENSE="|| ( GPL-2 GPL-3 )"
23     SLOT="0"
24 ago 1.14 KEYWORDS="alpha amd64 arm ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
25 pesa 1.1
26     IUSE="X dbus debug declarative designer doc examples help kde multimedia opengl phonon script scripttools sql svg webkit xmlpatterns"
27     REQUIRED_USE="
28     ${PYTHON_REQUIRED_USE}
29     declarative? ( X )
30     designer? ( X )
31     help? ( X )
32     multimedia? ( X )
33     opengl? ( X )
34     phonon? ( X )
35     scripttools? ( X script )
36     sql? ( X )
37     svg? ( X )
38     webkit? ( X )
39     "
40    
41     # Minimal supported version of Qt.
42 pesa 1.4 QT_PV="4.8.5:4"
43 pesa 1.1
44     RDEPEND="
45     ${PYTHON_DEPS}
46     >=dev-python/sip-4.16:=[${PYTHON_USEDEP}]
47     >=dev-qt/qtcore-${QT_PV}
48     X? (
49     >=dev-qt/qtgui-${QT_PV}
50     >=dev-qt/qttest-${QT_PV}
51     )
52     dbus? (
53     >=dev-python/dbus-python-0.80[${PYTHON_USEDEP}]
54     >=dev-qt/qtdbus-${QT_PV}
55     )
56     declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
57 pesa 1.4 designer? ( >=dev-qt/designer-${QT_PV} )
58 pesa 1.1 help? ( >=dev-qt/qthelp-${QT_PV} )
59     multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
60     opengl? ( >=dev-qt/qtopengl-${QT_PV} )
61     phonon? (
62 kensington 1.10 kde? ( media-libs/phonon[qt4] )
63     !kde? ( || ( >=dev-qt/qtphonon-${QT_PV} media-libs/phonon[qt4] ) )
64 pesa 1.1 )
65     script? ( >=dev-qt/qtscript-${QT_PV} )
66     sql? ( >=dev-qt/qtsql-${QT_PV} )
67     svg? ( >=dev-qt/qtsvg-${QT_PV} )
68     webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
69     xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
70     "
71     DEPEND="${RDEPEND}
72     dbus? ( virtual/pkgconfig )
73     "
74    
75     S=${WORKDIR}/${MY_P}
76    
77     src_prepare() {
78     # Support qreal on arm architecture (bug 322349).
79     use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
80    
81     # Allow building against KDE's phonon (bug 433944 and others).
82     sed -i \
83     -e "s:VideoWidget()\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/qt4/QtGui\"]:" \
84     -e "s:^\s\+generate_code(\"phonon\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/phonon\"]:" \
85     configure.py || die
86    
87     if ! use dbus; then
88     sed -i -e 's/^\(\s\+\)check_dbus()/\1pass/' configure.py || die
89     fi
90    
91     python_copy_sources
92    
93     preparation() {
94     if [[ ${EPYTHON} == python3.* ]]; then
95     rm -fr pyuic/uic/port_v2
96     else
97     rm -fr pyuic/uic/port_v3
98     fi
99     }
100     python_foreach_impl run_in_build_dir preparation
101     }
102    
103     pyqt4_use_enable() {
104     use $1 && echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
105     }
106    
107     src_configure() {
108     configuration() {
109     local myconf=(
110     "${PYTHON}" configure.py
111     --confirm-license
112     --bindir="${EPREFIX}/usr/bin"
113     --destdir="$(python_get_sitedir)"
114     --sipdir="${EPREFIX}/usr/share/sip"
115     --assume-shared
116     --no-timestamp
117     --qsci-api
118     $(use debug && echo --debug)
119     --enable=QtCore
120     --enable=QtNetwork
121     --enable=QtXml
122     $(pyqt4_use_enable X QtGui)
123     $(pyqt4_use_enable X QtTest)
124     $(pyqt4_use_enable dbus QtDBus)
125     $(pyqt4_use_enable declarative)
126     $(pyqt4_use_enable designer) $(use designer || echo --no-designer-plugin)
127     $(pyqt4_use_enable help)
128     $(pyqt4_use_enable multimedia)
129     $(pyqt4_use_enable opengl QtOpenGL)
130     $(pyqt4_use_enable phonon phonon)
131     $(pyqt4_use_enable script)
132     $(pyqt4_use_enable scripttools QtScriptTools)
133     $(pyqt4_use_enable sql)
134     $(pyqt4_use_enable svg)
135     $(pyqt4_use_enable webkit QtWebKit)
136     $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
137     AR="$(tc-getAR) cqs"
138     CC="$(tc-getCC)"
139     CFLAGS="${CFLAGS}"
140     CFLAGS_RELEASE=
141     CXX="$(tc-getCXX)"
142     CXXFLAGS="${CXXFLAGS}"
143     CXXFLAGS_RELEASE=
144     LINK="$(tc-getCXX)"
145     LINK_SHLIB="$(tc-getCXX)"
146     LFLAGS="${LDFLAGS}"
147     LFLAGS_RELEASE=
148     RANLIB=
149     STRIP=
150     )
151     echo "${myconf[@]}"
152     "${myconf[@]}" || die
153    
154     local mod
155     for mod in QtCore \
156     $(use X && echo QtGui) \
157     $(use dbus && echo QtDBus) \
158     $(use declarative && echo QtDeclarative) \
159     $(use designer && echo QtDesigner) \
160     $(use opengl && echo QtOpenGL); do
161     # Run eqmake4 inside the qpy subdirectories to respect
162     # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
163     pushd qpy/${mod} > /dev/null || return
164     eqmake4 $(ls w_qpy*.pro)
165     popd > /dev/null || return
166    
167     # Fix insecure runpaths.
168     sed -i -e "/^LFLAGS\s*=/ s:-Wl,-rpath,${BUILD_DIR}/qpy/${mod}::" \
169     ${mod}/Makefile || die "failed to fix rpath for ${mod}"
170     done
171    
172     # Avoid stripping of libpythonplugin.so.
173     if use designer; then
174     pushd designer > /dev/null || return
175     eqmake4 python.pro
176     popd > /dev/null || return
177     fi
178     }
179     python_parallel_foreach_impl run_in_build_dir configuration
180     }
181    
182     src_compile() {
183     python_foreach_impl run_in_build_dir default
184     }
185    
186     src_install() {
187     installation() {
188     local tmp_root=${D%/}/tmp
189    
190     # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
191     emake DESTDIR="${tmp_root}" INSTALL_ROOT="${tmp_root}" install
192    
193     python_doexe "${tmp_root}${EPREFIX}"/usr/bin/pyuic4
194     rm "${tmp_root}${EPREFIX}"/usr/bin/pyuic4 || die
195    
196     multibuild_merge_root "${tmp_root}" "${D}"
197     python_optimize
198     }
199     python_foreach_impl run_in_build_dir installation
200    
201     dodoc NEWS THANKS
202    
203     if use doc; then
204 pesa 1.2 dodoc -r doc/html
205 pesa 1.1 fi
206    
207     if use examples; then
208     insinto /usr/share/doc/${PF}
209     doins -r examples
210     fi
211     }

  ViewVC Help
Powered by ViewVC 1.1.20