diff options
| author | Alexey Shvetsov <alexxy@gentoo.org> | 2013-06-13 08:46:13 +0400 |
|---|---|---|
| committer | Alexey Shvetsov <alexxy@gentoo.org> | 2013-06-13 08:46:13 +0400 |
| commit | dd0adf958925865b062205884a81d983962c5e9d (patch) | |
| tree | 84e830e441452a57bf54db8d0e10b554ab5ee7af /kde-base/pykde4 | |
| parent | d5ba5042870fd3b3a735ac0ad322d5294f9b9ca5 (diff) | |
| download | kde-dd0adf958925865b062205884a81d983962c5e9d.tar.gz kde-dd0adf958925865b062205884a81d983962c5e9d.tar.bz2 kde-dd0adf958925865b062205884a81d983962c5e9d.zip | |
Add KDE SC 4.11 beta1
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Diffstat (limited to 'kde-base/pykde4')
| -rw-r--r-- | kde-base/pykde4/Manifest | 1 | ||||
| -rw-r--r-- | kde-base/pykde4/pykde4-4.10.80.ebuild | 156 |
2 files changed, 157 insertions, 0 deletions
diff --git a/kde-base/pykde4/Manifest b/kde-base/pykde4/Manifest new file mode 100644 index 00000000000..908dd4d34a6 --- /dev/null +++ b/kde-base/pykde4/Manifest @@ -0,0 +1 @@ +DIST pykde4-4.10.80.tar.xz 2046788 SHA256 5c5a5f641218e7c9bc101bfdd1198b39f2c13152728883e3e17d7ac11eac499c SHA512 32d675df87b53c81d8934ff278dc38be93c3a7739bea525c3730addd3d2c41cf62f302d6f1627725cf24880926645107b254bb8a4a37c1117d55c3cecff1f21b WHIRLPOOL 85aac7d1421cab508edf942580d9209893c605d9fd625008527e143904e6463b36501dd8e9c7da86eb169634ffd13511405f83f6224636745521fea7a778a2f3 diff --git a/kde-base/pykde4/pykde4-4.10.80.ebuild b/kde-base/pykde4/pykde4-4.10.80.ebuild new file mode 100644 index 00000000000..a5dd2aae5a9 --- /dev/null +++ b/kde-base/pykde4/pykde4-4.10.80.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 +} |
