diff options
| author | Johannes Huber <johu@gentoo.org> | 2013-06-27 20:31:26 +0200 |
|---|---|---|
| committer | Johannes Huber <johu@gentoo.org> | 2013-06-27 20:31:26 +0200 |
| commit | 45431dd6c5c33fee64df49066071af601327e9db (patch) | |
| tree | 27ada7c57c72ced5e0f8507d8624777626f03eb9 /kde-base/pykde4 | |
| parent | 5e00b4582ba93739d527beb1ba5837fac9b4d178 (diff) | |
| download | kde-45431dd6c5c33fee64df49066071af601327e9db.tar.gz kde-45431dd6c5c33fee64df49066071af601327e9db.tar.bz2 kde-45431dd6c5c33fee64df49066071af601327e9db.zip | |
[kde-base] Add KDE SC 4.11 beta2.
Package-Manager: portage-2.2.0_alpha185
Diffstat (limited to 'kde-base/pykde4')
| -rw-r--r-- | kde-base/pykde4/Manifest | 1 | ||||
| -rw-r--r-- | kde-base/pykde4/pykde4-4.10.90.ebuild | 156 |
2 files changed, 157 insertions, 0 deletions
diff --git a/kde-base/pykde4/Manifest b/kde-base/pykde4/Manifest index 908dd4d34a6..a5c33f07573 100644 --- a/kde-base/pykde4/Manifest +++ b/kde-base/pykde4/Manifest @@ -1 +1,2 @@ DIST pykde4-4.10.80.tar.xz 2046788 SHA256 5c5a5f641218e7c9bc101bfdd1198b39f2c13152728883e3e17d7ac11eac499c SHA512 32d675df87b53c81d8934ff278dc38be93c3a7739bea525c3730addd3d2c41cf62f302d6f1627725cf24880926645107b254bb8a4a37c1117d55c3cecff1f21b WHIRLPOOL 85aac7d1421cab508edf942580d9209893c605d9fd625008527e143904e6463b36501dd8e9c7da86eb169634ffd13511405f83f6224636745521fea7a778a2f3 +DIST pykde4-4.10.90.tar.xz 2046800 SHA256 f0944e5cef198f0f49f3d10b1fb923ff96859601df98b2c67957569aeb19ee79 SHA512 09f20fad23d1d2d3a3aefb4320e206de246912c29b4909a6d4c1e7373e968a0e01db84707299284e48d21595330bbbef54318fc7a244d98d92e6dd1785b38d71 WHIRLPOOL b9d2d521b15f54589da8fa3aefcefeb3d5906cbd39cfde4723228930647fd5f1ae5d5cff472b2a0c3b8d6639bfa3aa60f5281ba0c19deb686a8e548bc9b718df diff --git a/kde-base/pykde4/pykde4-4.10.90.ebuild b/kde-base/pykde4/pykde4-4.10.90.ebuild new file mode 100644 index 00000000000..a5dd2aae5a9 --- /dev/null +++ b/kde-base/pykde4/pykde4-4.10.90.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) +PYTHON_REQ_USE="threads" +OPENGL_REQUIRED="always" + +inherit python-r1 portability kde4-base multilib + +DESCRIPTION="Python bindings for KDE4" +KEYWORDS=" ~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="debug doc examples test" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# blocker added due to compatibility issues and error during compile time +RDEPEND=" + ${PYTHON_DEPS} + >=dev-python/sip-4.14:=[${PYTHON_USEDEP}] + >=dev-libs/soprano-2.9.0 + $(add_kdebase_dep kdelibs 'opengl') + $(add_kdebase_dep kdepimlibs) + aqua? ( >=dev-python/PyQt4-4.9.5[${PYTHON_USEDEP},dbus,declarative,script(+),sql,svg,webkit,aqua] ) + !aqua? ( >=dev-python/PyQt4-4.9.5[${PYTHON_USEDEP},dbus,declarative,script(+),sql,svg,webkit,X] ) +" +DEPEND="${RDEPEND} + sys-devel/libtool +" + +pkg_setup() { + kde4-base_pkg_setup + + have_python2=false + + scan_python_versions() { + if [[ ${EPYTHON} == python2.* ]]; then + have_python2=true + fi + } + python_foreach_impl scan_python_versions + + if ! ${have_python2}; then + ewarn "You do not have a Python 2 version selected." + ewarn "kpythonpluginfactory will not be built" + fi +} + +src_prepare() { + kde4-base_src_prepare + + if ! use examples; then + sed -e '/^ADD_SUBDIRECTORY(examples)/s/^/# DISABLED /' -i CMakeLists.txt \ + || die "Failed to disable examples" + fi + + # See bug 322351 + use arm && epatch "${FILESDIR}/${PN}-4.10.1-arm-sip.patch" + + sed -e 's/kpythonpluginfactory /kpython${PYTHON_SHORT_VERSION}pluginfactory /g' \ + -i kpythonpluginfactory/CMakeLists.txt || die + + if ${have_python2}; then + mkdir -p "${WORKDIR}/wrapper" || die "failed to copy wrapper" + cp "${FILESDIR}/kpythonpluginfactorywrapper.c-r1" "${WORKDIR}/wrapper/kpythonpluginfactorywrapper.c" || die "failed to copy wrapper" + fi + python_copy_sources + +} + +src_configure() { + configuration() { + local mycmakeargs=( + -DWITH_PolkitQt=OFF + -DWITH_QScintilla=OFF + -DPYTHON_EXECUTABLE=${PYTHON} + -DPYKDEUIC4_ALTINSTALL=TRUE + ) + local CMAKE_BUILD_DIR=${S}_build-${PYTHON_ABI} + kde4-base_src_configure + } + + python_foreach_impl run_in_build_dir configuration +} + +echo_and_run() { + echo "$@" + "$@" +} + +src_compile() { + compilation() { + local CMAKE_BUILD_DIR=${S}_build-${PYTHON_ABI} + kde4-base_src_compile + } + python_foreach_impl run_in_build_dir compilation + + if ${have_python2}; then + pushd "${WORKDIR}/wrapper" > /dev/null + echo_and_run libtool --tag=CC --mode=compile $(tc-getCC) \ + -shared \ + ${CFLAGS} ${CPPFLAGS} \ + -DEPREFIX="\"${EPREFIX}\"" \ + -DPLUGIN_DIR="\"/usr/$(get_libdir)/kde4\"" -c \ + -o kpythonpluginfactorywrapper.lo \ + kpythonpluginfactorywrapper.c + echo_and_run libtool --tag=CC --mode=link $(tc-getCC) \ + -shared -module -avoid-version \ + ${CFLAGS} ${LDFLAGS} \ + -o kpythonpluginfactory.la \ + -rpath "${EPREFIX}/usr/$(get_libdir)/kde4" \ + kpythonpluginfactorywrapper.lo \ + $(dlopen_lib) + popd > /dev/null + fi +} + +src_test() { + python_foreach_impl run_in_build_dir kde4-base_src_test +} + +src_install() { + installation() { + emake DESTDIR="${D}" install + + mv "${ED}"/usr/bin/pykdeuic4-{${EPYTHON/python/},${EPYTHON}} || die + python_optimize + } + python_foreach_impl run_in_build_dir installation + + dosym python-exec /usr/bin/pykdeuic4 + + # As we don't call the eclass's src_install, we have to install the docs manually + DOCS=("${S}"/{AUTHORS,NEWS,README}) + use doc && HTML_DOCS=("${S}/docs/html/") + base_src_install_docs + + if ${have_python2}; then + pushd "${WORKDIR}/wrapper" > /dev/null + echo_and_run libtool --mode=install install kpythonpluginfactory.la "${ED}/usr/$(get_libdir)/kde4/kpythonpluginfactory.la" + rm "${ED}/usr/$(get_libdir)/kde4/kpythonpluginfactory.la" + popd > /dev/null + fi +} + +pkg_postinst() { + kde4-base_pkg_postinst + + if use examples; then + echo + elog "PyKDE4 examples have been installed to" + elog "${EPREFIX}/usr/share/apps/${PN}/examples" + echo + fi +} |
