1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=(python{2_7,3_3,3_4} pypy)
8 PYTHON_REQ_USE="xml(+)"
12 DESCRIPTION="Collection of administration scripts for Gentoo"
13 HOMEPAGE="https://www.gentoo.org/proj/en/portage/tools/index.xml"
14 SRC_URI="mirror://gentoo/${P}.tar.gz"
20 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
22 DEPEND="sys-apps/portage[${PYTHON_USEDEP}]"
24 !<=app-portage/gentoolkit-dev-0.2.7
25 || ( >=sys-apps/coreutils-8.15 app-misc/realpath sys-freebsd/freebsd-bin )
27 sys-apps/gentoo-functions
31 "${FILESDIR}"/${PV}-revdep-rebuild-py-504654-1.patch
32 "${FILESDIR}"/${PV}-revdep-rebuild-py-504654-2.patch
33 "${FILESDIR}"/${PV}-equery-508114.patch
34 "${FILESDIR}"/${PV}-equery-strip-XXXFLAGS.patch
35 "${FILESDIR}"/${PV}-revdep-rebuild-526400.patch
38 python_prepare_all() {
40 echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
41 VERSION="${PVR}" "${PYTHON}" setup.py set_version
42 mv ./bin/revdep-rebuild{,.py} || die
43 distutils-r1_python_prepare_all
46 python_install_all() {
47 distutils-r1_python_install_all
49 # Rename the python versions of revdep-rebuild, since we are not ready
50 # to switch to the python version yet. Link /usr/bin/revdep-rebuild to
51 # revdep-rebuild.sh. Leaving the python version available for potential
52 # testing by a wider audience.
53 dosym revdep-rebuild.sh /usr/bin/revdep-rebuild
55 # TODO: Fix this as it is now a QA violation
56 # Create cache directory for revdep-rebuild
57 keepdir /var/cache/revdep-rebuild
58 use prefix || fowners root:0 /var/cache/revdep-rebuild
59 fperms 0700 /var/cache/revdep-rebuild
61 # remove on Gentoo Prefix platforms where it's broken anyway
63 elog "The revdep-rebuild command is removed, the preserve-libs"
64 elog "feature of portage will handle issues."
65 rm "${ED}"/usr/bin/revdep-rebuild*
66 rm "${ED}"/usr/share/man/man1/revdep-rebuild.1
67 rm -rf "${ED}"/etc/revdep-rebuild
73 # Only show the elog information on a new install
74 if [[ ! ${REPLACING_VERSIONS} ]]; then
76 elog "For further information on gentoolkit, please read the gentoolkit"
77 elog "guide: https://www.gentoo.org/doc/en/gentoolkit.xml"
79 elog "Another alternative to equery is app-portage/portage-utils"
81 elog "Additional tools that may be of interest:"
83 elog " app-admin/eclean-kernel"
84 elog " app-portage/diffmask"
85 elog " app-portage/flaggie"
86 elog " app-portage/install-mask"
87 elog " app-portage/portpeek"
88 elog " app-portage/smart-live-rebuild"