1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit flag-o-matic toolchain-funcs eutils
9 DESCRIPTION="small and fast portage helper tools written in C"
10 HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
11 SRC_URI="mirror://gentoo/${P}.tar.xz
12 https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-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"
19 DEPEND="app-arch/xz-utils"
27 use static && append-ldflags -static
29 # Avoid slow configure+gnulib+make if on an up-to-date Linux system
30 if use prefix || ! use kernel_linux || \
31 has_version '<sys-libs/glibc-2.10'
33 econf --with-eprefix="${EPREFIX}"
46 exeinto /etc/portage/bin
47 doexe "${FILESDIR}"/post_sync
48 insinto /etc/portage/postsync.d
49 doins "${FILESDIR}"/q-reinitialize
51 # Portage fixes shebangs, we just need to fix the paths in the files
53 -e "s:\(/etc/portage/postsync.d\|/usr/bin/q\):${EPREFIX}&:g" \
54 "${ED}"/etc/portage/bin/post_sync \
55 "${ED}"/etc/portage/postsync.d/q-reinitialize || die
59 # preserve +x bit on postsync files #301721
61 pushd "${ED}" >/dev/null
62 for x in etc/portage/postsync.d/* ; do
63 [[ -x ${EROOT}/${x} ]] && chmod +x "${x}"
68 if [[ -z ${REPLACING_VERSIONS} ]] ; then
69 elog "${EPREFIX}/etc/portage/postsync.d/q-reinitialize has been installed for convenience"
70 elog "If you wish for it to be automatically run at the end of every --sync:"
71 elog " # chmod +x ${EPREFIX}/etc/portage/postsync.d/q-reinitialize"
72 elog "Normally this should only take a few seconds to run but file systems"
73 elog "such as ext3 can take a lot longer. To disable, simply do:"
74 elog " # chmod -x ${EPREFIX}/etc/portage/postsync.d/q-reinitialize"