summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-03-05 02:22:54 +0000
committerZac Medico <zmedico@gentoo.org>2013-03-05 02:22:54 +0000
commit6c0d3837927c092a351b44e7c66e7d4fbd6f08d0 (patch)
tree07b762ccc7eee019395c5fbf284dc2022bb5cb3d /sys-apps
parentunmask povray on darwin (diff)
downloadhistorical-6c0d3837927c092a351b44e7c66e7d4fbd6f08d0.tar.gz
historical-6c0d3837927c092a351b44e7c66e7d4fbd6f08d0.tar.bz2
historical-6c0d3837927c092a351b44e7c66e7d4fbd6f08d0.zip
2.1.11.55 version bump. This fixes bug #460304 (spurious networkmanager
rebuilds triggered by thee wimax USE flag). Bug #459934 tracks all bugs fixed since portage-2.1.11.52. Package-Manager: portage-2.2.0_alpha166/cvs/Linux i686 Manifest-Sign-Key: 0xFDE8EF85AE5719A3
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/portage/ChangeLog9
-rw-r--r--sys-apps/portage/Manifest10
-rw-r--r--sys-apps/portage/portage-2.1.11.55.ebuild280
3 files changed, 294 insertions, 5 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog
index c1166acceadf..7c361c7853f4 100644
--- a/sys-apps/portage/ChangeLog
+++ b/sys-apps/portage/ChangeLog
@@ -1,6 +1,13 @@
# 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.1219 2013/03/03 19:07:32 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1220 2013/03/05 02:22:52 zmedico Exp $
+
+*portage-2.1.11.55 (05 Mar 2013)
+
+ 05 Mar 2013; Zac Medico <zmedico@gentoo.org> +portage-2.1.11.55.ebuild:
+ 2.1.11.55 version bump. This fixes bug #460304 (spurious networkmanager
+ rebuilds triggered by thee wimax USE flag). Bug #459934 tracks all bugs fixed
+ since portage-2.1.11.52.
*portage-2.2.0_alpha165 (03 Mar 2013)
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index fd08b1077e5d..e1a00e195ef8 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -5,6 +5,7 @@ AUX README.RESCUE 137 SHA256 69bea0c755eab59b6b4d90838b8551744f0b0c8eeac170b1cd1
DIST portage-2.1.11.50.tar.bz2 895469 SHA256 39f61e4f2256cbc9f7b6e5da9d6eeb43ff16fd674d7304a7b280ff84d8835110 SHA512 4d313e62ee250b852950ebfd2bb8edf465f56d8e6b9f473b0c55b3856755ad4cb6c6875ab067ca2978c4a0cc75ad6583dc14425b5b4fcf096e72797bc5271a8c WHIRLPOOL cf0b2212eda9c78a8e57f37570dc87a0af0f11ea7b9b79938e7ac78b2196283880571e8bd000c35d665e5188500064aa5065dc7b5a2d0de21c9b8e4d54a2bfec
DIST portage-2.1.11.52.tar.bz2 903416 SHA256 30f5985f1a92137bfc1399bf6d7a3a32548dedc011d1c694bd0de0bf8ac62882 SHA512 d3d779c29b9b79c4581f64645739b5b1f2d5e8f1590013026908eb90f905a37390501e3de61d0c24cf73c2b5aad06369249604de2755f9ec1503170fe37c6879 WHIRLPOOL d97848f23a5d6d2b2dd789dc440acef57de2b343708e8b053471ef80eece040ad430bb7a845754769a5359314211686abbc55b556dd63eb50f64e53b30b3baf9
DIST portage-2.1.11.54.tar.bz2 906176 SHA256 a231a0fce8c6bed32dfe46fcc1aabf3e89671f712ec8e2ef589a527e28917890 SHA512 10b8db57c1150a1e1973242641937446cd65ef565348288f7affc23262b5ecf4c12deac33f8b1abfccc83b8f42c1cb138bdb17e82cb11f04a7e39e282adc9bff WHIRLPOOL 61c361cca9f7064ce1ab424139359e22c2e8c7419f3a2f14b19f5f0c7668870c8ebe85b1165f93310d7f9b98a947cd708f5c97b415cf1e8580215295cdf3f80c
+DIST portage-2.1.11.55.tar.bz2 906931 SHA256 555aeaa2e69a6655650a145d149827de24e668a2f199111bdd31a8144f33a3aa SHA512 2605058e2fcf4fc3fd0e30261d19d67518dd03b8050c1022e224738886179bae8ce8c80e391c97026cc7dc3d6e7a5bb7f7df2b0cf3572d7ac629528cd21d92e2 WHIRLPOOL 99e1008d818484a7da15bb656979b5af6935db1c4a3e4bf6cd3309ff984ed70bf36441c85a08b38523481ee5b2625bfbc08f4fa23d53a8caede6512f36c21c14
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
@@ -15,17 +16,18 @@ DIST portage-man-pl-2.1.2.tar.bz2 53893 SHA256 960eaa7c6f3a2af44bdc665266a8e8846
EBUILD portage-2.1.11.50.ebuild 9616 SHA256 0eaf9eaa380ebf11043b1c030868bf10b79899728a4d18ca5cb5889857024dd3 SHA512 95c10ce269a8c31ee0e00bcde04cfc352a2afbac6d1c90eb77f18e0fdae226107281d47cbfc11e84fc12b8a7b5e64e0cf2098d5eea2cdfd34254c944cb9e4f39 WHIRLPOOL b8ec608c2f1eaa4478b999a3594c03e6b5c0c6523c8bf88a5aeef8b8343d6d70c3d577b5dfcca187d3a7438b99bfce9584489b8fb2b94696e8e2a041907a8a2e
EBUILD portage-2.1.11.52.ebuild 9567 SHA256 e952a76873877a21553b4c5ded7ab29cdfc31ac292ce17c6e2d61c34c7eaddcc SHA512 42872e7d35d3b97d7e7cdeeccffa6e5e1586d565c8d52d4a595862f01eb93bde4625e919f08c0e353266ae930805f4a7ebc6f7f72f21024ff883838ec75733d1 WHIRLPOOL d694c2aa7770bcf5d1daa6f7d154c2dd3d1da3970f4eb1e30e10f325832163b71f462631837f2f5e1e66069e248861dabb46ad0a04e34e179e50c56417b69bda
EBUILD portage-2.1.11.54.ebuild 9581 SHA256 da6cea0eda9a12eadd5db7df2ff9de7572d5d111714d600ac71bffdc882e29aa SHA512 662ca5b2aa50e2b3f3e0fd35637ba273642ed052e2196473fddc09cdb87c572f3093276bdf7868a0fcdf1bb87a7012e15c144f1e685ccfbfd3bbdbdf4e02cdce WHIRLPOOL 0ffa7a55143a7bce7e69612b45be1f1ce696f6e0d8a37f5225668c6c497d3fea737671974c27890207c88299070348d92573ec17f8ecee0d07cc2f582b68e373
+EBUILD portage-2.1.11.55.ebuild 9581 SHA256 faecff2c34b6fb2f2df2a5c75999aef2eac246af80d1ffffe5e241f91876d31f SHA512 c995ae7edc6e1f971910c101ad0d0712dd88c1a04bc21c9ecd7a428504dac4b575a7405a73ab2a9a6fd470c826e7018cb0b73ddfbc5f968d1e23ad4352a855f0 WHIRLPOOL e3942e63db662640df824c384bc560f4a6cf30ec140ddcb584570b9067da241dd778a6aeb5c9bc4e769a20f9f39ea929f5fd8765eedfffe7c4fe300d74185975
EBUILD portage-2.1.6.7_p1.ebuild 8391 SHA256 aa62c9abf35aa31026863d881fcc47eab499992fa290a4aeda39435289358c94 SHA512 f5c66cf066f6096c930a25825314837b214d9c23386f62af8ee4f50b92c8878765ce81274a5335b5f45c8707849ecd3ca5dedb466af7dbbd2744cd356ab7bcbc WHIRLPOOL 6eca21d68dc0ad96d0ab6c9bb84b14dd21100cd48a7531305fa63a1276a1d90ddda33724c32d695632215da338aa91fba412b2f398d2d1ee91fd730d4678484d
EBUILD portage-2.2.0_alpha163.ebuild 11683 SHA256 0cd72cc6d179853e7150c61f1e2c3a004e384dc23d29ad3c70787a11d337e074 SHA512 7e01187b35ac606a685c2ea5496d664c47a4472f867a9a94a5ee5732b0fe0195b448f8de76c5f6ae6d107ed3eb2d5b23ecbd1aeb15e27044d18027a68c43d2f2 WHIRLPOOL 2c111024ab5c0c540ff3bbce6ed540867e3e7e2fa5cba484b9f580e33f46205462a968cc5cc17a46711acf4364462fb32bd0dfb0f86b0933196bab909aa51456
EBUILD portage-2.2.0_alpha165.ebuild 11683 SHA256 547e4e5514b994e1c2c42a58c09b769ca5fc13d7b6adb906a8b0961a17f859bd SHA512 ec8a1fe8b249db437c9f454c5690ce29102fc189011ec262777fc621d29c91dc4d3614089a4bf65f4c991efb12185875ff9f5335897d3738c6bf81c7fe3e63ef WHIRLPOOL 129c408f59fb0c64f72cd3f09245fe1ab5cd8f5c2d3657d522edc2a4540160de488bcc551f324baddca46b48f4e198d95e09594ab59d3fd1e6327f32e2da74a8
EBUILD portage-9999.ebuild 10933 SHA256 df8bfc4843071ca9f6f93db097ade40fa89b12d269a75df36e24b88d5c63b96b SHA512 f223651769423b7a3d5e74435b9e4b98ec11ad03045777449783633cb11fcaf2047c64714a613e92fc6d9d55c0ab7d62142148d10eaccdcb924a7d09b0a04b26 WHIRLPOOL c28ae296f4c92cc4d6fbf265d21e2980618c02863aaece2d17695fe860f634c5102b0c180b27bf1af23930980d8503a400569d5cbe4435a3f259f25c6e03528c
-MISC ChangeLog 16119 SHA256 40b345947ac36481b406134b9ea871526768bf9358801ea5ddf3095cac359372 SHA512 412097cee76207596356db3bc61eb01cd8d909e16d80fe3b9d64d519c0961347ddd240f32e90798958e6c4ee885e1acc9cc2df16d88776b133cbbf8a0de24a4d WHIRLPOOL a32a6abf7f2076e44248d99c03232b53803bd9201ec5ec2f78a5b6c2ff5ebabebcee49e4741dc0231cbd5ce4e2edc497fefedfff19898ff72c1e715d6ffcd251
+MISC ChangeLog 16409 SHA256 24ae8aa1e3b85edeec8ef197eb31e5f6d4e9695c14dac3c08f56e3af2db0ec59 SHA512 aa1e49f05dfcb73ce8cb4f8c39a78d29a1cdf1b3079095a1d2cd8d4dba87e4b5e868b5cdc04f591acc9ac51a98f37c948fa854561f5cf7f8392eb00b4fb76aa5 WHIRLPOOL 35fc5c7c833711cb6ceffcafc5f9fb1d387becd0235cd7a035ceee31d1d30cb277322502b2346a67933f5fc4022373360ea500809fa387465cc9f1bf40f78e00
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.19 (GNU/Linux)
-iEYEAREIAAYFAlEzn3YACgkQ/ejvha5XGaNctACg5BIR6p1rwzbN/gXYa3GGU+q8
-CpoAoOJvesKtB7zxtkcuqt6GE5XOJnAL
-=x3WW
+iEYEAREIAAYFAlE1Vv4ACgkQ/ejvha5XGaNwAwCbBbxXt0jW3Sp8FEmxywGwbB62
+5TcAoJp9pxCf3nxb8rTDaAzHxD98UPRF
+=8oXc
-----END PGP SIGNATURE-----
diff --git a/sys-apps/portage/portage-2.1.11.55.ebuild b/sys-apps/portage/portage-2.1.11.55.ebuild
new file mode 100644
index 000000000000..a0b212cf9039
--- /dev/null
+++ b/sys-apps/portage/portage-2.1.11.55.ebuild
@@ -0,0 +1,280 @@
+# 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.1 2013/03/05 02:22:52 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
+}