/[gentoo-x86]/dev-python/pyside/pyside-1.2.1-r1.ebuild
Gentoo

Contents of /dev-python/pyside/pyside-1.2.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Dec 25 19:26:11 2013 UTC (6 months, 4 weeks ago) by pesa
Branch: MAIN
Add python 3.3 support.
Fix detection of media-libs/phonon, thanks to Gianluigi Tiesi <sherpya@gmail.com> in bug 475786.

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 17A85C72)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/pyside/pyside-1.2.1.ebuild,v 1.1 2013/11/14 00:46:04 pesa Exp $
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
8
9 inherit multilib cmake-utils python-r1 virtualx
10
11 MY_P="${PN}-qt4.8+${PV}"
12
13 DESCRIPTION="Python bindings for the Qt framework"
14 HOMEPAGE="http://qt-project.org/wiki/PySide"
15 SRC_URI="http://download.qt-project.org/official_releases/${PN}/${MY_P}.tar.bz2"
16
17 LICENSE="LGPL-2.1"
18 SLOT="0"
19 KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
20 IUSE="X declarative designer help multimedia opengl phonon script scripttools sql svg test webkit xmlpatterns"
21
22 REQUIRED_USE="
23 declarative? ( X )
24 designer? ( X )
25 help? ( X )
26 multimedia? ( X )
27 opengl? ( X )
28 phonon? ( X )
29 scripttools? ( X script )
30 sql? ( X )
31 svg? ( X )
32 test? ( X )
33 webkit? ( X )
34 "
35
36 # Minimal supported version of Qt.
37 QT_PV="4.7.0:4"
38
39 RDEPEND="
40 >=dev-python/shiboken-${PV}[${PYTHON_USEDEP}]
41 >=dev-qt/qtcore-${QT_PV}
42 X? (
43 >=dev-qt/qtgui-${QT_PV}[accessibility]
44 >=dev-qt/qttest-${QT_PV}
45 )
46 declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
47 designer? ( || ( dev-qt/designer:4 <dev-qt/qtgui-4.8.5:4 ) )
48 help? ( >=dev-qt/qthelp-${QT_PV} )
49 multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
50 opengl? ( >=dev-qt/qtopengl-${QT_PV} )
51 phonon? ( || (
52 media-libs/phonon[qt4(+)]
53 >=dev-qt/qtphonon-${QT_PV}
54 ) )
55 script? ( >=dev-qt/qtscript-${QT_PV} )
56 sql? ( >=dev-qt/qtsql-${QT_PV} )
57 svg? ( >=dev-qt/qtsvg-${QT_PV}[accessibility] )
58 webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
59 xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
60 "
61 DEPEND="${RDEPEND}
62 >=dev-qt/qtgui-${QT_PV}
63 "
64
65 S=${WORKDIR}/${MY_P}
66
67 DOCS=( ChangeLog )
68
69 src_prepare() {
70 # Fix generated pkgconfig file to require the shiboken
71 # library suffixed with the correct python version.
72 sed -i -e '/^Requires:/ s/shiboken$/&@SHIBOKEN_PYTHON_SUFFIX@/' \
73 libpyside/pyside.pc.in || die
74
75 if use prefix; then
76 cp "${FILESDIR}"/rpath.cmake . || die
77 sed -i -e '1iinclude(rpath.cmake)' CMakeLists.txt || die
78 fi
79 }
80
81 src_configure() {
82 local mycmakeargs=(
83 $(cmake-utils_use_build test TESTS)
84 $(cmake-utils_use_disable X QtGui)
85 $(cmake-utils_use_disable X QtTest)
86 $(cmake-utils_use_disable declarative QtDeclarative)
87 $(cmake-utils_use_disable designer QtDesigner)
88 $(cmake-utils_use_disable designer QtUiTools)
89 $(cmake-utils_use_disable help QtHelp)
90 $(cmake-utils_use_disable multimedia QtMultimedia)
91 $(cmake-utils_use_disable opengl QtOpenGL)
92 $(cmake-utils_use_disable phonon)
93 $(cmake-utils_use_disable script QtScript)
94 $(cmake-utils_use_disable scripttools QtScriptTools)
95 $(cmake-utils_use_disable sql QtSql)
96 $(cmake-utils_use_disable svg QtSvg)
97 $(cmake-utils_use_disable webkit QtWebKit)
98 $(cmake-utils_use_disable xmlpatterns QtXmlPatterns)
99 )
100
101 if use phonon && has_version "media-libs/phonon[qt4(+)]"; then
102 # bug 475786
103 mycmakeargs+=(
104 -DQT_PHONON_INCLUDE_DIR="${EPREFIX}/usr/include/phonon"
105 -DQT_PHONON_LIBRARY_RELEASE="${EPREFIX}/usr/$(get_libdir)/libphonon.so"
106 )
107 fi
108
109 configuration() {
110 local mycmakeargs=(
111 -DPYTHON_SUFFIX="-${EPYTHON}"
112 "${mycmakeargs[@]}"
113 )
114 cmake-utils_src_configure
115 }
116 python_foreach_impl configuration
117 }
118
119 src_compile() {
120 python_foreach_impl cmake-utils_src_make
121 }
122
123 src_test() {
124 local PYTHONDONTWRITEBYTECODE
125 export PYTHONDONTWRITEBYTECODE
126
127 local VIRTUALX_COMMAND="cmake-utils_src_test"
128 python_foreach_impl virtualmake
129 }
130
131 src_install() {
132 installation() {
133 cmake-utils_src_install
134 mv "${ED}"usr/$(get_libdir)/pkgconfig/${PN}{,-${EPYTHON}}.pc || die
135 }
136 python_foreach_impl installation
137 }

  ViewVC Help
Powered by ViewVC 1.1.20