mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-01 10:31:37 +02:00
commit
057e0c9a5a
@ -1,2 +1,3 @@
|
||||
DIST rsyslog-3.22.1.tar.gz 1358598 RMD160 979dc146d40a5373ec7d210c424e925b5e091c15 SHA1 d5c8828db3edef35e48a1eec418e800fafc6d6a3 SHA256 5d3bb28dc87b3abb7053ccae8316f032ddd0486681683b116a25f66fc0942abb
|
||||
DIST rsyslog-5.8.11.tar.gz 2393222 RMD160 be13514e02f121ae7b78e0177063ce8cd8a9d859 SHA1 eabba672b9cace696207028da703cf073956d505 SHA256 f75b39cf22506f7a28d986d0a446a09a0806f253dba661f125a241a1b47d6285
|
||||
DIST rsyslog-3.22.1.tar.gz 1358598 SHA256 5d3bb28dc87b3abb7053ccae8316f032ddd0486681683b116a25f66fc0942abb SHA512 a80582230aa5888bfc25ca2e0717c3ac699b78e2746b178f1dc3b9e72eae777ff603973d76eb78d8277b6f4c3fc5fc270117a3842335ec6f0b4b352ee29a3c5e WHIRLPOOL c23bad47a22c66171359bece4c0843f6ba162977593ff9c280e3edf1bff0e92d7f97b055f689b3b7dfbbb205baa7900c9d04490ad7164b641cb2742658f57d4b
|
||||
DIST rsyslog-5.8.11.tar.gz 2393222 SHA256 f75b39cf22506f7a28d986d0a446a09a0806f253dba661f125a241a1b47d6285 SHA512 545db333efd136c2ae26131ad400e69f41aaa4fa458a5d586c73e9063f0acb044dbcfe3a13e48b3db77a72f471e87b3b8f9ab2bff008b1166b836dbdddb7974a WHIRLPOOL 2ab8ae35179dcade3953c612cb8bdbd48e7bce6c0cca54278d2949ff3c7c29311341855778511acc38328db4ebeca5599e632c94def038f7134cdd2df78e53e8
|
||||
DIST rsyslog-zeromq.tar.gz 22223 SHA256 3cca6ce8722ec5035744a9b88e65b89b35f6b2e6bbdbc9c9bba89d22addd2753 SHA512 d0fd6705d1fbbfd8c2932df281ef30ebfcc83085a62026ffd192bdfefaca5abef415183f958eee4f7421804ca59d8c20d8cf7fbc5b4105f86c297c6fbbcdd760 WHIRLPOOL 17d189dfe12ef5525f103d6ee202cfafe019bca11856da9d206004a9377b682b09d76816e2e2d1ca5aff2394b8cc8baec13f4961d32c74a377a9b6041ff398b1
|
||||
|
@ -1,178 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.8.3_p2.ebuild,v 1.9 2012/03/03 14:37:03 ranger Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils pam multilib libtool
|
||||
|
||||
MY_P=${P/_/}
|
||||
MY_P=${MY_P/beta/b}
|
||||
|
||||
uri_prefix=
|
||||
case ${P} in
|
||||
*_beta*|*_rc*) uri_prefix=beta/ ;;
|
||||
esac
|
||||
|
||||
DESCRIPTION="Allows users or groups to run commands as other users"
|
||||
HOMEPAGE="http://www.sudo.ws/"
|
||||
SRC_URI="http://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz
|
||||
ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz"
|
||||
|
||||
# Basic license is ISC-style as-is, some files are released under
|
||||
# 3-clause BSD license
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="ldap nls pam offensive selinux skey"
|
||||
|
||||
DEPEND="pam? ( virtual/pam )
|
||||
skey? ( >=sys-auth/skey-1.1.5-r1 )
|
||||
ldap? (
|
||||
>=net-nds/openldap-2.1.30-r1
|
||||
dev-libs/cyrus-sasl
|
||||
)
|
||||
sys-libs/zlib"
|
||||
RDEPEND="${DEPEND}
|
||||
selinux? ( sec-policy/selinux-sudo )
|
||||
ldap? ( dev-lang/perl )
|
||||
pam? ( sys-auth/pambase )
|
||||
>=app-misc/editor-wrapper-3
|
||||
virtual/editor
|
||||
virtual/mta"
|
||||
DEPEND="${DEPEND}
|
||||
sys-devel/bison"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
REQUIRED_USE="pam? ( !skey ) skey? ( !pam )"
|
||||
|
||||
MAKEOPTS+=" SAMPLES="
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-1.8.3_p1-linguas.patch
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
set_rootpath() {
|
||||
# FIXME: secure_path is a compile time setting. using ROOTPATH
|
||||
# is not perfect, env-update may invalidate this, but until it
|
||||
# is available as a sudoers setting this will have to do.
|
||||
einfo "Setting secure_path ..."
|
||||
|
||||
# first extract the default ROOTPATH from build env
|
||||
ROOTPATH=$(unset ROOTPATH; . /etc/profile.env; echo "${ROOTPATH}")
|
||||
if [[ -z ${ROOTPATH} ]] ; then
|
||||
ewarn " Failed to find ROOTPATH, please report this"
|
||||
fi
|
||||
|
||||
# then remove duplicate path entries
|
||||
cleanpath() {
|
||||
local newpath thisp IFS=:
|
||||
for thisp in $1 ; do
|
||||
if [[ :${newpath}: != *:${thisp}:* ]] ; then
|
||||
newpath+=:$thisp
|
||||
else
|
||||
einfo " Duplicate entry ${thisp} removed..."
|
||||
fi
|
||||
done
|
||||
ROOTPATH=${newpath#:}
|
||||
}
|
||||
cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${ROOTPATH:+:${ROOTPATH}}
|
||||
|
||||
# finally, strip gcc paths #136027
|
||||
rmpath() {
|
||||
local e newpath thisp IFS=:
|
||||
for thisp in ${ROOTPATH} ; do
|
||||
for e ; do [[ $thisp == $e ]] && continue 2 ; done
|
||||
newpath+=:$thisp
|
||||
done
|
||||
ROOTPATH=${newpath#:}
|
||||
}
|
||||
rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*'
|
||||
|
||||
einfo "... done"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local ROOTPATH
|
||||
set_rootpath
|
||||
|
||||
# audit: somebody got to explain me how I can test this before I
|
||||
# enable it.. - Diego
|
||||
# plugindir: autoconf code is crappy and does not delay evaluation
|
||||
# until `make` time, so we have to use a full path here rather than
|
||||
# basing off other values.
|
||||
econf \
|
||||
--enable-zlib=system \
|
||||
--with-secure-path="${ROOTPATH}" \
|
||||
--with-editor=/usr/libexec/editor \
|
||||
--with-env-editor \
|
||||
$(use_with offensive insults) \
|
||||
$(use_with offensive all-insults) \
|
||||
$(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) \
|
||||
$(use_with ldap) \
|
||||
$(use_enable nls) \
|
||||
$(use_with pam) \
|
||||
$(use_with skey) \
|
||||
$(use_with selinux) \
|
||||
--without-opie \
|
||||
--without-linux-audit \
|
||||
--with-timedir=/var/db/sudo \
|
||||
--with-plugindir=/usr/$(get_libdir)/sudo \
|
||||
--docdir=/usr/share/doc/${PF}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
|
||||
if use ldap ; then
|
||||
dodoc README.LDAP doc/schema.OpenLDAP
|
||||
dosbin plugins/sudoers/sudoers2ldif
|
||||
|
||||
cat <<-EOF > "${T}"/ldap.conf.sudo
|
||||
# See ldap.conf(5) and README.LDAP for details
|
||||
# This file should only be readable by root
|
||||
|
||||
# supported directives: host, port, ssl, ldap_version
|
||||
# uri, binddn, bindpw, sudoers_base, sudoers_debug
|
||||
# tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key
|
||||
EOF
|
||||
|
||||
insinto /etc
|
||||
doins "${T}"/ldap.conf.sudo
|
||||
fperms 0440 /etc/ldap.conf.sudo
|
||||
fi
|
||||
|
||||
pamd_mimic system-auth sudo auth account session
|
||||
|
||||
keepdir /var/db/sudo
|
||||
fperms 0700 /var/db/sudo
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use ldap ; then
|
||||
ewarn
|
||||
ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration."
|
||||
ewarn
|
||||
if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then
|
||||
ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly"
|
||||
ewarn "configured in /etc/nsswitch.conf."
|
||||
ewarn
|
||||
ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:"
|
||||
ewarn " sudoers: ldap files"
|
||||
ewarn
|
||||
fi
|
||||
fi
|
||||
|
||||
elog "To use the -A (askpass) option, you need to install a compatible"
|
||||
elog "password program from the following list. Starred packages will"
|
||||
elog "automatically register for the use with sudo (but will not force"
|
||||
elog "the -A option):"
|
||||
elog ""
|
||||
elog " [*] net-misc/ssh-askpass-fullscreen"
|
||||
elog " net-misc/x11-ssh-askpass"
|
||||
elog ""
|
||||
elog "You can override the choice by setting the SUDO_ASKPASS environmnent"
|
||||
elog "variable to the program you want to use."
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-vim/gentoo-syntax/gentoo-syntax-20101212.ebuild,v 1.3 2011/05/03 09:34:13 grobian Exp $
|
||||
|
||||
inherit eutils vim-plugin
|
||||
|
||||
DESCRIPTION="vim plugin: Gentoo Ebuild, Eclass, GLEP, ChangeLog and Portage Files syntax highlighting, filetype and indent settings"
|
||||
HOMEPAGE="http://www.gentoo.org/"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.bz2"
|
||||
|
||||
LICENSE="vim"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="ignore-glep31"
|
||||
|
||||
VIM_PLUGIN_HELPFILES="gentoo-syntax"
|
||||
VIM_PLUGIN_MESSAGES="filetype"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
if use ignore-glep31 ; then
|
||||
for f in ftplugin/*.vim ; do
|
||||
ebegin "Removing UTF-8 rules from ${f} ..."
|
||||
sed -i -e 's~\(setlocal fileencoding=utf-8\)~" \1~' ${f} \
|
||||
|| die "waah! bad sed voodoo. need more goats."
|
||||
eend $?
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
vim-plugin_pkg_postinst
|
||||
if use ignore-glep31 1>/dev/null ; then
|
||||
ewarn "You have chosen to disable the rules which ensure GLEP 31"
|
||||
ewarn "compliance. When editing ebuilds, please make sure you get"
|
||||
ewarn "the character set correct."
|
||||
else
|
||||
elog "Note for developers and anyone else who edits ebuilds:"
|
||||
elog " This release of gentoo-syntax now contains filetype rules to set"
|
||||
elog " fileencoding for ebuilds and ChangeLogs to utf-8 as per GLEP 31."
|
||||
elog " If you find this feature breaks things, please submit a bug and"
|
||||
elog " assign it to vim@gentoo.org. You can use the 'ignore-glep31' USE"
|
||||
elog " flag to remove these rules."
|
||||
fi
|
||||
echo
|
||||
}
|
@ -1 +0,0 @@
|
||||
gtest-1.4.0.ebuild
|
@ -1,44 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-cpp/gtest/gtest-1.4.0.ebuild,v 1.2 2012/04/20 18:18:06 vapier Exp $
|
||||
|
||||
EAPI="2"
|
||||
inherit autotools eutils
|
||||
|
||||
DESCRIPTION="Google C++ Testing Framework"
|
||||
HOMEPAGE="http://code.google.com/p/googletest/"
|
||||
SRC_URI="http://googletest.googlecode.com/files/${P}.tar.bz2"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
IUSE="examples static-libs"
|
||||
|
||||
DEPEND="dev-lang/python"
|
||||
RDEPEND=""
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e "s|/tmp|${T}|g" test/gtest-filepath_test.cc || die "sed failed"
|
||||
|
||||
epatch "${FILESDIR}"/${P}-asneeded.patch
|
||||
epatch "${FILESDIR}"/${P}-gcc-4.7.patch
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable static-libs static)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
|
||||
dodoc CHANGES CONTRIBUTORS README
|
||||
|
||||
use static-libs || rm "${D}"/usr/lib*/*.la
|
||||
|
||||
if use examples ; then
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
doins samples/*.{cc,h}
|
||||
fi
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/m17n-db/m17n-db-1.5.5.ebuild,v 1.1 2010/01/26 15:26:00 matsuu Exp $
|
||||
|
||||
EAPI="2"
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="Database for the m17n library"
|
||||
HOMEPAGE="http://www.m17n.org/m17n-lib/"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="sys-devel/gettext"
|
||||
RDEPEND="virtual/libintl"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/do-not-commit-extra-space.patch"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
rm -rf "${D}/usr/share/m17n/icons" || die
|
||||
dodoc AUTHORS ChangeLog NEWS README || die
|
||||
docinto FORMATS; dodoc FORMATS/* || die
|
||||
docinto UNIDATA; dodoc UNIDATA/* || die
|
||||
}
|
@ -1,138 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/sqlite/sqlite-3.6.22-r2.ebuild,v 1.5 2010/03/09 21:42:17 josejx Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit eutils flag-o-matic multilib versionator autotools
|
||||
|
||||
DESCRIPTION="A SQL Database Engine in a C Library"
|
||||
HOMEPAGE="http://www.sqlite.org/"
|
||||
DOC_BASE="$(get_version_component_range 1-3)"
|
||||
DOC_PV="$(replace_all_version_separators _ ${DOC_BASE})"
|
||||
|
||||
SRC_URI="
|
||||
tcl? ( http://www.sqlite.org/${P}.tar.gz )
|
||||
!tcl? (
|
||||
test? ( http://www.sqlite.org/${P}.tar.gz )
|
||||
!test? ( http://www.sqlite.org/${PN}-amalgamation-${PV}.tar.gz )
|
||||
)
|
||||
doc? ( http://www.sqlite.org/${PN}_docs_${DOC_PV}.zip )"
|
||||
|
||||
LICENSE="as-is"
|
||||
SLOT="3"
|
||||
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="debug doc extensions +fts3 icu +readline secure-delete soundex tcl +threadsafe test"
|
||||
|
||||
RDEPEND="icu? ( dev-libs/icu )
|
||||
readline? ( sys-libs/readline )
|
||||
tcl? ( dev-lang/tcl )"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-lang/tcl )
|
||||
doc? ( app-arch/unzip )"
|
||||
|
||||
src_prepare() {
|
||||
if use icu; then
|
||||
rm -f test/like.test
|
||||
fi
|
||||
|
||||
if use tcl || use test; then
|
||||
epatch "${FILESDIR}"/${P}-interix-fixes.patch
|
||||
epatch "${FILESDIR}"/${P}-dlopen.patch # bug 300836
|
||||
eautoreconf # dlopen.patch patches configure.ac
|
||||
else
|
||||
epatch "${FILESDIR}"/${P}-interix-fixes-amalgamation.patch
|
||||
fi
|
||||
|
||||
eautoreconf # for MiNT and interix
|
||||
epunt_cxx
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Support column metadata, bug #266651
|
||||
append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
|
||||
|
||||
# Support R-trees, bug #257646
|
||||
append-cppflags -DSQLITE_ENABLE_RTREE
|
||||
|
||||
if use icu; then
|
||||
append-cppflags -DSQLITE_ENABLE_ICU
|
||||
if use tcl || use test; then
|
||||
# Normal tarball.
|
||||
sed -e "s/TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
else
|
||||
# Amalgamation tarball.
|
||||
sed -e "s/LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Support soundex, bug #143794
|
||||
if use soundex; then
|
||||
append-cppflags -DSQLITE_SOUNDEX
|
||||
fi
|
||||
|
||||
# Support FTS3, bug #207701
|
||||
if use fts3; then
|
||||
append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS
|
||||
fi
|
||||
|
||||
# We need to use secure-delete for firefox/thunderbird/xulrunner
|
||||
if use secure-delete; then
|
||||
append-cppflags -DSQLITE_SECURE_DELETE=1 -DSQLITE_CHECK_PAGES=1 -DSQLITE_CORE=1
|
||||
fi
|
||||
|
||||
# The amalgamation source doesn't have these via Makefile
|
||||
if use debug; then
|
||||
append-cppflags -DSQLITE_DEBUG=1
|
||||
else
|
||||
append-cppflags -DNDEBUG
|
||||
fi
|
||||
|
||||
local extensions_option
|
||||
if use tcl || use test; then
|
||||
extensions_option="load-extension"
|
||||
else
|
||||
extensions_option="dynamic-extensions"
|
||||
fi
|
||||
|
||||
# `configure` from amalgamation tarball doesn't support
|
||||
# --with-readline-inc and --(enable|disable)-tcl options.
|
||||
econf \
|
||||
$(use_enable extensions ${extensions_option}) \
|
||||
$(use_enable readline) \
|
||||
$({ use tcl || use test; } && echo --with-readline-inc="-I${EPREFIX}/usr/include/readline") \
|
||||
$(use_enable threadsafe) \
|
||||
$(use tcl && echo --enable-tcl) \
|
||||
$(use !tcl && use test && echo --enable-tcl)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" || die "emake failed"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ "${EUID}" -ne "0" ]]; then
|
||||
local test="test"
|
||||
use debug && test="fulltest"
|
||||
emake ${test} || die "Some test(s) failed"
|
||||
else
|
||||
ewarn "The userpriv feature must be enabled to run tests."
|
||||
eerror "Testsuite will not be run."
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" \
|
||||
install \
|
||||
|| die "emake install failed"
|
||||
|
||||
doman sqlite3.1 || die "doman sqlite3.1 failed"
|
||||
|
||||
if use doc; then
|
||||
# Naming scheme changes randomly between - and _ in releases
|
||||
# http://www.sqlite.org/cvstrac/tktview?tn=3523
|
||||
dohtml -r "${WORKDIR}"/${PN}-${DOC_PV}-docs/* || die "dohtml failed"
|
||||
fi
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/u-boot-tools/u-boot-tools-2011.06.ebuild,v 1.2 2011/10/14 22:29:10 vapier Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
MY_P="u-boot-${PV/_/-}"
|
||||
DESCRIPTION="utilities for working with Das U-Boot"
|
||||
HOMEPAGE="http://www.denx.de/wiki/U-Boot/WebHome"
|
||||
SRC_URI="ftp://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
IUSE=""
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e "s:-g ::" tools/Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake \
|
||||
HOSTSTRIP=echo \
|
||||
HOSTCC="$(tc-getCC)" \
|
||||
HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
|
||||
HOSTLDFLAGS="${LDFLAGS}" \
|
||||
tools-all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd tools
|
||||
dobin bmp_logo gen_eth_addr img2srec mkimage
|
||||
dobin easylogo/easylogo
|
||||
dobin env/fw_printenv
|
||||
dosym fw_printenv /usr/bin/fw_setenv
|
||||
insinto /etc
|
||||
doins env/fw_env.config
|
||||
}
|
@ -1,139 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-1.0.2.ebuild,v 1.4 2012/09/14 18:29:06 maekke Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
if [[ ${PV} = 9999 ]]; then
|
||||
EHG_REPO_URI="https://go.googlecode.com/hg"
|
||||
inherit mercurial
|
||||
fi
|
||||
inherit bash-completion-r1 elisp-common eutils
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz"
|
||||
# Upstream only supports go on amd64, arm and x86 architectures.
|
||||
KEYWORDS="-* ~amd64 ~arm ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="http://www.golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE="bash-completion emacs vim-syntax zsh-completion"
|
||||
|
||||
DEPEND="sys-apps/ed
|
||||
${COMMON_DEPEND}"
|
||||
RDEPEND="bash-completion? ( app-shells/bash-completion )
|
||||
emacs? ( virtual/emacs )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
zsh-completion? ( app-shells/zsh-completion )
|
||||
${COMMON_DEPEND}"
|
||||
|
||||
# The go language stores binary data for packages in *.a files.
|
||||
# These are _NOT_ libraries, and should not be stripped.
|
||||
STRIP_MASK="/usr/lib/go/pkg/linux*/*.a"
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
S="${WORKDIR}"/go
|
||||
fi
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
epatch "${FILESDIR}"/${P}-hardened.patch
|
||||
fi
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
export GOROOT_FINAL=/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
if [[ $CTARGET = armv5* ]]
|
||||
then
|
||||
export GOARM=5
|
||||
fi
|
||||
|
||||
cd src
|
||||
./make.bash || die "build failed"
|
||||
cd ..
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile misc/emacs/*.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash --no-rebuild --banner || die "tests failed"
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
dobin bin/*
|
||||
dodoc AUTHORS CONTRIBUTORS PATENTS README
|
||||
|
||||
dodir /usr/lib/go
|
||||
insinto /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] http://code.google.com/p/go/issues/detail?id=2775
|
||||
doins -r doc lib pkg src
|
||||
|
||||
if use bash-completion; then
|
||||
dobashcomp misc/bash/go
|
||||
fi
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} misc/emacs/*.el misc/emacs/*.elc
|
||||
fi
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles
|
||||
doins -r misc/vim/ftdetect
|
||||
doins -r misc/vim/ftplugin
|
||||
doins -r misc/vim/syntax
|
||||
doins -r misc/vim/plugin
|
||||
doins -r misc/vim/indent
|
||||
fi
|
||||
|
||||
if use zsh-completion; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins misc/zsh/go
|
||||
fi
|
||||
|
||||
fperms -R +x /usr/lib/go/pkg/tool
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
|
||||
# If the go tool sees a package file timestamped older than a dependancy it
|
||||
# will rebuild that file. So, in order to stop go from rebuilding lots of
|
||||
# packages for every build we need to fix the timestamps. The compiler and
|
||||
# linker are also checked - so we need to fix them too.
|
||||
ebegin "fixing timestamps to avoid unnecessary rebuilds"
|
||||
tref="usr/lib/go/pkg/*/runtime.a"
|
||||
find "${ROOT}"usr/lib/go/pkg -type f \
|
||||
-exec touch -r "${ROOT}"${tref} {} \;
|
||||
eend $?
|
||||
}
|
||||
|
||||
pkg_postrm()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
}
|
@ -1,140 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-1.0.3.ebuild,v 1.4 2013/04/16 15:56:38 williamh Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
inherit bash-completion-r1 elisp-common eutils
|
||||
|
||||
if [[ ${PV} = 9999 ]]; then
|
||||
EHG_REPO_URI="https://go.googlecode.com/hg"
|
||||
inherit mercurial
|
||||
else
|
||||
SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz"
|
||||
# Upstream only supports go on amd64, arm and x86 architectures.
|
||||
KEYWORDS="-* ~amd64 ~arm ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="http://www.golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
IUSE="bash-completion emacs vim-syntax zsh-completion"
|
||||
|
||||
DEPEND="sys-apps/ed"
|
||||
RDEPEND="bash-completion? ( app-shells/bash-completion )
|
||||
emacs? ( virtual/emacs )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
zsh-completion? ( app-shells/zsh-completion )"
|
||||
|
||||
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
|
||||
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/linux*/*"
|
||||
|
||||
# The go language stores binary data for packages in *.a files.
|
||||
# These are _NOT_ libraries, and should not be stripped.
|
||||
STRIP_MASK="/usr/lib/go/pkg/linux*/*.a"
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
S="${WORKDIR}"/go
|
||||
fi
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
epatch "${FILESDIR}"/${P}-hardened.patch
|
||||
epatch "${FILESDIR}"/${P}-no-Werror.patch
|
||||
fi
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
export GOROOT_FINAL=/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
if [[ $CTARGET = armv5* ]]
|
||||
then
|
||||
export GOARM=5
|
||||
fi
|
||||
|
||||
cd src
|
||||
./make.bash || die "build failed"
|
||||
cd ..
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile misc/emacs/*.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash --no-rebuild --banner || die "tests failed"
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
dobin bin/*
|
||||
dodoc AUTHORS CONTRIBUTORS PATENTS README
|
||||
|
||||
dodir /usr/lib/go
|
||||
insinto /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] http://code.google.com/p/go/issues/detail?id=2775
|
||||
doins -r doc include lib pkg src
|
||||
|
||||
if use bash-completion; then
|
||||
dobashcomp misc/bash/go
|
||||
fi
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} misc/emacs/*.el misc/emacs/*.elc
|
||||
fi
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles
|
||||
doins -r misc/vim/ftdetect
|
||||
doins -r misc/vim/ftplugin
|
||||
doins -r misc/vim/syntax
|
||||
doins -r misc/vim/plugin
|
||||
doins -r misc/vim/indent
|
||||
fi
|
||||
|
||||
if use zsh-completion; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
doins misc/zsh/go
|
||||
fi
|
||||
|
||||
fperms -R +x /usr/lib/go/pkg/tool
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
|
||||
# If the go tool sees a package file timestamped older than a dependancy it
|
||||
# will rebuild that file. So, in order to stop go from rebuilding lots of
|
||||
# packages for every build we need to fix the timestamps. The compiler and
|
||||
# linker are also checked - so we need to fix them too.
|
||||
ebegin "fixing timestamps to avoid unnecessary rebuilds"
|
||||
tref="usr/lib/go/pkg/*/runtime.a"
|
||||
find "${ROOT}"usr/lib/go -type f \
|
||||
-exec touch -r "${ROOT}"${tref} {} \;
|
||||
eend $?
|
||||
}
|
||||
|
||||
pkg_postrm()
|
||||
{
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
fi
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.3.9.ebuild,v 1.12 2009/11/04 12:12:05 arfrever Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
# Usually apr-util has the same PV as apr, but in case of security fixes, this may change.
|
||||
#APR_PV=${PV}
|
||||
APR_PV="1.3.8"
|
||||
|
||||
inherit autotools db-use eutils libtool multilib
|
||||
|
||||
DESCRIPTION="Apache Portable Runtime Utility Library"
|
||||
HOMEPAGE="http://apr.apache.org/"
|
||||
SRC_URI="mirror://apache/apr/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="1"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
|
||||
IUSE="berkdb doc freetds gdbm ldap mysql odbc postgres sqlite sqlite3"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="dev-libs/expat
|
||||
>=dev-libs/apr-${APR_PV}:1
|
||||
berkdb? ( =sys-libs/db-4* )
|
||||
freetds? ( dev-db/freetds )
|
||||
gdbm? ( sys-libs/gdbm )
|
||||
ldap? ( =net-nds/openldap-2* )
|
||||
mysql? ( =virtual/mysql-5* )
|
||||
odbc? ( dev-db/unixODBC )
|
||||
postgres? ( virtual/postgresql-base )
|
||||
sqlite? ( dev-db/sqlite:0 )
|
||||
sqlite3? ( dev-db/sqlite:3 )"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-doc/doxygen )"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${P}-support_berkeley_db-4.8.patch"
|
||||
eautoreconf
|
||||
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
use ldap && myconf+=" --with-ldap"
|
||||
|
||||
if use berkdb; then
|
||||
local db_version
|
||||
db_version="$(db_findver sys-libs/db)" || die "Unable to find db version"
|
||||
db_version="$(db_ver_to_slot "${db_version}")"
|
||||
db_version="${db_version/\./}"
|
||||
myconf+=" --with-dbm=db${db_version} --with-berkeley-db=$(db_includedir):/usr/$(get_libdir)"
|
||||
else
|
||||
myconf+=" --without-berkeley-db"
|
||||
fi
|
||||
|
||||
econf --datadir=/usr/share/apr-util-1 \
|
||||
--with-apr=/usr \
|
||||
--with-expat=/usr \
|
||||
$(use_with freetds) \
|
||||
$(use_with gdbm) \
|
||||
$(use_with mysql) \
|
||||
$(use_with odbc) \
|
||||
$(use_with postgres pgsql) \
|
||||
$(use_with sqlite sqlite2) \
|
||||
$(use_with sqlite3) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake || die "emake failed"
|
||||
|
||||
if use doc; then
|
||||
emake dox || die "emake dox failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
|
||||
dodoc CHANGES NOTICE README
|
||||
|
||||
if use doc; then
|
||||
dohtml -r docs/dox/html/* || die "dohtml failed"
|
||||
fi
|
||||
|
||||
# This file is only used on AIX systems, which Gentoo is not,
|
||||
# and causes collisions between the SLOTs, so remove it.
|
||||
rm -f "${D}usr/$(get_libdir)/aprutil.exp"
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr/apr-1.3.9.ebuild,v 1.9 2010/03/07 11:56:25 hollow Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit autotools eutils libtool multilib
|
||||
|
||||
DESCRIPTION="Apache Portable Runtime Library"
|
||||
HOMEPAGE="http://apr.apache.org/"
|
||||
SRC_URI="mirror://apache/apr/${P}.tar.bz2"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="1"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="doc older-kernels-compatibility +urandom"
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="doc? ( app-doc/doxygen )"
|
||||
RDEPEND=""
|
||||
|
||||
src_prepare() {
|
||||
AT_M4DIR="build" eautoreconf
|
||||
elibtoolize
|
||||
|
||||
epatch "${FILESDIR}/config.layout.patch"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
if use older-kernels-compatibility; then
|
||||
local apr_cv_accept4 apr_cv_dup3 apr_cv_epoll_create1 apr_cv_sock_cloexec
|
||||
export apr_cv_accept4="no"
|
||||
export apr_cv_dup3="no"
|
||||
export apr_cv_epoll_create1="no"
|
||||
export apr_cv_sock_cloexec="no"
|
||||
fi
|
||||
|
||||
if use urandom; then
|
||||
myconf+=" --with-devrandom=/dev/urandom"
|
||||
else
|
||||
myconf+=" --with-devrandom=/dev/random"
|
||||
fi
|
||||
|
||||
econf --enable-layout=gentoo \
|
||||
--enable-nonportable-atomics \
|
||||
--enable-threads \
|
||||
${myconf}
|
||||
|
||||
# Make sure we use the system libtool.
|
||||
sed -i 's,$(apr_builddir)/libtool,/usr/bin/libtool,' build/apr_rules.mk
|
||||
sed -i 's,${installbuilddir}/libtool,/usr/bin/libtool,' apr-1-config
|
||||
rm -f libtool
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 || die "emake failed"
|
||||
|
||||
if use doc; then
|
||||
emake -j1 dox || die "emake dox failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
|
||||
dodoc CHANGES NOTICE
|
||||
|
||||
if use doc; then
|
||||
dohtml -r docs/dox/html/* || die "dohtml failed"
|
||||
fi
|
||||
|
||||
# This file is only used on AIX systems, which Gentoo is not,
|
||||
# and causes collisions between the SLOTs, so remove it.
|
||||
rm -f "${D}usr/$(get_libdir)/apr.exp"
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libevent/libevent-1.4.13.ebuild,v 1.10 2010/02/25 21:11:26 grobian Exp $
|
||||
|
||||
inherit autotools
|
||||
|
||||
MY_P="${P}-stable"
|
||||
|
||||
DESCRIPTION="A library to execute a function when a specific event occurs on a file descriptor"
|
||||
HOMEPAGE="http://monkey.org/~provos/libevent/"
|
||||
SRC_URI="http://monkey.org/~provos/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="!dev-libs/9libs"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
pkg_setup() {
|
||||
prevver=$(best_version ${CATEGORY}/${PN})
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
# don't waste time building tests/samples
|
||||
sed -i \
|
||||
-e 's|^\(SUBDIRS =.*\)sample test\(.*\)$|\1\2|' \
|
||||
-e 's/libevent_extra_la_LIBADD =/& libevent.la/' \
|
||||
Makefile.am || die "sed Makefile.am failed"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Building tests"
|
||||
cd test
|
||||
make test || die "failed to build tests"
|
||||
|
||||
einfo "Running tests"
|
||||
./test.sh > "${T}"/tests
|
||||
cat "${T}"/tests
|
||||
grep FAILED "${T}"/tests &>/dev/null && die "1 or more tests failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make DESTDIR="${D}" install || die "make install failed"
|
||||
dodoc README ChangeLog
|
||||
}
|
@ -1,237 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8-r4.ebuild,v 1.6 2012/01/16 02:59:51 jer Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
PYTHON_USE_WITH="-build xml"
|
||||
PYTHON_USE_WITH_OPT="python"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython"
|
||||
|
||||
inherit libtool flag-o-matic eutils python autotools prefix
|
||||
|
||||
DESCRIPTION="Version 2 of the library to manipulate XML files"
|
||||
HOMEPAGE="http://www.xmlsoft.org/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="2"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
||||
IUSE="debug doc examples icu ipv6 python readline static-libs test"
|
||||
|
||||
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
|
||||
XSTS_NAME_1="xmlschema2002-01-16"
|
||||
XSTS_NAME_2="xmlschema2004-01-14"
|
||||
XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
|
||||
XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
|
||||
|
||||
SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz
|
||||
test? (
|
||||
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
|
||||
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} )"
|
||||
|
||||
RDEPEND="sys-libs/zlib
|
||||
icu? ( dev-libs/icu )
|
||||
readline? ( sys-libs/readline )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )"
|
||||
|
||||
pkg_setup() {
|
||||
if use python; then
|
||||
python_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
|
||||
# as they are needed as tarballs in ${S}/xstc instead and not unpacked
|
||||
unpack ${P}.tar.gz
|
||||
cd "${S}"
|
||||
|
||||
if use test; then
|
||||
cp "${DISTDIR}/${XSTS_TARBALL_1}" \
|
||||
"${DISTDIR}/${XSTS_TARBALL_2}" \
|
||||
"${S}"/xstc/ \
|
||||
|| die "Failed to install test tarballs"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Patches needed for prefix support
|
||||
epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.7.2-winnt.patch
|
||||
|
||||
eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
|
||||
|
||||
epunt_cxx
|
||||
|
||||
# Reactivate the shared library versionning script
|
||||
epatch "${FILESDIR}/${P}-reactivate-script.patch"
|
||||
|
||||
# Fix a potential memory access error
|
||||
epatch "${FILESDIR}/${P}-xpath-memory.patch"
|
||||
|
||||
# Fix a potential freeing error in XPath
|
||||
epatch "${FILESDIR}/${P}-xpath-freeing.patch"
|
||||
epatch "${FILESDIR}/${P}-xpath-freeing2.patch"
|
||||
|
||||
# Fix some potential problems on reallocation failures
|
||||
epatch "${FILESDIR}/${P}-reallocation-failures.patch"
|
||||
|
||||
epatch "${FILESDIR}/${P}-disable_static_modules.patch"
|
||||
|
||||
# Hardening of XPath evaluation
|
||||
epatch "${FILESDIR}/${P}-hardening-xpath.patch"
|
||||
|
||||
# Fix missing error status in XPath evaluation
|
||||
epatch "${FILESDIR}/${P}-error-xpath.patch"
|
||||
|
||||
# Heap-based overflow in parsing long entity references
|
||||
epatch "${FILESDIR}/${P}-allocation-error-copying-entities.patch"
|
||||
|
||||
epatch "${FILESDIR}/${P}-stop-parse.patch"
|
||||
epatch "${FILESDIR}/${P}-utf-8.patch"
|
||||
|
||||
# Please do not remove, as else we get references to PORTAGE_TMPDIR
|
||||
# in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
|
||||
# We now need to run eautoreconf at the end to prevent maintainer mode.
|
||||
# elibtoolize
|
||||
|
||||
# Python bindings are built/tested/installed manually.
|
||||
sed -e "s/@PYTHON_SUBDIR@//" -i Makefile.am || die "sed failed"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# USE zlib support breaks gnome2
|
||||
# (libgnomeprint for instance fails to compile with
|
||||
# fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002).
|
||||
|
||||
# The meaning of the 'debug' USE flag does not apply to the --with-debug
|
||||
# switch (enabling the libxml2 debug module). See bug #100898.
|
||||
|
||||
# --with-mem-debug causes unusual segmentation faults (bug #105120).
|
||||
|
||||
local myconf="--with-html-subdir=${PF}/html
|
||||
--docdir=${EPREFIX}/usr/share/doc/${PF}
|
||||
$(use_with debug run-debug)
|
||||
$(use_with icu)
|
||||
$(use_with python)
|
||||
$(use_with readline)
|
||||
$(use_with readline history)
|
||||
$(use_enable ipv6)
|
||||
$(use_enable static-libs static)"
|
||||
|
||||
# filter seemingly problematic CFLAGS (#26320)
|
||||
filter-flags -fprefetch-loop-arrays -funroll-loops
|
||||
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
python_copy_sources python
|
||||
building() {
|
||||
emake PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \
|
||||
PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)"
|
||||
}
|
||||
python_execute_function -s --source-dir python building
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
testing() {
|
||||
emake test
|
||||
}
|
||||
python_execute_function -s --source-dir python testing
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples \
|
||||
install || die "Installation failed"
|
||||
|
||||
# on windows, xmllint is installed by interix libxml2 in parent prefix.
|
||||
# this is the version to use. the native winnt version does not support
|
||||
# symlinks, which makes repoman fail if the portage tree is linked in
|
||||
# from another location (which is my default). -- mduft
|
||||
if [[ ${CHOST} == *-winnt* ]]; then
|
||||
rm -rf "${ED}"/usr/bin/xmllint
|
||||
rm -rf "${ED}"/usr/bin/xmlcatalog
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
installation() {
|
||||
emake DESTDIR="${D}" \
|
||||
PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" \
|
||||
docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
|
||||
exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
|
||||
install
|
||||
}
|
||||
python_execute_function -s --source-dir python installation
|
||||
|
||||
python_clean_installation_image
|
||||
fi
|
||||
|
||||
rm -rf "${ED}"/usr/share/doc/${P}
|
||||
dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* || die "dodoc failed"
|
||||
|
||||
if ! use python; then
|
||||
rm -rf "${ED}"/usr/share/doc/${PF}/python
|
||||
rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV}
|
||||
fi
|
||||
|
||||
if ! use doc; then
|
||||
rm -rf "${ED}"/usr/share/gtk-doc
|
||||
rm -rf "${ED}"/usr/share/doc/${PF}/html
|
||||
fi
|
||||
|
||||
if ! use examples; then
|
||||
rm -rf "${ED}/usr/share/doc/${PF}/examples"
|
||||
rm -rf "${ED}/usr/share/doc/${PF}/python/examples"
|
||||
fi
|
||||
|
||||
if ! use static-libs; then
|
||||
# Remove useless .la files
|
||||
find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use python; then
|
||||
python_mod_optimize drv_libxml2.py libxml2.py
|
||||
fi
|
||||
|
||||
# We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
|
||||
# be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
|
||||
if [ "${ROOT}" != "/" ]
|
||||
then
|
||||
elog "Skipping XML catalog creation for stage building (bug #208887)."
|
||||
else
|
||||
# need an XML catalog, so no-one writes to a non-existent one
|
||||
CATALOG="${EROOT}etc/xml/catalog"
|
||||
|
||||
# we dont want to clobber an existing catalog though,
|
||||
# only ensure that one is there
|
||||
# <obz@gentoo.org>
|
||||
if [ ! -e ${CATALOG} ]; then
|
||||
[ -d "${EROOT}etc/xml" ] || mkdir -p "${EROOT}etc/xml"
|
||||
"${EPREFIX}"/usr/bin/xmlcatalog --create > ${CATALOG}
|
||||
einfo "Created XML catalog in ${CATALOG}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if use python; then
|
||||
python_mod_cleanup drv_libxml2.py libxml2.py
|
||||
fi
|
||||
}
|
@ -1,216 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8.ebuild,v 1.9 2011/02/26 17:17:33 arfrever Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
PYTHON_USE_WITH="-build xml"
|
||||
PYTHON_USE_WITH_OPT="python"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython"
|
||||
|
||||
inherit libtool flag-o-matic eutils python autotools prefix
|
||||
|
||||
DESCRIPTION="Version 2 of the library to manipulate XML files"
|
||||
HOMEPAGE="http://www.xmlsoft.org/"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="2"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
||||
IUSE="debug doc examples icu ipv6 python readline test"
|
||||
|
||||
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
|
||||
XSTS_NAME_1="xmlschema2002-01-16"
|
||||
XSTS_NAME_2="xmlschema2004-01-14"
|
||||
XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
|
||||
XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
|
||||
|
||||
SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz
|
||||
test? (
|
||||
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
|
||||
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} )"
|
||||
|
||||
RDEPEND="sys-libs/zlib
|
||||
icu? ( dev-libs/icu )
|
||||
readline? ( sys-libs/readline )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )"
|
||||
|
||||
pkg_setup() {
|
||||
if use python; then
|
||||
python_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
|
||||
# as they are needed as tarballs in ${S}/xstc instead and not unpacked
|
||||
unpack ${P}.tar.gz
|
||||
cd "${S}"
|
||||
|
||||
if use test; then
|
||||
cp "${DISTDIR}/${XSTS_TARBALL_1}" \
|
||||
"${DISTDIR}/${XSTS_TARBALL_2}" \
|
||||
"${S}"/xstc/ \
|
||||
|| die "Failed to install test tarballs"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Patches needed for prefix support
|
||||
epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.7.2-winnt.patch
|
||||
|
||||
eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
|
||||
|
||||
epunt_cxx
|
||||
|
||||
# Reactivate the shared library versionning script
|
||||
epatch "${FILESDIR}/${P}-reactivate-script.patch"
|
||||
|
||||
# Fix a potential memory access error
|
||||
epatch "${FILESDIR}/${P}-xpath-memory.patch"
|
||||
|
||||
# Fix a potential freeing error in XPath
|
||||
epatch "${FILESDIR}/${P}-xpath-freeing.patch"
|
||||
epatch "${FILESDIR}/${P}-xpath-freeing2.patch"
|
||||
|
||||
epatch "${FILESDIR}/${P}-disable_static_modules.patch"
|
||||
|
||||
# Please do not remove, as else we get references to PORTAGE_TMPDIR
|
||||
# in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
|
||||
# We now need to run eautoreconf at the end to prevent maintainer mode.
|
||||
# elibtoolize
|
||||
|
||||
# Python bindings are built/tested/installed manually.
|
||||
sed -e "s/@PYTHON_SUBDIR@//" -i Makefile.am || die "sed failed"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# USE zlib support breaks gnome2
|
||||
# (libgnomeprint for instance fails to compile with
|
||||
# fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002).
|
||||
|
||||
# The meaning of the 'debug' USE flag does not apply to the --with-debug
|
||||
# switch (enabling the libxml2 debug module). See bug #100898.
|
||||
|
||||
# --with-mem-debug causes unusual segmentation faults (bug #105120).
|
||||
|
||||
local myconf="--with-html-subdir=${PF}/html
|
||||
--docdir=${EPREFIX}/usr/share/doc/${PF}
|
||||
$(use_with debug run-debug)
|
||||
$(use_with icu)
|
||||
$(use_with python)
|
||||
$(use_with readline)
|
||||
$(use_with readline history)
|
||||
$(use_enable ipv6)"
|
||||
|
||||
# filter seemingly problematic CFLAGS (#26320)
|
||||
filter-flags -fprefetch-loop-arrays -funroll-loops
|
||||
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
python_copy_sources python
|
||||
building() {
|
||||
emake PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \
|
||||
PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)"
|
||||
}
|
||||
python_execute_function -s --source-dir python building
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
testing() {
|
||||
emake test
|
||||
}
|
||||
python_execute_function -s --source-dir python testing
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples \
|
||||
install || die "Installation failed"
|
||||
|
||||
# on windows, xmllint is installed by interix libxml2 in parent prefix.
|
||||
# this is the version to use. the native winnt version does not support
|
||||
# symlinks, which makes repoman fail if the portage tree is linked in
|
||||
# from another location (which is my default). -- mduft
|
||||
if [[ ${CHOST} == *-winnt* ]]; then
|
||||
rm -rf "${ED}"/usr/bin/xmllint
|
||||
rm -rf "${ED}"/usr/bin/xmlcatalog
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
installation() {
|
||||
emake DESTDIR="${D}" \
|
||||
PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" \
|
||||
docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
|
||||
exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
|
||||
install
|
||||
}
|
||||
python_execute_function -s --source-dir python installation
|
||||
|
||||
python_clean_installation_image
|
||||
fi
|
||||
|
||||
rm -rf "${ED}"/usr/share/doc/${P}
|
||||
dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* || die "dodoc failed"
|
||||
|
||||
if ! use python; then
|
||||
rm -rf "${ED}"/usr/share/doc/${PF}/python
|
||||
rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV}
|
||||
fi
|
||||
|
||||
if ! use doc; then
|
||||
rm -rf "${ED}"/usr/share/gtk-doc
|
||||
rm -rf "${ED}"/usr/share/doc/${PF}/html
|
||||
fi
|
||||
|
||||
if ! use examples; then
|
||||
rm -rf "${ED}/usr/share/doc/${PF}/examples"
|
||||
rm -rf "${ED}/usr/share/doc/${PF}/python/examples"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use python; then
|
||||
python_mod_optimize drv_libxml2.py libxml2.py
|
||||
fi
|
||||
|
||||
# We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
|
||||
# be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
|
||||
if [ "${ROOT}" != "/" ]
|
||||
then
|
||||
elog "Skipping XML catalog creation for stage building (bug #208887)."
|
||||
else
|
||||
# need an XML catalog, so no-one writes to a non-existent one
|
||||
CATALOG="${EROOT}etc/xml/catalog"
|
||||
|
||||
# we dont want to clobber an existing catalog though,
|
||||
# only ensure that one is there
|
||||
# <obz@gentoo.org>
|
||||
if [ ! -e ${CATALOG} ]; then
|
||||
[ -d "${EROOT}etc/xml" ] || mkdir -p "${EROOT}etc/xml"
|
||||
"${EPREFIX}"/usr/bin/xmlcatalog --create > ${CATALOG}
|
||||
einfo "Created XML catalog in ${CATALOG}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if use python; then
|
||||
python_mod_cleanup drv_libxml2.py libxml2.py
|
||||
fi
|
||||
}
|
@ -1,118 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxslt/libxslt-1.1.26-r1.ebuild,v 1.7 2011/03/18 17:30:53 armin76 Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython"
|
||||
|
||||
inherit autotools eutils python toolchain-funcs
|
||||
|
||||
DESCRIPTION="XSLT libraries and tools"
|
||||
HOMEPAGE="http://www.xmlsoft.org/"
|
||||
SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="crypt debug python"
|
||||
|
||||
DEPEND=">=dev-libs/libxml2-2.6.27:2
|
||||
crypt? ( >=dev-libs/libgcrypt-1.1.42 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
if use python; then
|
||||
python_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/libxslt.m4-${P}.patch \
|
||||
"${FILESDIR}"/${PN}-1.1.23-parallel-install.patch \
|
||||
"${FILESDIR}"/${P}-undefined.patch \
|
||||
"${FILESDIR}"/${P}-disable_static_modules.patch
|
||||
|
||||
# Python bindings are built/tested/installed manually.
|
||||
sed -e "s/@PYTHON_SUBDIR@//" -i Makefile.am || die "sed failed"
|
||||
|
||||
# Fix generate-id() to not expose object addresses, bug #358615
|
||||
epatch "${FILESDIR}/${P}-id-generation.patch"
|
||||
|
||||
eautoreconf
|
||||
epunt_cxx
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# libgcrypt is missing pkg-config file, so fixing cross-compile
|
||||
# here. see bug 267503.
|
||||
if tc-is-cross-compiler; then
|
||||
export LIBGCRYPT_CONFIG="${SYSROOT}/usr/bin/libgcrypt-config"
|
||||
fi
|
||||
|
||||
econf \
|
||||
--disable-dependency-tracking \
|
||||
--with-html-dir=/usr/share/doc/${PF} \
|
||||
--with-html-subdir=html \
|
||||
$(use_with crypt crypto) \
|
||||
$(use_with python) \
|
||||
$(use_with debug) \
|
||||
$(use_with debug mem-debug)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
python_copy_sources python
|
||||
building() {
|
||||
emake PYTHON_INCLUDES="$(python_get_includedir)" \
|
||||
PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \
|
||||
PYTHON_VERSION="$(python_get_version)"
|
||||
}
|
||||
python_execute_function -s --source-dir python building
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
default
|
||||
|
||||
if use python; then
|
||||
testing() {
|
||||
emake test
|
||||
}
|
||||
python_execute_function -s --source-dir python testing
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
|
||||
if use python; then
|
||||
installation() {
|
||||
emake DESTDIR="${D}" \
|
||||
PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \
|
||||
install
|
||||
}
|
||||
python_execute_function -s --source-dir python installation
|
||||
|
||||
python_clean_installation_image
|
||||
fi
|
||||
|
||||
mv -vf "${ED}"/usr/share/doc/${PN}-python-${PV} \
|
||||
"${ED}"/usr/share/doc/${PF}/python
|
||||
dodoc AUTHORS ChangeLog FEATURES NEWS README TODO || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use python; then
|
||||
python_mod_optimize libxslt.py
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
if use python; then
|
||||
python_mod_cleanup libxslt.py
|
||||
fi
|
||||
}
|
@ -1,6 +1,51 @@
|
||||
# ChangeLog for dev-python/boto
|
||||
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/ChangeLog,v 1.53 2013/01/25 04:50:57 radhermit Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/ChangeLog,v 1.63 2013/06/19 03:47:57 radhermit Exp $
|
||||
|
||||
*boto-2.9.6 (19 Jun 2013)
|
||||
|
||||
19 Jun 2013; Tim Harder <radhermit@gentoo.org> +boto-2.9.6.ebuild:
|
||||
Version bump.
|
||||
|
||||
03 Jun 2013; Sébastien Fabbro <bicatali@gentoo.org> boto-2.9.5.ebuild:
|
||||
Keyword amd64-linux and x86-linux
|
||||
|
||||
*boto-2.9.5 (29 May 2013)
|
||||
|
||||
29 May 2013; Tim Harder <radhermit@gentoo.org> +boto-2.9.5.ebuild:
|
||||
Version bump.
|
||||
|
||||
*boto-2.9.4 (21 May 2013)
|
||||
|
||||
21 May 2013; Tim Harder <radhermit@gentoo.org> +boto-2.9.4.ebuild:
|
||||
Version bump.
|
||||
|
||||
*boto-2.9.3 (16 May 2013)
|
||||
|
||||
16 May 2013; Tim Harder <radhermit@gentoo.org> +boto-2.9.3.ebuild:
|
||||
Version bump.
|
||||
|
||||
*boto-2.9.2 (01 May 2013)
|
||||
|
||||
01 May 2013; Tim Harder <radhermit@gentoo.org> +boto-2.9.2.ebuild:
|
||||
Version bump.
|
||||
|
||||
20 Feb 2013; Matthew Thode <prometheanfire@gentoo.org> boto-2.1.1.ebuild:
|
||||
added comment to boto-2.1.1 to hopefully prevent bad pruning
|
||||
|
||||
20 Feb 2013; Matthew Thode <prometheanfire@gentoo.org> boto-2.1.1.ebuild:
|
||||
readding boto-2.1.1 as sys-cluster/nova requires it
|
||||
|
||||
05 Feb 2013; Tim Harder <radhermit@gentoo.org> -boto-2.0.ebuild,
|
||||
-boto-2.1.1.ebuild, -boto-2.2.2.ebuild, -boto-2.2.2-r1.ebuild,
|
||||
-files/boto-2.2.2-no-install-tests.patch, -boto-2.4.1.ebuild,
|
||||
-boto-2.5.2.ebuild:
|
||||
Remove old.
|
||||
|
||||
*boto-2.8.0 (05 Feb 2013)
|
||||
|
||||
05 Feb 2013; Tim Harder <radhermit@gentoo.org> +boto-2.8.0.ebuild:
|
||||
Version bump.
|
||||
|
||||
*boto-2.7.0 (25 Jan 2013)
|
||||
|
||||
|
@ -1,34 +1,36 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
AUX boto-2.2.2-no-install-tests.patch 1403 SHA256 704eb7cbdb6f3d64ed3fddc9e1168f7867703bb1fcb50f2198916f32fe13d10e SHA512 507707d69fb788aaaeba4440a428c40f607dc3dc30036e001f39d7458d7414eb794e01b08e989c16999191d667c41f856fab9fd09e412debad46c6f828a46b22 WHIRLPOOL 9ac99ed58d59b585cdc2531b329e4fd6131bf2cb20b91cecd706efcb57e95f9f8e2dce6f49f6b553ed4c415f82dd07c3ff8f5bdb87956efb96912744ae98b122
|
||||
DIST boto-2.0.tar.gz 302074 SHA256 7b8714b0a6054f3a8c1b8e0908b8a0606c528c2c04b2910fb6dbd4337692e16b SHA512 1a673ebd2861fdb89aea5b888599184a1b046ff11dbac0ec334fe56ef17737100f1d910fe824a4f195f6eb5f2f8d962e01ec1b77d4026edbc78f853f2b9ccd21 WHIRLPOOL 2c4fb122aa92ed3d73419da050ae8ad121c73993a518352f1557c93266227fc5380ec23c35d64146df73a2beff817a3dfb96c4fe7800dd5cf4b06e4be230f7bc
|
||||
DIST boto-2.1.1.tar.gz 313294 SHA256 4d6d38aa8e9e536a27a9737eb4222f896417841fed9a12eedcb619ba8fb68a39 SHA512 0b8d5820ba9b3821a306f353bf2c4725f490121377a9fbcb88777ab25263d2d7bcb89d9700f68a9671364b040dcd9892cdfe3b372ef487694d1ec4d3437dee1a WHIRLPOOL 193f480de4b6c71f268173e81ae4d11fe11b5b1368c398d64c7f24ad67e2717d4c619032d2b1ee09478052440507aab6bcc88c11bdaa3753eb53a336e4e09bdc
|
||||
DIST boto-2.2.2.tar.gz 456632 SHA256 17dce8082a650da50cdc966a5325b97873fac14916dcf1b9d9130b7e212ee292 SHA512 52a4482348a5088d173474fb5f8e800dc552ac24085bc60c2d47bacbb1d86ccee51751a57fec35db83d861c365825fba14919c6c0e19d8123cc790b5913a985e WHIRLPOOL f92b94fcfdc3d40be8fbeed86b9087e100e9e40ad748d66a5bc66f099ccaa0f1b779eec5fb7964fe8906f846127ac3fb9ba85a367e87fedb80f7d4797b64813f
|
||||
DIST boto-2.3.0.tar.gz 488207 SHA256 c12969a9b51eb803e348f71850b3cd28edb43095235d46b86408f334fd4e3516 SHA512 a59edcea8c4f30268e21c8bd518c516771f926e4833e696f2dc812c42893c47df279c3705e3e050dddbfcb3df34c2fb0d86ae77b7952cf6802774623e7da9aaf WHIRLPOOL f66872fdd9243d5e4acadff7c6052dfae99ec005b89596e96ee68443b79ff2b4077a3145449a4e76a50a9d1f72916c481a71aa5ebe44ca2ebb04c9c0d8f972aa
|
||||
DIST boto-2.4.1.tar.gz 519928 SHA256 68c3b8d6ece61f6d0edd04faaea3eb6a4f40f9def936a005dc69bc456d89c814 SHA512 6491f9eb7d7dcb81abf81d7d99e27f3de20a28883cddd3fb9742fe2a7c0ba6ea68faad3b1a83ec5918354c16cca7f144bfcf0e65032f6b83bcbf9802cae701b6 WHIRLPOOL 112a2e44d5013d9ab32e6920d10db93a83f70f96293754b3d637cbf82eff2abb72fcf5d082e95b2c5125c6725b40612e3e0063ff3f6f4934be39a764e86269e4
|
||||
DIST boto-2.5.2.tar.gz 580273 SHA256 1dbe16df5b3a69011ae80b1999680ed4a3d97cb1aeeceb1ad86bceaff0b580ed SHA512 82103aba0ef97922e6b54f015df508eb56ae179720068127e546e7b41b1bd5865f49e51fc685c53bc5673a6e717584010a9e023e58a2ff6f772de7e405f92c1a WHIRLPOOL c2d8e594d1ea408036c4186bc46ebdb661e9ff1e5574005e870bc54efed3accb664da41ea0279dd71eeaa51de4d49a8e7a4e338f22c1d066c41f8a615f18a156
|
||||
DIST boto-2.6.0.tar.gz 640220 SHA256 ce516d8e92601f61e53b439c9d31669b2dab0a93710b7ab8cd9510975dd2dff2 SHA512 2fb66275a3447e887a84d99da3bbf82dbe70be2a93a8e3a94d6a65ce447fe6ad3b0253c2321c2bb69d663fc73b7509145e08c659d10ee955b04bbe7b3f37a697 WHIRLPOOL bd864b36c3f263efed240699d7c7a593b53f6f9bb975aabedd95f4d9e7778a8bcc6bb88de1438960e43f9040f5b7fbbfff57239c5a6146bce662ee8855726882
|
||||
DIST boto-2.7.0.tar.gz 706722 SHA256 77e8c62113cab20ddd0d3cb8a72229f0f947cacbb7a168ef2641f5aa424e37a2 SHA512 3439b1ff9b754821a1a3b1a632d4efd1514d5976a5bba4cfa617653ac793ba520b3020604dada73f76c50622287a661e855287d9f7582efc4b60e3b18e704f40 WHIRLPOOL 45b58c0639ee418d0e08966e9bbf048bd624f3eb5a25b201c9ced40357a7a68b84b17bd5023f781150b811f525ff7a8580126e5fdffbc0c0bfd18fef2e6c1a91
|
||||
EBUILD boto-2.0.ebuild 627 SHA256 6e5b5c0a98f6307b1cbf54edb871408e4e46dd7c616a9dbb185588ceb8297f1b SHA512 621aa9689ae4007764a1bb8133cb371785084018a677f6995f681601b6350389ecf410550d0b4ab52deb00478bcb60c3956db95449226450798fd15fef499482 WHIRLPOOL f00e2b64b74376fa6916d1e0c40c5192183790aff2db1310f8a0a9881e136fa3c2075d42782489e85e01dbeae34547665890602855f4f81412f79636db4584c0
|
||||
EBUILD boto-2.1.1.ebuild 636 SHA256 920b7b15d5f0ff2209bf0e968e3825be3c79f6371a4b44a621360e6df56c10fd SHA512 4b06b3d7faac5c8a106877f4d061970e79ea38a6bd9c42d3b7151d84251f312015dc00378fa6d06cc1ca54c91e3603ff65bd81cc631d20c1101b07ce784895d1 WHIRLPOOL d08d6cf4226bfe6bdfc3e962697f993b14e3553cdff42502a0fdcad88e7869c8de283123e322c526dce1b249204ae31cf52867fa5e6a9f8e21a1978d1556f876
|
||||
EBUILD boto-2.2.2-r1.ebuild 897 SHA256 40ff6311a3848c3eb301c963ad20c64ef3b5a24bb102fc9cc95030af90785b83 SHA512 b648de5c14b3518b8b56b5db5f9bea1ca40dc0a709e32f33ee401ff14fb3fb1ccab0f7f4d99a87c642b6d97e9a3fc5454cdc592339db6fb2466b582db4d295ed WHIRLPOOL 41e6b72b14a4e0d1bf28f37ab040cd2bcd3647fbc8400e64d3f518d2be0819acad2abf6b675b3ec13ddcc591193fcb186c1c494f308317086955def12cca9568
|
||||
EBUILD boto-2.2.2.ebuild 783 SHA256 9d6eba8ec64cf097eab1004ac82e61c64e576cff5891fcc9388ed9ef5d4025a0 SHA512 cfaa53029e5605e3ebd4b5dd171893f110926220c32fff2186fdbcf1d35dd26f201a391d726575e8cf3a0da97f3305b2ad767768ebda86d1a05a6421ee40c6b5 WHIRLPOOL ad6128b530d643222dd65e56a5b2eb65e62f6376e19191f573f98d60316fe5d805ffe2cbff412acdad73a6c99ca238f2005af7fbf2a027df8cf4cacee7cf9de5
|
||||
DIST boto-2.8.0.tar.gz 743925 SHA256 f520cec579a11c99b510e06d16f484ce877f5b75eeae850c7e165753092939db SHA512 12853813ae78243ea025fb2e7d0d1dca71b655d977da5d9d28071f52a78708eebf16a42d8763b315246e7ebb681f5ec111e779d710286293175d38ac165a69f1 WHIRLPOOL 6853135e4a66852ac9f06fe1789355b64241cb91f24c1b8b534d10dda81b37083945e5c140ce0d20fa33454472ea4e22a128ac5a9a63cdefde409882df0dc82c
|
||||
DIST boto-2.9.2.tar.gz 875951 SHA256 be7b58fb34a9ceb136c4aadcb3e1a926e8a3fde4ebcc55c940b8c69a9dcbba4a SHA512 fb384d36d1aab5cef668a7e5477fd2ea525162dd388af67115aa04f47fbe060f8683ce147e4a5d31625ee7948a8546d62465dae41911400cbdfc478e02db4cf5 WHIRLPOOL 7c1b1317f84e42659b9b020b9ba83bf225ee853cb2b6ac183796435f4e29577418fe941865a7c71ecb4bde12daae1a1d141d7f87a8a4756342fb6cfbcd1cd388
|
||||
DIST boto-2.9.3.tar.gz 915218 SHA256 57ec51f2dbcfe8ef444d355096b55bfbbf6b04b34de700ff79ba7a8cf24ea39d SHA512 b1d4874b8577c258f54a5372a734f953e1ee069eb001728f1dc1d8b66c47168e547f72f749f10ac4f2c283c8f5d155269ae361fef8e6b59c2a178fa92c7f0b7f WHIRLPOOL 30bcc0e53362bd59aa76c0a4c77380a9d6effa63f5c9a3e6e4499dc0bcfee71efcb7aa6d6cd819a479f8f30ad2f410dbbeab57ff9f1f0e441acd67bb57e5057b
|
||||
DIST boto-2.9.4.tar.gz 916124 SHA256 9e4747923c1c92c15d330dd29427306af24f05ee2fa6eb80debde0dea1b6bd2f SHA512 051136f68b5055696647f82c111821ddf80a427a9e87681cac94d4c92950ce54f20195fb93e33b83844ee921f09db45c7b973fee60685df7df0fc44e95cb4593 WHIRLPOOL 2b054cfba368f7f97245d41a30b5a272111c58c54a847fd593cfb83d819cddfc72acba969565fc6793335166797e03502e0c78613dacb1b8c478005d973f0f50
|
||||
DIST boto-2.9.5.tar.gz 921725 SHA256 4684b9f8ef57b397954089006306d37fc595a4f6ac04882143fd7e861944cab6 SHA512 77881c5a5e8389b92e60e638fba39f534f7d5d10ab4318bdd933b3a156d6003fd7c5fb25a5d00cb5b7e90c0bd03d1e709e0a9e4c27a1889b8ca879f94391ba92 WHIRLPOOL 28eba724e037fd34831b52eaa154b9110c26737a8fbf34c98b91d427f8d1000debad19bdf6d69474705e62c79431f3d28965c8e88651d262c4d64415636fd708
|
||||
DIST boto-2.9.6.tar.gz 926557 SHA256 baf12b9101b17a5bb97e7ee74fef8622f4ca0f3c147f870eff58c37a7a2297c5 SHA512 25bfabd43ebc317824ab2175431368844dd4a130970d8e54cb1be336a4e6f0b24273d14e10b29b63aa0004c15af5a0c9975af3a31aa81ea38d58509f4dbe8a85 WHIRLPOOL 1dc7396d7c41a123b5ec7e4062eecb7510a3dd615409608157a23d7a51738756096e25c6ee4c724d2841e02735ef7a75081818227206010cdfdb230b25ca9504
|
||||
EBUILD boto-2.1.1.ebuild 864 SHA256 957b383c3cee1c7ba1040210c6f66e91f58069dc6a3875232f10bb743d1ede36 SHA512 df90aaabdd971f4fdf9dd31667ba2662967d9d6447197e026364d3d60e3ab3d7519a619ba054ecaed2e3ca44877772e066e35bb08b3e367b1c36b41305a3a68b WHIRLPOOL 469e724242cf27a1527c8679a23c034ec78656c8d1a3558d0996672d503c49a39268c7934f1dfeb5667401cf40459398034e698e5cf36577cf69f511049747f8
|
||||
EBUILD boto-2.3.0.ebuild 777 SHA256 78a311dfde127d44dd52115245fbc6897b7d95e38551e2899cf74e990f7a10b9 SHA512 cfb21ab698d2edeaff817289bab88bc97dfa2e26d9e2190191f6a420cbfa1fefc71d6446654b5e58a0e55f1d345130b58dd36cbe71f9af7df6a950b864590648 WHIRLPOOL 73e305ab381a9cc51985e5ef702dc81fadd07faf27ae897a7e9cc084cb569c18690545a75b0b465f9a08e0d9d349201b22f696b6ee658f54e1e22d68b42e674c
|
||||
EBUILD boto-2.4.1.ebuild 783 SHA256 efedefd0fdd5ef09c59092d912487ee7a69adc7b333a51a251095f8d2a5f6abf SHA512 ad54a33f9bbb04bbc8a04efa98e3c509c769c13ae4830d52d5271e136255c11dd40087c9c887971e8e450c2e0f5790ef45684bda1aca7ad6daa968d0e84caaa6 WHIRLPOOL 562cacd61b8fc9bfe82b2ab9c7fcac67ab3dae34c03eff8b3d517f6bb8f17ebab82e89a8f266b5fc4311eea518e81f8c0165a71d9a277f79e3fc7e0513c72a6e
|
||||
EBUILD boto-2.5.2.ebuild 780 SHA256 5308b3cfaaad657b153cbd532032f2b6f5ab3a5e431237eecda1b210bce84556 SHA512 c62ec1e862f394a04505786e6135973755878b17f9eee02fe455154b3e24dd73f486dc667a2fd6ece2a7f532c56c67936f3984993fa8088992b67691802bd600 WHIRLPOOL 8b27b3e32decf3fdabd1efc829a05646a315c94a525b81348df1610e49b9721fed491336ab53d95107c991a6cc7239dc4ed1fb096e323d24c5e3309b0cb2b676
|
||||
EBUILD boto-2.6.0.ebuild 783 SHA256 7788bbaf215c663bc74e47585eaa65cd9bc25ddca14b822d42bd4fc70874f363 SHA512 f83b75f3ac9d59ffc67389dc272c0e557e353a4f77dcdf52ed88b8c35d5441be67c048b44e2697dd8f4e45814e263ad67711f0bc63f74a3ee57316237c99d551 WHIRLPOOL 207ea13a882c3968fa196c52a0d0ed0d91d2011ce9f4b41def2333dd11e9cdf41471aaee64cd8374942c736b390322a45d04f5265e81e56a31a1482fbbc61104
|
||||
EBUILD boto-2.7.0.ebuild 774 SHA256 af3d8c376d457b36b608da193bfd5c5c09812d073fc5c578efcfe5e61807663b SHA512 878951df08c95aefbfed5186668507b28450884c3c361d34081d0be63b2a060d6adabbdd598e14f9109e87fa4d89c287b0021812c9950c0a21428d6bc1c12e22 WHIRLPOOL a586c5d96bd636c50ccd20f6339e4f14a32ac8b3cb3ead082d1c882d4a5341ac9e1b84205ad297588747fe30e5b52d9d31d62ad44756980c0ae1553daabc551b
|
||||
MISC ChangeLog 6243 SHA256 9a79379b3e5ad310872699ed1e5b7832a6b090080e7fcca84dd62e2ad7fc1991 SHA512 0819da7eebf4233710c05683f0312d12dc5468d6a0cf893dfc73869bf5bfb04459f8f4386cf2c68a11ea06217e09bcb744ae4bb68265041eaffade7dbbaafae8 WHIRLPOOL 27b07783642980b0f1a49813aca3458c9188fac7f372ed859ab18641372d25f5421095236e1592c3355ead1b2050e2b517b92ca78cc0116d1560f31001f34175
|
||||
EBUILD boto-2.8.0.ebuild 774 SHA256 4943589a6d7dbf7c09928f4ae75ac16735e929f1a467cbd7ea367429835dc506 SHA512 b1869abe6e6cb965ab6d6878654cfee9026bc5125f23213262e910ef5cc6c6cfd387a9322a31654f83c422f8c054083390fd2d5d56657336cd635cc88071511d WHIRLPOOL 373d1dcc253373f2408a3f37c3f674601ab43851679633700d6f7a5d5db27dd6489d2453a8f27737e0e3b51b0ec36c6d6861fb2206a383c18b3e835c3e04e354
|
||||
EBUILD boto-2.9.2.ebuild 774 SHA256 a4016e7b595b5056319277b81849f20b5374a59fc7ffd333f83177a71f5ac278 SHA512 1728dea74b56446135423a8d7ce388aaf075a8f5548b7a49eed52c26d6af177b9cf822e41a8721d28315ee6cc9c5e2f00ec8bd09d6c241c1012beb5a6e845973 WHIRLPOOL 0e1e3aa25a38aa3a05bc4fa86b62fa9d521280166f4840073754f658475e90d0826b2b76ea6ca6b55b26eac3684f722380897510f52d3bde6004392fa2d0b356
|
||||
EBUILD boto-2.9.3.ebuild 774 SHA256 ebc3e9e8d67e9263776f9be071d256d0dfc7e67285426935daf1586b59d04356 SHA512 51b7ba958f374533168fc575840af63b6763963b6fe0dcbd0add7eca0d27e04c844f4a134898302549ea4f487fc956c067e040382a6e4a7c56d2750913f414c2 WHIRLPOOL b566ab1f219eeb403c5d9cdfa9d3abbc026f6895f93e3e90ca540756e0700ce9181c33e2a1ffd9f3307a9b8e1125a28d77ea72f1354e9aea0bd48fbb20d9b036
|
||||
EBUILD boto-2.9.4.ebuild 774 SHA256 3434dfb4b3e46edefb81856dceefd451451219b3a2336a90a3ce60926f8eaba6 SHA512 0a316bb08fb4f120cc5249e6a1f8b05a593b9d5df75fb5021c3c43857500e1708a1e76cb145a98e7e1f1f9a60f5f5cdb18d19fcebbc759bf4c3be35224010fa2 WHIRLPOOL bd3d216f3d514b607b8c373b89376ef20f0c662c6e7ef648b5d3fb3821805779f396ce5a28b0ca8776bd5abb4cd9861fcb2260f7553a06667ff82f8609daa78a
|
||||
EBUILD boto-2.9.5.ebuild 786 SHA256 00ea8b2473ee849a9cd4d714ce9f12621e5b538b813951193ae3c71ff1800eea SHA512 5ae29b608ee1f055e39ecc5bcd9a98ee6aa5700a05ed93c4b1aeb004083a1a00f40e57fa2be2c662d2be7c183ca23258a5ff825cf0a763bac1814f322c08fa67 WHIRLPOOL 402655c8b71d6a2b4000a633be830cba1d30b5d60601dc11702a85b49be6197b49689810a5e25e0de550a4da90cbb369ab3727d833cae0ae1fe0a7adfd10b9f3
|
||||
EBUILD boto-2.9.6.ebuild 787 SHA256 e239e30778873fdea1fd033489a1896fec7ebe8b62bca14394b7615e0c459a4b SHA512 e92632c63460290eec036da89090d6ad2451d2751b4ace668f5f4a1828f0172515cccf8076193088eb8b70917d96d571edd3027aaff973756c812edfc72dad8e WHIRLPOOL 55eb3f025bdf5659263caeb30aad37585a029394de448ef79d8577e7caae1a24fa15de5e188186e5fa85f3713dd21ee95ce009cc15fe21f9ebc4414fb1a2b28b
|
||||
MISC ChangeLog 7536 SHA256 18a7a8295abaa41a850aa4f37087783bdf4b6b9f5b11d98ca7346cb9ad2e346c SHA512 44e7579ce4fc0e842f53e6f18b8a9a3b1870c70052e2550fd26f3287a968f1c654e5475a54baedf10cb4c9942d5b07c5ba6450ed1b9aca5da396faa3f66dd2a4 WHIRLPOOL 5f89058c2b4099f7e193a4bab859ba7c3f096f794fd9d27de9ad6da9683e708533e907e4b742331115d824581137a005934497199b02360b9133e086a25f4341
|
||||
MISC metadata.xml 298 SHA256 ac95be2c38d5896ff88c2ba8bc63dff03e183ccf83e9fabee9f7285d6dea56a8 SHA512 05d441e559c6bc0495d2b7e64370a7ac0d5f0e57e98d9f539811692b127c4f919f95278b491c7732183e15a5580e92c46474acc417c2c41c9fddd82041916494 WHIRLPOOL 6d8921d57774481113917ce37833bc3e8c19d0e5cf308e826a70307b8ed43c1c0e20a0a9700b413517b909518b78b9a64e1693b7a74b47910239703afa979f79
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.19 (GNU/Linux)
|
||||
Version: GnuPG v2.0.20 (GNU/Linux)
|
||||
|
||||
iQEcBAEBCAAGBQJRAg80AAoJEEqz6FtPBkyjL3UH/jkPFTxX4xiU+jDAh55d2j04
|
||||
R/jad5CMGNvNKo5QrjQj2UpZRNWOpxAGiA5+Dyq92Cj4+JTeMdeD3UwU6Wh7D8Dd
|
||||
WOyEqW+ygxkptzOGYv/had1Lqr6k+rbcrFHoNu3XZjptSrl0BjwpxdI5K1OH6lVW
|
||||
78l0H9M7W4cj1Cowc4QpnlrnHpJHb4FyQO1EVOg8EgLtnhn1pG9jvXJ2QKeo4gIu
|
||||
4kmF83nq1Wxcq8GM1EphG6q2aXigTdmz3vtwfkpZxwj+G+UH9RXkxuRu+cuqOTqD
|
||||
kFhbdMLAAfwGCJcuP3z/F0PNGeA78Wq9fcnMeSM9uCKHMWbAq7gWy5gzRN0gnrk=
|
||||
=Yr3c
|
||||
iQEcBAEBCAAGBQJRwSnwAAoJEEqz6FtPBkyjL/wH/3rku/5pu5KjRgvbATMVMXzr
|
||||
DNlFepRwWJIkSiaCUR2R3slE1QhcvN9AYQaddKS/fIoETqxD53CFAFUsEC8S0/gI
|
||||
L0dCukRPHfgnl4cqwWXJSvXEM815Vu+0+Fg3k8jIeBfSKuAqsMnYVR1MJz4ezmC0
|
||||
XyM29hdEi0TBziSgRDGjIWEunn5B6Vq2yw5KUQxnEELVbqfytDToDXOhCuQeYD5F
|
||||
y3jctrPqMiO+7sErRKAcTW/dIYM+1Mvxz5niH22Oy7eGlmC5tYB5hP1FPL6wY+Jo
|
||||
2C/KFDrcRZv5370pTsQ0K/2DxUbihOaS3M1z94ctGCUC0V7wiA+Crq6d4Mo45Dw=
|
||||
=PgP3
|
||||
-----END PGP SIGNATURE-----
|
||||
|
@ -1,22 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.0.ebuild,v 1.5 2012/02/22 16:51:42 vapier Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2:2.5"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="2.4 3.*"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="http://code.google.com/p/boto/ http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="http://boto.googlecode.com/files/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc sparc x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-python/setuptools"
|
||||
RDEPEND=""
|
@ -1,22 +1,31 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.1.1.ebuild,v 1.1 2011/11/09 22:17:28 radhermit Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.1.1.ebuild,v 1.5 2013/02/20 06:18:44 prometheanfire Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2:2.5"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="2.4 3.*"
|
||||
#please do not remove without checking if it is still required by
|
||||
#sys-cluster/nova
|
||||
|
||||
inherit distutils
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="http://code.google.com/p/boto/ http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="http://boto.googlecode.com/files/${P}.tar.gz"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE=""
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools"
|
||||
RDEPEND=""
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.2.2-r1.ebuild,v 1.1 2012/02/29 16:27:43 vapier Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="2:2.5"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="2.4 3.*"
|
||||
DISTUTILS_SRC_TEST="setup.py"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://github/boto/boto/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# Requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
||||
|
||||
src_prepare() {
|
||||
distutils_src_prepare
|
||||
epatch "${FILESDIR}"/${PN}-2.2.2-no-install-tests.patch #404979
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.2.2.ebuild,v 1.1 2012/02/18 03:12:01 radhermit Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="2:2.5"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="2.4 3.*"
|
||||
DISTUTILS_SRC_TEST="setup.py"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://github/boto/boto/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# Requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
@ -1,27 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.4.1.ebuild,v 1.2 2012/06/13 21:03:33 radhermit Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="2:2.5"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="2.4 3.*"
|
||||
DISTUTILS_SRC_TEST="setup.py"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://github/boto/boto/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# Requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
@ -1,27 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.5.2.ebuild,v 1.1 2012/07/17 02:23:26 vapier Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="2:2.5"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="2.4 3.*"
|
||||
DISTUTILS_SRC_TEST="setup.py"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://github/boto/boto/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# Requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.8.0.ebuild
vendored
Normal file
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.8.0.ebuild
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.8.0.ebuild,v 1.1 2013/02/05 01:34:00 radhermit Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.2.ebuild
vendored
Normal file
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.2.ebuild
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.9.2.ebuild,v 1.1 2013/05/01 08:00:05 radhermit Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.3.ebuild
vendored
Normal file
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.3.ebuild
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.9.3.ebuild,v 1.1 2013/05/16 10:27:44 radhermit Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.4.ebuild
vendored
Normal file
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.4.ebuild
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.9.4.ebuild,v 1.1 2013/05/21 07:46:06 radhermit Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.5.ebuild
vendored
Normal file
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.5.ebuild
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.9.5.ebuild,v 1.2 2013/06/03 16:45:56 bicatali Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.6.ebuild
vendored
Normal file
28
sdk_container/src/third_party/portage-stable/dev-python/boto/boto-2.9.6.ebuild
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/boto/boto-2.9.6.ebuild,v 1.1 2013/06/19 03:47:57 radhermit Exp $
|
||||
|
||||
EAPI="5"
|
||||
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Amazon Web Services API"
|
||||
HOMEPAGE="https://github.com/boto/boto http://pypi.python.org/pypi/boto"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/m2crypto )"
|
||||
RDEPEND="dev-python/m2crypto"
|
||||
|
||||
# requires Amazon Web Services keys to pass some tests
|
||||
RESTRICT="test"
|
||||
|
||||
python_test() {
|
||||
esetup.py test
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
https://bugs.gentoo.org/404979
|
||||
https://github.com/boto/boto/issues/597
|
||||
https://github.com/boto/boto/commit/f797759a2df235475cd29e67bddec51e7e8d6336
|
||||
|
||||
commit f797759a2df235475cd29e67bddec51e7e8d6336
|
||||
Author: Mitch Garnaat <mitch@garnaat.com>
|
||||
Date: Tue Feb 28 05:52:12 2012 -0800
|
||||
|
||||
Tests need to be in the source distro but shouldn't be installed. Also, moved some tests scattered throughout the distro to the tests directory. Fixes #597.
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 3ede0a3..cc093da 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -59,11 +59,7 @@ setup(name = "boto",
|
||||
"boto.mturk", "boto.mturk.test", "boto.pyami",
|
||||
"boto.pyami.installers", "boto.pyami.installers.ubuntu",
|
||||
"boto.mashups", "boto.contrib", "boto.manage",
|
||||
- "tests", "tests.autoscale", "tests.cloudfront",
|
||||
- "tests.devpay", "tests.db", "tests.dynamodb",
|
||||
- "tests.ec2", "tests.ec2.cloudwatch", "tests.ec2.elb",
|
||||
- "tests.s3", "tests.sdb", "tests.sqs", "tests.sts",
|
||||
- "tests.utils", "boto.services", "boto.cloudfront",
|
||||
+ "boto.services", "boto.cloudfront",
|
||||
"boto.roboto", "boto.rds", "boto.vpc", "boto.fps",
|
||||
"boto.fps.test", "boto.emr", "boto.emr.tests", "boto.sns",
|
||||
"boto.ecs", "boto.iam", "boto.route53", "boto.ses",
|
@ -1,79 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/dbus-python/dbus-python-0.84.0.ebuild,v 1.8 2011/11/27 19:07:37 armin76 Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython *-pypy-*"
|
||||
PYTHON_TESTS_RESTRICTED_ABIS="2.4 2.5"
|
||||
PYTHON_EXPORT_PHASE_FUNCTIONS="1"
|
||||
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Python bindings for the D-Bus messagebus"
|
||||
HOMEPAGE="http://www.freedesktop.org/wiki/Software/DBusBindings http://dbus.freedesktop.org/doc/dbus-python/"
|
||||
SRC_URI="http://dbus.freedesktop.org/releases/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ~ppc64 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
|
||||
IUSE="doc examples test"
|
||||
|
||||
RDEPEND=">=dev-libs/dbus-glib-0.88
|
||||
>=sys-apps/dbus-1.4.1"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig
|
||||
doc? ( =dev-python/epydoc-3* )
|
||||
test? ( dev-python/pygobject:2 )"
|
||||
|
||||
src_prepare() {
|
||||
# Disable compiling of .pyc files.
|
||||
mv py-compile py-compile.orig
|
||||
ln -s $(type -P true) py-compile
|
||||
|
||||
# Workaround testsuite issues
|
||||
epatch "${FILESDIR}/${PN}-0.83.1-workaround-broken-test.patch"
|
||||
|
||||
python_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
configuration() {
|
||||
econf \
|
||||
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
||||
$(use_enable doc api-docs)
|
||||
}
|
||||
python_execute_function -s configuration
|
||||
}
|
||||
|
||||
src_test() {
|
||||
unset DBUS_SESSION_BUS_ADDRESS
|
||||
python_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
python_src_install
|
||||
|
||||
if use doc; then
|
||||
install_documentation() {
|
||||
dohtml api/* || return 1
|
||||
}
|
||||
python_execute_function -f -q -s install_documentation
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}/
|
||||
doins -r examples || die
|
||||
fi
|
||||
|
||||
python_clean_installation_image
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
python_mod_optimize dbus dbus_bindings.py
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup dbus dbus_bindings.py
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/logilab-common-0.53.0.ebuild,v 1.2 2010/12/24 09:23:22 grobian Exp $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
DESCRIPTION="Useful miscellaneous modules used by Logilab projects"
|
||||
HOMEPAGE="http://www.logilab.org/projects/common/ http://pypi.python.org/pypi/logilab-common"
|
||||
SRC_URI="ftp://ftp.logilab.org/pub/common/${P}.tar.gz mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="dev-python/setuptools"
|
||||
# Tests using dev-python/psycopg are skipped when dev-python/psycopg isn't installed.
|
||||
# dev-python/unittest2 is not required with Python >=3.2.
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
dev-python/egenix-mx-base
|
||||
dev-python/unittest2
|
||||
!dev-python/psycopg[-mxdatetime]
|
||||
)"
|
||||
|
||||
DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
|
||||
|
||||
PYTHON_MODNAME="logilab"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${P}-fix_indentation.patch"
|
||||
distutils_src_prepare
|
||||
|
||||
conversion() {
|
||||
[[ "${PYTHON_ABI}" == 2.* ]] && return
|
||||
find -name "*.py" ! -name "setup.py" -print | xargs 2to3-${PYTHON_ABI} -nw --no-diffs
|
||||
|
||||
# Ignore errors during transformation of data of tests.
|
||||
:
|
||||
}
|
||||
python_execute_function -s conversion
|
||||
}
|
||||
|
||||
src_test() {
|
||||
testing() {
|
||||
# Install temporarily.
|
||||
local tpath="${T}/test-${PYTHON_ABI}"
|
||||
local spath="${tpath}$(python_get_sitedir)"
|
||||
|
||||
"$(PYTHON)" setup.py install --root="${tpath}" || die "Installation for tests failed with $(python_get_implementation) $(python_get_version)"
|
||||
|
||||
# pytest uses tests placed relatively to the current directory.
|
||||
pushd "${spath}" > /dev/null || return 1
|
||||
if [[ "${PYTHON_ABI}" == 3.* ]]; then
|
||||
# Support for Python 3 is experimental. Many tests are known to fail.
|
||||
PYTHONPATH="${spath}" "$(PYTHON)" "${tpath}/usr/bin/pytest" -v
|
||||
else
|
||||
PYTHONPATH="${spath}" "$(PYTHON)" "${tpath}/usr/bin/pytest" -v || return 1
|
||||
fi
|
||||
popd > /dev/null || return 1
|
||||
}
|
||||
python_execute_function -s testing
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils_src_install
|
||||
|
||||
python_generate_wrapper_scripts -E -f -q "${ED}usr/bin/pytest"
|
||||
|
||||
doman doc/pytest.1 || die "doman failed"
|
||||
|
||||
delete_tests() {
|
||||
rm -fr "${ED}$(python_get_sitedir)/${PN/-//}/test"
|
||||
}
|
||||
python_execute_function -q delete_tests
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/setuptools/setuptools-0.6.14.ebuild,v 1.16 2011/11/16 19:06:55 hwoarang Exp $
|
||||
|
||||
EAPI="3"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
DISTUTILS_SRC_TEST="setup.py"
|
||||
|
||||
inherit distutils eutils
|
||||
|
||||
MY_PN="distribute"
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="Distribute (fork of Setuptools) is a collection of extensions to Distutils"
|
||||
HOMEPAGE="http://pypi.python.org/pypi/distribute"
|
||||
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
DOCS="README.txt docs/easy_install.txt docs/pkg_resources.txt docs/setuptools.txt"
|
||||
PYTHON_MODNAME="easy_install.py pkg_resources.py setuptools site.py"
|
||||
|
||||
src_prepare() {
|
||||
distutils_src_prepare
|
||||
|
||||
epatch "${FILESDIR}/${PN}-0.6_rc7-noexe.patch"
|
||||
epatch "${FILESDIR}/distribute-0.6.12-disable_versioned_easy_install.patch"
|
||||
epatch "${FILESDIR}/distribute-0.6.12-fix_deprecation_warnings.patch"
|
||||
|
||||
# Disable tests requiring network connection.
|
||||
rm -f setuptools/tests/test_packageindex.py
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# test_install_site_py fails with disabled byte-compiling in Python 2.7 / >=3.2.
|
||||
python_enable_pyc
|
||||
|
||||
distutils_src_test
|
||||
|
||||
python_disable_pyc
|
||||
find "(" -name "*.pyc" -o -name "*\$py.class" ")" -print0 | xargs -0 rm -f
|
||||
find -name "__pycache__" -print0 | xargs -0 rmdir
|
||||
}
|
||||
|
||||
src_install() {
|
||||
DONT_PATCH_SETUPTOOLS="1" distutils_src_install
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/simplejson/simplejson-2.5.0.ebuild,v 1.5 2012/05/29 19:58:34 ranger Exp $
|
||||
|
||||
EAPI="3"
|
||||
PYTHON_DEPEND="2"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.*"
|
||||
|
||||
inherit distutils
|
||||
|
||||
DESCRIPTION="Simple, fast, extensible JSON encoder/decoder for Python"
|
||||
HOMEPAGE="http://undefined.org/python/#simplejson http://pypi.python.org/pypi/simplejson"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm ppc ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
|
||||
|
||||
src_test() {
|
||||
testing() {
|
||||
if [[ "$(python_get_implementation)" != "Jython" ]]; then
|
||||
ln -fs ../$(ls -d build-${PYTHON_ABI}/lib*)/simplejson/_speedups.so simplejson/_speedups.so || return 1
|
||||
fi
|
||||
PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" simplejson/tests/__init__.py
|
||||
}
|
||||
python_execute_function testing
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils_src_install
|
||||
|
||||
delete_tests() {
|
||||
rm -fr "${ED}$(python_get_sitedir)/simplejson/tests"
|
||||
}
|
||||
python_execute_function -q delete_tests
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-util/boost-build/boost-build-1.42.0.ebuild,v 1.1 2010/03/03 12:32:08 djc Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit flag-o-matic toolchain-funcs versionator
|
||||
|
||||
MY_PV=$(replace_all_version_separators _)
|
||||
MAJOR_PV="$(replace_all_version_separators _ $(get_version_component_range 1-2))"
|
||||
|
||||
DESCRIPTION="A system for large project software construction, which is simple to use and powerful."
|
||||
HOMEPAGE="http://www.boost.org/doc/tools/build/index.html"
|
||||
SRC_URI="mirror://sourceforge/boost/boost_${MY_PV}.tar.bz2"
|
||||
LICENSE="Boost-1.0"
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86"
|
||||
IUSE="examples python"
|
||||
|
||||
DEPEND="!<dev-libs/boost-1.34.0
|
||||
!<=dev-util/boost-build-1.35.0-r1
|
||||
python? ( dev-lang/python )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/boost_${MY_PV}/tools"
|
||||
|
||||
pkg_setup() {
|
||||
ewarn "Compilation of boost-build is known to break if {C,LD}FLAGS contain"
|
||||
ewarn "extra white space (bug 293652)"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
tar xjpf "${DISTDIR}/${A}" boost_${MY_PV}/tools/{jam,build/v2} || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/boost-1.42-fix-mpich2-detection.patch"
|
||||
|
||||
# Remove stripping option
|
||||
cd "${S}/jam/src"
|
||||
sed -i -e 's|-s\b||' \
|
||||
build.jam || die "sed failed"
|
||||
|
||||
# Force regeneration
|
||||
rm jambase.c
|
||||
|
||||
# This patch allows us to fully control optimization
|
||||
# and stripping flags when bjam is used as build-system
|
||||
# We simply extend the optimization and debug-symbols feature
|
||||
# with empty dummies called 'none'
|
||||
cd "${S}/build/v2"
|
||||
sed -i \
|
||||
-e 's/\(off speed space\)/\1 none/' \
|
||||
-e 's/\(debug-symbols : on off\)/\1 none/' \
|
||||
tools/builtin.jam || die "sed failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd jam/src
|
||||
local toolset
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
toolset=darwin
|
||||
else
|
||||
# Using boost's generic toolset here, which respects CC and CFLAGS
|
||||
toolset=cc
|
||||
fi
|
||||
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
# For slotting
|
||||
sed -i \
|
||||
-e "s|/usr/share/boost-build|/usr/share/boost-build-${MAJOR_PV}|" \
|
||||
Jambase || die "sed failed"
|
||||
|
||||
# The build.jam file for building bjam using a bootstrapped jam0 ignores
|
||||
# the LDFLAGS env var (bug #209794). We have now two options:
|
||||
# a) change the cc-target definition in build.jam to include separate compile
|
||||
# and link targets to make it use the LDFLAGS var, or
|
||||
# b) a simple dirty workaround by injecting the LDFLAGS in the LIBS env var
|
||||
# (which should not be set by us).
|
||||
if [[ -z "${LDFLAGS}" ]] ; then
|
||||
CC=$(tc-getCC) ./build.sh ${toolset} $(use_with python) \
|
||||
|| die "building bjam failed"
|
||||
else
|
||||
LIBS=${LDFLAGS} CC=$(tc-getCC) ./build.sh ${toolset} \
|
||||
$(use_with python) || die "building bjam failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newbin jam/src/bin.*/bjam bjam-${MAJOR_PV}
|
||||
|
||||
cd "${S}/build/v2"
|
||||
insinto /usr/share/boost-build-${MAJOR_PV}
|
||||
doins -r boost-build.jam bootstrap.jam build-system.jam site-config.jam user-config.jam \
|
||||
build kernel options tools util || die
|
||||
|
||||
dodoc changes.txt hacking.txt release_procedure.txt \
|
||||
notes/build_dir_option.txt notes/relative_source_paths.txt
|
||||
|
||||
if use examples ; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r example
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd jam/test
|
||||
./test.sh || die "tests failed"
|
||||
}
|
@ -1,178 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-2.8.6-r4.ebuild,v 1.5 2011/12/14 00:20:03 ago Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
CMAKE_REMOVE_MODULES="no"
|
||||
inherit elisp-common toolchain-funcs eutils versionator flag-o-matic base cmake-utils virtualx
|
||||
|
||||
MY_P="${PN}-$(replace_version_separator 3 - ${MY_PV})"
|
||||
|
||||
DESCRIPTION="Cross platform Make"
|
||||
HOMEPAGE="http://www.cmake.org/"
|
||||
SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="CMake"
|
||||
KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
SLOT="0"
|
||||
IUSE="emacs ncurses qt4 vim-syntax"
|
||||
|
||||
DEPEND="
|
||||
>=app-arch/libarchive-2.8.0
|
||||
>=net-misc/curl-7.20.0-r1[ssl]
|
||||
>=dev-libs/expat-2.0.1
|
||||
dev-util/pkgconfig
|
||||
sys-libs/zlib
|
||||
ncurses? ( sys-libs/ncurses )
|
||||
qt4? ( x11-libs/qt-gui:4 )
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
emacs? ( virtual/emacs )
|
||||
vim-syntax? (
|
||||
|| (
|
||||
app-editors/vim
|
||||
app-editors/gvim
|
||||
)
|
||||
)
|
||||
"
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
VIMFILE="${PN}.vim"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
|
||||
|
||||
# Fixme:
|
||||
# Boost patchset is foobared and should respect eselect / slotting
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.6.3-darwin-bundle.patch
|
||||
"${FILESDIR}"/${PN}-2.6.3-no-duplicates-in-rpath.patch
|
||||
"${FILESDIR}"/${PN}-2.6.3-fix_broken_lfs_on_aix.patch
|
||||
"${FILESDIR}"/${PN}-2.8.0-darwin-default-install_name.patch
|
||||
"${FILESDIR}"/${PN}-2.8.1-libform.patch
|
||||
"${FILESDIR}"/${PN}-2.8.4-FindPythonLibs.patch
|
||||
"${FILESDIR}"/${PN}-2.8.3-more-no_host_paths.patch
|
||||
"${FILESDIR}"/${PN}-2.8.3-ruby_libname.patch
|
||||
"${FILESDIR}"/${PN}-2.8.4-FindBoost.patch
|
||||
"${FILESDIR}"/${PN}-2.8.6-FindBLAS-2.patch
|
||||
"${FILESDIR}"/${PN}-2.8.6-FindLAPACK-2.patch
|
||||
"${FILESDIR}"/${PN}-2.8.6-CodeBlocks.patch
|
||||
"${FILESDIR}"/${PN}-2.8.6-testsvn17.patch
|
||||
)
|
||||
cmake_src_bootstrap() {
|
||||
# Cleanup args to extract only JOBS.
|
||||
# Because bootstrap does not know anything else.
|
||||
echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | egrep -o '[[:digit:]]+')
|
||||
par_arg="--parallel=${par_arg}"
|
||||
else
|
||||
par_arg="--parallel=1"
|
||||
fi
|
||||
|
||||
tc-export CC CXX LD
|
||||
|
||||
./bootstrap \
|
||||
--prefix="${T}/cmakestrap/" \
|
||||
${par_arg} \
|
||||
|| die "Bootstrap failed"
|
||||
}
|
||||
|
||||
cmake_src_test() {
|
||||
# fix OutDir test
|
||||
# this is altered thanks to our eclass
|
||||
sed -i -e 's:#IGNORE ::g' "${S}"/Tests/OutDir/CMakeLists.txt || die
|
||||
|
||||
pushd "${CMAKE_BUILD_DIR}" > /dev/null
|
||||
|
||||
local ctestargs
|
||||
[[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
|
||||
|
||||
# Excluded tests:
|
||||
# BootstrapTest: we actualy bootstrap it every time so why test it.
|
||||
# SimpleCOnly_sdcc: sdcc choke on global cflags so just skip the test
|
||||
# as it was never intended to be used this way.
|
||||
"${CMAKE_BUILD_DIR}"/bin/ctest ${ctestargs} \
|
||||
-E BootstrapTest SimpleCOnly_sdcc \
|
||||
|| die "Tests failed"
|
||||
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
einfo "Fixing java access violations ..."
|
||||
# bug 387227
|
||||
addpredict /proc/self/coredump_filter
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
base_src_prepare
|
||||
|
||||
# disable running of cmake in boostrap command
|
||||
sed -i \
|
||||
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
|
||||
bootstrap || die "sed failed"
|
||||
|
||||
# Add gcc libs to the default link paths
|
||||
sed -i \
|
||||
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
|
||||
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
|
||||
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
|
||||
|
||||
cmake_src_bootstrap
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# make things work with gentoo java setup
|
||||
# in case java-config cannot be run, the variable just becomes unset
|
||||
# per bug #315229
|
||||
export JAVA_HOME=$(java-config -g JAVA_HOME 2> /dev/null)
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_USE_SYSTEM_LIBRARIES=ON
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
|
||||
-DCMAKE_DOC_DIR=/share/doc/${PF}
|
||||
-DCMAKE_MAN_DIR=/share/man
|
||||
-DCMAKE_DATA_DIR=/share/${PN}
|
||||
$(cmake-utils_use_build ncurses CursesDialog)
|
||||
$(cmake-utils_use_build qt4 QtDialog)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
use emacs && elisp-compile Docs/cmake-mode.el
|
||||
}
|
||||
|
||||
src_test() {
|
||||
VIRTUALX_COMMAND="cmake_src_test" virtualmake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
if use emacs; then
|
||||
elisp-install ${PN} Docs/cmake-mode.el Docs/cmake-mode.elc
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||||
fi
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles/syntax
|
||||
doins Docs/cmake-syntax.vim
|
||||
|
||||
insinto /usr/share/vim/vimfiles/indent
|
||||
doins Docs/cmake-indent.vim
|
||||
|
||||
insinto /usr/share/vim/vimfiles/ftdetect
|
||||
doins "${FILESDIR}/${VIMFILE}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-util/intltool/intltool-0.41.0.ebuild,v 1.1 2010/02/17 21:13:01 ssuominen Exp $
|
||||
|
||||
EAPI=2
|
||||
|
||||
DESCRIPTION="Internationalization Tool Collection"
|
||||
HOMEPAGE="http://edge.launchpad.net/intltool/"
|
||||
SRC_URI="http://edge.launchpad.net/intltool/trunk/${PV}/+download/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-lang/perl-5.8.1
|
||||
dev-perl/XML-Parser"
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
dodoc AUTHORS README TODO doc/I18N-HOWTO || die
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-util/pkgconfig/pkgconfig-0.26.ebuild,v 1.7 2011/07/31 19:27:35 jer Exp $
|
||||
|
||||
EAPI=4
|
||||
inherit flag-o-matic multilib
|
||||
|
||||
MY_P=pkg-config-${PV}
|
||||
|
||||
DESCRIPTION="Package config system that manages compile/link flags"
|
||||
HOMEPAGE="http://pkgconfig.freedesktop.org/wiki/"
|
||||
SRC_URI="http://pkgconfig.freedesktop.org/releases/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="elibc_FreeBSD hardened"
|
||||
|
||||
RDEPEND="dev-libs/glib:2
|
||||
>=dev-libs/popt-1.15"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
DOCS=( AUTHORS NEWS README )
|
||||
|
||||
src_configure() {
|
||||
if ! has_version dev-util/pkgconfig; then
|
||||
export GLIB_CFLAGS="-I/usr/include/glib-2.0 -I/usr/$(get_libdir)/glib-2.0/include"
|
||||
export GLIB_LIBS="-lglib-2.0"
|
||||
fi
|
||||
|
||||
use ppc64 && use hardened && replace-flags -O[2-3] -O1
|
||||
|
||||
# Force using all the requirements when linking, so that needed -pthread
|
||||
# lines are inherited between libraries
|
||||
local myconf
|
||||
use elibc_FreeBSD && myconf="--enable-indirect-deps"
|
||||
|
||||
econf \
|
||||
--docdir=/usr/share/doc/${PF}/html \
|
||||
--with-installed-popt \
|
||||
${myconf}
|
||||
}
|
@ -1,139 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.1.1.ebuild,v 1.8 2012/06/17 17:32:15 armin76 Exp $
|
||||
|
||||
EAPI=3
|
||||
PYTHON_DEPEND="2"
|
||||
PYTHON_USE_WITH="threads"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
|
||||
|
||||
inherit bash-completion-r1 elisp-common eutils distutils
|
||||
|
||||
DESCRIPTION="Scalable distributed SCM"
|
||||
HOMEPAGE="http://mercurial.selenic.com/"
|
||||
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bugzilla emacs gpg test tk zsh-completion"
|
||||
|
||||
RDEPEND="bugzilla? ( dev-python/mysql-python )
|
||||
gpg? ( app-crypt/gnupg )
|
||||
tk? ( dev-lang/tk )
|
||||
zsh-completion? ( app-shells/zsh )"
|
||||
DEPEND="emacs? ( virtual/emacs )
|
||||
test? ( app-arch/unzip
|
||||
dev-python/pygments )"
|
||||
|
||||
PYTHON_CFLAGS=(
|
||||
"2.* + -fno-strict-aliasing"
|
||||
"* - -ftracer -ftree-vectorize"
|
||||
)
|
||||
|
||||
PYTHON_MODNAME="${PN} hgext"
|
||||
SITEFILE="70${PN}-gentoo.el"
|
||||
|
||||
src_prepare() {
|
||||
distutils_src_prepare
|
||||
|
||||
# fix up logic that won't work in Gentoo Prefix (also won't outside in
|
||||
# certain cases), bug #362891
|
||||
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
distutils_src_compile
|
||||
|
||||
if use emacs; then
|
||||
cd "${S}"/contrib || die
|
||||
elisp-compile mercurial.el || die "elisp-compile failed!"
|
||||
fi
|
||||
|
||||
rm -rf contrib/{win32,macosx} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils_src_install
|
||||
|
||||
newbashcomp contrib/bash_completion ${PN} || die
|
||||
|
||||
if use zsh-completion ; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins contrib/zsh_completion _hg || die
|
||||
fi
|
||||
|
||||
rm -f doc/*.?.txt || die
|
||||
dodoc CONTRIBUTORS PKG-INFO README doc/*.txt || die
|
||||
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
|
||||
|
||||
dobin hgeditor || die
|
||||
dobin contrib/hgk || die
|
||||
dobin contrib/hg-ssh || die
|
||||
|
||||
rm -f contrib/hgk contrib/hg-ssh || die
|
||||
|
||||
rm -f contrib/bash_completion || die
|
||||
cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die
|
||||
doman doc/*.? || die
|
||||
|
||||
cat > "${T}/80mercurial" <<-EOF
|
||||
HG="${EPREFIX}/usr/bin/hg"
|
||||
EOF
|
||||
doenvd "${T}/80mercurial" || die
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd "${S}/tests/" || die
|
||||
rm -rf *svn* || die # Subversion tests fail with 1.5
|
||||
rm -f test-archive || die # Fails due to verbose tar output changes
|
||||
rm -f test-convert-baz* || die # GNU Arch baz
|
||||
rm -f test-convert-cvs* || die # CVS
|
||||
rm -f test-convert-darcs* || die # Darcs
|
||||
rm -f test-convert-git* || die # git
|
||||
rm -f test-convert-mtn* || die # monotone
|
||||
rm -f test-convert-tla* || die # GNU Arch tla
|
||||
rm -f test-doctest* || die # doctest always fails with python 2.5.x
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
einfo "Removing tests which require user privileges to succeed"
|
||||
rm -f test-command-template || die # Test is broken when run as root
|
||||
rm -f test-convert || die # Test is broken when run as root
|
||||
rm -f test-lock-badness || die # Test is broken when run as root
|
||||
rm -f test-permissions || die # Test is broken when run as root
|
||||
rm -f test-pull-permission || die # Test is broken when run as root
|
||||
rm -f test-clone-failure || die
|
||||
rm -f test-journal-exists || die
|
||||
rm -f test-repair-strip || die
|
||||
fi
|
||||
|
||||
testing() {
|
||||
local testdir="${T}/tests-${PYTHON_ABI}"
|
||||
rm -rf "${testdir}" || die
|
||||
"$(PYTHON)" run-tests.py --tmpdir="${testdir}"
|
||||
}
|
||||
python_execute_function testing
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
distutils_pkg_postinst
|
||||
use emacs && elisp-site-regen
|
||||
|
||||
elog "If you want to convert repositories from other tools using convert"
|
||||
elog "extension please install correct tool:"
|
||||
elog " dev-vcs/cvs"
|
||||
elog " dev-vcs/darcs"
|
||||
elog " dev-vcs/git"
|
||||
elog " dev-vcs/monotone"
|
||||
elog " dev-vcs/subversion"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
distutils_pkg_postrm
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,142 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.5.1.ebuild,v 1.2 2013/02/21 03:19:14 zmedico Exp $
|
||||
|
||||
EAPI=3
|
||||
PYTHON_DEPEND="2"
|
||||
PYTHON_USE_WITH="threads"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
|
||||
|
||||
inherit bash-completion-r1 elisp-common eutils distutils
|
||||
|
||||
DESCRIPTION="Scalable distributed SCM"
|
||||
HOMEPAGE="http://mercurial.selenic.com/"
|
||||
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bugzilla emacs gpg test tk zsh-completion"
|
||||
|
||||
RDEPEND="bugzilla? ( dev-python/mysql-python )
|
||||
gpg? ( app-crypt/gnupg )
|
||||
tk? ( dev-lang/tk )
|
||||
zsh-completion? ( app-shells/zsh )
|
||||
app-misc/ca-certificates"
|
||||
DEPEND="emacs? ( virtual/emacs )
|
||||
test? ( app-arch/unzip
|
||||
dev-python/pygments )"
|
||||
|
||||
PYTHON_CFLAGS=(
|
||||
"2.* + -fno-strict-aliasing"
|
||||
"* - -ftracer -ftree-vectorize"
|
||||
)
|
||||
|
||||
PYTHON_MODNAME="${PN} hgext"
|
||||
SITEFILE="70${PN}-gentoo.el"
|
||||
|
||||
src_prepare() {
|
||||
distutils_src_prepare
|
||||
# fix up logic that won't work in Gentoo Prefix (also won't outside in
|
||||
# certain cases), bug #362891
|
||||
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
distutils_src_compile
|
||||
if use emacs; then
|
||||
cd "${S}"/contrib || die
|
||||
elisp-compile mercurial.el || die "elisp-compile failed!"
|
||||
fi
|
||||
rm -rf contrib/{win32,macosx} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils_src_install
|
||||
python_convert_shebangs 2 contrib/hg-ssh
|
||||
|
||||
newbashcomp contrib/bash_completion ${PN} || die
|
||||
|
||||
if use zsh-completion ; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins contrib/zsh_completion _hg || die
|
||||
fi
|
||||
|
||||
rm -f doc/*.?.txt || die
|
||||
dodoc CONTRIBUTORS README doc/*.txt || die
|
||||
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
|
||||
|
||||
dobin hgeditor || die
|
||||
dobin contrib/hgk || die
|
||||
dobin contrib/hg-ssh || die
|
||||
|
||||
rm -f contrib/hgk contrib/hg-ssh || die
|
||||
|
||||
rm -f contrib/bash_completion || die
|
||||
cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die
|
||||
doman doc/*.? || die
|
||||
|
||||
cat > "${T}/80mercurial" <<-EOF
|
||||
HG="${EPREFIX}/usr/bin/hg"
|
||||
EOF
|
||||
doenvd "${T}/80mercurial" || die
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
insinto /etc/mercurial/hgrc.d
|
||||
doins "${FILESDIR}/cacerts.rc"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd "${S}/tests/" || die
|
||||
rm -rf *svn* || die # Subversion tests fail with 1.5
|
||||
rm -f test-archive* || die # Fails due to verbose tar output changes
|
||||
rm -f test-convert-baz* || die # GNU Arch baz
|
||||
rm -f test-convert-cvs* || die # CVS
|
||||
rm -f test-convert-darcs* || die # Darcs
|
||||
rm -f test-convert-git* || die # git
|
||||
rm -f test-convert-mtn* || die # monotone
|
||||
rm -f test-convert-tla* || die # GNU Arch tla
|
||||
rm -f test-doctest* || die # doctest always fails with python 2.5.x
|
||||
rm -f test-largefiles* || die # tends to time out
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
einfo "Removing tests which require user privileges to succeed"
|
||||
rm -f test-command-template* || die # Test is broken when run as root
|
||||
rm -f test-convert* || die # Test is broken when run as root
|
||||
rm -f test-lock-badness* || die # Test is broken when run as root
|
||||
rm -f test-permissions* || die # Test is broken when run as root
|
||||
rm -f test-pull-permission* || die # Test is broken when run as root
|
||||
rm -f test-clone-failure* || die
|
||||
rm -f test-journal-exists* || die
|
||||
rm -f test-repair-strip* || die
|
||||
fi
|
||||
|
||||
testing() {
|
||||
local testdir="${T}/tests-${PYTHON_ABI}"
|
||||
rm -rf "${testdir}" || die
|
||||
"$(PYTHON)" run-tests.py --tmpdir="${testdir}"
|
||||
}
|
||||
python_execute_function testing
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
distutils_pkg_postinst
|
||||
use emacs && elisp-site-regen
|
||||
|
||||
elog "If you want to convert repositories from other tools using convert"
|
||||
elog "extension please install correct tool:"
|
||||
elog " dev-vcs/cvs"
|
||||
elog " dev-vcs/darcs"
|
||||
elog " dev-vcs/git"
|
||||
elog " dev-vcs/monotone"
|
||||
elog " dev-vcs/subversion"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
distutils_pkg_postrm
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,149 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.5.2.ebuild,v 1.3 2013/03/09 12:55:52 mgorny Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
|
||||
PYTHON_REQ_USE="threads"
|
||||
|
||||
inherit bash-completion-r1 elisp-common eutils distutils-r1 flag-o-matic
|
||||
|
||||
DESCRIPTION="Scalable distributed SCM"
|
||||
HOMEPAGE="http://mercurial.selenic.com/"
|
||||
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bugzilla emacs gpg test tk zsh-completion"
|
||||
|
||||
RDEPEND="bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
|
||||
gpg? ( app-crypt/gnupg )
|
||||
tk? ( dev-lang/tk )
|
||||
zsh-completion? ( app-shells/zsh )
|
||||
app-misc/ca-certificates"
|
||||
DEPEND="emacs? ( virtual/emacs )
|
||||
test? ( app-arch/unzip
|
||||
dev-python/pygments[${PYTHON_USEDEP}] )"
|
||||
|
||||
SITEFILE="70${PN}-gentoo.el"
|
||||
|
||||
python_prepare_all() {
|
||||
# fix up logic that won't work in Gentoo Prefix (also won't outside in
|
||||
# certain cases), bug #362891
|
||||
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_configure_all() {
|
||||
strip-flags -ftracer -ftree-vectorize
|
||||
# Note: make it impl-conditional if py3 is supported
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
"${PYTHON}" setup.py build_mo || die
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
rm -r contrib/{win32,macosx} || die
|
||||
if use emacs; then
|
||||
cd contrib || die
|
||||
elisp-compile mercurial.el || die "elisp-compile failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
|
||||
newbashcomp contrib/bash_completion ${PN}
|
||||
|
||||
if use zsh-completion ; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins contrib/zsh_completion _hg
|
||||
fi
|
||||
|
||||
rm -f doc/*.?.txt || die
|
||||
dodoc CONTRIBUTORS doc/*.txt
|
||||
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
|
||||
|
||||
dobin hgeditor
|
||||
dobin contrib/hgk
|
||||
python_foreach_impl python_doscript contrib/hg-ssh
|
||||
|
||||
rm -f contrib/hgk contrib/hg-ssh || die
|
||||
|
||||
rm -f contrib/bash_completion || die
|
||||
dodoc -r contrib
|
||||
docompress -x /usr/share/doc/${PF}/contrib
|
||||
doman doc/*.?
|
||||
|
||||
cat > "${T}/80mercurial" <<-EOF
|
||||
HG="${EPREFIX}/usr/bin/hg"
|
||||
EOF
|
||||
doenvd "${T}/80mercurial"
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
insinto /etc/mercurial/hgrc.d
|
||||
doins "${FILESDIR}/cacerts.rc"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd tests || die
|
||||
rm -rf *svn* || die # Subversion tests fail with 1.5
|
||||
rm -f test-archive* || die # Fails due to verbose tar output changes
|
||||
rm -f test-convert-baz* || die # GNU Arch baz
|
||||
rm -f test-convert-cvs* || die # CVS
|
||||
rm -f test-convert-darcs* || die # Darcs
|
||||
rm -f test-convert-git* || die # git
|
||||
rm -f test-convert-mtn* || die # monotone
|
||||
rm -f test-convert-tla* || die # GNU Arch tla
|
||||
rm -f test-doctest* || die # doctest always fails with python 2.5.x
|
||||
rm -f test-largefiles* || die # tends to time out
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
einfo "Removing tests which require user privileges to succeed"
|
||||
rm -f test-command-template* || die # Test is broken when run as root
|
||||
rm -f test-convert* || die # Test is broken when run as root
|
||||
rm -f test-lock-badness* || die # Test is broken when run as root
|
||||
rm -f test-permissions* || die # Test is broken when run as root
|
||||
rm -f test-pull-permission* || die # Test is broken when run as root
|
||||
rm -f test-clone-failure* || die
|
||||
rm -f test-journal-exists* || die
|
||||
rm -f test-repair-strip* || die
|
||||
fi
|
||||
|
||||
cd .. || die
|
||||
distutils-r1_src_test
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local TEST_DIR
|
||||
|
||||
rm -rf "${TMPDIR}"/test
|
||||
distutils_install_for_testing
|
||||
cd tests || die
|
||||
"${PYTHON}" run-tests.py --verbose \
|
||||
--tmpdir="${TMPDIR}"/test \
|
||||
--with-hg="${TEST_DIR}"/scripts/hg \
|
||||
|| die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
|
||||
elog "If you want to convert repositories from other tools using convert"
|
||||
elog "extension please install correct tool:"
|
||||
elog " dev-vcs/cvs"
|
||||
elog " dev-vcs/darcs"
|
||||
elog " dev-vcs/git"
|
||||
elog " dev-vcs/monotone"
|
||||
elog " dev-vcs/subversion"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,142 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-2.5.ebuild,v 1.2 2013/02/03 14:41:06 djc Exp $
|
||||
|
||||
EAPI=3
|
||||
PYTHON_DEPEND="2"
|
||||
PYTHON_USE_WITH="threads"
|
||||
SUPPORT_PYTHON_ABIS="1"
|
||||
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
|
||||
|
||||
inherit bash-completion-r1 elisp-common eutils distutils
|
||||
|
||||
DESCRIPTION="Scalable distributed SCM"
|
||||
HOMEPAGE="http://mercurial.selenic.com/"
|
||||
SRC_URI="http://mercurial.selenic.com/release/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="bugzilla emacs gpg test tk zsh-completion"
|
||||
|
||||
RDEPEND="bugzilla? ( dev-python/mysql-python )
|
||||
gpg? ( app-crypt/gnupg )
|
||||
tk? ( dev-lang/tk )
|
||||
zsh-completion? ( app-shells/zsh )
|
||||
app-misc/ca-certificates"
|
||||
DEPEND="emacs? ( virtual/emacs )
|
||||
test? ( app-arch/unzip
|
||||
dev-python/pygments )"
|
||||
|
||||
PYTHON_CFLAGS=(
|
||||
"2.* + -fno-strict-aliasing"
|
||||
"* - -ftracer -ftree-vectorize"
|
||||
)
|
||||
|
||||
PYTHON_MODNAME="${PN} hgext"
|
||||
SITEFILE="70${PN}-gentoo.el"
|
||||
|
||||
src_prepare() {
|
||||
distutils_src_prepare
|
||||
# fix up logic that won't work in Gentoo Prefix (also won't outside in
|
||||
# certain cases), bug #362891
|
||||
sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
distutils_src_compile
|
||||
if use emacs; then
|
||||
cd "${S}"/contrib || die
|
||||
elisp-compile mercurial.el || die "elisp-compile failed!"
|
||||
fi
|
||||
rm -rf contrib/{win32,macosx} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils_src_install
|
||||
python_convert_shebangs 2 contrib/hg-ssh
|
||||
|
||||
newbashcomp contrib/bash_completion ${PN} || die
|
||||
|
||||
if use zsh-completion ; then
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins contrib/zsh_completion _hg || die
|
||||
fi
|
||||
|
||||
rm -f doc/*.?.txt || die
|
||||
dodoc CONTRIBUTORS README doc/*.txt || die
|
||||
cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
|
||||
|
||||
dobin hgeditor || die
|
||||
dobin contrib/hgk || die
|
||||
dobin contrib/hg-ssh || die
|
||||
|
||||
rm -f contrib/hgk contrib/hg-ssh || die
|
||||
|
||||
rm -f contrib/bash_completion || die
|
||||
cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die
|
||||
doman doc/*.? || die
|
||||
|
||||
cat > "${T}/80mercurial" <<-EOF
|
||||
HG="${EPREFIX}/usr/bin/hg"
|
||||
EOF
|
||||
doenvd "${T}/80mercurial" || die
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
|
||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE}
|
||||
fi
|
||||
|
||||
insinto /etc/mercurial/hgrc.d
|
||||
doins "${FILESDIR}/cacerts.rc"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd "${S}/tests/" || die
|
||||
rm -rf *svn* || die # Subversion tests fail with 1.5
|
||||
rm -f test-archive* || die # Fails due to verbose tar output changes
|
||||
rm -f test-convert-baz* || die # GNU Arch baz
|
||||
rm -f test-convert-cvs* || die # CVS
|
||||
rm -f test-convert-darcs* || die # Darcs
|
||||
rm -f test-convert-git* || die # git
|
||||
rm -f test-convert-mtn* || die # monotone
|
||||
rm -f test-convert-tla* || die # GNU Arch tla
|
||||
rm -f test-doctest* || die # doctest always fails with python 2.5.x
|
||||
rm -f test-largefiles* || die # tends to time out
|
||||
if [[ ${EUID} -eq 0 ]]; then
|
||||
einfo "Removing tests which require user privileges to succeed"
|
||||
rm -f test-command-template* || die # Test is broken when run as root
|
||||
rm -f test-convert* || die # Test is broken when run as root
|
||||
rm -f test-lock-badness* || die # Test is broken when run as root
|
||||
rm -f test-permissions* || die # Test is broken when run as root
|
||||
rm -f test-pull-permission* || die # Test is broken when run as root
|
||||
rm -f test-clone-failure* || die
|
||||
rm -f test-journal-exists* || die
|
||||
rm -f test-repair-strip* || die
|
||||
fi
|
||||
|
||||
testing() {
|
||||
local testdir="${T}/tests-${PYTHON_ABI}"
|
||||
rm -rf "${testdir}" || die
|
||||
"$(PYTHON)" run-tests.py --tmpdir="${testdir}"
|
||||
}
|
||||
python_execute_function testing
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
distutils_pkg_postinst
|
||||
use emacs && elisp-site-regen
|
||||
|
||||
elog "If you want to convert repositories from other tools using convert"
|
||||
elog "extension please install correct tool:"
|
||||
elog " dev-vcs/cvs"
|
||||
elog " dev-vcs/darcs"
|
||||
elog " dev-vcs/git"
|
||||
elog " dev-vcs/monotone"
|
||||
elog " dev-vcs/subversion"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
distutils_pkg_postrm
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-libs/libjpeg-turbo/libjpeg-turbo-1.2.0-r1.ebuild,v 1.8 2012/03/25 15:36:48 maekke Exp $
|
||||
|
||||
# http://libjpeg-turbo.svn.sourceforge.net/viewvc/libjpeg-turbo/branches/1.2.x/?view=tar
|
||||
|
||||
EAPI=4
|
||||
|
||||
unset _inherits
|
||||
|
||||
JPEG_ABI=8
|
||||
|
||||
if [[ ${PV} == *_p20* ]]; then
|
||||
SRC_URI="http://dev.gentoo.org/~ssuominen/${P}.tar.xz"
|
||||
_inherits=autotools
|
||||
else
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
fi
|
||||
|
||||
inherit ${_inherits} java-pkg-opt-2 libtool toolchain-funcs
|
||||
|
||||
DESCRIPTION="MMX, SSE, and SSE2 SIMD accelerated JPEG library"
|
||||
HOMEPAGE="http://libjpeg-turbo.virtualgl.org/ http://sourceforge.net/projects/libjpeg-turbo/"
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://debian/pool/main/libj/libjpeg${JPEG_ABI}/libjpeg${JPEG_ABI}_${JPEG_ABI}d-1.debian.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm hppa ~mips ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
|
||||
IUSE="java static-libs"
|
||||
|
||||
ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
|
||||
COMMON_DEPEND="!media-libs/jpeg:0"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
java? ( >=virtual/jre-1.5 )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
amd64? ( ${ASM_DEPEND} )
|
||||
x86? ( ${ASM_DEPEND} )
|
||||
amd64-linux? ( ${ASM_DEPEND} )
|
||||
x86-linux? ( ${ASM_DEPEND} )
|
||||
java? ( >=virtual/jdk-1.5 )"
|
||||
|
||||
src_prepare() {
|
||||
if [[ -x ./configure ]]; then
|
||||
elibtoolize
|
||||
else
|
||||
eautoreconf
|
||||
fi
|
||||
java-pkg-opt-2_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use java; then
|
||||
export JAVACFLAGS="$(java-pkg_javac-args)"
|
||||
export JNI_CFLAGS="$(java-pkg_get-jni-cflags)"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable static-libs static) \
|
||||
--with-jpeg${JPEG_ABI} \
|
||||
$(use_with java)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local _java_makeopts
|
||||
use java && _java_makeopts="-j1"
|
||||
emake ${_java_makeopts}
|
||||
|
||||
ebegin "Building exifautotran and jpegexiforient extra tools"
|
||||
pushd ../debian/extra >/dev/null
|
||||
emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
|
||||
popd >/dev/null
|
||||
eend $?
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
docdir="${EPREFIX}"/usr/share/doc/${PF} \
|
||||
exampledir="${EPREFIX}"/usr/share/doc/${PF} \
|
||||
install
|
||||
|
||||
find "${ED}"usr -name '*.la' -exec rm -f {} +
|
||||
|
||||
insinto /usr/share/doc/${PF}/html
|
||||
doins -r doc/html/*
|
||||
|
||||
if use java; then
|
||||
insinto /usr/share/doc/${PF}/html/java
|
||||
doins -r java/doc/*
|
||||
newdoc java/README README.java
|
||||
|
||||
rm -rf "${ED}"usr/classes
|
||||
java-pkg_dojar java/turbojpeg.jar
|
||||
fi
|
||||
|
||||
ebegin "Installing exifautotran and jpegexiforient extra tools"
|
||||
pushd ../debian/extra >/dev/null
|
||||
newdoc ../changelog changelog.debian
|
||||
|
||||
emake \
|
||||
DESTDIR="${D}" prefix="${EPREFIX}"/usr \
|
||||
INSTALL="install -m755" INSTALLDIR="install -d -m755" \
|
||||
install
|
||||
popd >/dev/null
|
||||
eend $?
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netperf/netperf-2.4.4.ebuild,v 1.8 2009/08/26 00:49:05 jer Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
MY_P=${P/_rc/-rc}
|
||||
|
||||
DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more."
|
||||
#SRC_URI="ftp://ftp.netperf.org/netperf/experimental/${MY_P}.tar.gz"
|
||||
SRC_URI="ftp://ftp.netperf.org/netperf/${MY_P}.tar.gz
|
||||
mirror://gentoo/netperf-2.4.4-svn_trunk_20071205.patch.bz2"
|
||||
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
|
||||
|
||||
HOMEPAGE="http://www.netperf.org/"
|
||||
LICENSE="netperf"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="!sci-mathematics/snns"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
sed -i 's:^\(#define DEBUG_LOG_FILE "\)/tmp/netperf.debug:\1/var/log/netperf.debug:' src/netserver.c
|
||||
epatch "${WORKDIR}"/${P}-svn_trunk_20071205.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.4.0-gcc41.patch
|
||||
epatch "${FILESDIR}"/${PN}-CVE-2007-1444.patch
|
||||
epatch "${FILESDIR}"/${PN}-fix-scripts.patch
|
||||
|
||||
# Fixing paths in scripts
|
||||
sed -i -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
|
||||
doc/examples/sctp_stream_script \
|
||||
doc/examples/tcp_range_script \
|
||||
doc/examples/tcp_rr_script \
|
||||
doc/examples/tcp_stream_script \
|
||||
doc/examples/udp_rr_script \
|
||||
doc/examples/udp_stream_script
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_install () {
|
||||
einstall || die
|
||||
|
||||
# move netserver into sbin as we had it before 2.4 was released with its
|
||||
# autoconf goodness
|
||||
dodir /usr/sbin
|
||||
mv "${D}"/usr/{bin,sbin}/netserver || die
|
||||
|
||||
# init.d / conf.d
|
||||
newinitd "${FILESDIR}"/${PN}-2.2-init netperf
|
||||
newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
|
||||
|
||||
# documentation and example scripts
|
||||
dodoc AUTHORS ChangeLog NEWS README Release_Notes
|
||||
dodir /usr/share/doc/${PF}/examples
|
||||
#Scripts no longer get installed by einstall
|
||||
cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples
|
||||
}
|
42
sdk_container/src/third_party/portage-stable/net-misc/gsutil/ChangeLog
vendored
Normal file
42
sdk_container/src/third_party/portage-stable/net-misc/gsutil/ChangeLog
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
# ChangeLog for net-misc/gsutil
|
||||
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/gsutil/ChangeLog,v 1.11 2013/01/25 05:49:50 vapier Exp $
|
||||
|
||||
*gsutil-3.21 (25 Jan 2013)
|
||||
|
||||
25 Jan 2013; Mike Frysinger <vapier@gentoo.org> +gsutil-3.21.ebuild:
|
||||
Version bump.
|
||||
|
||||
*gsutil-3.18 (30 Oct 2012)
|
||||
|
||||
30 Oct 2012; Mike Frysinger <vapier@gentoo.org> +gsutil-3.18.ebuild:
|
||||
Version bump.
|
||||
|
||||
*gsutil-3.14 (02 Aug 2012)
|
||||
|
||||
02 Aug 2012; Mike Frysinger <vapier@gentoo.org> +gsutil-3.14.ebuild:
|
||||
Version bump.
|
||||
|
||||
01 Jun 2012; Mike Frysinger <vapier@gentoo.org> -gsutil-2011.21.11-r1.ebuild:
|
||||
Drop older version to move to non-datestamp releases.
|
||||
|
||||
*gsutil-3.7 (21 May 2012)
|
||||
|
||||
21 May 2012; Mike Frysinger <vapier@gentoo.org> +gsutil-3.7.ebuild:
|
||||
Version bump.
|
||||
|
||||
*gsutil-2011.21.11-r1 (13 Dec 2011)
|
||||
|
||||
13 Dec 2011; Mike Frysinger <vapier@gentoo.org> -gsutil-2011.21.11.ebuild,
|
||||
+gsutil-2011.21.11-r1.ebuild:
|
||||
Install VERSION file since gsutil sometimes wants to read it #394471 by
|
||||
Janusz.
|
||||
|
||||
28 Nov 2011; Mike Frysinger <vapier@gentoo.org> gsutil-2011.21.11.ebuild:
|
||||
Force newer version of boto to match what upstream expects.
|
||||
|
||||
*gsutil-2011.21.11 (22 Nov 2011)
|
||||
|
||||
22 Nov 2011; Mike Frysinger <vapier@gentoo.org> +gsutil-2011.21.11.ebuild,
|
||||
+files/gsutil-system-boto.patch, +metadata.xml:
|
||||
Initial import by me.
|
@ -1 +1,31 @@
|
||||
DIST gsutil_3.14.tar.gz 755999 RMD160 f038f74384bbc75f3290d9678fc8c861bc2422f8 SHA1 d738034987586e08860eb8314bec6878f09ad21d SHA256 39a0e85cf569c60ab0cabdcb574ee4a3bb31d11beb819fbe33594260d8804773
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
AUX gsutil-system-boto.patch 890 SHA256 c1451a3e04fe0039001e8db4b9fb6c9bdae2cfe1eec4f2020950165c75c6ccb6 SHA512 cc81f0d95f7b5ed5c57826161d0c975cd89efb2f62ffcb8436fdeadaf015930c9a6916a8bae321be9333a2712aa899ff7202f024a381ad2117e73e73f152e656 WHIRLPOOL 16f20e790577f18ac36699c7751591bc9f302b11f5ed62fead07896e13acd89177758b6172bfc3b5880655bdfb1831d99e4e2387de7d246e3ea7f267872f5788
|
||||
DIST gsutil_3.14.tar.gz 755999 SHA256 39a0e85cf569c60ab0cabdcb574ee4a3bb31d11beb819fbe33594260d8804773 SHA512 01d6f83e21f148f7dd581f0a4132be7ceb70e069ccc3bf5fabd85e1e6ed68b422288878a57ff4477d279c5984c7b203107997a7af3f90d0924b09604b6a6aa93 WHIRLPOOL cd0c3655149f6e2ab35b298ac8fe5367a665a7bde5d56a0f91db3a24cd2b6de519271e849bd6f4480d857f0d0a4a294f9394a9eadbb96725bb8f6db56e2fcbd7
|
||||
DIST gsutil_3.18.tar.gz 795447 SHA256 640defd2c3a1825295ae8c18e8cdb1c961df1f9f93fca83b921cfbd967d1171c SHA512 11d246412a53eecbc63af49f945f438d2866bfd8ebbc7368776da6066139bdbcdf72c6e45169a16014002accf940cd369064c25070fea3d9622dd50e614164c9 WHIRLPOOL 6ab0ebb61044e5dc67a8c2be9085e726bb3364d7020e915923410b5cbd3b927c59d981ae1772957a5cc1b0601f685064ed9e5456d3782542852c87529ead1c45
|
||||
DIST gsutil_3.21.tar.gz 1092318 SHA256 a92863eb1be812bc2ebfeaef8ade68dab81b7a3a3c73dafa637c95b7bde6abce SHA512 74f092558951a22fd94cd5e861cb147e9d12b7ff5a6514ec01f8cb618469f30c4dc0054a96231792b2fb77b83c270c26368e64038d0f6974c53ee74fe580d703 WHIRLPOOL 9fb6bf3fb6667d9be741cb310770d291afb66b6e1f890be50f2df0de5d71fd78516039969194510b26c5ba925a7ba67ceb748e5fad16ddf33086377c0dab1b22
|
||||
DIST gsutil_3.7.tar.gz 673203 SHA256 77907865287e57a8ce713e97155191bd44448d6888861a45345d9b035a3b3b87 SHA512 771fbe6f095955a14565ca50704a8a5b674935f0992564491e2a0e57f1a14e26f44f4379ed2b6160a7fe9f34299f405c22402d86d8a9042baa886dd8b7389cd3 WHIRLPOOL dd353f1e7ecc3262fc17463610e80b2f89c928d67490dfd5eaf99977ff5c578bbaaf1f6408de19c7c72e5ed88d7185549dbe2415ef021bf109860857ad419aef
|
||||
EBUILD gsutil-3.14.ebuild 1447 SHA256 4b2d702cb5c5425dbf7dbe30d9e2efb98f823a7d66e5e2cc53f999ec9981207f SHA512 5a32cffb3cdd40db6d71829ca09de0712665f952a1313c5870086d8d0c502058f5e1e6401ea03100b6e9157d07f29996b28308dfd358c82aa37ad053c67f970d WHIRLPOOL bb3b2acb93b7ef2202b979add5bd06a156c08dd8b1dc6d05815181971f6bb30e0e935374d66176682e934b838308ed84ccbcc36b27107bd7651a66f4841f9d9b
|
||||
EBUILD gsutil-3.18.ebuild 1447 SHA256 7b06511eaf43b9921a350907a34d8d71c34e1238b00b613ce76ff2189603bd5a SHA512 e281825061d3ee228b630b90af0f328cf70be044973d26863c9186342d951a5a1ec716cdad2d839a148f1b733241f1e099494819ce6ca5e3b30ca83fc05a4bc5 WHIRLPOOL b57cc0cba4f966ac2e561646450d23d937bc184045926584c020419689fc869fad7c5fb08a555d5e43c11b9e48774984456e436fc316f2776f4a39220d374537
|
||||
EBUILD gsutil-3.21.ebuild 1365 SHA256 dc4b93942945c5da7791c7392fb58027d40e3184fdf6a0226a7a8936f73711a0 SHA512 62152792fb90f13e3eadf1a826cd572a2427bfd66bc9d3a493422d6972b55e6362e1709f7a7f1348ed28222a8f14b087b1887273abd9837d1d9ba8f67e9fe1aa WHIRLPOOL fac57614487bc0407667bdfe831d597eb29252346b1fe707fbf4bdc52237cf01c72033d76da77c5c042bf240c81284529e9ea39ceba38c3dd7e3484d12b78cfe
|
||||
EBUILD gsutil-3.7.ebuild 1446 SHA256 f54b57bd39bb2db05fdc80dd41bec4d8a4bf350deef74dc89f4b1dbf91a4839b SHA512 f07fe2a63d9cdf257b5ddd7aa1ee40967165295305aa64d9c2917ba5a3bb59020c87571261c0d04ec7a77e5093753a577e3381623ee0106f0d91fc0a41329977 WHIRLPOOL 10f3ea580174fd062eb78af8f29adefc0f6e3fcbdfb56974927e136be3feaa2db6fc0e0a619c617fca6c0083d320f6f1edb0bebcf16cf7c1b920589471c7c67c
|
||||
MISC ChangeLog 1358 SHA256 8bcd4d9c8523fa1a85280170154496d978aee294121d0695577fe3a0ee0bfadb SHA512 4447c86e9f9f54f9c1aecd45b88a952ec51a37f0af73b0430129dc04574de53d6c0c9891341886a61d71029dc2ddc596f18ac9027e7f707fc763016f6ed54db8 WHIRLPOOL 2c9a42dafc1177ed2bebfa54a81d522f77878f92b24c0f827e5eecaff34597b9bfdf2aaf1ac03db8502201499fed2e6cf2285a84e25bc911bb0c133478da49bc
|
||||
MISC metadata.xml 279 SHA256 2f5ae61fef1327d85bd4b0fa86038ee21e3874a6e7fbfef8f293868aff24e414 SHA512 99e70099183392c5d73cd994c35ac73b958dae2f542e43b9da84c12528161f6a44b043be24a8f1541f8080a4f49a9215f9fc8e5076718d7cd0d0ed4e531872da WHIRLPOOL 39bc89a7f235cb2f5c10f77a0decb0c45cc5bd322202f50100c19e84db22fe99610c3f858bf995e6a6b26ec2f238c2873981eab24c1f9086c04c439eae55d8ab
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.19 (GNU/Linux)
|
||||
|
||||
iQIcBAEBCAAGBQJRAh0CAAoJELEHsLL7fEFW4rUQAKH974YSDqoxLcdzDmqYQhpl
|
||||
RRyZG3mqjpLN9RwxQbqPIQjzYKQ6qzUkwmqjXE0hizGHCR37TOHh4C3ER9W6dbFi
|
||||
R2mJdjuJ/wVu8RG1MzCn3yydr4RZPB5foCGdEhrTA+ua8c+ZfbFPoxwwgF0HXann
|
||||
2U6tRN0EywvC9kH8lA7pCywxjYqsNBV8H+6nVapNEq5GFopTzHSC8v8EtzqQcsPB
|
||||
o4CykYTw4jyKImpRydBV9ZWO5qlwLX+07MjpvFodGCr5vsdo5oqYErWTiId7sRlG
|
||||
ImfW7dKPjDHNHA4N9fdELz8dOlz9S/Qt2ymxV2gm2kzwkBQRxB9KPX8YDrz/CAg2
|
||||
clpLbhZI5urzzMMm3BGsFdWjjKHvgZUk/zm6BeqRbw1c4kaJpR/MFQ0t7Fg8+JFR
|
||||
BKomi1nkb3Wpy0JkCBSVkHWZb0vZniYgFx2eiXcP1u+VRpFjlUkMLoqCN404Ztk9
|
||||
TdcUSFEhvgL33aeztvMB3F25BR/MPMwB4M6W1fN8W+yJQIZ+/c5G+0ZoU7XsDS9k
|
||||
T8rDCTPN2OaTwORsDBaN68pBTpjJ3IwZ1ubsE7ldzJ2OLBXLAbZTnMZV/s5kLSLH
|
||||
J7GmhVmsuMOxvmeIls3+MA+agKVSGUSvpo7+DaGB/MzRPsQQpk3NGt8DM0oxMXRB
|
||||
/ahleucJ2+p+b6inL8nm
|
||||
=Yw9e
|
||||
-----END PGP SIGNATURE-----
|
||||
|
@ -12,7 +12,7 @@ SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="examples"
|
||||
|
||||
DEPEND=""
|
||||
|
60
sdk_container/src/third_party/portage-stable/net-misc/gsutil/gsutil-3.18.ebuild
vendored
Normal file
60
sdk_container/src/third_party/portage-stable/net-misc/gsutil/gsutil-3.18.ebuild
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/gsutil/gsutil-3.18.ebuild,v 1.1 2012/10/30 07:09:22 vapier Exp $
|
||||
|
||||
EAPI="3"
|
||||
|
||||
inherit eutils python multilib
|
||||
|
||||
DESCRIPTION="command line tool for interacting with cloud storage services"
|
||||
HOMEPAGE="http://code.google.com/p/gsutil/"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="examples"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-python/boto-2.5.2"
|
||||
|
||||
S=${WORKDIR}/${PN}
|
||||
|
||||
src_prepare() {
|
||||
# use system boto
|
||||
rm -rf boto
|
||||
epatch "${FILESDIR}"/${PN}-system-boto.patch
|
||||
|
||||
# use the custom internal path to avoid polluting python system
|
||||
sed -i \
|
||||
-e "/^gsutil_bin_dir =/s:=.*:= '/usr/$(get_libdir)/${PN}';sys.path.insert(0, gsutil_bin_dir);:" \
|
||||
gsutil || die
|
||||
|
||||
# trim some cruft
|
||||
find gslib third_party -name README -delete
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin gsutil || die
|
||||
|
||||
insinto /usr/$(get_libdir)/${PN}
|
||||
doins -r gslib oauth2_plugin third_party VERSION || die
|
||||
|
||||
# http://code.google.com/p/gsutil/issues/detail?id=96
|
||||
rm "${D}"/usr/$(get_libdir)/${PN}/gslib/commands/test.py || die
|
||||
|
||||
dodoc README
|
||||
if use examples ; then
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
doins -r cloud{auth,reader}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
python_mod_optimize /usr/$(get_libdir)/${PN}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/$(get_libdir)/${PN}
|
||||
}
|
57
sdk_container/src/third_party/portage-stable/net-misc/gsutil/gsutil-3.21.ebuild
vendored
Normal file
57
sdk_container/src/third_party/portage-stable/net-misc/gsutil/gsutil-3.21.ebuild
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/gsutil/gsutil-3.21.ebuild,v 1.1 2013/01/25 05:49:50 vapier Exp $
|
||||
|
||||
EAPI="3"
|
||||
|
||||
inherit eutils python multilib
|
||||
|
||||
DESCRIPTION="command line tool for interacting with cloud storage services"
|
||||
HOMEPAGE="http://code.google.com/p/gsutil/"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="examples"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-python/boto-2.7.0"
|
||||
|
||||
S=${WORKDIR}/${PN}
|
||||
|
||||
src_prepare() {
|
||||
# use system boto
|
||||
rm -rf boto
|
||||
epatch "${FILESDIR}"/${PN}-system-boto.patch
|
||||
|
||||
# trim some cruft
|
||||
find gslib third_party -name README -delete
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr/$(get_libdir)/${PN}
|
||||
doins -r gslib gsutil oauth2_plugin third_party CHECKSUM VERSION || die
|
||||
|
||||
dodir /usr/bin
|
||||
dosym /usr/$(get_libdir)/${PN}/gsutil /usr/bin/gsutil
|
||||
fperms a+x /usr/$(get_libdir)/${PN}/gsutil
|
||||
|
||||
# http://code.google.com/p/gsutil/issues/detail?id=96
|
||||
rm "${D}"/usr/$(get_libdir)/${PN}/gslib/commands/test.py || die
|
||||
|
||||
dodoc README
|
||||
if use examples ; then
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
doins -r cloud{auth,reader}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
python_mod_optimize /usr/$(get_libdir)/${PN}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/$(get_libdir)/${PN}
|
||||
}
|
60
sdk_container/src/third_party/portage-stable/net-misc/gsutil/gsutil-3.7.ebuild
vendored
Normal file
60
sdk_container/src/third_party/portage-stable/net-misc/gsutil/gsutil-3.7.ebuild
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/gsutil/gsutil-3.7.ebuild,v 1.3 2012/08/02 15:53:54 vapier Exp $
|
||||
|
||||
EAPI="3"
|
||||
|
||||
inherit eutils python multilib
|
||||
|
||||
DESCRIPTION="command line tool for interacting with cloud storage services"
|
||||
HOMEPAGE="http://code.google.com/p/gsutil/"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="examples"
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="${DEPEND}
|
||||
>=dev-python/boto-2.4.0"
|
||||
|
||||
S=${WORKDIR}/${PN}
|
||||
|
||||
src_prepare() {
|
||||
# use system boto
|
||||
rm -rf boto
|
||||
epatch "${FILESDIR}"/${PN}-system-boto.patch
|
||||
|
||||
# use the custom internal path to avoid polluting python system
|
||||
sed -i \
|
||||
-e "/^gsutil_bin_dir =/s:=.*:= '/usr/$(get_libdir)/${PN}';sys.path.insert(0, gsutil_bin_dir);:" \
|
||||
gsutil || die
|
||||
|
||||
# trim some cruft
|
||||
find gslib third_party -name README -delete
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin gsutil || die
|
||||
|
||||
insinto /usr/$(get_libdir)/${PN}
|
||||
doins -r gslib oauth2_plugin third_party VERSION || die
|
||||
|
||||
# http://code.google.com/p/gsutil/issues/detail?id=96
|
||||
rm "${D}"/usr/$(get_libdir)/${PN}/gslib/commands/test.py || die
|
||||
|
||||
dodoc README
|
||||
if use examples ; then
|
||||
insinto /usr/share/doc/${PF}/examples
|
||||
doins -r cloud{auth,reader}
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
python_mod_optimize /usr/$(get_libdir)/${PN}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/$(get_libdir)/${PN}
|
||||
}
|
10
sdk_container/src/third_party/portage-stable/net-misc/gsutil/metadata.xml
vendored
Normal file
10
sdk_container/src/third_party/portage-stable/net-misc/gsutil/metadata.xml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer>
|
||||
<email>vapier@gentoo.org</email>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="google-code">gsutil</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -1,74 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20100418-r1.ebuild,v 1.1 2010/09/14 01:58:24 vapier Exp $
|
||||
|
||||
inherit flag-o-matic eutils toolchain-funcs
|
||||
|
||||
DESCRIPTION="Network monitoring tools including ping and ping6"
|
||||
HOMEPAGE="http://www.linux-foundation.org/en/Net:Iputils"
|
||||
SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
|
||||
mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
|
||||
IUSE="doc extras idn ipv6 SECURITY_HAZARD ssl static"
|
||||
|
||||
RDEPEND="extras? ( !net-misc/rarpd )
|
||||
ssl? ( dev-libs/openssl )
|
||||
idn? ( net-dns/libidn )"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/os-headers"
|
||||
|
||||
S=${WORKDIR}/${PN}-s${PV}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
|
||||
epatch "${FILESDIR}"/${PN}-20100418-arping-broadcast.patch #337049
|
||||
epatch "${FILESDIR}"/${PN}-20100418-openssl.patch #335436
|
||||
epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347
|
||||
epatch "${FILESDIR}"/${PN}-20100418-makefile.patch
|
||||
epatch "${FILESDIR}"/${PN}-20100418-proper-libs.patch #332703
|
||||
epatch "${FILESDIR}"/${PN}-20100418-printf-size.patch
|
||||
epatch "${FILESDIR}"/${PN}-20100418-aliasing.patch
|
||||
epatch "${FILESDIR}"/${PN}-20071127-kernel-ifaddr.patch
|
||||
epatch "${FILESDIR}"/${PN}-20070202-idn.patch #218638
|
||||
epatch "${FILESDIR}"/${PN}-20100418-ping-CVE-2010-2529.patch #332527
|
||||
epatch "${FILESDIR}"/${PN}-20071127-infiniband.patch #377687
|
||||
use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
|
||||
use static && append-ldflags -static
|
||||
use ssl && append-cppflags -DHAVE_OPENSSL
|
||||
use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile
|
||||
export IDN=$(use idn && echo yes)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
tc-export CC
|
||||
emake || die "make main failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
into /
|
||||
dobin ping || die "ping"
|
||||
use ipv6 && dobin ping6
|
||||
dosbin arping || die "arping"
|
||||
into /usr
|
||||
dosbin tracepath || die "tracepath"
|
||||
use ipv6 && dosbin trace{path,route}6
|
||||
use extras && \
|
||||
{ dosbin clockdiff rarpd rdisc ipg tftpd || die "misc sbin"; }
|
||||
|
||||
fperms 4711 /bin/ping
|
||||
use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6
|
||||
|
||||
dodoc INSTALL RELNOTES
|
||||
use ipv6 \
|
||||
&& dosym ping.8 /usr/share/man/man8/ping6.8 \
|
||||
|| rm -f doc/*6.8
|
||||
rm -f doc/setkey.8
|
||||
doman doc/*.8
|
||||
|
||||
use doc && dohtml doc/*.html
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-hcidump/bluez-hcidump-2.0.ebuild,v 1.5 2011/10/26 11:37:48 xarthisius Exp $
|
||||
|
||||
EAPI=4
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="Bluetooth HCI packet analyzer"
|
||||
HOMEPAGE="http://bluez.sourceforge.net/"
|
||||
SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 hppa ppc x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=net-wireless/bluez-4.90"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog README )
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${P}-bluez-4.9x.patch
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-hcidump/bluez-hcidump-2.1.ebuild,v 1.1 2011/11/04 20:43:01 ssuominen Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
DESCRIPTION="Bluetooth HCI packet analyzer"
|
||||
HOMEPAGE="http://www.bluez.org/"
|
||||
SRC_URI="mirror://debian/pool/main/b/${PN}/${PN}_${PV}.orig.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~hppa ~ppc ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=net-wireless/bluez-4.96"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog README )
|
@ -1,45 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/debianutils/debianutils-3.4.4.ebuild,v 1.6 2011/05/01 12:20:13 xarthisius Exp $
|
||||
|
||||
inherit eutils flag-o-matic
|
||||
|
||||
DESCRIPTION="A selection of tools from Debian"
|
||||
HOMEPAGE="http://packages.qa.debian.org/d/debianutils.html"
|
||||
SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.gz"
|
||||
|
||||
LICENSE="BSD GPL-2 SMAIL"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="kernel_linux static"
|
||||
|
||||
PDEPEND="|| ( >=sys-apps/coreutils-6.10-r1 sys-apps/mktemp sys-freebsd/freebsd-ubin )"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/${PN}-3.4.2-no-bs-namespace.patch
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use static && append-ldflags -static
|
||||
econf || die
|
||||
emake || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
into /
|
||||
dobin tempfile run-parts || die
|
||||
if use kernel_linux ; then
|
||||
dosbin installkernel || die "installkernel failed"
|
||||
fi
|
||||
|
||||
into /usr
|
||||
dosbin savelog || die "savelog failed"
|
||||
|
||||
doman tempfile.1 run-parts.8 savelog.8
|
||||
use kernel_linux && doman installkernel.8
|
||||
cd debian
|
||||
dodoc changelog control
|
||||
keepdir /etc/kernel/postinst.d
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/help2man/help2man-1.36.4-r1.ebuild,v 1.9 2010/01/11 04:23:03 vapier Exp $
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="GNU utility to convert program --help output to a man page"
|
||||
HOMEPAGE="http://www.gnu.org/software/help2man"
|
||||
SRC_URI="mirror://gnu/help2man/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="nls elibc_glibc"
|
||||
|
||||
RDEPEND="dev-lang/perl"
|
||||
DEPEND="${RDEPEND}
|
||||
elibc_glibc? ( nls? ( dev-perl/Locale-gettext
|
||||
>=sys-devel/gettext-0.12.1-r1 ) )"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
epatch "${FILESDIR}/${P}-respect-LDFLAGS.patch"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local myconf
|
||||
use elibc_glibc && myconf="${myconf} $(use_enable nls)" \
|
||||
|| myconf="${myconf} --disable-nls"
|
||||
|
||||
econf ${myconf} || die
|
||||
emake || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -j1 DESTDIR="${D}" install || die "make install failed"
|
||||
dodoc ChangeLog NEWS README THANKS
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/hwids-20120922.ebuild,v 1.4 2012/10/02 12:53:52 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
DESCRIPTION="Hardware (PCI, USB) IDs databases"
|
||||
HOMEPAGE="https://github.com/gentoo/hwids"
|
||||
SRC_URI="https://github.com/gentoo/hwids/tarball/${P} -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( GPL-2 BSD )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND="!<sys-apps/pciutils-3.1.9-r2
|
||||
!<sys-apps/usbutils-005-r1"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_compile() {
|
||||
cd "${S}"/gentoo-hwids-*
|
||||
|
||||
for file in {usb,pci}.ids; do
|
||||
gzip -c ${file} > ${file}.gz || die
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}"/gentoo-hwids-*
|
||||
|
||||
insinto /usr/share/misc
|
||||
doins {usb,pci}.ids{,.gz}
|
||||
|
||||
dodoc README.md
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/hwids-20130114.ebuild,v 1.9 2013/01/26 21:14:15 ssuominen Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit udev eutils
|
||||
|
||||
DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases"
|
||||
HOMEPAGE="https://github.com/gentoo/hwids"
|
||||
SRC_URI="https://github.com/gentoo/hwids/archive/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( GPL-2 BSD ) public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux"
|
||||
IUSE="+udev"
|
||||
|
||||
DEPEND="udev? ( dev-lang/perl !=sys-fs/udev-196 )"
|
||||
RDEPEND="!<sys-apps/pciutils-3.1.9-r2
|
||||
!<sys-apps/usbutils-005-r1"
|
||||
|
||||
S=${WORKDIR}/hwids-${P}
|
||||
|
||||
src_compile() {
|
||||
emake UDEV=$(usex udev)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake UDEV=$(usex udev) install \
|
||||
DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
|
||||
MISCDIR="${EPREFIX}/usr/share/misc" \
|
||||
HWDBDIR="${EPREFIX}$(udev_get_udevdir)/hwdb.d" \
|
||||
DESTDIR="${D}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# until udev introduces a way to compile the database at a given
|
||||
# location, rather than just /, we can't do much on offset root.
|
||||
if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if use udev && [[ $(udevadm --help 2>&1) == *hwdb* ]]; then
|
||||
udevadm hwdb --update
|
||||
fi
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwids/hwids-20130131.ebuild,v 1.1 2013/01/31 16:04:01 flameeyes Exp $
|
||||
|
||||
EAPI=4
|
||||
inherit udev eutils
|
||||
|
||||
DESCRIPTION="Hardware (PCI, USB, OUI, IAB) IDs databases"
|
||||
HOMEPAGE="https://github.com/gentoo/hwids"
|
||||
SRC_URI="https://github.com/gentoo/hwids/archive/${P}.tar.gz"
|
||||
|
||||
LICENSE="|| ( GPL-2 BSD ) public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd x86-fbsd ~x64-freebsd ~amd64-linux x86-linux"
|
||||
IUSE="+udev"
|
||||
|
||||
DEPEND="udev? ( dev-lang/perl !=sys-fs/udev-196 )"
|
||||
RDEPEND="!<sys-apps/pciutils-3.1.9-r2
|
||||
!<sys-apps/usbutils-005-r1"
|
||||
|
||||
S=${WORKDIR}/hwids-${P}
|
||||
|
||||
src_compile() {
|
||||
emake UDEV=$(usex udev)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake UDEV=$(usex udev) install \
|
||||
DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
|
||||
MISCDIR="${EPREFIX}/usr/share/misc" \
|
||||
HWDBDIR="${EPREFIX}$(udev_get_udevdir)/hwdb.d" \
|
||||
DESTDIR="${D}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# until udev introduces a way to compile the database at a given
|
||||
# location, rather than just /, we can't do much on offset root.
|
||||
if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if use udev && [[ $(udevadm --help 2>&1) == *hwdb* ]]; then
|
||||
udevadm hwdb --update
|
||||
fi
|
||||
}
|
@ -1,6 +1,96 @@
|
||||
# ChangeLog for sys-apps/portage
|
||||
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1285 2013/06/08 04:08:42 zmedico Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1298 2013/06/22 06:52:21 zmedico Exp $
|
||||
|
||||
*portage-2.2.0_alpha184 (22 Jun 2013)
|
||||
|
||||
22 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.2.0_alpha184.ebuild,
|
||||
-portage-2.2.0_alpha181.ebuild:
|
||||
2.2.0_alpha184 version bump. This includes all of the fixes in 2.1.12.9. Bug
|
||||
#210077 tracks all bugs fixed since portage-2.1.x.
|
||||
|
||||
*portage-2.1.12.9 (22 Jun 2013)
|
||||
|
||||
22 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.12.9.ebuild,
|
||||
-portage-2.1.12.6.ebuild:
|
||||
2.1.12.9 version bump. This fixes bug #465000 (wrap install command for xattr
|
||||
preservation when FEATURES=xattr is enabled). Bug #472632 tracks all bugs
|
||||
fixed since portage-2.1.12.2.
|
||||
|
||||
*portage-2.2.0_alpha183 (20 Jun 2013)
|
||||
|
||||
20 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.2.0_alpha183.ebuild,
|
||||
-portage-2.2.0_alpha182.ebuild:
|
||||
2.2.0_alpha183 version bump. This includes all of the fixes in 2.1.12.8. Bug
|
||||
#210077 tracks all bugs fixed since portage-2.1.x.
|
||||
|
||||
*portage-2.1.12.8 (20 Jun 2013)
|
||||
|
||||
20 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.12.8.ebuild,
|
||||
-portage-2.1.12.7.ebuild:
|
||||
2.1.12.8 version bump. This fixes bug #473892 (regression in 2.1.12.7 and
|
||||
2.2.0_alpha182 which causes tests to fail with python3 when sys-
|
||||
apps/file[python] is installed). Bug #472632 tracks all bugs fixed since
|
||||
portage-2.1.12.2.
|
||||
|
||||
*portage-2.2.0_alpha182 (20 Jun 2013)
|
||||
|
||||
20 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.2.0_alpha182.ebuild,
|
||||
-portage-2.2.0_alpha179.ebuild, -portage-2.2.0_alpha180.ebuild:
|
||||
2.2.0_alpha182 version bump. This includes all of the fixes in 2.1.12.7. Bug
|
||||
#210077 tracks all bugs fixed since portage-2.1.x.
|
||||
|
||||
*portage-2.1.12.7 (20 Jun 2013)
|
||||
|
||||
20 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.12.7.ebuild,
|
||||
-portage-2.1.12.4.ebuild, -portage-2.1.12.5.ebuild:
|
||||
2.1.12.7 version bump. This fixes bugs in cross-prefix support (see bug
|
||||
#395633, improves repos.conf error handling, and fixes some bugs interactions
|
||||
between emerge --exclude and --newuse. Bug #472632 tracks all bugs fixed since
|
||||
portage-2.1.12.2.
|
||||
|
||||
*portage-2.2.0_alpha181 (18 Jun 2013)
|
||||
|
||||
18 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.2.0_alpha181.ebuild:
|
||||
2.2.0_alpha181 version bump. This includes all of the fixes in 2.1.12.6. Bug
|
||||
#210077 tracks all bugs fixed since portage-2.1.x.
|
||||
|
||||
*portage-2.1.12.6 (18 Jun 2013)
|
||||
|
||||
18 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.12.6.ebuild:
|
||||
2.1.12.6 version bump. This fixes bug #395633 (add cross-prefix support) and
|
||||
bug #473710 (regression in 2.1.12.5 and 2.2.0_alpha179 which caused emerge
|
||||
with ROOT to throw an AttributeError during dependency calculation. Bug
|
||||
#472632 tracks all bugs fixed since portage-2.1.12.2.
|
||||
|
||||
*portage-2.2.0_alpha180 (16 Jun 2013)
|
||||
|
||||
16 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.2.0_alpha180.ebuild:
|
||||
2.2.0_alpha179 version bump. This includes all of the fixes in 2.1.12.5. Bug
|
||||
#210077 tracks all bugs fixed since portage-2.1.x.
|
||||
|
||||
*portage-2.1.12.5 (16 Jun 2013)
|
||||
|
||||
16 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.12.5.ebuild:
|
||||
2.1.12.5 version bump. This fixes emerge's blocker display to show more
|
||||
information in some cases. Bug #472632 tracks all bugs fixed since
|
||||
portage-2.1.12.2.
|
||||
|
||||
15 Jun 2013; Zac Medico <zmedico@gentoo.org> -portage-2.1.12.3.ebuild,
|
||||
-portage-2.2.0_alpha178.ebuild:
|
||||
Remove old versions.
|
||||
|
||||
*portage-2.2.0_alpha179 (09 Jun 2013)
|
||||
|
||||
09 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.2.0_alpha179.ebuild:
|
||||
2.2.0_alpha179 version bump. This includes all of the fixes in 2.1.12.4. Bug
|
||||
#210077 tracks all bugs fixed since portage-2.1.x.
|
||||
|
||||
*portage-2.1.12.4 (09 Jun 2013)
|
||||
|
||||
09 Jun 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.12.4.ebuild:
|
||||
2.1.12.4 version bump. This fixes bug #467826 (handle revision part for =*
|
||||
atoms). Bug #472632 tracks all bugs fixed since portage-2.1.12.2.
|
||||
|
||||
*portage-2.2.0_alpha178 (08 Jun 2013)
|
||||
|
||||
|
@ -4,28 +4,32 @@ Hash: SHA256
|
||||
AUX README.RESCUE 137 SHA256 69bea0c755eab59b6b4d90838b8551744f0b0c8eeac170b1cd13a71ee83f9ac4 SHA512 dba0f0d6d4cd140e636cc70dfb7bdb298e2f2fb040bc07b0874cac994bdbabd26bfd9361d85a0f8b9a92a185281e4901606b9e4f563afdc8867341bbe6af1cb0 WHIRLPOOL 713fcc790442999d56e13efaf536fec9954dadeda680b3642d0358311332096ddedf8b55697bd1ca620d84f0dc7d025ff7931e086c74c1f5032be72dca2ff8f5
|
||||
DIST portage-2.1.11.62.tar.bz2 916085 SHA256 894bd50830264d222210f5417448263355830d5d8d2de446c1b6b3a4c7a14bfb SHA512 1a969c5164871ce12cc87014f69d44fc54c11a2c58d472fc0dfaa82e9561fbfeac442a3b8a0d5cccd39b117f762acfc0e7abcc00c2e16719940e93746a7c4ba7 WHIRLPOOL b681b290e98162ba7f770b4e5d63d5b42398ecd325629a166b158a6e3becd15de5bae8b4a5808612a5a9529683e544473f33d030f20838fb03086501b7e89cc2
|
||||
DIST portage-2.1.12.2.tar.bz2 868695 SHA256 700cf7118d60aa14a2d759887e50988a3e527e04fe980100f25cc69357ae2437 SHA512 53bfbcad9743b2613501191f4883d0b99d1e99ca6fdff550996121cb47c7b8333837d825f6174cb82f83cc16069ebe66a0aba0cc7b13f86a65a055d961e2c70b WHIRLPOOL 736dcc71a323d83c7fd75aa9f5c047b0fe234c66545a1744a2d69ca1b15af4d9bc60d9dfb2f9e76f1645e4d9c061f86bc56f4beac4e146b5cef970198b9010f6
|
||||
DIST portage-2.1.12.3.tar.bz2 870256 SHA256 63dc0b263fffd39a7bd030cf39bd106d36121c3401849d534bb87f480e6cd754 SHA512 66518d59389919fa3eeae559c7ee1322704818406c9084c3bd55c1186357eb2ac28687cf5b34f0de7ffeb24b2a4afdcefc5d40c4ec596f69756fe27ca088cc37 WHIRLPOOL f95142f9aa4fc4d755fe7c9ae24a9a997b1b41f88771d3a606511f412cef34faa3676283f29091e0f6a199e8013675e722f41b42103bcb9ebfa39d51e7a8029d
|
||||
DIST portage-2.1.12.8.tar.bz2 874956 SHA256 a30be8c0c5a1ee3034b0dffeeef9ef0b1615c3205c55b1031e2bf565d28a9db6 SHA512 4f8121e4ee6a33441b093cf309ad50076fcd4d4ac5473ec040d70ff194ade87e82fb3d0a00fce4f1abb0b394cbca3adc058f55aee5b2c177b673f4c5602052af WHIRLPOOL 1ae7382ab7c40e25f2e17ff45429dfe538fe398eca60a94c1c62e65da47d358d59cfe40f44569d752624fb9230aec539982da17424b8eb647540f87f175f4d50
|
||||
DIST portage-2.1.12.9.tar.bz2 878538 SHA256 ccf40d74251ea42541a7393c1ca986030212f1aed35cf2f850c3d94a9032431d SHA512 5322556022a320e832491bc0701d344b97aa3b225af661a2ef16a92a136773b37ab0e40d0a9f39de0b04f78073cbacda8986a8564e47b9390a23290df0fdf64f WHIRLPOOL 438bbf5630f8ab60386d6152a7e9c16dc6c4edd17dc83d083bf1bec7e80c5be179a0ee5fff998e38880072f799e8c1c54750164002e87c58423ec2eb11d186f9
|
||||
DIST portage-2.1.6.7.patch.bz2 50118 SHA256 5f0605b51a24d23703330b040d2f7154322284db3e0cefa7499002ff1fa733c0 SHA512 dd2acc1d436cad77cfc83c4dec79316763c1fb88d61b7702e8e47e6f31b2b9fe49e8a4cf4a947614a2acd6db2ef080ed8b4ae5fce9d9be29d7e218a0ec1576c0 WHIRLPOOL 050f923249fde7c4774a2a8a944889e4270a89b00441f1923c01ab0be38f107503e018d7ab7a7f42615e7e375f0f6c0eb3bdbf3ff4ce1ce226957238a729b1ee
|
||||
DIST portage-2.1.6.7_p1.patch.bz2 4741 SHA256 ddaae2ad8c01e6477bfe22e23a4da57eb9d079a27a17a08385d56fe2c49eec30 SHA512 39058d815827b340787d813515ed4fb8c52c4fb0caa12ae70c8a9a97b9ba16c2bf4177190cb7d1c508055ce8a7aaa390ba9b31642c7d74bfb4a14d729e720617 WHIRLPOOL 8eab9574ed2e6cabac593d93f8b6ff71465c01376e7eec4cf357c336b5ed3d4f3fb3521991148ba4e34ba00c56bec5534c98311167c03866812277a8d88b0494
|
||||
DIST portage-2.1.6.tar.bz2 518771 SHA256 b1c507445b3858449c861568f477e1cfab8b2326ded906b852c5193fb3839647 SHA512 d035f84601802ecaea3c0edea037a783fec743733bd40895eb5bb8a220449eb24cf1e2623cbca2e378197caba63a833d8cc54f1e49d886266307288b0adcfbdc WHIRLPOOL 25b6a6e3810f428c630ec7a6dc3cf2cfbe6bfdf276553786e1436b2630532ab442186e427bc75f249a224c5171b508a92303ce352b07be1a8a4d805c568ec10f
|
||||
DIST portage-2.2.0_alpha175.tar.bz2 866662 SHA256 97976729bbdac82e790ec0691ccd15313a761db09cde2ae9d3504c4e925581c1 SHA512 278d9589e28c14d05c8ac139d5a822e0f7ae1ea068834450b3bcaf65e52af688833635a4bbf3bb279dc0af7f2c1706449d1d3b989722ac00b9f3d202fef1b8f0 WHIRLPOOL cc19445dd9368cb3ad2f37f23025b94117371eac00807337953d31e8deb299a933c3fc7a78c7f010a074ef6d6c01fbc0d53976b4ad9c23e7480873490851fd7e
|
||||
DIST portage-2.2.0_alpha177.patch.bz2 12456 SHA256 4a4659a0cadc7e92eee630419586155b5a7f1e869b5ece5a3689f6adfbc49c21 SHA512 f137864b191d4605c12266889021259d4448063c96eb1e8601f17c5ec71c584fa81ef79cf5609d9e3fdbe89300a06de86da8d122b229ccb3bf352d9cb85654c2 WHIRLPOOL ede934ba974b7ab2da815d607301c3c86e2370f9f5c1c75841dbdf163dcb4ce7b8c472e8967b04b4094705f547ffca89c4a013c3072938f413afa03947ab8385
|
||||
DIST portage-2.2.0_alpha178.patch.bz2 19261 SHA256 b956274eef6c9b6fefa5f0c46572d7dad73c39580497fd47242f32392c1a5411 SHA512 a140ed0fbd561547ccfa703cc1650a0a2c7060f73cbb4787a9e1f3de0974fda75343eeed6a77321c5716aa42b80341dac7c0cab82279be02c9cbe3996f716f79 WHIRLPOOL b8b988cb32d7db4c4b33589a40b4c40aeeebf98b1990ae3e7e17f3d0bb09533598fff7f9b94690ba5c5b914e0f238eb002d5ef7995b58ee0c2f7db1e5d12f300
|
||||
DIST portage-2.2.0_alpha183.patch.bz2 37229 SHA256 67c113b75dd5b94e45828aa62ae5bc5d90ad3eb075dac9f6bf7074807b3f2ebc SHA512 7cd72530de6cbe2e551d13c64aedf7af8301dfce3e0f91790d82becf6946f6b5ae7ea99d69e1621c89a6fad3f74d98e8e98b60a2b374490c6f893e4f9cd4a42f WHIRLPOOL 336dfaa00b3ebf781f88e6f7c9696f58bec2e70856413f59e66f9982abb3e651759ef2bb3da9c1affad915568a5d0f7553e86212de1c725bc89608545f1989e1
|
||||
DIST portage-2.2.0_alpha184.patch.bz2 40729 SHA256 745289b30b116c25bfc191541993349d44494e750bb3e35c68c5e62df310bf38 SHA512 8a626e3714a93003b365256f017ea82dc0f363590fd92edcf90041b767b7dcf8edb974509ac666214c4b3c14051cbc6a29e268e2805385d6165e54616fbdfd10 WHIRLPOOL 3d5f2059f25228eb6c8c4c1c739ab5b672ad67b13f0c2fa8425f9e8f7d38d0b04b64563d6dca0172e2c3c280eb91b92ffbb3c7bdaf73bc3bf6b7fd2004cd605f
|
||||
DIST portage-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f SHA512 5f5c8dd1559048546633b1e7291ff8c0f5d637595f1a4c98405424b08c30c089fc9359e0214f78fbe358754f20d327794f4692b9b67639585c29b755975ee853 WHIRLPOOL 756e267b84077501d976f46fa448cda5368cd52aeca6ec43d109c81fe8e2364e0cd0f35630d68a4186c70e3b440b7c870b86ac7ef83cc0afa43e10f9f8e1f422
|
||||
EBUILD portage-2.1.11.62.ebuild 13593 SHA256 04e9222038bd66b61ea43e1b31a033d8de541cb5f55ca6fd0b093e378278c010 SHA512 dcce3640c68f2e7d76c6f3467b3ff79b30711e60346728c2eed04fdf351ce7d6c3ea6ea7a67ea5a395b0bd4b378720161f3c5a20fd883b15b7f6f477cf62792b WHIRLPOOL a71351363a0505780d353e8a82b048916fe5dd4aa57df79fc9d5b87fe3927e65a02560150393811794abf49f7f024701ef5b98e2c25e28156b2b2d8be8d09ce4
|
||||
EBUILD portage-2.1.12.2.ebuild 14494 SHA256 85037f1445802e54533e3836b044b9467451e6cd50eed996e853ab5ef8986d21 SHA512 a0adaa880f8a81a381e2ad50f101291dfac542615faa4ba580ecb981b3c94b3fa8fd654e2bcba7266361af52eec61553e9dce0c5c19619bae7e9691101e35147 WHIRLPOOL 6ffa02929b0e33c023aaaba58405e78e1a0168d19b6f837fbb4b6a5f8bafbfd06f392854367dd66ab7260141891b6f33cd76e0dfbe257531bec8c4ba8ab11ad3
|
||||
EBUILD portage-2.1.12.3.ebuild 14508 SHA256 43774065716f7f3250fb752f688266d6dd7bf553ee6d8cafdb23d560f274ff53 SHA512 23f6274c064151098e00f0544d7487c7663ffcf6e8906127261fb7b5d133176cbee4e24595996a1b2bbae994879797541c2b16909a9081d60ea5080ce0654e57 WHIRLPOOL b7ffb556da146d5235b7c3cb7bfa23ed143c10f30f942f82761c032dc2f1f25190d7f2233eeac1227abb17ef66c29cd295ff7b3cbd9212dfbf39c3029587114a
|
||||
EBUILD portage-2.1.12.8.ebuild 14508 SHA256 0ea76d3056d5e9b43186ac8f7042cd30657a2409d5167ca03d93ff05d8297fc1 SHA512 1100487317426fa4e11d6277c8ac83fd9fff7169e3b3938cbac0400b7fc938ff6cdd755cfff36042d5f6e8bb365788fa8c8b829e5ce68f9f2d929d7279dc075a WHIRLPOOL 0fca76ba0edfa70512245664b8ae03562d92d7853da988deb755688bd58fafdda92c17b0589cbcd49e57a1020bafbfae84175e0e29b8557bf1f973b55d694218
|
||||
EBUILD portage-2.1.12.9.ebuild 14508 SHA256 fd6d044796066cf2fcb747d032f5849fb1bd0702bd203ebf893d63ded133757a SHA512 abcd1fa3cded6a735a7f8713a9cdee69266be4062a28a2f93aa8b359cb2188987ac2ee2edcebedab48e699e269be7276fd2095063622f64abfca418347678246 WHIRLPOOL 96ce0451e509803799c8f30b03931ed69c726c7bdd461e0d80604d3e7d855f4bc28d77517dee5fb64e4852e8d6a636cfbf40fdeb8951ca403bb94cf2c5e166b8
|
||||
EBUILD portage-2.1.6.7_p1.ebuild 8307 SHA256 d43a972b7100062b95b23cf6c2d26ac240799622e04f915c0df98beb51f33108 SHA512 79362e2a742d978f5636b25cbfe818c22d4b2926ca2092ee1624c23da4256a008048bc8aa1ba641b85e2dcb9cd7d80e6b3f0558a446aff4355065e41607d74ef WHIRLPOOL 8783d9d9a9a13333d3bd581ab84df36154ee1c4050494b46414603d65b7c50c2087a9a53a8dbcad99e626d69fe54f008e23eba8e649e269313d093be2dffac9a
|
||||
EBUILD portage-2.2.0_alpha177.ebuild 15628 SHA256 7369304a962d369d783fc65c6bec4c0437944ddd7709c8c272782baf8e912ca0 SHA512 41d7f2f8b2dace9406a8d89240ba4cd2dc149cb5d247df99180e4afd4a7ea297fb610fd845755f9aeb910e122ff74a5fe4b244f4a8a39606686f5b5a2577f292 WHIRLPOOL 3cff1a7c7edb3b42a7c223390f3f6fe7c390d7be2fd83966dd84849e676df3808ce3e19f84c3844fa15493cb9b5167138ea20c89495c70b86c25d9767ef9ee9b
|
||||
EBUILD portage-2.2.0_alpha178.ebuild 15628 SHA256 f553c2d93f73573f97555960f0d4f60d3621d22ec0b546f4a9845ed3bbac0c82 SHA512 6bd8a3f685fae3f3fad1351211f178a46faf2765daf91573d8dcc0bed51eae5bfc00d2a203904bf5109e1a4df09ba6b23d4f3215343e8448babf70627da470da WHIRLPOOL 03bb6aff6273cdcf037b2df8d79ea71d0a3b27113e5448bd8e56d6dd7e14a1d35d203b151ba93e24a01aebdc9ec07c22dc50f4f8dc7e52158845215349b99575
|
||||
EBUILD portage-2.2.0_alpha183.ebuild 15628 SHA256 7989d2b274631afef335155e3a328eaae4cc605bf3bb4d40e23689ef4238cf66 SHA512 20be29f57b26ddeb3cbc3db8d4726287a082c9c250db69d3de3255bcce28e650ce7fd98d56d70706478f664818b13fb4f50ae2fcd4eef9233c13de22192d092a WHIRLPOOL 39f7efc7c96d7317b1b9e82b0fb9a53716d41af2356368c6ecd2337b2174f265fced8b7c90cd9834a88df6003a5b43bee50ffa6db3727b00fedc052c2cc49742
|
||||
EBUILD portage-2.2.0_alpha184.ebuild 15628 SHA256 6f78019ef6bdfbf6bdc020bcc72c1ddebce4583c685c50468c3afae8de44b568 SHA512 e91bc9aaf0c16de1eecb55dc45256c5119cc37bdb2a36b6ebb6b0095b6b5163ea7a5efa3af0e9927a6688f8f60088d9d35ec24ea2070e456427a7fdcb3290742 WHIRLPOOL f494a3fcb3af14f089b31ed0b3602f217a799ec085f7d19fa14598d8966fee3983357f4ae1d59e8e06ede1c8f46b14d53b9551796b984a8ccce93605792bc977
|
||||
EBUILD portage-9999.ebuild 14860 SHA256 fa10372f49d0c73de513db773167c7b31f1863c5db2b65ec413e3b7c0981fa6f SHA512 ff406024ea90fc8256607c061bc467aafc6d0632b470f3ff1c667189813e85cd1a018b4638727419d04654201189a989c6721e011b8cc727e30cd2ae5e1a40cf WHIRLPOOL 95955aa90cf55613e54e87aa169e834f54db2c3228455caf6f0e69080256f7701f8b7cad2223ad584137dc6a98e18b3216f56087a8808833067a709bf993e2da
|
||||
MISC ChangeLog 30637 SHA256 6ee33cc4128e69f1225ba962d80624ba2574db879af0b7868bda54d017a4e27b SHA512 0fa83c30567a653a1ea60a12e7902d373aaf8c9f1f8ed7ae3ba32bca72c4d099ed93679ff02d486336be6682dda42207c26e6c065b2c27a17d7e7dbbec692964 WHIRLPOOL 65b73ec66b0a47b6f4bc5fd721c4006620b8db93239213e80b04ff5dd6f5a43efd62d1f7b1c86a294f6f80ae264afdc83061ef0b36d558a7d66a4e075b4101df
|
||||
MISC ChangeLog 34435 SHA256 22f4ff211fbcef1164469ffe0ff4bc8796297ce99efdab5ee7c4199a53120269 SHA512 bf68d437963d6f509997e84424353336ea5e0b2fac7104b24de3890017b48c9430fcdca423f32e325aa5b6614acc5c7dc9e902b626f8f126bea0cd68e3207db0 WHIRLPOOL 0ada43adc83f3f1c1b6ad4101c5c5caa628c9d535b4156f8b9289c955b427d43e030fa0b1a928cca9b06420f1be669ba32065ec18c24b2982090d6a274bd4d01
|
||||
MISC ChangeLog-2012 133873 SHA256 157a7eb13d4cf2e2c94bfcb7e91f218af1ea88f5ff20c24a50546950a9839c94 SHA512 1241f4ccd7b31bdd340649417257b0e95202992feb66e0cd4d41fc2d35bf0baeac19680f34a831d2fefce0c0fec03aa6e7a191f783e59cf9b93aaf266f010a3f WHIRLPOOL b027bdba0f5ccc1b3a2dc18df92d82b473af5e55536816b7177071c1ae1a89e4d50d42c2093fa1bbe28b92a42014fbefbfc9e7daa4e6426ebecbd5bffc3d479f
|
||||
MISC metadata.xml 926 SHA256 8736b6884463a876892a4fd45f6239a123c1229d2372ce47d5dff719f0eba2b9 SHA512 38d3c969b49012a94bfadecd1d48936513391a305eee5e5e55eb6c4a6b82e05b6ebf1dd6dfe6fbb5a96ba5fffc33fddcfda8d41f3d367ff4ad030859a655ef8b WHIRLPOOL 6f9afcacb628f75f84d03e812ed93b4e3613fcfc4e1180bcb0551c1c8025050ebd3b21fcdef79358aaad3606558345fcd6f914928eb62155e5b9a50bde0d3bf4
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.20 (GNU/Linux)
|
||||
|
||||
iEYEAREIAAYFAlGyrksACgkQ/ejvha5XGaMHRwCeJ4XEaObm0zBCG3Y4M2bp9QNJ
|
||||
5wQAoIuBJHNzLbPE2txFmfTGcOB7m3kl
|
||||
=LIrt
|
||||
iEYEAREIAAYFAlHFSacACgkQ/ejvha5XGaOvuwCdHG2PdtTsgWeGiYpKpqYSf/Oh
|
||||
e3AAoJARoM5/wuIHTOyoHxuHsnFZxBKl
|
||||
=5Vil
|
||||
-----END PGP SIGNATURE-----
|
||||
|
@ -1,278 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.31.ebuild,v 1.12 2013/01/27 22:04:14 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
DEPEND="${python_dep}
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
/usr/bin/python -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i man/* || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,281 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.50.ebuild,v 1.15 2013/02/09 18:06:18 ago Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
# >=python-2.6.5 for bug #456236
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] >=dev-lang/python-2.6.5:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] >=dev-lang/python-2.6.5:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
/usr/bin/python -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,280 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.52.ebuild,v 1.12 2013/03/01 10:02:48 ago Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
/usr/bin/python -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,322 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.55.ebuild,v 1.8 2013/05/06 21:42:24 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~alpha amd64 arm hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
/usr/bin/python -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=$1 PYTHON=/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
# elog dir must exist to avoid logrotate error for bug #415911.
|
||||
# This code runs in preinst in order to bypass the mapping of
|
||||
# portage:portage to root:root which happens after src_install.
|
||||
keepdir /var/log/portage/elog
|
||||
# This is allowed to fail if the user/group are invalid for prefix users.
|
||||
if chown portage:portage "${D}"var/log/portage{,/elog} 2>/dev/null ; then
|
||||
chmod g+s,ug+rwx "${D}"var/log/portage{,/elog}
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
}
|
@ -1,280 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.57.ebuild,v 1.1 2013/03/20 03:52:03 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
/usr/bin/python -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,389 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.58.ebuild,v 1.4 2013/03/26 05:17:45 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${ROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${ROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=$1 PYTHON=/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
while read -r mod_dir ; do
|
||||
cd "${D}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${D}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
}
|
@ -1,395 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.60.ebuild,v 1.2 2013/04/04 17:45:27 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${ROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${ROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=$1 PYTHON=/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
if use build && [[ ${ROOT} == / &&
|
||||
! -x /usr/bin/$(get_python_interpreter ${impl}) ]] ; then
|
||||
# Tolerate --nodeps at beginning of stage1 for catalyst
|
||||
ewarn "skipping python_targets_${impl}, interpreter not found"
|
||||
continue
|
||||
fi
|
||||
while read -r mod_dir ; do
|
||||
cd "${D}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${D}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
}
|
@ -1,404 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.11.63.ebuild,v 1.2 2013/05/06 21:42:24 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${ROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${ROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=$1 PYTHON=/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
if use build && [[ ${ROOT} == / &&
|
||||
! -x /usr/bin/$(get_python_interpreter ${impl}) ]] ; then
|
||||
# Tolerate --nodeps at beginning of stage1 for catalyst
|
||||
ewarn "skipping python_targets_${impl}, interpreter not found"
|
||||
continue
|
||||
fi
|
||||
while read -r mod_dir ; do
|
||||
cd "${D}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${D}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
# elog dir must exist to avoid logrotate error for bug #415911.
|
||||
# This code runs in preinst in order to bypass the mapping of
|
||||
# portage:portage to root:root which happens after src_install.
|
||||
keepdir /var/log/portage/elog
|
||||
# This is allowed to fail if the user/group are invalid for prefix users.
|
||||
if chown portage:portage "${D}"var/log/portage{,/elog} 2>/dev/null ; then
|
||||
chmod g+s,ug+rwx "${D}"var/log/portage{,/elog}
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
}
|
@ -1,428 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.12.1.ebuild,v 1.1 2013/05/19 00:12:51 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=2
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=$PV
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${ROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${ROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=$1 PYTHON=/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="/etc" \
|
||||
prefix="/usr" \
|
||||
install || die
|
||||
|
||||
# Extended set config is currently disabled in portage-2.1.x.
|
||||
rm -rf "${D}/usr/share/portage/config/sets" || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
if use build && [[ ${ROOT} == / &&
|
||||
! -x /usr/bin/$(get_python_interpreter ${impl}) ]] ; then
|
||||
# Tolerate --nodeps at beginning of stage1 for catalyst
|
||||
ewarn "skipping python_targets_${impl}, interpreter not found"
|
||||
continue
|
||||
fi
|
||||
while read -r mod_dir ; do
|
||||
cd "${D}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${D}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$D" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
# elog dir must exist to avoid logrotate error for bug #415911.
|
||||
# This code runs in preinst in order to bypass the mapping of
|
||||
# portage:portage to root:root which happens after src_install.
|
||||
keepdir /var/log/portage/elog
|
||||
# This is allowed to fail if the user/group are invalid for prefix users.
|
||||
if chown portage:portage "${D}"var/log/portage{,/elog} 2>/dev/null ; then
|
||||
chmod g+s,ug+rwx "${D}"var/log/portage{,/elog}
|
||||
fi
|
||||
|
||||
if [[ -d ${ROOT}var/log/portage && \
|
||||
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
|
||||
has_version '<sys-apps/portage-2.1.10.11' ; then
|
||||
# Initialize permissions for bug #378451 and bug #377177, since older
|
||||
# portage does not create /var/log/portage with the desired default
|
||||
# permissions.
|
||||
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
|
||||
chown portage:portage "${ROOT}var/log/portage"
|
||||
chmod g+ws "${ROOT}var/log/portage"
|
||||
fi
|
||||
|
||||
if has_version '<sys-apps/portage-2.1.10.61' ; then
|
||||
ewarn "FEATURES=config-protect-if-modified is now enabled by default."
|
||||
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
|
||||
ewarn "files that have not been modified since they were installed."
|
||||
fi
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! { [ -e "${ROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ; } \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ${NEEDED_REBUILD_UPGRADE} ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
local cpv filename line newline
|
||||
for cpv in "${ROOT}/var/db/pkg"/*/*; do
|
||||
[[ -f "${cpv}/NEEDED" && ! -f "${cpv}/NEEDED.ELF.2" ]] || continue
|
||||
while read -r line; do
|
||||
filename=${line% *}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;%n" "${ROOT%/}${filename}")
|
||||
newline=${newline// - }
|
||||
[[ ${#ROOT} -gt 1 ]] && newline=${newline/${ROOT%/}}
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
done
|
||||
fi
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.12.3.ebuild,v 1.1 2013/06/08 04:08:42 zmedico Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.12.8.ebuild,v 1.1 2013/06/20 07:55:07 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.12.ebuild,v 1.1 2013/05/16 00:25:31 zmedico Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.12.9.ebuild,v 1.1 2013/06/22 06:48:14 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
@ -1,332 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha142.ebuild,v 1.6 2013/01/27 22:04:14 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
DEPEND="${python_dep}
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha142
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${EPREFIX}/usr/bin/python" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i man/* || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
find . -type f -print0 | \
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"${EPREFIX}/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,332 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha161.ebuild,v 1.2 2013/01/27 22:04:14 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
DEPEND="${python_dep}
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha160
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${EPREFIX}/usr/bin/python" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
find . -type f -print0 | \
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"${EPREFIX}/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,334 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha163.ebuild,v 1.1 2013/02/14 06:04:40 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha160
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${EPREFIX}/usr/bin/python" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
find . -type f -print0 | \
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"${EPREFIX}/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,334 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha166.ebuild,v 1.1 2013/03/05 02:23:46 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha166
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${EPREFIX}/usr/bin/python" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
find . -type f -print0 | \
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"${EPREFIX}/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,334 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha168.ebuild,v 1.1 2013/03/20 03:53:08 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
inherit eutils python
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha166
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${EPREFIX}/usr/bin/python" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in /usr/bin/python2.* ; do
|
||||
x=${x#/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
python_set_active_version 3
|
||||
elif use python2; then
|
||||
python_set_active_version 2
|
||||
elif use pypy2_0; then
|
||||
python_set_active_version 2.7-pypy-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
if use python3; then
|
||||
einfo "Converting shebangs for python3..."
|
||||
python_convert_shebangs -r 3 .
|
||||
elif use python2; then
|
||||
einfo "Converting shebangs for python2..."
|
||||
python_convert_shebangs -r 2 .
|
||||
elif use pypy2_0; then
|
||||
einfo "Converting shebangs for pypy-c2.0..."
|
||||
python_convert_shebangs -r 2.7-pypy-2.0 .
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
find . -type f -print0 | \
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Set PYTHONPATH for portage API consumers. This way we don't have
|
||||
# to rely on patched python having the correct path, since it has
|
||||
# been known to incorrectly add /usr/libx32/portage/pym to sys.path.
|
||||
echo "PYTHONPATH=\"${EPREFIX}/usr/lib/portage/pym\"" > \
|
||||
"${T}/05portage" || die
|
||||
doenvd "${T}/05portage" || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Compile all source files recursively. Any orphans
|
||||
# will be identified and removed in postrm.
|
||||
python_mod_optimize /usr/lib/portage/pym
|
||||
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup /usr/lib/portage/pym
|
||||
}
|
@ -1,444 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha169.ebuild,v 1.4 2013/03/26 05:17:45 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha166
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${EROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${EROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=${EPREFIX}$1 PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in "${EPREFIX}"/usr/bin/python2.* ; do
|
||||
x=${x#${EPREFIX}/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
while read -r mod_dir ; do
|
||||
cd "${ED}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${ED}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
@ -1,450 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha171.ebuild,v 1.2 2013/04/04 17:45:27 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha170
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${EROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${EROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=${EPREFIX}$1 PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in "${EPREFIX}"/usr/bin/python2.* ; do
|
||||
x=${x#${EPREFIX}/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
if use build && [[ ${ROOT} == / &&
|
||||
! -x ${EPREFIX}/usr/bin/$(get_python_interpreter ${impl}) ]] ; then
|
||||
# Tolerate --nodeps at beginning of stage1 for catalyst
|
||||
ewarn "skipping python_targets_${impl}, interpreter not found"
|
||||
continue
|
||||
fi
|
||||
while read -r mod_dir ; do
|
||||
cd "${ED}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${ED}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
@ -1,459 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha173.ebuild,v 1.2 2013/05/06 21:42:24 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha170
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${EROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${EROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=${EPREFIX}$1 PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in "${EPREFIX}"/usr/bin/python2.* ; do
|
||||
x=${x#${EPREFIX}/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
if use build && [[ ${ROOT} == / &&
|
||||
! -x ${EPREFIX}/usr/bin/$(get_python_interpreter ${impl}) ]] ; then
|
||||
# Tolerate --nodeps at beginning of stage1 for catalyst
|
||||
ewarn "skipping python_targets_${impl}, interpreter not found"
|
||||
continue
|
||||
fi
|
||||
while read -r mod_dir ; do
|
||||
cd "${ED}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${ED}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
# elog dir must exist to avoid logrotate error for bug #415911.
|
||||
# This code runs in preinst in order to bypass the mapping of
|
||||
# portage:portage to root:root which happens after src_install.
|
||||
keepdir /var/log/portage/elog
|
||||
# This is allowed to fail if the user/group are invalid for prefix users.
|
||||
if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
|
||||
chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
@ -1,459 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha174.ebuild,v 1.2 2013/05/06 21:42:24 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha170
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${EROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${EROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=${EPREFIX}$1 PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in "${EPREFIX}"/usr/bin/python2.* ; do
|
||||
x=${x#${EPREFIX}/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
if use build && [[ ${ROOT} == / &&
|
||||
! -x ${EPREFIX}/usr/bin/$(get_python_interpreter ${impl}) ]] ; then
|
||||
# Tolerate --nodeps at beginning of stage1 for catalyst
|
||||
ewarn "skipping python_targets_${impl}, interpreter not found"
|
||||
continue
|
||||
fi
|
||||
while read -r mod_dir ; do
|
||||
cd "${ED}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${ED}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
# elog dir must exist to avoid logrotate error for bug #415911.
|
||||
# This code runs in preinst in order to bypass the mapping of
|
||||
# portage:portage to root:root which happens after src_install.
|
||||
keepdir /var/log/portage/elog
|
||||
# This is allowed to fail if the user/group are invalid for prefix users.
|
||||
if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
|
||||
chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if $NEEDED_REBUILD_UPGRADE ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
if [ -f "${cpv}/NEEDED" ]; then
|
||||
rm -f "${cpv}/NEEDED.ELF.2"
|
||||
while read line; do
|
||||
filename=${line% *}
|
||||
needed=${line#* }
|
||||
needed=${needed//+/++}
|
||||
needed=${needed//#/##}
|
||||
needed=${needed//%/%%}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
|
||||
newline=${newline// - }
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
@ -1,452 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha175.ebuild,v 1.1 2013/05/16 00:34:25 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
||||
EAPI=3
|
||||
PYTHON_COMPAT=(
|
||||
pypy1_9 pypy2_0
|
||||
python3_1 python3_2 python3_3 python3_4
|
||||
python2_6 python2_7
|
||||
)
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
|
||||
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr"
|
||||
|
||||
for _pyimpl in ${PYTHON_COMPAT[@]} ; do
|
||||
IUSE+=" python_targets_${_pyimpl}"
|
||||
done
|
||||
unset _pyimpl
|
||||
|
||||
# Import of the io module in python-2.6 raises ImportError for the
|
||||
# thread module if threading is disabled.
|
||||
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] )
|
||||
!pypy2_0? ( !python2? ( !python3? (
|
||||
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
|
||||
) ) )
|
||||
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) )
|
||||
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
|
||||
python_dep="${python_dep_ssl//\[ssl\]}"
|
||||
python_dep="${python_dep//,ssl}"
|
||||
python_dep="${python_dep//ssl,}"
|
||||
|
||||
python_dep="${python_dep}
|
||||
python_targets_pypy1_9? ( dev-python/pypy:1.9 )
|
||||
python_targets_pypy2_0? ( dev-python/pypy:2.0 )
|
||||
python_targets_python2_6? ( dev-lang/python:2.6 )
|
||||
python_targets_python2_7? ( dev-lang/python:2.7 )
|
||||
python_targets_python3_1? ( dev-lang/python:3.1 )
|
||||
python_targets_python3_2? ( dev-lang/python:3.2 )
|
||||
python_targets_python3_3? ( dev-lang/python:3.3 )
|
||||
python_targets_python3_4? ( dev-lang/python:3.4 )
|
||||
"
|
||||
|
||||
# The pysqlite blocker is for bug #282760.
|
||||
# make-3.82 is for bug #455858
|
||||
DEPEND="${python_dep}
|
||||
>=sys-devel/make-3.82
|
||||
>=sys-apps/sed-4.0.5 sys-devel/patch
|
||||
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
|
||||
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
|
||||
# Require sandbox-2.2 for bug #288863.
|
||||
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
|
||||
# quite slow, so it's not considered in the dependencies as an alternative to
|
||||
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
|
||||
# for now, don't pull in xattr deps for other kernels.
|
||||
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
|
||||
# For compgen, require bash[readline] (bug #445576).
|
||||
RDEPEND="${python_dep}
|
||||
!build? ( >=sys-apps/sed-4.0.5
|
||||
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) )
|
||||
>=app-admin/eselect-1.2
|
||||
|| ( ${python_dep_ssl} dev-python/python-mhash )
|
||||
)
|
||||
elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
|
||||
elibc_glibc? ( >=sys-apps/sandbox-2.2 )
|
||||
elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
|
||||
>=app-misc/pax-utils-0.1.17
|
||||
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
|
||||
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
|
||||
!<app-shells/bash-3.2_p17
|
||||
!<app-admin/logrotate-3.8.0"
|
||||
PDEPEND="
|
||||
!build? (
|
||||
>=net-misc/rsync-2.6.4
|
||||
userland_GNU? ( >=sys-apps/coreutils-6.4 )
|
||||
)"
|
||||
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532
|
||||
# NOTE: FEATURES=installsources requires debugedit and rsync
|
||||
|
||||
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
|
||||
|
||||
prefix_src_archives() {
|
||||
local x y
|
||||
for x in ${@}; do
|
||||
for y in ${SRC_ARCHIVES}; do
|
||||
echo ${y}/${x}
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
PV_PL="2.1.2"
|
||||
PATCHVER_PL=""
|
||||
TARBALL_PV=2.2.0_alpha175
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
|
||||
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
|
||||
|
||||
PATCHVER=
|
||||
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
|
||||
if [ -n "${PATCHVER}" ]; then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
|
||||
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
|
||||
fi
|
||||
|
||||
S="${WORKDIR}"/${PN}-${TARBALL_PV}
|
||||
S_PL="${WORKDIR}"/${PN}-${PV_PL}
|
||||
|
||||
compatible_python_is_selected() {
|
||||
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
|
||||
}
|
||||
|
||||
current_python_has_xattr() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
|
||||
"${PYTHON}" -c 'import xattr' 2>/dev/null
|
||||
}
|
||||
|
||||
call_with_python_impl() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
env EPYTHON=${EPYTHON} "$@"
|
||||
}
|
||||
|
||||
get_python_interpreter() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1 python
|
||||
case "${impl}" in
|
||||
python*)
|
||||
python=${impl/_/.}
|
||||
;;
|
||||
pypy*)
|
||||
python=${impl/_/.}
|
||||
python=${python/pypy/pypy-c}
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized python target: ${impl}"
|
||||
esac
|
||||
echo ${python}
|
||||
}
|
||||
|
||||
get_python_sitedir() {
|
||||
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*"
|
||||
local impl=$1
|
||||
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages
|
||||
[[ -d ${EROOT}${site_dir} ]] || \
|
||||
ewarn "site-packages dir missing for ${impl}: ${EROOT}${site_dir}"
|
||||
echo "${site_dir}"
|
||||
}
|
||||
|
||||
python_compileall() {
|
||||
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
|
||||
local d=${EPREFIX}$1 PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
local d_image=${D}${d#/}
|
||||
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}"
|
||||
case "${EPYTHON}" in
|
||||
python*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
# Note: Using -OO breaks emaint, since it requires __doc__,
|
||||
# and __doc__ is None when -OO is used.
|
||||
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
pypy*)
|
||||
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized EPYTHON value: ${EPYTHON}"
|
||||
esac
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if use python2 && use python3 ; then
|
||||
ewarn "Both python2 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python3 ; then
|
||||
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python3."
|
||||
fi
|
||||
if use pypy2_0 && use python2 ; then
|
||||
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one"
|
||||
ewarn "can be in the shebangs. Using python2"
|
||||
fi
|
||||
if ! use pypy2_0 && ! use python2 && ! use python3 && \
|
||||
! compatible_python_is_selected ; then
|
||||
ewarn "Attempting to select a compatible default python interpreter"
|
||||
local x success=0
|
||||
for x in "${EPREFIX}"/usr/bin/python2.* ; do
|
||||
x=${x#${EPREFIX}/usr/bin/python2.}
|
||||
if [[ $x -ge 6 ]] 2>/dev/null ; then
|
||||
eselect python set python2.$x
|
||||
if compatible_python_is_selected ; then
|
||||
elog "Default python interpreter is now set to python-2.$x"
|
||||
success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $success != 1 ] ; then
|
||||
eerror "Unable to select a compatible default python interpreter!"
|
||||
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use EPYTHON to designate the active python interpreter,
|
||||
# but we only export when needed, via call_with_python_impl.
|
||||
EPYTHON=python
|
||||
export -n EPYTHON
|
||||
if use python3; then
|
||||
EPYTHON=python3
|
||||
elif use python2; then
|
||||
EPYTHON=python2
|
||||
elif use pypy2_0; then
|
||||
EPYTHON=pypy-c2.0
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [ -n "${PATCHVER}" ] ; then
|
||||
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
|
||||
rm "$S/bin/ebuild-helpers/portageq" \
|
||||
|| die "failed to remove portageq helper symlink"
|
||||
fi
|
||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||
fi
|
||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||
die "Failed to patch portage.VERSION"
|
||||
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
|
||||
die "Failed to patch VERSION in doc/fragment/version"
|
||||
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \
|
||||
die "Failed to patch VERSION in man page headers"
|
||||
|
||||
if ! use ipc ; then
|
||||
einfo "Disabling ipc..."
|
||||
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
|
||||
-i pym/_emerge/AbstractEbuildProcess.py || \
|
||||
die "failed to patch AbstractEbuildProcess.py"
|
||||
fi
|
||||
|
||||
if use xattr && use kernel_linux ; then
|
||||
einfo "Adding FEATURES=xattr to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
local set_shebang=
|
||||
if use python3; then
|
||||
set_shebang=python3
|
||||
elif use python2; then
|
||||
set_shebang=python2
|
||||
elif use pypy2_0; then
|
||||
set_shebang=pypy-c2.0
|
||||
fi
|
||||
if [[ -n ${set_shebang} ]] ; then
|
||||
einfo "Converting shebangs for ${set_shebang}..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then
|
||||
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
fi
|
||||
|
||||
if [[ -n ${EPREFIX} ]] ; then
|
||||
einfo "Setting portage.const.EPREFIX ..."
|
||||
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \
|
||||
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \
|
||||
-i pym/portage/const.py || \
|
||||
die "Failed to patch portage.const.EPREFIX"
|
||||
|
||||
einfo "Prefixing shebangs ..."
|
||||
while read -r -d $'\0' ; do
|
||||
local shebang=$(head -n1 "$REPLY")
|
||||
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
|
||||
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
|
||||
die "sed failed"
|
||||
fi
|
||||
done < <(find . -type f -print0)
|
||||
|
||||
einfo "Adjusting make.globals ..."
|
||||
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \
|
||||
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \
|
||||
-i cnf/make.globals || die "sed failed"
|
||||
|
||||
einfo "Adding FEATURES=force-prefix to make.globals ..."
|
||||
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \
|
||||
|| die "failed to append to make.globals"
|
||||
fi
|
||||
|
||||
cd "${S}/cnf" || die
|
||||
if [ -f "make.conf.${ARCH}".diff ]; then
|
||||
patch make.conf "make.conf.${ARCH}".diff || \
|
||||
die "Failed to patch make.conf.example"
|
||||
else
|
||||
eerror ""
|
||||
eerror "Portage does not have an arch-specific configuration for this arch."
|
||||
eerror "Please notify the arch maintainer about this issue. Using generic."
|
||||
eerror ""
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use doc; then
|
||||
call_with_python_impl \
|
||||
emake docbook || die
|
||||
fi
|
||||
|
||||
if use epydoc; then
|
||||
einfo "Generating api docs"
|
||||
call_with_python_impl \
|
||||
emake epydoc || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# make files executable, in case they were created by patch
|
||||
find bin -type f | xargs chmod +x
|
||||
call_with_python_impl \
|
||||
emake test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
call_with_python_impl \
|
||||
emake DESTDIR="${D}" \
|
||||
sysconfdir="${EPREFIX}/etc" \
|
||||
prefix="${EPREFIX}/usr" \
|
||||
install || die
|
||||
|
||||
# Use dodoc for compression, since the Makefile doesn't do that.
|
||||
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
|
||||
|
||||
if use linguas_pl; then
|
||||
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
|
||||
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
|
||||
fi
|
||||
|
||||
# Allow external portage API consumers to import portage python modules
|
||||
# (this used to be done with PYTHONPATH setting in /etc/env.d).
|
||||
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in
|
||||
# site-packages, and compile with the corresponding interpreter.
|
||||
local impl files mod_dir dest_mod_dir python relative_path x
|
||||
for impl in "${PYTHON_COMPAT[@]}" ; do
|
||||
use "python_targets_${impl}" || continue
|
||||
if use build && [[ ${ROOT} == / &&
|
||||
! -x ${EPREFIX}/usr/bin/$(get_python_interpreter ${impl}) ]] ; then
|
||||
# Tolerate --nodeps at beginning of stage1 for catalyst
|
||||
ewarn "skipping python_targets_${impl}, interpreter not found"
|
||||
continue
|
||||
fi
|
||||
while read -r mod_dir ; do
|
||||
cd "${ED}/usr/lib/portage/pym/${mod_dir}" || die
|
||||
files=$(echo *.py)
|
||||
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then
|
||||
# __pycache__ directories contain no py files
|
||||
continue
|
||||
fi
|
||||
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir}
|
||||
dodir "${dest_mod_dir}" || die
|
||||
relative_path=../../../lib/portage/pym/${mod_dir}
|
||||
x=/${mod_dir}
|
||||
while [ -n "${x}" ] ; do
|
||||
relative_path=../${relative_path}
|
||||
x=${x%/*}
|
||||
done
|
||||
for x in ${files} ; do
|
||||
dosym "${relative_path}/${x}" \
|
||||
"${dest_mod_dir}/${x}" || die
|
||||
done
|
||||
done < <(cd "${ED}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*")
|
||||
cd "${S}" || die
|
||||
EPYTHON=$(get_python_interpreter ${impl}) \
|
||||
python_compileall "$(get_python_sitedir ${impl})"
|
||||
done
|
||||
|
||||
# Compile /usr/lib/portage/pym with the active interpreter, since portage
|
||||
# internal commands force this directory to the beginning of sys.path.
|
||||
python_compileall /usr/lib/portage/pym
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if [[ $ROOT == / ]] ; then
|
||||
# Run some minimal tests as a sanity check.
|
||||
local test_runner=$(find "$ED" -name runTests)
|
||||
if [[ -n $test_runner && -x $test_runner ]] ; then
|
||||
einfo "Running preinst sanity tests..."
|
||||
"$test_runner" || die "preinst sanity tests failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use xattr && ! current_python_has_xattr ; then
|
||||
ewarn "For optimal performance in xattr handling, install"
|
||||
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
|
||||
ewarn "enable USE=python3 for $CATEGORY/$PN."
|
||||
fi
|
||||
|
||||
# elog dir must exist to avoid logrotate error for bug #415911.
|
||||
# This code runs in preinst in order to bypass the mapping of
|
||||
# portage:portage to root:root which happens after src_install.
|
||||
keepdir /var/log/portage/elog
|
||||
# This is allowed to fail if the user/group are invalid for prefix users.
|
||||
if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then
|
||||
chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog}
|
||||
fi
|
||||
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \
|
||||
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false
|
||||
|
||||
# If portage-2.1.6 is installed and the preserved_libs_registry exists,
|
||||
# assume that the NEEDED.ELF.2 files have already been generated.
|
||||
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
|
||||
! { [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \
|
||||
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ; } \
|
||||
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if $WORLD_MIGRATION_UPGRADE && \
|
||||
grep -q "^@" "${EROOT}/var/lib/portage/world"; then
|
||||
einfo "moving set references from the worldfile into world_sets"
|
||||
cd "${EROOT}/var/lib/portage/"
|
||||
grep "^@" world >> world_sets
|
||||
sed -i -e '/^@/d' world
|
||||
fi
|
||||
|
||||
if ${NEEDED_REBUILD_UPGRADE} ; then
|
||||
einfo "rebuilding NEEDED.ELF.2 files"
|
||||
local cpv filename line newline
|
||||
for cpv in "${EROOT}/var/db/pkg"/*/*; do
|
||||
[[ -f "${cpv}/NEEDED" && ! -f "${cpv}/NEEDED.ELF.2" ]] || continue
|
||||
while read -r line; do
|
||||
filename=${line% *}
|
||||
newline=$(scanelf -BF "%a;%F;%S;%r;%n" "${ROOT%/}${filename}")
|
||||
newline=${newline// - }
|
||||
[[ ${#ROOT} -gt 1 ]] && newline=${newline/${ROOT%/}}
|
||||
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
|
||||
done < "${cpv}/NEEDED"
|
||||
done
|
||||
fi
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha176.ebuild,v 1.1 2013/05/19 00:14:30 zmedico Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha183.ebuild,v 1.1 2013/06/20 07:56:24 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha178.ebuild,v 1.1 2013/06/08 04:03:22 zmedico Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha184.ebuild,v 1.1 2013/06/22 06:52:21 zmedico Exp $
|
||||
|
||||
# Require EAPI 2 since we now require at least python-2.6 (for python 3
|
||||
# syntax support) which also requires EAPI 2.
|
@ -1,47 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd-ui/systemd-ui-1.ebuild,v 1.1 2012/03/31 11:52:03 mgorny Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit autotools-utils
|
||||
|
||||
DESCRIPTION="System and service manager for Linux"
|
||||
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
|
||||
SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
VALASLOT="0.14"
|
||||
|
||||
RDEPEND="!sys-apps/systemd[gtk]
|
||||
>=dev-libs/glib-2.26
|
||||
dev-libs/libgee:0
|
||||
sys-apps/dbus
|
||||
x11-libs/gtk+:2
|
||||
>=x11-libs/libnotify-0.7"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
app-arch/xz-utils
|
||||
dev-lang/vala:${VALASLOT}"
|
||||
|
||||
# Due to vala being broken.
|
||||
AUTOTOOLS_IN_SOURCE_BUILD=1
|
||||
|
||||
src_prepare() {
|
||||
# Force the rebuild of .vala sources
|
||||
touch src/*.vala || die
|
||||
|
||||
# Fix hardcoded path in .vala.
|
||||
sed -i -e 's:/lib/systemd:/usr/lib/systemd:g' src/*.vala || die
|
||||
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export VALAC="$(type -p valac-${VALASLOT})"
|
||||
autotools-utils_src_configure
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/dosfstools/dosfstools-3.0.9.ebuild,v 1.8 2010/10/12 17:12:56 armin76 Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit toolchain-funcs flag-o-matic
|
||||
|
||||
DESCRIPTION="DOS filesystem tools - provides mkdosfs, mkfs.msdos, mkfs.vfat"
|
||||
HOMEPAGE="http://www.daniel-baumann.ch/software/dosfstools/"
|
||||
SRC_URI="http://www.daniel-baumann.ch/software/dosfstools/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
|
||||
IUSE=""
|
||||
RESTRICT="test" # there is no test target #239071
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e '/^PREFIX/s:/local::' \
|
||||
-e '/^OPTFLAGS/s:=.*:=:' \
|
||||
Makefile || die "sed Makefile"
|
||||
append-lfs-flags
|
||||
tc-export CC
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
dodir /sbin
|
||||
mv "${D}"/usr/sbin/*fsck* "${D}"/sbin/ || die
|
||||
mv "${D}"/usr/share/doc/{${PN},${PF}} || die
|
||||
prepalldocs
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev-init-scripts/udev-init-scripts-22.ebuild,v 1.6 2013/01/31 23:08:27 ago Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils
|
||||
|
||||
if [ "${PV}" = "9999" ]; then
|
||||
EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/udev-gentoo-scripts.git"
|
||||
inherit git-2
|
||||
fi
|
||||
|
||||
DESCRIPTION="udev startup scripts for openrc"
|
||||
HOMEPAGE="http://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
if [ "${PV}" != "9999" ]; then
|
||||
SRC_URI="http://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
|
||||
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86"
|
||||
fi
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="virtual/pkgconfig"
|
||||
RDEPEND=">=virtual/udev-180
|
||||
sys-apps/openrc
|
||||
!<sys-fs/udev-186"
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
epatch_user
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
# Add udev and udev-mount to the sysinit runlevel automatically if this is
|
||||
# the first install of this package.
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]
|
||||
then
|
||||
if [[ -x "${ROOT}"etc/init.d/udev \
|
||||
&& -d "${ROOT}"etc/runlevels/sysinit ]]
|
||||
then
|
||||
ln -s "${ROOT}"etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit/udev
|
||||
fi
|
||||
if [[ -x "${ROOT}"etc/init.d/udev-mount \
|
||||
&& -d "${ROOT}"etc/runlevels/sysinit ]]
|
||||
then
|
||||
ln -s "${ROOT}"etc/init.d/udev-mount \
|
||||
"${ROOT}"etc/runlevels/sysinit/udev-mount
|
||||
fi
|
||||
fi
|
||||
|
||||
# Warn the user about adding the scripts to their sysinit runlevel
|
||||
if [[ -e "${ROOT}"etc/runlevels/sysinit ]]
|
||||
then
|
||||
if [[ ! -e "${ROOT}"etc/runlevels/sysinit/udev ]]
|
||||
then
|
||||
ewarn
|
||||
ewarn "You need to add udev to the sysinit runlevel."
|
||||
ewarn "If you do not do this,"
|
||||
ewarn "your system will not be able to boot!"
|
||||
ewarn "Run this command:"
|
||||
ewarn "\trc-update add udev sysinit"
|
||||
fi
|
||||
if [[ ! -e "${ROOT}"etc/runlevels/sysinit/udev-mount ]]
|
||||
then
|
||||
ewarn
|
||||
ewarn "You need to add udev-mount to the sysinit runlevel."
|
||||
ewarn "If you do not do this,"
|
||||
ewarn "your system will not be able to boot!"
|
||||
ewarn "Run this command:"
|
||||
ewarn "\trc-update add udev-mount sysinit"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qs 'boot\|default\|sysinit'; then
|
||||
ewarn "The udev-postmount service has been removed because the reasons for"
|
||||
ewarn "its existance have been removed upstream."
|
||||
ewarn "Please remove it from your runlevels."
|
||||
fi
|
||||
}
|
@ -1,593 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-171-r10.ebuild,v 1.4 2013/02/02 16:16:22 grobian Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
KV_min=2.6.31
|
||||
KV_reliable=2.6.31
|
||||
PATCHSET=${P}-gentoo-patchset-v2
|
||||
scriptversion=7.1
|
||||
scriptname=udev-gentoo-scripts
|
||||
[[ -n "${scriptversion}" ]] && scriptname="${scriptname}-${scriptversion}"
|
||||
|
||||
if [[ ${PV} == "9999" ]]
|
||||
then
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
|
||||
EGIT_BRANCH="master"
|
||||
inherit autotools git-2
|
||||
fi
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool
|
||||
|
||||
if [[ ${PV} != "9999" ]]
|
||||
then
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.bz2
|
||||
test? ( mirror://gentoo/${PN}-171-testsys.tar.bz2 )
|
||||
mirror://gentoo/${PN}-gentoo-legacy-patchset-2.tar.bz2"
|
||||
if [[ -n "${PATCHSET}" ]]
|
||||
then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
|
||||
fi
|
||||
fi
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${scriptname}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
|
||||
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="build selinux test debug +rule_generator hwdb gudev introspection
|
||||
keymap floppy edd action_modeswitch extras"
|
||||
|
||||
COMMON_DEPEND="selinux? ( sys-libs/libselinux )
|
||||
extras? ( dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
virtual/libusb:0 )
|
||||
gudev? ( dev-libs/glib:2 )
|
||||
introspection? ( dev-libs/gobject-introspection )
|
||||
action_modeswitch? ( virtual/libusb:0 )
|
||||
>=sys-apps/util-linux-2.16
|
||||
!<sys-libs/glibc-2.11"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
keymap? ( dev-util/gperf )
|
||||
extras? ( dev-util/gperf )
|
||||
virtual/pkgconfig
|
||||
virtual/os-headers
|
||||
!<sys-kernel/linux-headers-2.6.34
|
||||
test? ( app-text/tree )"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
hwdb?
|
||||
(
|
||||
>=sys-apps/usbutils-0.82
|
||||
|| (
|
||||
( sys-apps/hwids >=sys-apps/pciutils-3.1.9-r2 )
|
||||
>=sys-apps/pciutils-3.1.9-r1[-compress-db]
|
||||
<sys-apps/pciutils-3.1.9-r1[-zlib]
|
||||
)
|
||||
)
|
||||
extras?
|
||||
(
|
||||
>=sys-apps/usbutils-0.82
|
||||
sys-apps/pciutils
|
||||
)
|
||||
!sys-apps/coldplug
|
||||
!<sys-fs/lvm2-2.02.45
|
||||
!sys-fs/device-mapper
|
||||
>=sys-apps/baselayout-2"
|
||||
|
||||
if [[ ${PV} == "9999" ]]
|
||||
then
|
||||
# for documentation processing with xsltproc
|
||||
DEPEND="${DEPEND}
|
||||
app-text/docbook-xsl-stylesheets
|
||||
app-text/docbook-xml-dtd
|
||||
dev-util/gtk-doc"
|
||||
fi
|
||||
|
||||
# required kernel options
|
||||
CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
|
||||
~!IDE ~BLK_DEV_BSG"
|
||||
|
||||
# Return values:
|
||||
# 2 - reliable
|
||||
# 1 - unreliable
|
||||
# 0 - too old
|
||||
udev_check_KV() {
|
||||
local ok=0
|
||||
if kernel_is -ge ${KV_reliable//./ }
|
||||
then
|
||||
ok=2
|
||||
elif kernel_is -ge ${KV_min//./ }
|
||||
then
|
||||
ok=1
|
||||
fi
|
||||
return $ok
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
linux-info_pkg_setup
|
||||
|
||||
# always print kernel version requirements
|
||||
ewarn
|
||||
ewarn "${P} does not support Linux kernel before version ${KV_min}!"
|
||||
if [[ ${KV_min} != ${KV_reliable} ]]
|
||||
then
|
||||
ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
|
||||
fi
|
||||
|
||||
udev_check_KV
|
||||
case "$?" in
|
||||
2) einfo "Your kernel version (${KV_FULL}) is new enough to run ${P} reliably." ;;
|
||||
1) ewarn "Your kernel version (${KV_FULL}) is new enough to run ${P},"
|
||||
ewarn "but it may be unreliable in some cases."
|
||||
;;
|
||||
0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
|
||||
;;
|
||||
esac
|
||||
|
||||
KV_FULL_SRC=${KV_FULL}
|
||||
get_running_version
|
||||
udev_check_KV
|
||||
if [[ "$?" = "0" ]]
|
||||
then
|
||||
eerror
|
||||
eerror "udev cannot be restarted after emerging,"
|
||||
eerror "as your running kernel version (${KV_FULL}) is too old."
|
||||
eerror "You really need to use a newer kernel after a reboot!"
|
||||
NO_RESTART=1
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
if [[ ${PV} == "9999" ]]
|
||||
then
|
||||
git-2_src_unpack
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use test && [[ -d "${WORKDIR}"/test/sys ]]
|
||||
then
|
||||
mv "${WORKDIR}"/test/sys "${S}"/test/
|
||||
fi
|
||||
|
||||
# patches go here...
|
||||
epatch "${WORKDIR}"/${P}-path_id-skip-ATA-transport.patch #437418
|
||||
|
||||
# backport some patches
|
||||
if [[ -n "${PATCHSET}" ]]
|
||||
then
|
||||
EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" epatch
|
||||
fi
|
||||
|
||||
# change rules back to group uucp instead of dialout for now
|
||||
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
|
||||
-i rules/{rules.d,arch}/*.rules \
|
||||
|| die "failed to change group dialout to uucp"
|
||||
|
||||
if [[ ${PV} != 9999 ]]
|
||||
then
|
||||
# Make sure there is no sudden changes to upstream rules file
|
||||
# (more for my own needs than anything else ...)
|
||||
MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules")
|
||||
MD5=${MD5/ -/}
|
||||
if [[ ${MD5} != a9954d57e97aa0ad2e0ed53899d9559a ]]
|
||||
then
|
||||
eerror "50-udev-default.rules has been updated, please validate!"
|
||||
eerror "md5sum: ${MD5}"
|
||||
die "50-udev-default.rules has been updated, please validate!"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${PV} == 9999 ]]
|
||||
then
|
||||
gtkdocize --copy || die "gtkdocize failed"
|
||||
eautoreconf
|
||||
else
|
||||
elibtoolize
|
||||
fi
|
||||
}
|
||||
|
||||
use_extras() { use extras && echo "--enable-${2:-$1}" || use_enable "$@" ; }
|
||||
src_configure() {
|
||||
econf \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--sysconfdir="${EPREFIX}/etc" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-rootlibdir="${EPREFIX}/$(get_libdir)" \
|
||||
--libexecdir="${EPREFIX}/lib/udev" \
|
||||
--enable-logging \
|
||||
--enable-static \
|
||||
$(use_with selinux) \
|
||||
$(use_enable debug) \
|
||||
$(use_extras rule_generator) \
|
||||
$(use_extras hwdb) \
|
||||
--with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
|
||||
--with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
|
||||
--disable-udev_acl \
|
||||
$(use_extras gudev) \
|
||||
$(use_extras introspection) \
|
||||
$(use_extras keymap) \
|
||||
$(use_extras floppy) \
|
||||
$(use_extras edd) \
|
||||
$(use_extras action_modeswitch) \
|
||||
$(systemd_with_unitdir)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
filter-flags -fprefetch-loop-arrays
|
||||
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
into /
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
exeinto /lib/udev
|
||||
keepdir /lib/udev/state
|
||||
keepdir /lib/udev/devices
|
||||
|
||||
# create symlinks for these utilities to /sbin
|
||||
# where multipath-tools expect them to be (Bug #168588)
|
||||
dosym "../lib/udev/scsi_id" /sbin/scsi_id
|
||||
|
||||
# Add gentoo stuff to udev.conf
|
||||
echo "# If you need to change mount-options, do it in /etc/fstab" \
|
||||
>> "${ED}"/etc/udev/udev.conf
|
||||
|
||||
# let the dir exist at least
|
||||
keepdir /etc/udev/rules.d
|
||||
|
||||
# Now installing rules
|
||||
cd "${S}"/rules
|
||||
insinto /lib/udev/rules.d/
|
||||
|
||||
# support older kernels
|
||||
doins misc/30-kernel-compat.rules
|
||||
|
||||
# Adding arch specific rules
|
||||
if [[ -f arch/40-${ARCH}.rules ]]
|
||||
then
|
||||
doins "arch/40-${ARCH}.rules"
|
||||
fi
|
||||
cd "${S}"
|
||||
|
||||
insinto /etc/modprobe.d
|
||||
newins "${WORKDIR}"/blacklist-146 blacklist.conf
|
||||
newins "${WORKDIR}"/pnp-aliases pnp-aliases.conf
|
||||
|
||||
# documentation
|
||||
dodoc ChangeLog README TODO
|
||||
|
||||
# keep doc in just one directory, Bug #281137
|
||||
rm -rf "${ED}/usr/share/doc/${PN}"
|
||||
if use keymap
|
||||
then
|
||||
dodoc extras/keymap/README.keymap.txt
|
||||
fi
|
||||
|
||||
cd "${WORKDIR}/${scriptname}"
|
||||
sed -i -e 's/2.6.34/2.6.31/' init.d/udev
|
||||
doconfd conf.d/*
|
||||
exeinto /lib/udev
|
||||
doexe helpers/*
|
||||
doexe "${WORKDIR}"/shell-compat-KV.sh
|
||||
doinitd init.d/*
|
||||
insinto /etc/modprobe.d
|
||||
doins modprobe.d/*
|
||||
insinto /lib/udev/rules.d
|
||||
doins rules.d/*
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local emake_cmd="${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE}"
|
||||
|
||||
cd "${S}"
|
||||
einfo ">>> Test phase [udev:check]: ${CATEGORY}/${PF}"
|
||||
has userpriv $FEATURES && einfo "Disable FEATURES userpriv to run the udev tests"
|
||||
if ! $emake_cmd -j1 check
|
||||
then
|
||||
has test $FEATURES && die "udev: Make test failed. See above for details."
|
||||
has test $FEATURES || eerror "udev: Make test failed. See above for details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# moving old files to support newer modprobe, 12 May 2009
|
||||
local f dir=${EROOT}/etc/modprobe.d/
|
||||
for f in pnp-aliases blacklist; do
|
||||
if [[ -f $dir/$f && ! -f $dir/$f.conf ]]
|
||||
then
|
||||
elog "Moving $dir/$f to $f.conf"
|
||||
mv -f "$dir/$f" "$dir/$f.conf"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -d ${EROOT}/lib/udev-state ]]
|
||||
then
|
||||
mv -f "${EROOT}"/lib/udev-state/* "${ED}"/lib/udev/state/
|
||||
rm -r "${EROOT}"/lib/udev-state
|
||||
fi
|
||||
|
||||
if [[ -f ${EROOT}/etc/udev/udev.config &&
|
||||
! -f ${EROOT}/etc/udev/udev.rules ]]
|
||||
then
|
||||
mv -f "${EROOT}"/etc/udev/udev.config "${EROOT}"/etc/udev/udev.rules
|
||||
fi
|
||||
|
||||
# delete the old udev.hotplug symlink if it is present
|
||||
if [[ -h ${EROOT}/etc/hotplug.d/default/udev.hotplug ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/hotplug.d/default/udev.hotplug
|
||||
fi
|
||||
|
||||
# delete the old wait_for_sysfs.hotplug symlink if it is present
|
||||
if [[ -h ${EROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
|
||||
fi
|
||||
|
||||
# delete the old wait_for_sysfs.hotplug symlink if it is present
|
||||
if [[ -h ${EROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/hotplug.d/default/10-udev.hotplug
|
||||
fi
|
||||
|
||||
has_version "=${CATEGORY}/${PN}-103-r3"
|
||||
previous_equal_to_103_r3=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-104-r5"
|
||||
previous_less_than_104_r5=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-106-r5"
|
||||
previous_less_than_106_r5=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-113"
|
||||
previous_less_than_113=$?
|
||||
}
|
||||
|
||||
# 19 Nov 2008
|
||||
fix_old_persistent_net_rules() {
|
||||
local rules=${EROOT}/etc/udev/rules.d/70-persistent-net.rules
|
||||
[[ -f ${rules} ]] || return
|
||||
|
||||
elog
|
||||
elog "Updating persistent-net rules file"
|
||||
|
||||
# Change ATTRS to ATTR matches, Bug #246927
|
||||
sed -i -e 's/ATTRS{/ATTR{/g' "${rules}"
|
||||
|
||||
# Add KERNEL matches if missing, Bug #246849
|
||||
sed -ri \
|
||||
-e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
|
||||
"${rules}"
|
||||
}
|
||||
|
||||
# See Bug #129204 for a discussion about restarting udevd
|
||||
restart_udevd() {
|
||||
if [[ ${NO_RESTART} = "1" ]]
|
||||
then
|
||||
ewarn "Not restarting udevd, as your kernel is too old!"
|
||||
return
|
||||
fi
|
||||
|
||||
# need to merge to our system
|
||||
[[ ${EROOT} = / ]] || return
|
||||
|
||||
# check if root of init-process is identical to ours (not in chroot)
|
||||
[[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return
|
||||
|
||||
# abort if there is no udevd running
|
||||
[[ -n $(pidof udevd) ]] || return
|
||||
|
||||
# abort if no /dev/.udev exists
|
||||
[[ -e /dev/.udev ]] || return
|
||||
|
||||
elog
|
||||
elog "restarting udevd now."
|
||||
|
||||
killall -15 udevd &>/dev/null
|
||||
sleep 1
|
||||
killall -9 udevd &>/dev/null
|
||||
|
||||
/sbin/udevd --daemon
|
||||
sleep 3
|
||||
if [[ ! -n $(pidof udevd) ]]
|
||||
then
|
||||
eerror "FATAL: udev died, please check your kernel is"
|
||||
eerror "new enough and configured correctly for ${P}."
|
||||
eerror
|
||||
eerror "Please have a look at this before rebooting."
|
||||
eerror "If in doubt, please downgrade udev back to your old version"
|
||||
fi
|
||||
}
|
||||
|
||||
postinst_init_scripts() {
|
||||
local enable_postmount=false
|
||||
|
||||
# FIXME: inconsistent handling of init-scripts here
|
||||
# * udev is added to sysinit in openrc-ebuild
|
||||
# * we add udev-postmount to default in here
|
||||
#
|
||||
|
||||
# If we are building stages, add udev and udev-mount to the sysinit runlevel
|
||||
# automatically.
|
||||
if use build
|
||||
then
|
||||
if [[ -x "${EROOT}"/etc/init.d/udev \
|
||||
&& -d "${EROOT}"/etc/runlevels/sysinit ]]
|
||||
then
|
||||
ln -s "${EPREFIX}"/etc/init.d/udev "${EROOT}"/etc/runlevels/sysinit/udev
|
||||
fi
|
||||
if [[ -x "${ROOT}"/etc/init.d/udev-mount \
|
||||
&& -d "${ROOT}"/etc/runlevels/sysinit ]]
|
||||
then
|
||||
ln -s /etc/init.d/udev-mount \
|
||||
"${ROOT}"/etc/runlevels/sysinit/udev-mount
|
||||
fi
|
||||
enable_postmount=true
|
||||
fi
|
||||
|
||||
# Warn the user about adding the scripts to their sysinit runlevel
|
||||
if [[ -e "${EROOT}"/etc/runlevels/sysinit ]]
|
||||
then
|
||||
if [[ ! -e "${EROOT}"/etc/runlevels/sysinit/udev ]]
|
||||
then
|
||||
ewarn
|
||||
ewarn "You need to add udev to the sysinit runlevel."
|
||||
ewarn "If you do not do this,"
|
||||
ewarn "your system will not be able to boot!"
|
||||
ewarn "Run this command:"
|
||||
ewarn "\trc-update add udev sysinit"
|
||||
fi
|
||||
if [[ ! -e "${EROOT}"/etc/runlevels/sysinit/udev-mount ]]
|
||||
then
|
||||
ewarn
|
||||
ewarn "You need to add udev-mount to the sysinit runlevel."
|
||||
ewarn "If you do not do this,"
|
||||
ewarn "your system will not be able to boot!"
|
||||
ewarn "Run this command:"
|
||||
ewarn "\trc-update add udev-mount sysinit"
|
||||
fi
|
||||
fi
|
||||
|
||||
# add udev-postmount to default runlevel instead of that ugly injecting
|
||||
# like a hotplug event, 2009/10/15
|
||||
|
||||
# already enabled?
|
||||
[[ -e "${EROOT}"/etc/runlevels/default/udev-postmount ]] && return
|
||||
|
||||
[[ -e "${EROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true
|
||||
[[ "${EROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true
|
||||
|
||||
if $enable_postmount
|
||||
then
|
||||
local initd=udev-postmount
|
||||
|
||||
if [[ -e ${EROOT}/etc/init.d/${initd} ]] && \
|
||||
[[ ! -e ${EROOT}/etc/runlevels/default/${initd} ]]
|
||||
then
|
||||
ln -snf "${EPREFIX}"/etc/init.d/${initd} "${EROOT}"/etc/runlevels/default/${initd}
|
||||
elog "Auto-adding '${initd}' service to your default runlevel"
|
||||
fi
|
||||
else
|
||||
elog "You should add the udev-postmount service to default runlevel."
|
||||
elog "Run this to add it:"
|
||||
elog "\trc-update add udev-postmount default"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fix_old_persistent_net_rules
|
||||
|
||||
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
|
||||
# So try to remove it here (will only work if empty).
|
||||
rmdir "${EROOT}"/dev/loop 2>/dev/null
|
||||
if [[ -d "${EROOT}"/dev/loop ]]
|
||||
then
|
||||
ewarn "Please make sure your remove /dev/loop,"
|
||||
ewarn "else losetup may be confused when looking for unused devices."
|
||||
fi
|
||||
|
||||
restart_udevd
|
||||
|
||||
postinst_init_scripts
|
||||
|
||||
# people want reminders, I'll give them reminders. Odds are they will
|
||||
# just ignore them anyway...
|
||||
|
||||
# delete 40-scsi-hotplug.rules, it is integrated in 50-udev.rules, 19 Jan 2007
|
||||
if [[ $previous_equal_to_103_r3 = 0 ]] &&
|
||||
[[ -e ${EROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]]
|
||||
then
|
||||
ewarn "Deleting stray 40-scsi-hotplug.rules"
|
||||
ewarn "installed by sys-fs/udev-103-r3"
|
||||
rm -f "${EROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
|
||||
fi
|
||||
|
||||
# Removing some device-nodes we thought we need some time ago, 25 Jan 2007
|
||||
if [[ -d ${EROOT}/lib/udev/devices ]]
|
||||
then
|
||||
rm -f "${EROOT}"/lib/udev/devices/{null,zero,console,urandom}
|
||||
fi
|
||||
|
||||
# Removing some old file, 29 Jan 2007
|
||||
if [[ $previous_less_than_104_r5 = 0 ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/dev.d/net/hotplug.dev
|
||||
rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/net 2>/dev/null
|
||||
fi
|
||||
|
||||
# 19 Mar 2007
|
||||
if [[ $previous_less_than_106_r5 = 0 ]] &&
|
||||
[[ -e ${EROOT}/etc/udev/rules.d/95-net.rules ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/udev/rules.d/95-net.rules
|
||||
fi
|
||||
|
||||
# Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
|
||||
if [[ -d ${EROOT}/etc/dev.d ]]
|
||||
then
|
||||
rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/default "${EROOT}"/etc/dev.d 2>/dev/null
|
||||
if [[ -d ${EROOT}/etc/dev.d ]]
|
||||
then
|
||||
ewarn "You still have the directory /etc/dev.d on your system."
|
||||
ewarn "This is no longer used by udev and can be removed."
|
||||
fi
|
||||
fi
|
||||
|
||||
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper
|
||||
# remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
|
||||
if [[ $previous_less_than_113 = 0 ]] &&
|
||||
[[ -f ${EROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
|
||||
! has_version sys-fs/device-mapper
|
||||
then
|
||||
rm -f "${EROOT}"/etc/udev/rules.d/64-device-mapper.rules
|
||||
einfo "Removed unneeded file 64-device-mapper.rules"
|
||||
fi
|
||||
|
||||
# requested in Bug #225033:
|
||||
elog
|
||||
elog "persistent-net does assigning fixed names to network devices."
|
||||
elog "If you have problems with the persistent-net rules,"
|
||||
elog "just delete the rules file"
|
||||
elog "\trm ${EROOT}etc/udev/rules.d/70-persistent-net.rules"
|
||||
elog "and then reboot."
|
||||
elog
|
||||
elog "This may however number your devices in a different way than they are now."
|
||||
|
||||
ewarn
|
||||
ewarn "If you build an initramfs including udev, then please"
|
||||
ewarn "make sure that the /sbin/udevadm binary gets included,"
|
||||
ewarn "and your scripts changed to use it,as it replaces the"
|
||||
ewarn "old helper apps udevinfo, udevtrigger, ..."
|
||||
|
||||
ewarn
|
||||
ewarn "mount options for directory /dev are no longer"
|
||||
ewarn "set in /etc/udev/udev.conf, but in /etc/fstab"
|
||||
ewarn "as for other directories."
|
||||
|
||||
ewarn
|
||||
ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*,"
|
||||
ewarn "then please migrate over to using the device names"
|
||||
ewarn "/dev/md*, /dev/loop* and /dev/ram*."
|
||||
ewarn "The devfs-compat rules have been removed."
|
||||
ewarn "For reference see Bug #269359."
|
||||
|
||||
ewarn
|
||||
ewarn "Rules for /dev/hd* devices have been removed"
|
||||
ewarn "Please migrate to libata."
|
||||
|
||||
elog
|
||||
elog "For more information on udev on Gentoo, writing udev rules, and"
|
||||
elog " fixing known issues visit:"
|
||||
elog " http://www.gentoo.org/doc/en/udev-guide.xml"
|
||||
}
|
@ -1,601 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-171-r2.ebuild,v 1.2 2011/09/18 06:42:42 zmedico Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
KV_min=2.6.32
|
||||
KV_reliable=2.6.32
|
||||
PATCHSET=${P}-gentoo-patchset-v1
|
||||
scriptversion=v4
|
||||
scriptname=udev-gentoo-scripts-${scriptversion}
|
||||
|
||||
if [[ ${PV} == "9999" ]]
|
||||
then
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
|
||||
EGIT_BRANCH="master"
|
||||
vcs="git-2 autotools"
|
||||
fi
|
||||
|
||||
inherit ${vcs} eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool
|
||||
|
||||
if [[ ${PV} != "9999" ]]
|
||||
then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-linux"
|
||||
# please update testsys-tarball whenever udev-xxx/test/sys/ is changed
|
||||
SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
|
||||
test? ( mirror://gentoo/${PN}-171-testsys.tar.bz2 )"
|
||||
if [[ -n "${PATCHSET}" ]]
|
||||
then
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
|
||||
fi
|
||||
fi
|
||||
SRC_URI="${SRC_URI} mirror://gentoo/${scriptname}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
|
||||
HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="build selinux test debug +rule_generator hwdb acl gudev introspection
|
||||
keymap floppy edd action_modeswitch extras"
|
||||
|
||||
COMMON_DEPEND="selinux? ( sys-libs/libselinux )
|
||||
extras? ( sys-apps/acl
|
||||
dev-libs/glib:2
|
||||
dev-libs/gobject-introspection
|
||||
virtual/libusb:0 )
|
||||
acl? ( sys-apps/acl dev-libs/glib:2 )
|
||||
gudev? ( dev-libs/glib:2 )
|
||||
introspection? ( dev-libs/gobject-introspection )
|
||||
action_modeswitch? ( virtual/libusb:0 )
|
||||
>=sys-apps/util-linux-2.16
|
||||
>=sys-libs/glibc-2.10"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
keymap? ( dev-util/gperf )
|
||||
extras? ( dev-util/gperf )
|
||||
dev-util/pkgconfig
|
||||
virtual/os-headers
|
||||
!<sys-kernel/linux-headers-2.6.34
|
||||
test? ( app-text/tree )"
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
hwdb?
|
||||
(
|
||||
>=sys-apps/usbutils-0.82
|
||||
sys-apps/pciutils
|
||||
)
|
||||
extras?
|
||||
(
|
||||
>=sys-apps/usbutils-0.82
|
||||
sys-apps/pciutils
|
||||
)
|
||||
!sys-apps/coldplug
|
||||
!<sys-fs/lvm2-2.02.45
|
||||
!sys-fs/device-mapper
|
||||
>=sys-apps/baselayout-1.12.5"
|
||||
|
||||
if [[ ${PV} == "9999" ]]
|
||||
then
|
||||
# for documentation processing with xsltproc
|
||||
DEPEND="${DEPEND}
|
||||
app-text/docbook-xsl-stylesheets
|
||||
app-text/docbook-xml-dtd
|
||||
dev-util/gtk-doc"
|
||||
fi
|
||||
|
||||
# required kernel options
|
||||
CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
|
||||
~!IDE ~BLK_DEV_BSG"
|
||||
|
||||
# Return values:
|
||||
# 2 - reliable
|
||||
# 1 - unreliable
|
||||
# 0 - too old
|
||||
udev_check_KV() {
|
||||
local ok=0
|
||||
if kernel_is -ge ${KV_reliable//./ }
|
||||
then
|
||||
ok=2
|
||||
elif kernel_is -ge ${KV_min//./ }
|
||||
then
|
||||
ok=1
|
||||
fi
|
||||
return $ok
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
linux-info_pkg_setup
|
||||
|
||||
# always print kernel version requirements
|
||||
ewarn
|
||||
ewarn "${P} does not support Linux kernel before version ${KV_min}!"
|
||||
if [[ ${KV_min} != ${KV_reliable} ]]
|
||||
then
|
||||
ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
|
||||
fi
|
||||
|
||||
udev_check_KV
|
||||
case "$?" in
|
||||
2) einfo "Your kernel version (${KV_FULL}) is new enough to run ${P} reliably." ;;
|
||||
1) ewarn "Your kernel version (${KV_FULL}) is new enough to run ${P},"
|
||||
ewarn "but it may be unreliable in some cases."
|
||||
;;
|
||||
0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
|
||||
;;
|
||||
esac
|
||||
|
||||
KV_FULL_SRC=${KV_FULL}
|
||||
get_running_version
|
||||
udev_check_KV
|
||||
if [[ "$?" = "0" ]]
|
||||
then
|
||||
eerror
|
||||
eerror "udev cannot be restarted after emerging,"
|
||||
eerror "as your running kernel version (${KV_FULL}) is too old."
|
||||
eerror "You really need to use a newer kernel after a reboot!"
|
||||
NO_RESTART=1
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
if [[ ${PV} == "9999" ]]
|
||||
then
|
||||
git-2_src_unpack
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use test && [[ -d "${WORKDIR}"/test/sys ]]
|
||||
then
|
||||
mv "${WORKDIR}"/test/sys "${S}"/test/
|
||||
fi
|
||||
|
||||
# patches go here...
|
||||
|
||||
# backport some patches
|
||||
if [[ -n "${PATCHSET}" ]]
|
||||
then
|
||||
EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" epatch
|
||||
fi
|
||||
|
||||
# change rules back to group uucp instead of dialout for now
|
||||
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
|
||||
-i rules/{rules.d,arch}/*.rules \
|
||||
|| die "failed to change group dialout to uucp"
|
||||
|
||||
if [[ ${PV} != 9999 ]]
|
||||
then
|
||||
# Make sure there is no sudden changes to upstream rules file
|
||||
# (more for my own needs than anything else ...)
|
||||
MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules")
|
||||
MD5=${MD5/ -/}
|
||||
if [[ ${MD5} != a9954d57e97aa0ad2e0ed53899d9559a ]]
|
||||
then
|
||||
eerror "50-udev-default.rules has been updated, please validate!"
|
||||
eerror "md5sum: ${MD5}"
|
||||
die "50-udev-default.rules has been updated, please validate!"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${PV} == 9999 ]]
|
||||
then
|
||||
gtkdocize --copy || die "gtkdocize failed"
|
||||
eautoreconf
|
||||
else
|
||||
elibtoolize
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if ! use extras
|
||||
then
|
||||
econf \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--sysconfdir="${EPREFIX}/etc" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-rootlibdir="${EPREFIX}/$(get_libdir)" \
|
||||
--libexecdir="${EPREFIX}/lib/udev" \
|
||||
--enable-logging \
|
||||
--enable-static \
|
||||
$(use_with selinux) \
|
||||
$(use_enable debug) \
|
||||
$(use_enable rule_generator) \
|
||||
$(use_enable hwdb) \
|
||||
--with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
|
||||
--with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
|
||||
$(use_enable acl udev_acl) \
|
||||
$(use_enable gudev) \
|
||||
$(use_enable introspection) \
|
||||
$(use_enable keymap) \
|
||||
$(use_enable floppy) \
|
||||
$(use_enable edd) \
|
||||
$(use_enable action_modeswitch) \
|
||||
$(systemd_with_unitdir)
|
||||
else
|
||||
econf \
|
||||
--prefix="${EPREFIX}/usr" \
|
||||
--sysconfdir="${EPREFIX}/etc" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--libdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-rootlibdir="${EPREFIX}/$(get_libdir)" \
|
||||
--libexecdir="${EPREFIX}/lib/udev" \
|
||||
--enable-logging \
|
||||
--enable-static \
|
||||
$(use_with selinux) \
|
||||
$(use_enable debug) \
|
||||
--enable-rule_generator \
|
||||
--enable-hwdb \
|
||||
--with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
|
||||
--with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
|
||||
--enable-udev_acl \
|
||||
--enable-gudev \
|
||||
--enable-introspection \
|
||||
--enable-keymap \
|
||||
--enable-floppy \
|
||||
--enable-edd \
|
||||
--enable-action_modeswitch \
|
||||
$(systemd_with_unitdir)
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
filter-flags -fprefetch-loop-arrays
|
||||
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -C "${WORKDIR}/${scriptname}" \
|
||||
DESTDIR="${D}" LIBDIR="${EPREFIX}$(get_libdir)" \
|
||||
LIBUDEV="${EPREFIX}/lib/udev" \
|
||||
MODPROBE_DIR="${EPREFIX}/etc/modprobe.d" \
|
||||
INITD="${EPREFIX}/etc/init.d" \
|
||||
CONFD="${EPREFIX}/etc/conf.d" \
|
||||
KV_min="${KV_min}" KV_reliable="${KV_reliable}" \
|
||||
install
|
||||
|
||||
into /
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
exeinto /lib/udev
|
||||
keepdir /lib/udev/state
|
||||
keepdir /lib/udev/devices
|
||||
|
||||
# create symlinks for these utilities to /sbin
|
||||
# where multipath-tools expect them to be (Bug #168588)
|
||||
dosym "../lib/udev/scsi_id" /sbin/scsi_id
|
||||
|
||||
# Add gentoo stuff to udev.conf
|
||||
echo "# If you need to change mount-options, do it in /etc/fstab" \
|
||||
>> "${ED}"/etc/udev/udev.conf
|
||||
|
||||
# let the dir exist at least
|
||||
keepdir /etc/udev/rules.d
|
||||
|
||||
# Now installing rules
|
||||
cd "${S}"/rules
|
||||
insinto /lib/udev/rules.d/
|
||||
|
||||
# support older kernels
|
||||
doins misc/30-kernel-compat.rules
|
||||
|
||||
# Adding arch specific rules
|
||||
if [[ -f arch/40-${ARCH}.rules ]]
|
||||
then
|
||||
doins "arch/40-${ARCH}.rules"
|
||||
fi
|
||||
cd "${S}"
|
||||
|
||||
insinto /etc/modprobe.d
|
||||
newins "${FILESDIR}"/blacklist-146 blacklist.conf
|
||||
newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
|
||||
|
||||
# documentation
|
||||
dodoc ChangeLog README TODO
|
||||
|
||||
# keep doc in just one directory, Bug #281137
|
||||
rm -rf "${ED}/usr/share/doc/${PN}"
|
||||
if use keymap
|
||||
then
|
||||
dodoc extras/keymap/README.keymap.txt
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local emake_cmd="${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE}"
|
||||
cd "${WORKDIR}/${scriptname}"
|
||||
vecho ">>> Test phase [scripts:test]: ${CATEGORY}/${PF}"
|
||||
if ! $emake_cmd -j1 test
|
||||
then
|
||||
has test $FEATURES && die "scripts: Make test failed. See above for details."
|
||||
has test $FEATURES || eerror "scripts: Make test failed. See above for details."
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
vecho ">>> Test phase [udev:check]: ${CATEGORY}/${PF}"
|
||||
has userpriv $FEATURES && einfo "Disable FEATURES userpriv to run the udev tests"
|
||||
if ! $emake_cmd -j1 check
|
||||
then
|
||||
has test $FEATURES && die "udev: Make test failed. See above for details."
|
||||
has test $FEATURES || eerror "udev: Make test failed. See above for details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# moving old files to support newer modprobe, 12 May 2009
|
||||
local f dir=${EROOT}/etc/modprobe.d/
|
||||
for f in pnp-aliases blacklist; do
|
||||
if [[ -f $dir/$f && ! -f $dir/$f.conf ]]
|
||||
then
|
||||
elog "Moving $dir/$f to $f.conf"
|
||||
mv -f "$dir/$f" "$dir/$f.conf"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -d ${EROOT}/lib/udev-state ]]
|
||||
then
|
||||
mv -f "${EROOT}"/lib/udev-state/* "${ED}"/lib/udev/state/
|
||||
rm -r "${EROOT}"/lib/udev-state
|
||||
fi
|
||||
|
||||
if [[ -f ${EROOT}/etc/udev/udev.config &&
|
||||
! -f ${EROOT}/etc/udev/udev.rules ]]
|
||||
then
|
||||
mv -f "${EROOT}"/etc/udev/udev.config "${EROOT}"/etc/udev/udev.rules
|
||||
fi
|
||||
|
||||
# delete the old udev.hotplug symlink if it is present
|
||||
if [[ -h ${EROOT}/etc/hotplug.d/default/udev.hotplug ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/hotplug.d/default/udev.hotplug
|
||||
fi
|
||||
|
||||
# delete the old wait_for_sysfs.hotplug symlink if it is present
|
||||
if [[ -h ${EROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
|
||||
fi
|
||||
|
||||
# delete the old wait_for_sysfs.hotplug symlink if it is present
|
||||
if [[ -h ${EROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/hotplug.d/default/10-udev.hotplug
|
||||
fi
|
||||
|
||||
has_version "=${CATEGORY}/${PN}-103-r3"
|
||||
previous_equal_to_103_r3=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-104-r5"
|
||||
previous_less_than_104_r5=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-106-r5"
|
||||
previous_less_than_106_r5=$?
|
||||
|
||||
has_version "<${CATEGORY}/${PN}-113"
|
||||
previous_less_than_113=$?
|
||||
}
|
||||
|
||||
# 19 Nov 2008
|
||||
fix_old_persistent_net_rules() {
|
||||
local rules=${EROOT}/etc/udev/rules.d/70-persistent-net.rules
|
||||
[[ -f ${rules} ]] || return
|
||||
|
||||
elog
|
||||
elog "Updating persistent-net rules file"
|
||||
|
||||
# Change ATTRS to ATTR matches, Bug #246927
|
||||
sed -i -e 's/ATTRS{/ATTR{/g' "${rules}"
|
||||
|
||||
# Add KERNEL matches if missing, Bug #246849
|
||||
sed -ri \
|
||||
-e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
|
||||
"${rules}"
|
||||
}
|
||||
|
||||
# See Bug #129204 for a discussion about restarting udevd
|
||||
restart_udevd() {
|
||||
if [[ ${NO_RESTART} = "1" ]]
|
||||
then
|
||||
ewarn "Not restarting udevd, as your kernel is too old!"
|
||||
return
|
||||
fi
|
||||
|
||||
# need to merge to our system
|
||||
[[ ${EROOT} = / ]] || return
|
||||
|
||||
# check if root of init-process is identical to ours (not in chroot)
|
||||
[[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return
|
||||
|
||||
# abort if there is no udevd running
|
||||
[[ -n $(pidof udevd) ]] || return
|
||||
|
||||
# abort if no /dev/.udev exists
|
||||
[[ -e /dev/.udev ]] || return
|
||||
|
||||
elog
|
||||
elog "restarting udevd now."
|
||||
|
||||
killall -15 udevd &>/dev/null
|
||||
sleep 1
|
||||
killall -9 udevd &>/dev/null
|
||||
|
||||
/sbin/udevd --daemon
|
||||
sleep 3
|
||||
if [[ ! -n $(pidof udevd) ]]
|
||||
then
|
||||
eerror "FATAL: udev died, please check your kernel is"
|
||||
eerror "new enough and configured correctly for ${P}."
|
||||
eerror
|
||||
eerror "Please have a look at this before rebooting."
|
||||
eerror "If in doubt, please downgrade udev back to your old version"
|
||||
fi
|
||||
}
|
||||
|
||||
postinst_init_scripts() {
|
||||
local enable_postmount=false
|
||||
|
||||
# FIXME: inconsistent handling of init-scripts here
|
||||
# * udev is added to sysinit in openrc-ebuild
|
||||
# * we add udev-postmount to default in here
|
||||
#
|
||||
|
||||
# If we are building stages, add udev to the sysinit runlevel automatically.
|
||||
if use build
|
||||
then
|
||||
if [[ -x "${EROOT}"/etc/init.d/udev \
|
||||
&& -d "${EROOT}"/etc/runlevels/sysinit ]]
|
||||
then
|
||||
ln -s "${EPREFIX}"/etc/init.d/udev "${EROOT}"/etc/runlevels/sysinit/udev
|
||||
fi
|
||||
enable_postmount=true
|
||||
fi
|
||||
|
||||
# migration to >=openrc-0.4
|
||||
if [[ -e "${EROOT}"/etc/runlevels/sysinit && ! -e "${EROOT}"/etc/runlevels/sysinit/udev ]]
|
||||
then
|
||||
ewarn
|
||||
ewarn "You need to add the udev init script to the runlevel sysinit,"
|
||||
ewarn "else your system will not be able to boot"
|
||||
ewarn "after updating to >=openrc-0.4.0"
|
||||
ewarn "Run this to enable udev for >=openrc-0.4.0:"
|
||||
ewarn "\trc-update add udev sysinit"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
# add udev-postmount to default runlevel instead of that ugly injecting
|
||||
# like a hotplug event, 2009/10/15
|
||||
|
||||
# already enabled?
|
||||
[[ -e "${EROOT}"/etc/runlevels/default/udev-postmount ]] && return
|
||||
|
||||
[[ -e "${EROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true
|
||||
[[ "${EROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true
|
||||
|
||||
if $enable_postmount
|
||||
then
|
||||
local initd=udev-postmount
|
||||
|
||||
if [[ -e ${EROOT}/etc/init.d/${initd} ]] && \
|
||||
[[ ! -e ${EROOT}/etc/runlevels/default/${initd} ]]
|
||||
then
|
||||
ln -snf "${EPREFIX}"/etc/init.d/${initd} "${EROOT}"/etc/runlevels/default/${initd}
|
||||
elog "Auto-adding '${initd}' service to your default runlevel"
|
||||
fi
|
||||
else
|
||||
elog "You should add the udev-postmount service to default runlevel."
|
||||
elog "Run this to add it:"
|
||||
elog "\trc-update add udev-postmount default"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fix_old_persistent_net_rules
|
||||
|
||||
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
|
||||
# So try to remove it here (will only work if empty).
|
||||
rmdir "${EROOT}"/dev/loop 2>/dev/null
|
||||
if [[ -d "${EROOT}"/dev/loop ]]
|
||||
then
|
||||
ewarn "Please make sure your remove /dev/loop,"
|
||||
ewarn "else losetup may be confused when looking for unused devices."
|
||||
fi
|
||||
|
||||
restart_udevd
|
||||
|
||||
postinst_init_scripts
|
||||
|
||||
# people want reminders, I'll give them reminders. Odds are they will
|
||||
# just ignore them anyway...
|
||||
|
||||
# delete 40-scsi-hotplug.rules, it is integrated in 50-udev.rules, 19 Jan 2007
|
||||
if [[ $previous_equal_to_103_r3 = 0 ]] &&
|
||||
[[ -e ${EROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]]
|
||||
then
|
||||
ewarn "Deleting stray 40-scsi-hotplug.rules"
|
||||
ewarn "installed by sys-fs/udev-103-r3"
|
||||
rm -f "${EROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
|
||||
fi
|
||||
|
||||
# Removing some device-nodes we thought we need some time ago, 25 Jan 2007
|
||||
if [[ -d ${EROOT}/lib/udev/devices ]]
|
||||
then
|
||||
rm -f "${EROOT}"/lib/udev/devices/{null,zero,console,urandom}
|
||||
fi
|
||||
|
||||
# Removing some old file, 29 Jan 2007
|
||||
if [[ $previous_less_than_104_r5 = 0 ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/dev.d/net/hotplug.dev
|
||||
rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/net 2>/dev/null
|
||||
fi
|
||||
|
||||
# 19 Mar 2007
|
||||
if [[ $previous_less_than_106_r5 = 0 ]] &&
|
||||
[[ -e ${EROOT}/etc/udev/rules.d/95-net.rules ]]
|
||||
then
|
||||
rm -f "${EROOT}"/etc/udev/rules.d/95-net.rules
|
||||
fi
|
||||
|
||||
# Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
|
||||
if [[ -d ${EROOT}/etc/dev.d ]]
|
||||
then
|
||||
rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/default "${EROOT}"/etc/dev.d 2>/dev/null
|
||||
if [[ -d ${EROOT}/etc/dev.d ]]
|
||||
then
|
||||
ewarn "You still have the directory /etc/dev.d on your system."
|
||||
ewarn "This is no longer used by udev and can be removed."
|
||||
fi
|
||||
fi
|
||||
|
||||
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper
|
||||
# remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
|
||||
if [[ $previous_less_than_113 = 0 ]] &&
|
||||
[[ -f ${EROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
|
||||
! has_version sys-fs/device-mapper
|
||||
then
|
||||
rm -f "${EROOT}"/etc/udev/rules.d/64-device-mapper.rules
|
||||
einfo "Removed unneeded file 64-device-mapper.rules"
|
||||
fi
|
||||
|
||||
# requested in Bug #225033:
|
||||
elog
|
||||
elog "persistent-net does assigning fixed names to network devices."
|
||||
elog "If you have problems with the persistent-net rules,"
|
||||
elog "just delete the rules file"
|
||||
elog "\trm ${EROOT}etc/udev/rules.d/70-persistent-net.rules"
|
||||
elog "and then reboot."
|
||||
elog
|
||||
elog "This may however number your devices in a different way than they are now."
|
||||
|
||||
ewarn
|
||||
ewarn "If you build an initramfs including udev, then please"
|
||||
ewarn "make sure that the /sbin/udevadm binary gets included,"
|
||||
ewarn "and your scripts changed to use it,as it replaces the"
|
||||
ewarn "old helper apps udevinfo, udevtrigger, ..."
|
||||
|
||||
ewarn
|
||||
ewarn "mount options for directory /dev are no longer"
|
||||
ewarn "set in /etc/udev/udev.conf, but in /etc/fstab"
|
||||
ewarn "as for other directories."
|
||||
|
||||
ewarn
|
||||
ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*,"
|
||||
ewarn "then please migrate over to using the device names"
|
||||
ewarn "/dev/md*, /dev/loop* and /dev/ram*."
|
||||
ewarn "The devfs-compat rules have been removed."
|
||||
ewarn "For reference see Bug #269359."
|
||||
|
||||
ewarn
|
||||
ewarn "Rules for /dev/hd* devices have been removed"
|
||||
ewarn "Please migrate to libata."
|
||||
|
||||
elog
|
||||
elog "For more information on udev on Gentoo, writing udev rules, and"
|
||||
elog " fixing known issues visit:"
|
||||
elog " http://www.gentoo.org/doc/en/udev-guide.xml"
|
||||
}
|
@ -1,512 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-197-r4.ebuild,v 1.30 2013/01/31 23:08:05 ago Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
KV_min=2.6.39
|
||||
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs versionator
|
||||
|
||||
if [[ ${PV} = 9999* ]]
|
||||
then
|
||||
EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd"
|
||||
inherit git-2
|
||||
else
|
||||
patchset=1
|
||||
SRC_URI="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz"
|
||||
if [[ -n "${patchset}" ]]
|
||||
then
|
||||
SRC_URI="${SRC_URI}
|
||||
http://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.bz2"
|
||||
fi
|
||||
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
|
||||
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
|
||||
|
||||
LICENSE="LGPL-2.1 MIT GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="acl doc gudev hwdb introspection keymap +kmod selinux static-libs"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
COMMON_DEPEND=">=sys-apps/util-linux-2.20
|
||||
acl? ( sys-apps/acl )
|
||||
gudev? ( >=dev-libs/glib-2 )
|
||||
introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
|
||||
kmod? ( >=sys-apps/kmod-12 )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!<sys-libs/glibc-2.11
|
||||
!<sys-apps/systemd-${PV}"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
virtual/os-headers
|
||||
virtual/pkgconfig
|
||||
!<sys-kernel/linux-headers-${KV_min}
|
||||
doc? ( >=dev-util/gtk-doc-1.18 )
|
||||
hwdb? ( >=sys-apps/hwids-20130114[udev] )
|
||||
keymap? ( dev-util/gperf )"
|
||||
|
||||
if [[ ${PV} = 9999* ]]
|
||||
then
|
||||
DEPEND="${DEPEND}
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxslt
|
||||
dev-util/gperf
|
||||
>=dev-util/intltool-0.50"
|
||||
fi
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!sys-apps/coldplug
|
||||
!<sys-fs/lvm2-2.02.97-r1
|
||||
!sys-fs/device-mapper
|
||||
!<sys-fs/udev-init-scripts-19
|
||||
!<sys-kernel/dracut-017-r1
|
||||
!<sys-kernel/genkernel-3.4.25
|
||||
!<sec-policy/selinux-base-2.20120725-r10"
|
||||
|
||||
PDEPEND=">=virtual/udev-197"
|
||||
|
||||
S=${WORKDIR}/systemd-${PV}
|
||||
|
||||
QA_MULTILIB_PATHS="lib/systemd/systemd-udevd"
|
||||
|
||||
udev_check_KV()
|
||||
{
|
||||
# accept4 came late for ia64
|
||||
use ia64 && KV_min=3.3
|
||||
if kernel_is lt ${KV_min//./ }
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
check_default_rules()
|
||||
{
|
||||
# Make sure there are no sudden changes to upstream rules file
|
||||
# (more for my own needs than anything else ...)
|
||||
local udev_rules_md5=66bb698deeae64ab444b710baf54a412
|
||||
MD5=$(md5sum < "${S}"/rules/50-udev-default.rules)
|
||||
MD5=${MD5/ -/}
|
||||
if [[ ${MD5} != ${udev_rules_md5} ]]
|
||||
then
|
||||
eerror "50-udev-default.rules has been updated, please validate!"
|
||||
eerror "md5sum: ${MD5}"
|
||||
die "50-udev-default.rules has been updated, please validate!"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup()
|
||||
{
|
||||
# required kernel options
|
||||
CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD"
|
||||
ERROR_DEVTMPFS="DEVTMPFS is not set in this kernel. Udev will not run."
|
||||
|
||||
linux-info_pkg_setup
|
||||
|
||||
if ! udev_check_KV
|
||||
then
|
||||
eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
|
||||
eerror "It must be at least ${KV_min}!"
|
||||
fi
|
||||
|
||||
KV_FULL_SRC=${KV_FULL}
|
||||
get_running_version
|
||||
if ! udev_check_KV
|
||||
then
|
||||
eerror
|
||||
eerror "Your running kernel version (${KV_FULL}) is too old"
|
||||
eerror "for this version of udev."
|
||||
eerror "You must upgrade your kernel or downgrade udev."
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
# backport some patches
|
||||
if [[ -n "${patchset}" ]]
|
||||
then
|
||||
EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch
|
||||
fi
|
||||
|
||||
# Remove requirements for gettext and intltool wrt bug #443028
|
||||
if ! has_version dev-util/intltool && ! [[ ${PV} = 9999* ]]; then
|
||||
sed -i \
|
||||
-e '/INTLTOOL_APPLIED_VERSION=/s:=.*:=0.40.0:' \
|
||||
-e '/XML::Parser perl module is required for intltool/s|^|:|' \
|
||||
configure || die
|
||||
eval export INTLTOOL_{EXTRACT,MERGE,UPDATE}=/bin/true
|
||||
eval export {MSG{FMT,MERGE},XGETTEXT}=/bin/true
|
||||
fi
|
||||
|
||||
# apply user patches
|
||||
epatch_user
|
||||
|
||||
# compile with older versions of gcc #451110
|
||||
version_is_at_least 4.6 $(gcc-version) || \
|
||||
sed -i 's:static_assert:alsdjflkasjdfa:' src/shared/macro.h
|
||||
|
||||
# change rules back to group uucp instead of dialout for now
|
||||
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
|
||||
-i rules/*.rules \
|
||||
|| die "failed to change group dialout to uucp"
|
||||
|
||||
if [[ ! -e configure ]]
|
||||
then
|
||||
if use doc
|
||||
then
|
||||
gtkdocize --docdir docs || die "gtkdocize failed"
|
||||
else
|
||||
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
||||
fi
|
||||
eautoreconf
|
||||
else
|
||||
check_default_rules
|
||||
elibtoolize
|
||||
fi
|
||||
|
||||
if [[ ${PV} = 9999* ]]; then
|
||||
# secure_getenv() disable for non-glibc systems wrt bug #443030
|
||||
if ! [[ $(grep -r secure_getenv * | wc -l) -eq 16 ]]; then
|
||||
eerror "The line count for secure_getenv() failed, see bug #443030"
|
||||
die
|
||||
fi
|
||||
|
||||
# gperf disable if keymaps are not requested wrt bug #452760
|
||||
if ! [[ $(grep -i gperf Makefile.am | wc -l) -eq 24 ]]; then
|
||||
eerror "The line count for gperf references failed, see bug 452760"
|
||||
die
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use elibc_glibc; then #443030
|
||||
echo '#define secure_getenv(x) NULL' >> config.h.in
|
||||
sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure()
|
||||
{
|
||||
use keymap || export ac_cv_path_GPERF=true #452760
|
||||
|
||||
local econf_args
|
||||
|
||||
econf_args=(
|
||||
ac_cv_search_cap_init=
|
||||
ac_cv_header_sys_capability_h=yes
|
||||
DBUS_CFLAGS=' '
|
||||
DBUS_LIBS=' '
|
||||
--bindir=/bin
|
||||
--docdir=/usr/share/doc/${PF}
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--with-html-dir=/usr/share/doc/${PF}/html
|
||||
--with-rootprefix=
|
||||
--with-rootlibdir=/$(get_libdir)
|
||||
--disable-audit
|
||||
--disable-coredump
|
||||
--disable-hostnamed
|
||||
--disable-ima
|
||||
--disable-libcryptsetup
|
||||
--disable-localed
|
||||
--disable-logind
|
||||
--disable-myhostname
|
||||
--disable-nls
|
||||
--disable-pam
|
||||
--disable-quotacheck
|
||||
--disable-readahead
|
||||
--enable-split-usr
|
||||
--disable-tcpwrap
|
||||
--disable-timedated
|
||||
--disable-xz
|
||||
--disable-silent-rules
|
||||
$(use_enable acl)
|
||||
$(use_enable doc gtk-doc)
|
||||
$(use_enable gudev)
|
||||
$(use_enable keymap)
|
||||
$(use_enable kmod)
|
||||
$(use_enable selinux)
|
||||
$(use_enable static-libs static)
|
||||
)
|
||||
if use introspection; then
|
||||
econf_args+=(
|
||||
--enable-introspection=$(usex introspection)
|
||||
)
|
||||
fi
|
||||
econf "${econf_args[@]}"
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
|
||||
emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
|
||||
local targets=(
|
||||
systemd-udevd
|
||||
udevadm
|
||||
libudev.la
|
||||
libsystemd-daemon.la
|
||||
ata_id
|
||||
cdrom_id
|
||||
collect
|
||||
scsi_id
|
||||
v4l_id
|
||||
accelerometer
|
||||
mtd_probe
|
||||
man/sd_is_fifo.3
|
||||
man/sd_notify.3
|
||||
man/sd_listen_fds.3
|
||||
man/sd-daemon.3
|
||||
man/udev.7
|
||||
man/udevadm.8
|
||||
man/systemd-udevd.8
|
||||
man/systemd-udevd.service.8
|
||||
)
|
||||
use keymap && targets+=( keymap )
|
||||
use gudev && targets+=( libgudev-1.0.la )
|
||||
|
||||
emake "${targets[@]}"
|
||||
if use doc
|
||||
then
|
||||
emake -C docs/libudev
|
||||
use gudev && emake -C docs/gudev
|
||||
fi
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
local lib_LTLIBRARIES="libsystemd-daemon.la libudev.la" \
|
||||
pkgconfiglib_DATA="src/libsystemd-daemon/libsystemd-daemon.pc src/libudev/libudev.pc"
|
||||
|
||||
local targets=(
|
||||
install-libLTLIBRARIES
|
||||
install-includeHEADERS
|
||||
install-libgudev_includeHEADERS
|
||||
install-binPROGRAMS
|
||||
install-rootlibexecPROGRAMS
|
||||
install-udevlibexecPROGRAMS
|
||||
install-dist_systemunitDATA
|
||||
install-dist_udevconfDATA
|
||||
install-dist_udevhomeSCRIPTS
|
||||
install-dist_udevkeymapDATA
|
||||
install-dist_udevkeymapforcerelDATA
|
||||
install-dist_udevrulesDATA
|
||||
install-girDATA
|
||||
install-man3
|
||||
install-man7
|
||||
install-man8
|
||||
install-nodist_systemunitDATA
|
||||
install-pkgconfiglibDATA
|
||||
install-sharepkgconfigDATA
|
||||
install-typelibsDATA
|
||||
install-dist_docDATA
|
||||
udev-confdirs
|
||||
systemd-install-hook
|
||||
libudev-install-hook
|
||||
libsystemd-daemon-install-hook
|
||||
install-pkgincludeHEADERS
|
||||
)
|
||||
|
||||
if use gudev
|
||||
then
|
||||
lib_LTLIBRARIES+=" libgudev-1.0.la"
|
||||
pkgconfiglib_DATA+=" src/gudev/gudev-1.0.pc"
|
||||
fi
|
||||
|
||||
# add final values of variables:
|
||||
targets+=(
|
||||
rootlibexec_PROGRAMS=systemd-udevd
|
||||
bin_PROGRAMS=udevadm
|
||||
lib_LTLIBRARIES="${lib_LTLIBRARIES}"
|
||||
MANPAGES="man/sd-daemon.3 man/sd_notify.3 man/sd_listen_fds.3 \
|
||||
man/sd_is_fifo.3 man/sd_booted.3 man/udev.7 man/udevadm.8 \
|
||||
man/systemd-udevd.service.8"
|
||||
MANPAGES_ALIAS="man/sd_is_socket.3 man/sd_is_socket_unix.3 \
|
||||
man/sd_is_socket_inet.3 man/sd_is_mq.3 man/sd_notifyf.3 \
|
||||
man/SD_LISTEN_FDS_START.3 man/SD_EMERG.3 man/SD_ALERT.3 \
|
||||
man/SD_CRIT.3 man/SD_ERR.3 man/SD_WARNING.3 man/SD_NOTICE.3 \
|
||||
man/SD_INFO.3 man/SD_DEBUG.3 man/systemd-udevd.8"
|
||||
dist_systemunit_DATA="units/systemd-udevd-control.socket \
|
||||
units/systemd-udevd-kernel.socket"
|
||||
nodist_systemunit_DATA="units/systemd-udevd.service \
|
||||
units/systemd-udev-trigger.service \
|
||||
units/systemd-udev-settle.service"
|
||||
pkgconfiglib_DATA="${pkgconfiglib_DATA}"
|
||||
systemunitdir="$(systemd_get_unitdir)"
|
||||
pkginclude_HEADERS="src/systemd/sd-daemon.h"
|
||||
)
|
||||
emake -j1 DESTDIR="${D}" "${targets[@]}"
|
||||
if use doc
|
||||
then
|
||||
emake -C docs/libudev DESTDIR="${D}" install
|
||||
use gudev && emake -C docs/gudev DESTDIR="${D}" install
|
||||
fi
|
||||
dodoc TODO
|
||||
|
||||
prune_libtool_files --all
|
||||
rm -f "${D}"/lib/udev/rules.d/99-systemd.rules
|
||||
rm -rf "${D}"/usr/share/doc/${PF}/LICENSE.*
|
||||
|
||||
# install gentoo-specific rules
|
||||
insinto /lib/udev/rules.d
|
||||
doins "${FILESDIR}"/40-gentoo.rules
|
||||
|
||||
# install udevadm symlink
|
||||
dosym ../bin/udevadm /sbin/udevadm
|
||||
|
||||
# move udevd where it should be and remove unlogical /lib/systemd
|
||||
mv "${ED}"/lib/systemd/systemd-udevd "${ED}"/sbin/udevd || die
|
||||
rm -r "${ED}"/lib/systemd
|
||||
|
||||
# install compability symlink for systemd and initramfs tools
|
||||
dosym /sbin/udevd "$(systemd_get_utildir)"/systemd-udevd
|
||||
find "${ED}/$(systemd_get_unitdir)" -name '*.service' -exec \
|
||||
sed -i -e "/ExecStart/s:/lib/systemd:$(systemd_get_utildir):" {} +
|
||||
|
||||
docinto gentoo
|
||||
dodoc "${FILESDIR}"/80-net-name-slot.rules
|
||||
docompress -x /usr/share/doc/${PF}/gentoo/80-net-name-slot.rules
|
||||
}
|
||||
|
||||
pkg_preinst()
|
||||
{
|
||||
local htmldir
|
||||
for htmldir in gudev libudev; do
|
||||
if [[ -d ${ROOT}usr/share/gtk-doc/html/${htmldir} ]]
|
||||
then
|
||||
rm -rf "${ROOT}"usr/share/gtk-doc/html/${htmldir}
|
||||
fi
|
||||
if [[ -d ${D}/usr/share/doc/${PF}/html/${htmldir} ]]
|
||||
then
|
||||
dosym ../../doc/${PF}/html/${htmldir} \
|
||||
/usr/share/gtk-doc/html/${htmldir}
|
||||
fi
|
||||
done
|
||||
preserve_old_lib /{,usr/}$(get_libdir)/libudev$(get_libname 0)
|
||||
}
|
||||
|
||||
# This function determines if a directory is a mount point.
|
||||
# It was lifted from dracut.
|
||||
ismounted()
|
||||
{
|
||||
while read a m a; do
|
||||
[[ $m = $1 ]] && return 0
|
||||
done < "${ROOT}"/proc/mounts
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
mkdir -p "${ROOT}"run
|
||||
|
||||
net_rules="${ROOT}"etc/udev/rules.d/80-net-name-slot.rules
|
||||
copy_net_rules() {
|
||||
[[ -f ${net_rules} ]] || cp "${ROOT}"usr/share/doc/${PF}/gentoo/80-net-name-slot.rules "${net_rules}"
|
||||
}
|
||||
|
||||
copy_net_rules
|
||||
|
||||
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
|
||||
# So try to remove it here (will only work if empty).
|
||||
rmdir "${ROOT}"dev/loop 2>/dev/null
|
||||
if [[ -d ${ROOT}dev/loop ]]
|
||||
then
|
||||
ewarn "Please make sure your remove /dev/loop,"
|
||||
ewarn "else losetup may be confused when looking for unused devices."
|
||||
fi
|
||||
|
||||
# people want reminders, I'll give them reminders. Odds are they will
|
||||
# just ignore them anyway...
|
||||
|
||||
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper
|
||||
# remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
|
||||
if [[ -f ${ROOT}etc/udev/rules.d/64-device-mapper.rules ]] &&
|
||||
! has_version sys-fs/device-mapper
|
||||
then
|
||||
rm -f "${ROOT}"etc/udev/rules.d/64-device-mapper.rules
|
||||
einfo "Removed unneeded file 64-device-mapper.rules"
|
||||
fi
|
||||
|
||||
if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 189 ]]; then
|
||||
ewarn
|
||||
ewarn "Upstream has removed the persistent-cd rules"
|
||||
ewarn "generator. If you need persistent names for these devices,"
|
||||
ewarn "place udev rules for them in ${ROOT}etc/udev/rules.d."
|
||||
fi
|
||||
|
||||
if ismounted /usr
|
||||
then
|
||||
ewarn
|
||||
ewarn "Your system has /usr on a separate partition. This means"
|
||||
ewarn "you will need to use an initramfs to pre-mount /usr before"
|
||||
ewarn "udev runs."
|
||||
ewarn
|
||||
ewarn "If this is not set up before your next reboot, udev may work;"
|
||||
ewarn "However, you also may experience failures which are very"
|
||||
ewarn "difficult to troubleshoot."
|
||||
ewarn
|
||||
ewarn "For a more detailed explanation, see the following URL:"
|
||||
ewarn "http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken"
|
||||
ewarn
|
||||
ewarn "For more information on setting up an initramfs, see the"
|
||||
ewarn "following URL:"
|
||||
ewarn "http://www.gentoo.org/doc/en/initramfs-guide.xml"
|
||||
fi
|
||||
|
||||
if [ -n "${net_rules}" ]; then
|
||||
ewarn
|
||||
ewarn "udev-197 and newer introduces a new method of naming network"
|
||||
ewarn "interfaces. The new names are a very significant change, so"
|
||||
ewarn "they are disabled by default on live systems."
|
||||
ewarn "Please see the contents of ${net_rules} for more"
|
||||
ewarn "information on this feature."
|
||||
fi
|
||||
|
||||
local fstab="${ROOT}"etc/fstab dev path fstype rest
|
||||
while read -r dev path fstype rest; do
|
||||
if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then
|
||||
ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs"
|
||||
ewarn "filesystem. Otherwise udev won't be able to boot."
|
||||
ewarn "See, http://bugs.gentoo.org/453186"
|
||||
fi
|
||||
done < "${fstab}"
|
||||
|
||||
if [[ -d ${ROOT}usr/lib/udev ]]
|
||||
then
|
||||
ewarn
|
||||
ewarn "Please re-emerge all packages on your system which install"
|
||||
ewarn "rules and helpers in /usr/lib/udev. They should now be in"
|
||||
ewarn "/lib/udev."
|
||||
ewarn
|
||||
ewarn "One way to do this is to run the following command:"
|
||||
ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
|
||||
ewarn "Note that qfile can be found in app-portage/portage-utils"
|
||||
fi
|
||||
|
||||
old_net_rules=${ROOT}etc/udev/rules.d/70-persistent-net.rules
|
||||
if [[ -f ${old_net_rules} ]]; then
|
||||
ewarn "You still have ${old_net_rules} in place from previous udev release."
|
||||
ewarn "Upstream has removed the possibility of renaming to existing"
|
||||
ewarn "network interfaces. For example, it's not possible to assign based"
|
||||
ewarn "on MAC address to existing interface eth0."
|
||||
ewarn "See http://bugs.gentoo.org/453494 for more information."
|
||||
ewarn "Rename your file to something else starting with 70- to silence"
|
||||
ewarn "this warning."
|
||||
fi
|
||||
|
||||
ewarn
|
||||
ewarn "You need to restart udev as soon as possible to make the upgrade go"
|
||||
ewarn "into effect."
|
||||
ewarn "The method you use to do this depends on your init system."
|
||||
ewarn
|
||||
|
||||
preserve_old_lib_notify /{,usr/}$(get_libdir)/libudev$(get_libname 0)
|
||||
|
||||
elog
|
||||
elog "For more information on udev on Gentoo, writing udev rules, and"
|
||||
elog " fixing known issues visit:"
|
||||
elog " http://www.gentoo.org/doc/en/udev-guide.xml"
|
||||
|
||||
use hwdb && udevadm hwdb --update
|
||||
}
|
@ -1,524 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-197-r5.ebuild,v 1.2 2013/01/31 10:38:57 ssuominen Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
KV_min=2.6.39
|
||||
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs versionator
|
||||
|
||||
if [[ ${PV} = 9999* ]]
|
||||
then
|
||||
EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd"
|
||||
inherit git-2
|
||||
else
|
||||
patchset=1
|
||||
SRC_URI="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz"
|
||||
if [[ -n "${patchset}" ]]
|
||||
then
|
||||
SRC_URI="${SRC_URI}
|
||||
http://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.bz2"
|
||||
fi
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
|
||||
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
|
||||
|
||||
LICENSE="LGPL-2.1 MIT GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="acl doc gudev hwdb introspection keymap +kmod +openrc selinux static-libs"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
COMMON_DEPEND=">=sys-apps/util-linux-2.20
|
||||
acl? ( sys-apps/acl )
|
||||
gudev? ( >=dev-libs/glib-2 )
|
||||
introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
|
||||
kmod? ( >=sys-apps/kmod-12 )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!<sys-libs/glibc-2.11
|
||||
!<sys-apps/systemd-${PV}"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
virtual/os-headers
|
||||
virtual/pkgconfig
|
||||
!<sys-kernel/linux-headers-${KV_min}
|
||||
doc? ( >=dev-util/gtk-doc-1.18 )
|
||||
hwdb? ( >=sys-apps/hwids-20130114[udev] )
|
||||
keymap? ( dev-util/gperf )"
|
||||
|
||||
if [[ ${PV} = 9999* ]]
|
||||
then
|
||||
DEPEND="${DEPEND}
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxslt
|
||||
dev-util/gperf
|
||||
>=dev-util/intltool-0.50"
|
||||
fi
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
openrc? ( !<sys-apps/openrc-0.9.9 )
|
||||
!sys-apps/coldplug
|
||||
!<sys-fs/lvm2-2.02.97-r1
|
||||
!sys-fs/device-mapper
|
||||
!<sys-fs/udev-init-scripts-19
|
||||
!<sys-kernel/dracut-017-r1
|
||||
!<sys-kernel/genkernel-3.4.25
|
||||
!<sec-policy/selinux-base-2.20120725-r10"
|
||||
|
||||
PDEPEND=">=virtual/udev-197
|
||||
openrc? ( >=sys-fs/udev-init-scripts-19-r1 )"
|
||||
|
||||
S=${WORKDIR}/systemd-${PV}
|
||||
|
||||
QA_MULTILIB_PATHS="lib/systemd/systemd-udevd"
|
||||
|
||||
udev_check_KV()
|
||||
{
|
||||
# accept4 came late for ia64
|
||||
use ia64 && KV_min=3.3
|
||||
if kernel_is lt ${KV_min//./ }
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
check_default_rules()
|
||||
{
|
||||
# Make sure there are no sudden changes to upstream rules file
|
||||
# (more for my own needs than anything else ...)
|
||||
local udev_rules_md5=66bb698deeae64ab444b710baf54a412
|
||||
MD5=$(md5sum < "${S}"/rules/50-udev-default.rules)
|
||||
MD5=${MD5/ -/}
|
||||
if [[ ${MD5} != ${udev_rules_md5} ]]
|
||||
then
|
||||
eerror "50-udev-default.rules has been updated, please validate!"
|
||||
eerror "md5sum: ${MD5}"
|
||||
die "50-udev-default.rules has been updated, please validate!"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup()
|
||||
{
|
||||
# required kernel options
|
||||
CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD"
|
||||
ERROR_DEVTMPFS="DEVTMPFS is not set in this kernel. Udev will not run."
|
||||
|
||||
linux-info_pkg_setup
|
||||
|
||||
if ! udev_check_KV
|
||||
then
|
||||
eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
|
||||
eerror "It must be at least ${KV_min}!"
|
||||
fi
|
||||
|
||||
KV_FULL_SRC=${KV_FULL}
|
||||
get_running_version
|
||||
if ! udev_check_KV
|
||||
then
|
||||
eerror
|
||||
eerror "Your running kernel version (${KV_FULL}) is too old"
|
||||
eerror "for this version of udev."
|
||||
eerror "You must upgrade your kernel or downgrade udev."
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
# backport some patches
|
||||
if [[ -n "${patchset}" ]]
|
||||
then
|
||||
EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch
|
||||
fi
|
||||
|
||||
# Remove requirements for gettext and intltool wrt bug #443028
|
||||
if ! has_version dev-util/intltool && ! [[ ${PV} = 9999* ]]; then
|
||||
sed -i \
|
||||
-e '/INTLTOOL_APPLIED_VERSION=/s:=.*:=0.40.0:' \
|
||||
-e '/XML::Parser perl module is required for intltool/s|^|:|' \
|
||||
configure || die
|
||||
eval export INTLTOOL_{EXTRACT,MERGE,UPDATE}=/bin/true
|
||||
eval export {MSG{FMT,MERGE},XGETTEXT}=/bin/true
|
||||
fi
|
||||
|
||||
# apply user patches
|
||||
epatch_user
|
||||
|
||||
# compile with older versions of gcc #451110
|
||||
version_is_at_least 4.6 $(gcc-version) || \
|
||||
sed -i 's:static_assert:alsdjflkasjdfa:' src/shared/macro.h
|
||||
|
||||
# change rules back to group uucp instead of dialout for now
|
||||
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
|
||||
-i rules/*.rules \
|
||||
|| die "failed to change group dialout to uucp"
|
||||
|
||||
if [[ ! -e configure ]]
|
||||
then
|
||||
if use doc
|
||||
then
|
||||
gtkdocize --docdir docs || die "gtkdocize failed"
|
||||
else
|
||||
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
||||
fi
|
||||
eautoreconf
|
||||
else
|
||||
check_default_rules
|
||||
elibtoolize
|
||||
fi
|
||||
|
||||
if [[ ${PV} = 9999* ]]; then
|
||||
# secure_getenv() disable for non-glibc systems wrt bug #443030
|
||||
if ! [[ $(grep -r secure_getenv * | wc -l) -eq 16 ]]; then
|
||||
eerror "The line count for secure_getenv() failed, see bug #443030"
|
||||
die
|
||||
fi
|
||||
|
||||
# gperf disable if keymaps are not requested wrt bug #452760
|
||||
if ! [[ $(grep -i gperf Makefile.am | wc -l) -eq 24 ]]; then
|
||||
eerror "The line count for gperf references failed, see bug 452760"
|
||||
die
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use elibc_glibc; then #443030
|
||||
echo '#define secure_getenv(x) NULL' >> config.h.in
|
||||
sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure()
|
||||
{
|
||||
use keymap || export ac_cv_path_GPERF=true #452760
|
||||
|
||||
local econf_args
|
||||
|
||||
econf_args=(
|
||||
ac_cv_search_cap_init=
|
||||
ac_cv_header_sys_capability_h=yes
|
||||
DBUS_CFLAGS=' '
|
||||
DBUS_LIBS=' '
|
||||
--bindir=/bin
|
||||
--docdir=/usr/share/doc/${PF}
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--with-html-dir=/usr/share/doc/${PF}/html
|
||||
--with-rootprefix=
|
||||
--with-rootlibdir=/$(get_libdir)
|
||||
--disable-audit
|
||||
--disable-coredump
|
||||
--disable-hostnamed
|
||||
--disable-ima
|
||||
--disable-libcryptsetup
|
||||
--disable-localed
|
||||
--disable-logind
|
||||
--disable-myhostname
|
||||
--disable-nls
|
||||
--disable-pam
|
||||
--disable-quotacheck
|
||||
--disable-readahead
|
||||
--enable-split-usr
|
||||
--disable-tcpwrap
|
||||
--disable-timedated
|
||||
--disable-xz
|
||||
--disable-silent-rules
|
||||
$(use_enable acl)
|
||||
$(use_enable doc gtk-doc)
|
||||
$(use_enable gudev)
|
||||
$(use_enable keymap)
|
||||
$(use_enable kmod)
|
||||
$(use_enable selinux)
|
||||
$(use_enable static-libs static)
|
||||
)
|
||||
if use introspection; then
|
||||
econf_args+=(
|
||||
--enable-introspection=$(usex introspection)
|
||||
)
|
||||
fi
|
||||
econf "${econf_args[@]}"
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
|
||||
emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
|
||||
local targets=(
|
||||
systemd-udevd
|
||||
udevadm
|
||||
libudev.la
|
||||
libsystemd-daemon.la
|
||||
ata_id
|
||||
cdrom_id
|
||||
collect
|
||||
scsi_id
|
||||
v4l_id
|
||||
accelerometer
|
||||
mtd_probe
|
||||
man/sd_is_fifo.3
|
||||
man/sd_notify.3
|
||||
man/sd_listen_fds.3
|
||||
man/sd-daemon.3
|
||||
man/udev.7
|
||||
man/udevadm.8
|
||||
man/systemd-udevd.8
|
||||
man/systemd-udevd.service.8
|
||||
)
|
||||
use keymap && targets+=( keymap )
|
||||
use gudev && targets+=( libgudev-1.0.la )
|
||||
|
||||
emake "${targets[@]}"
|
||||
if use doc
|
||||
then
|
||||
emake -C docs/libudev
|
||||
use gudev && emake -C docs/gudev
|
||||
fi
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
local lib_LTLIBRARIES="libsystemd-daemon.la libudev.la" \
|
||||
pkgconfiglib_DATA="src/libsystemd-daemon/libsystemd-daemon.pc src/libudev/libudev.pc"
|
||||
|
||||
local targets=(
|
||||
install-libLTLIBRARIES
|
||||
install-includeHEADERS
|
||||
install-libgudev_includeHEADERS
|
||||
install-binPROGRAMS
|
||||
install-rootlibexecPROGRAMS
|
||||
install-udevlibexecPROGRAMS
|
||||
install-dist_systemunitDATA
|
||||
install-dist_udevconfDATA
|
||||
install-dist_udevhomeSCRIPTS
|
||||
install-dist_udevkeymapDATA
|
||||
install-dist_udevkeymapforcerelDATA
|
||||
install-dist_udevrulesDATA
|
||||
install-girDATA
|
||||
install-man3
|
||||
install-man7
|
||||
install-man8
|
||||
install-nodist_systemunitDATA
|
||||
install-pkgconfiglibDATA
|
||||
install-sharepkgconfigDATA
|
||||
install-typelibsDATA
|
||||
install-dist_docDATA
|
||||
udev-confdirs
|
||||
systemd-install-hook
|
||||
libudev-install-hook
|
||||
libsystemd-daemon-install-hook
|
||||
install-pkgincludeHEADERS
|
||||
)
|
||||
|
||||
if use gudev
|
||||
then
|
||||
lib_LTLIBRARIES+=" libgudev-1.0.la"
|
||||
pkgconfiglib_DATA+=" src/gudev/gudev-1.0.pc"
|
||||
fi
|
||||
|
||||
# add final values of variables:
|
||||
targets+=(
|
||||
rootlibexec_PROGRAMS=systemd-udevd
|
||||
bin_PROGRAMS=udevadm
|
||||
lib_LTLIBRARIES="${lib_LTLIBRARIES}"
|
||||
MANPAGES="man/sd-daemon.3 man/sd_notify.3 man/sd_listen_fds.3 \
|
||||
man/sd_is_fifo.3 man/sd_booted.3 man/udev.7 man/udevadm.8 \
|
||||
man/systemd-udevd.service.8"
|
||||
MANPAGES_ALIAS="man/sd_is_socket.3 man/sd_is_socket_unix.3 \
|
||||
man/sd_is_socket_inet.3 man/sd_is_mq.3 man/sd_notifyf.3 \
|
||||
man/SD_LISTEN_FDS_START.3 man/SD_EMERG.3 man/SD_ALERT.3 \
|
||||
man/SD_CRIT.3 man/SD_ERR.3 man/SD_WARNING.3 man/SD_NOTICE.3 \
|
||||
man/SD_INFO.3 man/SD_DEBUG.3 man/systemd-udevd.8"
|
||||
dist_systemunit_DATA="units/systemd-udevd-control.socket \
|
||||
units/systemd-udevd-kernel.socket"
|
||||
nodist_systemunit_DATA="units/systemd-udevd.service \
|
||||
units/systemd-udev-trigger.service \
|
||||
units/systemd-udev-settle.service"
|
||||
pkgconfiglib_DATA="${pkgconfiglib_DATA}"
|
||||
systemunitdir="$(systemd_get_unitdir)"
|
||||
pkginclude_HEADERS="src/systemd/sd-daemon.h"
|
||||
)
|
||||
emake -j1 DESTDIR="${D}" "${targets[@]}"
|
||||
if use doc
|
||||
then
|
||||
emake -C docs/libudev DESTDIR="${D}" install
|
||||
use gudev && emake -C docs/gudev DESTDIR="${D}" install
|
||||
fi
|
||||
dodoc TODO
|
||||
|
||||
prune_libtool_files --all
|
||||
rm -f "${D}"/lib/udev/rules.d/99-systemd.rules
|
||||
rm -rf "${D}"/usr/share/doc/${PF}/LICENSE.*
|
||||
|
||||
# install gentoo-specific rules
|
||||
insinto /lib/udev/rules.d
|
||||
doins "${FILESDIR}"/40-gentoo.rules
|
||||
|
||||
# install udevadm symlink
|
||||
dosym ../bin/udevadm /sbin/udevadm
|
||||
|
||||
# move udevd where it should be and remove unlogical /lib/systemd
|
||||
mv "${ED}"/lib/systemd/systemd-udevd "${ED}"/sbin/udevd || die
|
||||
rm -r "${ED}"/lib/systemd
|
||||
|
||||
# install compability symlink for systemd and initramfs tools
|
||||
dosym /sbin/udevd "$(systemd_get_utildir)"/systemd-udevd
|
||||
find "${ED}/$(systemd_get_unitdir)" -name '*.service' -exec \
|
||||
sed -i -e "/ExecStart/s:/lib/systemd:$(systemd_get_utildir):" {} +
|
||||
|
||||
docinto gentoo
|
||||
dodoc "${FILESDIR}"/80-net-name-slot.rules
|
||||
docompress -x /usr/share/doc/${PF}/gentoo/80-net-name-slot.rules
|
||||
}
|
||||
|
||||
pkg_preinst()
|
||||
{
|
||||
local htmldir
|
||||
for htmldir in gudev libudev; do
|
||||
if [[ -d ${ROOT}usr/share/gtk-doc/html/${htmldir} ]]
|
||||
then
|
||||
rm -rf "${ROOT}"usr/share/gtk-doc/html/${htmldir}
|
||||
fi
|
||||
if [[ -d ${D}/usr/share/doc/${PF}/html/${htmldir} ]]
|
||||
then
|
||||
dosym ../../doc/${PF}/html/${htmldir} \
|
||||
/usr/share/gtk-doc/html/${htmldir}
|
||||
fi
|
||||
done
|
||||
preserve_old_lib /{,usr/}$(get_libdir)/libudev$(get_libname 0)
|
||||
}
|
||||
|
||||
# This function determines if a directory is a mount point.
|
||||
# It was lifted from dracut.
|
||||
ismounted()
|
||||
{
|
||||
while read a m a; do
|
||||
[[ $m = $1 ]] && return 0
|
||||
done < "${ROOT}"/proc/mounts
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
mkdir -p "${ROOT}"run
|
||||
|
||||
net_rules="${ROOT}"etc/udev/rules.d/80-net-name-slot.rules
|
||||
copy_net_rules() {
|
||||
[[ -f ${net_rules} ]] || cp "${ROOT}"usr/share/doc/${PF}/gentoo/80-net-name-slot.rules "${net_rules}"
|
||||
}
|
||||
|
||||
if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 197 ]]; then
|
||||
ewarn "Because this is a upgrade we disable the new predictable network interface"
|
||||
ewarn "name scheme by default."
|
||||
copy_net_rules
|
||||
fi
|
||||
|
||||
if has_version sys-apps/biosdevname; then
|
||||
ewarn "Because sys-apps/biosdevname is installed we disable the new predictable"
|
||||
ewarn "network interface name scheme by default."
|
||||
copy_net_rules
|
||||
fi
|
||||
|
||||
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
|
||||
# So try to remove it here (will only work if empty).
|
||||
rmdir "${ROOT}"dev/loop 2>/dev/null
|
||||
if [[ -d ${ROOT}dev/loop ]]
|
||||
then
|
||||
ewarn "Please make sure your remove /dev/loop,"
|
||||
ewarn "else losetup may be confused when looking for unused devices."
|
||||
fi
|
||||
|
||||
# people want reminders, I'll give them reminders. Odds are they will
|
||||
# just ignore them anyway...
|
||||
|
||||
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper
|
||||
# remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
|
||||
if [[ -f ${ROOT}etc/udev/rules.d/64-device-mapper.rules ]] &&
|
||||
! has_version sys-fs/device-mapper
|
||||
then
|
||||
rm -f "${ROOT}"etc/udev/rules.d/64-device-mapper.rules
|
||||
einfo "Removed unneeded file 64-device-mapper.rules"
|
||||
fi
|
||||
|
||||
if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 189 ]]; then
|
||||
ewarn
|
||||
ewarn "Upstream has removed the persistent-cd rules"
|
||||
ewarn "generator. If you need persistent names for these devices,"
|
||||
ewarn "place udev rules for them in ${ROOT}etc/udev/rules.d."
|
||||
fi
|
||||
|
||||
if ismounted /usr
|
||||
then
|
||||
ewarn
|
||||
ewarn "Your system has /usr on a separate partition. This means"
|
||||
ewarn "you will need to use an initramfs to pre-mount /usr before"
|
||||
ewarn "udev runs."
|
||||
ewarn
|
||||
ewarn "If this is not set up before your next reboot, udev may work;"
|
||||
ewarn "However, you also may experience failures which are very"
|
||||
ewarn "difficult to troubleshoot."
|
||||
ewarn
|
||||
ewarn "For a more detailed explanation, see the following URL:"
|
||||
ewarn "http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken"
|
||||
ewarn
|
||||
ewarn "For more information on setting up an initramfs, see the"
|
||||
ewarn "following URL:"
|
||||
ewarn "http://www.gentoo.org/doc/en/initramfs-guide.xml"
|
||||
fi
|
||||
|
||||
if [ -n "${net_rules}" ]; then
|
||||
ewarn
|
||||
ewarn "udev-197 and newer introduces a new method of naming network"
|
||||
ewarn "interfaces. The new names are a very significant change, so"
|
||||
ewarn "they are disabled by default on live systems."
|
||||
ewarn "Please see the contents of ${net_rules} for more"
|
||||
ewarn "information on this feature."
|
||||
fi
|
||||
|
||||
local fstab="${ROOT}"etc/fstab dev path fstype rest
|
||||
while read -r dev path fstype rest; do
|
||||
if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then
|
||||
ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs"
|
||||
ewarn "filesystem. Otherwise udev won't be able to boot."
|
||||
ewarn "See, http://bugs.gentoo.org/453186"
|
||||
fi
|
||||
done < "${fstab}"
|
||||
|
||||
if [[ -d ${ROOT}usr/lib/udev ]]
|
||||
then
|
||||
ewarn
|
||||
ewarn "Please re-emerge all packages on your system which install"
|
||||
ewarn "rules and helpers in /usr/lib/udev. They should now be in"
|
||||
ewarn "/lib/udev."
|
||||
ewarn
|
||||
ewarn "One way to do this is to run the following command:"
|
||||
ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
|
||||
ewarn "Note that qfile can be found in app-portage/portage-utils"
|
||||
fi
|
||||
|
||||
old_net_rules=${ROOT}etc/udev/rules.d/70-persistent-net.rules
|
||||
if [[ -f ${old_net_rules} ]]; then
|
||||
ewarn "You still have ${old_net_rules} in place from previous udev release."
|
||||
ewarn "Upstream has removed the possibility of renaming to existing"
|
||||
ewarn "network interfaces. For example, it's not possible to assign based"
|
||||
ewarn "on MAC address to existing interface eth0."
|
||||
ewarn "See http://bugs.gentoo.org/453494 for more information."
|
||||
ewarn "Rename your file to something else starting with 70- to silence"
|
||||
ewarn "this warning."
|
||||
fi
|
||||
|
||||
ewarn
|
||||
ewarn "You need to restart udev as soon as possible to make the upgrade go"
|
||||
ewarn "into effect."
|
||||
ewarn "The method you use to do this depends on your init system."
|
||||
ewarn
|
||||
|
||||
preserve_old_lib_notify /{,usr/}$(get_libdir)/libudev$(get_libname 0)
|
||||
|
||||
elog
|
||||
elog "For more information on udev on Gentoo, writing udev rules, and"
|
||||
elog " fixing known issues visit:"
|
||||
elog " http://www.gentoo.org/doc/en/udev-guide.xml"
|
||||
|
||||
use hwdb && udevadm hwdb --update
|
||||
}
|
@ -1,528 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-197-r6.ebuild,v 1.3 2013/02/03 06:33:36 ssuominen Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
KV_min=2.6.39
|
||||
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs versionator
|
||||
|
||||
if [[ ${PV} = 9999* ]]
|
||||
then
|
||||
EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd"
|
||||
inherit git-2
|
||||
else
|
||||
patchset=1
|
||||
SRC_URI="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz"
|
||||
if [[ -n "${patchset}" ]]
|
||||
then
|
||||
SRC_URI="${SRC_URI}
|
||||
http://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.bz2"
|
||||
fi
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
|
||||
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
|
||||
|
||||
LICENSE="LGPL-2.1 MIT GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="acl doc gudev hwdb introspection keymap +kmod +openrc selinux static-libs"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
COMMON_DEPEND=">=sys-apps/util-linux-2.20
|
||||
acl? ( sys-apps/acl )
|
||||
gudev? ( >=dev-libs/glib-2 )
|
||||
introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
|
||||
kmod? ( >=sys-apps/kmod-12 )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!<sys-libs/glibc-2.11
|
||||
!<sys-apps/systemd-${PV}"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
virtual/os-headers
|
||||
virtual/pkgconfig
|
||||
!<sys-kernel/linux-headers-${KV_min}
|
||||
doc? ( >=dev-util/gtk-doc-1.18 )
|
||||
hwdb? ( >=sys-apps/hwids-20130114[udev] )
|
||||
keymap? ( dev-util/gperf )"
|
||||
|
||||
if [[ ${PV} = 9999* ]]
|
||||
then
|
||||
DEPEND="${DEPEND}
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxslt
|
||||
dev-util/gperf
|
||||
>=dev-util/intltool-0.50"
|
||||
fi
|
||||
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
openrc? ( !<sys-apps/openrc-0.9.9 )
|
||||
!sys-apps/coldplug
|
||||
!<sys-fs/lvm2-2.02.97-r1
|
||||
!sys-fs/device-mapper
|
||||
!<sys-fs/udev-init-scripts-19
|
||||
!<sys-kernel/dracut-017-r1
|
||||
!<sys-kernel/genkernel-3.4.25
|
||||
!<sec-policy/selinux-base-2.20120725-r10"
|
||||
|
||||
PDEPEND=">=virtual/udev-197
|
||||
openrc? ( >=sys-fs/udev-init-scripts-19-r1 )"
|
||||
|
||||
S=${WORKDIR}/systemd-${PV}
|
||||
|
||||
QA_MULTILIB_PATHS="lib/systemd/systemd-udevd"
|
||||
|
||||
udev_check_KV()
|
||||
{
|
||||
# accept4 came late for ia64
|
||||
use ia64 && KV_min=3.3
|
||||
if kernel_is lt ${KV_min//./ }
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
check_default_rules()
|
||||
{
|
||||
# Make sure there are no sudden changes to upstream rules file
|
||||
# (more for my own needs than anything else ...)
|
||||
local udev_rules_md5=66bb698deeae64ab444b710baf54a412
|
||||
MD5=$(md5sum < "${S}"/rules/50-udev-default.rules)
|
||||
MD5=${MD5/ -/}
|
||||
if [[ ${MD5} != ${udev_rules_md5} ]]
|
||||
then
|
||||
eerror "50-udev-default.rules has been updated, please validate!"
|
||||
eerror "md5sum: ${MD5}"
|
||||
die "50-udev-default.rules has been updated, please validate!"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup()
|
||||
{
|
||||
CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~KALLSYMS ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD"
|
||||
|
||||
linux-info_pkg_setup
|
||||
|
||||
if ! udev_check_KV
|
||||
then
|
||||
eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
|
||||
eerror "It must be at least ${KV_min}!"
|
||||
fi
|
||||
|
||||
KV_FULL_SRC=${KV_FULL}
|
||||
get_running_version
|
||||
if ! udev_check_KV
|
||||
then
|
||||
eerror
|
||||
eerror "Your running kernel version (${KV_FULL}) is too old"
|
||||
eerror "for this version of udev."
|
||||
eerror "You must upgrade your kernel or downgrade udev."
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare()
|
||||
{
|
||||
# backport some patches
|
||||
if [[ -n "${patchset}" ]]
|
||||
then
|
||||
EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch
|
||||
fi
|
||||
|
||||
# These are missing from upstream 50-udev-default.rules
|
||||
cat <<-EOF > "${T}"/40-gentoo.rules
|
||||
SUBSYSTEM=="snd", GROUP="audio"
|
||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
|
||||
EOF
|
||||
|
||||
# Remove requirements for gettext and intltool wrt bug #443028
|
||||
if ! has_version dev-util/intltool && ! [[ ${PV} = 9999* ]]; then
|
||||
sed -i \
|
||||
-e '/INTLTOOL_APPLIED_VERSION=/s:=.*:=0.40.0:' \
|
||||
-e '/XML::Parser perl module is required for intltool/s|^|:|' \
|
||||
configure || die
|
||||
eval export INTLTOOL_{EXTRACT,MERGE,UPDATE}=/bin/true
|
||||
eval export {MSG{FMT,MERGE},XGETTEXT}=/bin/true
|
||||
fi
|
||||
|
||||
# apply user patches
|
||||
epatch_user
|
||||
|
||||
# compile with older versions of gcc #451110
|
||||
version_is_at_least 4.6 $(gcc-version) || \
|
||||
sed -i 's:static_assert:alsdjflkasjdfa:' src/shared/macro.h
|
||||
|
||||
# change rules back to group uucp instead of dialout for now
|
||||
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
|
||||
-i rules/*.rules \
|
||||
|| die "failed to change group dialout to uucp"
|
||||
|
||||
if [[ ! -e configure ]]
|
||||
then
|
||||
if use doc
|
||||
then
|
||||
gtkdocize --docdir docs || die "gtkdocize failed"
|
||||
else
|
||||
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
||||
fi
|
||||
eautoreconf
|
||||
else
|
||||
check_default_rules
|
||||
elibtoolize
|
||||
fi
|
||||
|
||||
if [[ ${PV} = 9999* ]]; then
|
||||
# secure_getenv() disable for non-glibc systems wrt bug #443030
|
||||
if ! [[ $(grep -r secure_getenv * | wc -l) -eq 16 ]]; then
|
||||
eerror "The line count for secure_getenv() failed, see bug #443030"
|
||||
die
|
||||
fi
|
||||
|
||||
# gperf disable if keymaps are not requested wrt bug #452760
|
||||
if ! [[ $(grep -i gperf Makefile.am | wc -l) -eq 24 ]]; then
|
||||
eerror "The line count for gperf references failed, see bug 452760"
|
||||
die
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use elibc_glibc; then #443030
|
||||
echo '#define secure_getenv(x) NULL' >> config.h.in
|
||||
sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure()
|
||||
{
|
||||
use keymap || export ac_cv_path_GPERF=true #452760
|
||||
|
||||
local econf_args
|
||||
|
||||
econf_args=(
|
||||
ac_cv_search_cap_init=
|
||||
ac_cv_header_sys_capability_h=yes
|
||||
DBUS_CFLAGS=' '
|
||||
DBUS_LIBS=' '
|
||||
--bindir=/bin
|
||||
--docdir=/usr/share/doc/${PF}
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--with-html-dir=/usr/share/doc/${PF}/html
|
||||
--with-rootprefix=
|
||||
--with-rootlibdir=/$(get_libdir)
|
||||
--disable-audit
|
||||
--disable-coredump
|
||||
--disable-hostnamed
|
||||
--disable-ima
|
||||
--disable-libcryptsetup
|
||||
--disable-localed
|
||||
--disable-logind
|
||||
--disable-myhostname
|
||||
--disable-nls
|
||||
--disable-pam
|
||||
--disable-quotacheck
|
||||
--disable-readahead
|
||||
--enable-split-usr
|
||||
--disable-tcpwrap
|
||||
--disable-timedated
|
||||
--disable-xz
|
||||
--disable-silent-rules
|
||||
$(use_enable acl)
|
||||
$(use_enable doc gtk-doc)
|
||||
$(use_enable gudev)
|
||||
$(use_enable keymap)
|
||||
$(use_enable kmod)
|
||||
$(use_enable selinux)
|
||||
$(use_enable static-libs static)
|
||||
)
|
||||
if use introspection; then
|
||||
econf_args+=(
|
||||
--enable-introspection=$(usex introspection)
|
||||
)
|
||||
fi
|
||||
econf "${econf_args[@]}"
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
|
||||
emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
|
||||
local targets=(
|
||||
systemd-udevd
|
||||
udevadm
|
||||
libudev.la
|
||||
libsystemd-daemon.la
|
||||
ata_id
|
||||
cdrom_id
|
||||
collect
|
||||
scsi_id
|
||||
v4l_id
|
||||
accelerometer
|
||||
mtd_probe
|
||||
man/sd_is_fifo.3
|
||||
man/sd_notify.3
|
||||
man/sd_listen_fds.3
|
||||
man/sd-daemon.3
|
||||
man/udev.7
|
||||
man/udevadm.8
|
||||
man/systemd-udevd.8
|
||||
man/systemd-udevd.service.8
|
||||
)
|
||||
use keymap && targets+=( keymap )
|
||||
use gudev && targets+=( libgudev-1.0.la )
|
||||
|
||||
emake "${targets[@]}"
|
||||
if use doc
|
||||
then
|
||||
emake -C docs/libudev
|
||||
use gudev && emake -C docs/gudev
|
||||
fi
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
local lib_LTLIBRARIES="libsystemd-daemon.la libudev.la" \
|
||||
pkgconfiglib_DATA="src/libsystemd-daemon/libsystemd-daemon.pc src/libudev/libudev.pc"
|
||||
|
||||
local targets=(
|
||||
install-libLTLIBRARIES
|
||||
install-includeHEADERS
|
||||
install-libgudev_includeHEADERS
|
||||
install-binPROGRAMS
|
||||
install-rootlibexecPROGRAMS
|
||||
install-udevlibexecPROGRAMS
|
||||
install-dist_systemunitDATA
|
||||
install-dist_udevconfDATA
|
||||
install-dist_udevhomeSCRIPTS
|
||||
install-dist_udevkeymapDATA
|
||||
install-dist_udevkeymapforcerelDATA
|
||||
install-dist_udevrulesDATA
|
||||
install-girDATA
|
||||
install-man3
|
||||
install-man7
|
||||
install-man8
|
||||
install-nodist_systemunitDATA
|
||||
install-pkgconfiglibDATA
|
||||
install-sharepkgconfigDATA
|
||||
install-typelibsDATA
|
||||
install-dist_docDATA
|
||||
udev-confdirs
|
||||
systemd-install-hook
|
||||
libudev-install-hook
|
||||
libsystemd-daemon-install-hook
|
||||
install-pkgincludeHEADERS
|
||||
)
|
||||
|
||||
if use gudev
|
||||
then
|
||||
lib_LTLIBRARIES+=" libgudev-1.0.la"
|
||||
pkgconfiglib_DATA+=" src/gudev/gudev-1.0.pc"
|
||||
fi
|
||||
|
||||
# add final values of variables:
|
||||
targets+=(
|
||||
rootlibexec_PROGRAMS=systemd-udevd
|
||||
bin_PROGRAMS=udevadm
|
||||
lib_LTLIBRARIES="${lib_LTLIBRARIES}"
|
||||
MANPAGES="man/sd-daemon.3 man/sd_notify.3 man/sd_listen_fds.3 \
|
||||
man/sd_is_fifo.3 man/sd_booted.3 man/udev.7 man/udevadm.8 \
|
||||
man/systemd-udevd.service.8"
|
||||
MANPAGES_ALIAS="man/sd_is_socket.3 man/sd_is_socket_unix.3 \
|
||||
man/sd_is_socket_inet.3 man/sd_is_mq.3 man/sd_notifyf.3 \
|
||||
man/SD_LISTEN_FDS_START.3 man/SD_EMERG.3 man/SD_ALERT.3 \
|
||||
man/SD_CRIT.3 man/SD_ERR.3 man/SD_WARNING.3 man/SD_NOTICE.3 \
|
||||
man/SD_INFO.3 man/SD_DEBUG.3 man/systemd-udevd.8"
|
||||
dist_systemunit_DATA="units/systemd-udevd-control.socket \
|
||||
units/systemd-udevd-kernel.socket"
|
||||
nodist_systemunit_DATA="units/systemd-udevd.service \
|
||||
units/systemd-udev-trigger.service \
|
||||
units/systemd-udev-settle.service"
|
||||
pkgconfiglib_DATA="${pkgconfiglib_DATA}"
|
||||
systemunitdir="$(systemd_get_unitdir)"
|
||||
pkginclude_HEADERS="src/systemd/sd-daemon.h"
|
||||
)
|
||||
emake -j1 DESTDIR="${D}" "${targets[@]}"
|
||||
if use doc
|
||||
then
|
||||
emake -C docs/libudev DESTDIR="${D}" install
|
||||
use gudev && emake -C docs/gudev DESTDIR="${D}" install
|
||||
fi
|
||||
dodoc TODO
|
||||
|
||||
prune_libtool_files --all
|
||||
rm -f "${D}"/lib/udev/rules.d/99-systemd.rules
|
||||
rm -rf "${D}"/usr/share/doc/${PF}/LICENSE.*
|
||||
|
||||
# install gentoo-specific rules
|
||||
insinto /lib/udev/rules.d
|
||||
doins "${T}"/40-gentoo.rules
|
||||
|
||||
# install udevadm symlink
|
||||
dosym ../bin/udevadm /sbin/udevadm
|
||||
|
||||
# move udevd where it should be and remove unlogical /lib/systemd
|
||||
mv "${ED}"/lib/systemd/systemd-udevd "${ED}"/sbin/udevd || die
|
||||
rm -r "${ED}"/lib/systemd
|
||||
|
||||
# install compability symlink for systemd and initramfs tools
|
||||
dosym /sbin/udevd "$(systemd_get_utildir)"/systemd-udevd
|
||||
find "${ED}/$(systemd_get_unitdir)" -name '*.service' -exec \
|
||||
sed -i -e "/ExecStart/s:/lib/systemd:$(systemd_get_utildir):" {} +
|
||||
|
||||
docinto gentoo
|
||||
dodoc "${FILESDIR}"/80-net-name-slot.rules
|
||||
docompress -x /usr/share/doc/${PF}/gentoo/80-net-name-slot.rules
|
||||
}
|
||||
|
||||
pkg_preinst()
|
||||
{
|
||||
local htmldir
|
||||
for htmldir in gudev libudev; do
|
||||
if [[ -d ${ROOT}usr/share/gtk-doc/html/${htmldir} ]]
|
||||
then
|
||||
rm -rf "${ROOT}"usr/share/gtk-doc/html/${htmldir}
|
||||
fi
|
||||
if [[ -d ${D}/usr/share/doc/${PF}/html/${htmldir} ]]
|
||||
then
|
||||
dosym ../../doc/${PF}/html/${htmldir} \
|
||||
/usr/share/gtk-doc/html/${htmldir}
|
||||
fi
|
||||
done
|
||||
preserve_old_lib /{,usr/}$(get_libdir)/libudev$(get_libname 0)
|
||||
}
|
||||
|
||||
# This function determines if a directory is a mount point.
|
||||
# It was lifted from dracut.
|
||||
ismounted()
|
||||
{
|
||||
while read a m a; do
|
||||
[[ $m = $1 ]] && return 0
|
||||
done < "${ROOT}"/proc/mounts
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_postinst()
|
||||
{
|
||||
mkdir -p "${ROOT}"run
|
||||
|
||||
net_rules="${ROOT}"etc/udev/rules.d/80-net-name-slot.rules
|
||||
copy_net_rules() {
|
||||
[[ -f ${net_rules} ]] || cp "${ROOT}"usr/share/doc/${PF}/gentoo/80-net-name-slot.rules "${net_rules}"
|
||||
}
|
||||
|
||||
if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 197 ]]; then
|
||||
ewarn "Because this is a upgrade we disable the new predictable network interface"
|
||||
ewarn "name scheme by default."
|
||||
copy_net_rules
|
||||
fi
|
||||
|
||||
if has_version sys-apps/biosdevname; then
|
||||
ewarn "Because sys-apps/biosdevname is installed we disable the new predictable"
|
||||
ewarn "network interface name scheme by default."
|
||||
copy_net_rules
|
||||
fi
|
||||
|
||||
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
|
||||
# So try to remove it here (will only work if empty).
|
||||
rmdir "${ROOT}"dev/loop 2>/dev/null
|
||||
if [[ -d ${ROOT}dev/loop ]]
|
||||
then
|
||||
ewarn "Please make sure your remove /dev/loop,"
|
||||
ewarn "else losetup may be confused when looking for unused devices."
|
||||
fi
|
||||
|
||||
# people want reminders, I'll give them reminders. Odds are they will
|
||||
# just ignore them anyway...
|
||||
|
||||
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper
|
||||
# remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
|
||||
if [[ -f ${ROOT}etc/udev/rules.d/64-device-mapper.rules ]] &&
|
||||
! has_version sys-fs/device-mapper
|
||||
then
|
||||
rm -f "${ROOT}"etc/udev/rules.d/64-device-mapper.rules
|
||||
einfo "Removed unneeded file 64-device-mapper.rules"
|
||||
fi
|
||||
|
||||
if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 189 ]]; then
|
||||
ewarn
|
||||
ewarn "Upstream has removed the persistent-cd rules"
|
||||
ewarn "generator. If you need persistent names for these devices,"
|
||||
ewarn "place udev rules for them in ${ROOT}etc/udev/rules.d."
|
||||
fi
|
||||
|
||||
if ismounted /usr
|
||||
then
|
||||
ewarn
|
||||
ewarn "Your system has /usr on a separate partition. This means"
|
||||
ewarn "you will need to use an initramfs to pre-mount /usr before"
|
||||
ewarn "udev runs."
|
||||
ewarn
|
||||
ewarn "If this is not set up before your next reboot, udev may work;"
|
||||
ewarn "However, you also may experience failures which are very"
|
||||
ewarn "difficult to troubleshoot."
|
||||
ewarn
|
||||
ewarn "For a more detailed explanation, see the following URL:"
|
||||
ewarn "http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken"
|
||||
ewarn
|
||||
ewarn "For more information on setting up an initramfs, see the"
|
||||
ewarn "following URL:"
|
||||
ewarn "http://www.gentoo.org/doc/en/initramfs-guide.xml"
|
||||
fi
|
||||
|
||||
if [ -n "${net_rules}" ]; then
|
||||
ewarn
|
||||
ewarn "udev-197 and newer introduces a new method of naming network"
|
||||
ewarn "interfaces. The new names are a very significant change, so"
|
||||
ewarn "they are disabled by default on live systems."
|
||||
ewarn "Please see the contents of ${net_rules} for more"
|
||||
ewarn "information on this feature."
|
||||
fi
|
||||
|
||||
local fstab="${ROOT}"etc/fstab dev path fstype rest
|
||||
while read -r dev path fstype rest; do
|
||||
if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then
|
||||
ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs"
|
||||
ewarn "filesystem. Otherwise udev won't be able to boot."
|
||||
ewarn "See, http://bugs.gentoo.org/453186"
|
||||
fi
|
||||
done < "${fstab}"
|
||||
|
||||
if [[ -d ${ROOT}usr/lib/udev ]]
|
||||
then
|
||||
ewarn
|
||||
ewarn "Please re-emerge all packages on your system which install"
|
||||
ewarn "rules and helpers in /usr/lib/udev. They should now be in"
|
||||
ewarn "/lib/udev."
|
||||
ewarn
|
||||
ewarn "One way to do this is to run the following command:"
|
||||
ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
|
||||
ewarn "Note that qfile can be found in app-portage/portage-utils"
|
||||
fi
|
||||
|
||||
old_net_rules=${ROOT}etc/udev/rules.d/70-persistent-net.rules
|
||||
if [[ -f ${old_net_rules} ]]; then
|
||||
ewarn "You still have ${old_net_rules} in place from previous udev release."
|
||||
ewarn "Upstream has removed the possibility of renaming to existing"
|
||||
ewarn "network interfaces. For example, it's not possible to assign based"
|
||||
ewarn "on MAC address to existing interface eth0."
|
||||
ewarn "See http://bugs.gentoo.org/453494 for more information."
|
||||
ewarn "Rename your file to something else starting with 70- to silence"
|
||||
ewarn "this warning."
|
||||
fi
|
||||
|
||||
ewarn
|
||||
ewarn "You need to restart udev as soon as possible to make the upgrade go"
|
||||
ewarn "into effect."
|
||||
ewarn "The method you use to do this depends on your init system."
|
||||
ewarn
|
||||
|
||||
preserve_old_lib_notify /{,usr/}$(get_libdir)/libudev$(get_libname 0)
|
||||
|
||||
elog
|
||||
elog "For more information on udev on Gentoo, writing udev rules, and"
|
||||
elog " fixing known issues visit:"
|
||||
elog " http://www.gentoo.org/doc/en/udev-guide.xml"
|
||||
|
||||
use hwdb && udevadm hwdb --update
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/slang-2.2.2.ebuild,v 1.9 2010/12/27 12:51:44 ssuominen Exp $
|
||||
|
||||
EAPI=2
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="A portable programmer's library designed to allow a developer to create robust portable software"
|
||||
HOMEPAGE="http://www.jedsoft.org/slang/"
|
||||
SRC_URI="mirror://slang/v${PV%.*}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
IUSE="cjk pcre png readline zlib"
|
||||
|
||||
RDEPEND="sys-libs/ncurses
|
||||
pcre? ( dev-libs/libpcre )
|
||||
png? ( media-libs/libpng )
|
||||
cjk? ( dev-libs/oniguruma )
|
||||
readline? ( sys-libs/readline )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-2.1.2-slsh-libs.patch \
|
||||
"${FILESDIR}"/${PN}-2.1.3-uclibc.patch
|
||||
|
||||
sed -i \
|
||||
-e '/^TERMCAP=/s:=.*:=:' \
|
||||
configure || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf
|
||||
|
||||
if use readline; then
|
||||
myconf+=" --with-readline=gnu"
|
||||
else
|
||||
myconf+=" --with-readline=slang"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_with cjk onig) \
|
||||
$(use_with pcre) \
|
||||
$(use_with png) \
|
||||
$(use_with zlib z) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 elf static || die "emake elf static failed"
|
||||
|
||||
cd slsh
|
||||
emake -j1 slsh || die "emake slsh failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -j1 DESTDIR="${D}" install-all || die "emake install-all failed"
|
||||
|
||||
rm -rf "${D}"/usr/share/doc/{slang,slsh}
|
||||
|
||||
dodoc NEWS README *.txt doc/{,internal,text}/*.txt
|
||||
dohtml doc/slangdoc.html slsh/doc/html/*.html
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/powertop-2.0.ebuild,v 1.4 2012/06/01 18:36:59 vapier Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
EGIT_REPO_URI="git://github.com/fenrus75/powertop.git"
|
||||
inherit git-2
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="https://01.org/powertop/sites/default/files/downloads/${P}.tar.bz2"
|
||||
KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux"
|
||||
fi
|
||||
|
||||
DESCRIPTION="tool that helps you find what software is using the most power"
|
||||
HOMEPAGE="https://01.org/powertop/ http://www.lesswatts.org/projects/powertop/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="unicode"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/libnl
|
||||
sys-apps/pciutils
|
||||
sys-devel/gettext
|
||||
sys-libs/ncurses[unicode?]
|
||||
sys-libs/zlib
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
x11-apps/xset
|
||||
"
|
||||
|
||||
DOCS=( TODO README )
|
||||
|
||||
src_prepare() {
|
||||
sed -i -r \
|
||||
-e '/^powertop_CXXFLAGS/s: (-O2|-g|-I/usr/include/) : :g' \
|
||||
src/Makefile.in || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export ac_cv_search_delwin=$(usex unicode -lncursesw no)
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C src csstoh
|
||||
cp "${FILESDIR}"/csstoh src/ || die
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
keepdir /var/cache/powertop
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
einfo "For PowerTOP to work best, use a Linux kernel with the"
|
||||
einfo "tickless idle (NO_HZ) feature enabled (version 2.6.21 or later)"
|
||||
echo
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-libs/libX11/libX11-1.4.99.901.ebuild,v 1.1 2012/03/16 23:29:19 chithanh Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
XORG_DOC=doc
|
||||
inherit xorg-2 toolchain-funcs flag-o-matic
|
||||
|
||||
DESCRIPTION="X.Org X11 library"
|
||||
|
||||
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
|
||||
IUSE="ipv6 test"
|
||||
|
||||
RDEPEND=">=x11-libs/libxcb-1.1.92
|
||||
x11-libs/xtrans
|
||||
>=x11-proto/xproto-7.0.17
|
||||
x11-proto/xf86bigfontproto
|
||||
x11-proto/inputproto
|
||||
x11-proto/kbproto
|
||||
x11-proto/xextproto"
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-lang/perl )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.1.4-aix-pthread.patch
|
||||
"${FILESDIR}"/${PN}-1.1.5-winnt-private.patch
|
||||
"${FILESDIR}"/${PN}-1.1.5-solaris.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
xorg-2_pkg_setup
|
||||
XORG_CONFIGURE_OPTIONS=(
|
||||
$(use_with doc xmlto)
|
||||
$(use_enable doc specs)
|
||||
$(use_enable ipv6)
|
||||
--without-fop
|
||||
)
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
[[ ${CHOST} == *-interix* ]] && export ac_cv_func_poll=no
|
||||
xorg-2_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# [Cross-Compile Love] Disable {C,LD}FLAGS and redefine CC= for 'makekeys'
|
||||
if tc-is-cross-compiler; then
|
||||
(
|
||||
filter-flags -m*
|
||||
emake -C "${AUTOTOOLS_BUILD_DIR}"/src/util CC=$(tc-getBUILD_CC) CFLAGS="${CFLAGS}" LDFLAGS="" clean all || die
|
||||
)
|
||||
fi
|
||||
xorg-2_src_compile
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-libs/libXt/libXt-1.0.7-r1.ebuild,v 1.10 2010/01/19 20:09:44 armin76 Exp $
|
||||
|
||||
SNAPSHOT="yes"
|
||||
|
||||
inherit x-modular flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="X.Org Xt library"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="x11-libs/libX11
|
||||
x11-libs/libSM
|
||||
x11-proto/xproto
|
||||
x11-proto/kbproto"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-fix-cross-compile-again.patch" )
|
||||
|
||||
pkg_setup() {
|
||||
# No such function yet
|
||||
# x-modular_pkg_setup
|
||||
|
||||
# (#125465) Broken with Bdirect support
|
||||
filter-flags -Wl,-Bdirect
|
||||
filter-ldflags -Bdirect
|
||||
filter-ldflags -Wl,-Bdirect
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
|
||||
fi
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/x11-misc/shared-mime-info/shared-mime-info-0.90.ebuild,v 1.7 2011/04/30 17:45:01 armin76 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit fdo-mime
|
||||
|
||||
DESCRIPTION="The Shared MIME-info Database specification"
|
||||
HOMEPAGE="http://freedesktop.org/wiki/Software/shared-mime-info"
|
||||
SRC_URI="http://people.freedesktop.org/~hadess/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-libs/glib-2.6:2
|
||||
>=dev-libs/libxml2-2.4"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig
|
||||
dev-util/intltool
|
||||
sys-devel/gettext"
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--disable-dependency-tracking \
|
||||
--disable-update-mimedb
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# http://bugs.gentoo.org/show_bug.cgi?id=347870
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=32127
|
||||
emake -j1 || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
dodoc ChangeLog HACKING NEWS README
|
||||
|
||||
# in prefix, install an env.d entry such that prefix patch is used/added
|
||||
if use prefix; then
|
||||
echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share\"" > "${T}"/50mimeinfo
|
||||
doenvd "${T}"/50mimeinfo
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use prefix && export XDG_DATA_DIRS="${EPREFIX}"/usr/share
|
||||
fdo-mime_mime_database_update
|
||||
# elog
|
||||
# elog "The database format has changed between 0.60 and 0.70."
|
||||
# elog "You may need to update all your local databases and caches."
|
||||
# elog "To do so, please run the following command(s):"
|
||||
# elog "(for each user) $ update-mime-database ~/.local/share/mime/"
|
||||
# if [[ -d ${EROOT}/usr/local/share/mime ]]; then
|
||||
# elog "(as root) # update-mime-database ${EPREFIX}/usr/local/share/mime/"
|
||||
# fi
|
||||
# elog
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user