summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2012-04-02 00:51:03 +0000
committerMike Gilbert <floppym@gentoo.org>2012-04-02 00:51:03 +0000
commit0a0750533f07dc65a094768cdcd9a1b4ace07dad (patch)
tree317272ca2c194b017d28b32bcb732bc9acbb495e
parentVersion bump (diff)
downloadhistorical-0a0750533f07dc65a094768cdcd9a1b4ace07dad.tar.gz
historical-0a0750533f07dc65a094768cdcd9a1b4ace07dad.tar.bz2
historical-0a0750533f07dc65a094768cdcd9a1b4ace07dad.zip
Support python_modules variable for improved handling of Python modules, which will execute code from boost_*/__init__.py (bug #404253). Ebuild and updated boost.eselect by Arfrever.
Package-Manager: portage-2.2.0_alpha98/cvs/Linux x86_64
-rw-r--r--app-admin/eselect-boost/ChangeLog12
-rw-r--r--app-admin/eselect-boost/Manifest14
-rw-r--r--app-admin/eselect-boost/eselect-boost-0.4.ebuild26
-rw-r--r--app-admin/eselect-boost/files/boost.eselect-0.4254
4 files changed, 298 insertions, 8 deletions
diff --git a/app-admin/eselect-boost/ChangeLog b/app-admin/eselect-boost/ChangeLog
index 7f2d2c7554aa..af043f646119 100644
--- a/app-admin/eselect-boost/ChangeLog
+++ b/app-admin/eselect-boost/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-admin/eselect-boost
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-boost/ChangeLog,v 1.17 2011/08/28 06:48:29 ulm Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-boost/ChangeLog,v 1.18 2012/04/02 00:51:03 floppym Exp $
+
+*eselect-boost-0.4 (02 Apr 2012)
+
+ 02 Apr 2012; Mike Gilbert <floppym@gentoo.org> +eselect-boost-0.4.ebuild,
+ +files/boost.eselect-0.4:
+ Support python_modules variable for improved handling of Python modules, which
+ will execute code from boost_*/__init__.py (bug #404253). Ebuild and updated
+ boost.eselect by Arfrever.
28 Aug 2011; Ulrich Mueller <ulm@gentoo.org> files/boost.eselect-0.3:
Fix spelling, bug 290968.
diff --git a/app-admin/eselect-boost/Manifest b/app-admin/eselect-boost/Manifest
index c9f53c13a31b..f4922e1da6e4 100644
--- a/app-admin/eselect-boost/Manifest
+++ b/app-admin/eselect-boost/Manifest
@@ -1,16 +1,18 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
AUX boost.eselect-0.2 5944 RMD160 917adf0e2636fdbe1c5e74bc170aa5050bd5e0f3 SHA1 2bd97ec0f850b25583234cd25f2b452f7778e58c SHA256 1b40e527feda7186784b1a61dfdd6a0d4fedb137def8bc14e8e8c943ee035458
AUX boost.eselect-0.3 6586 RMD160 8c63c1f5fc20353de2485aa0cd669da38e3f8020 SHA1 198edd92e66e0957e9616b36b135e48e18eec83b SHA256 9c882c7b07284ea21fa96daa5f85264deb0b0de5baf69f00e7d642575e4f1a75
+AUX boost.eselect-0.4 7738 RMD160 912f8e324beebd5a2e804eecce714cc28a4b7f83 SHA1 96438849324d1909cd5dc84cbb48a7227f916596 SHA256 6b73cd165fcb002f3aba5a263ffc8e803fae41c1a731a5285b7eb7bf8a5e006a
EBUILD eselect-boost-0.2.ebuild 685 RMD160 a5cd993175dd9cbf19617edb95ce1b7e3c67deaa SHA1 8eb625117e21eaafb67d5684fecda8967a0d275f SHA256 97c48f868229a5e6400025c0899e514a92276c309468ea1f1b6fc36156d39de6
EBUILD eselect-boost-0.3.ebuild 789 RMD160 c4ac9b4425e9869d372be07a704ddcc8ea402f63 SHA1 e078e876b6b73dfdda18bec936b1181215661d00 SHA256 a3cd32759ebdeccc3fec2735859911ad76d9ad35ba8b7865291cab3af912aa31
-MISC ChangeLog 2495 RMD160 ea390da86902797bd7aac789436c67af4764707a SHA1 a52ab26c6070ab71aec3f5eb040f1a2f986c81f6 SHA256 fce2321ef59d84304e34953be0532672f9e93292e0a05db6dd6af5f216fda924
+EBUILD eselect-boost-0.4.ebuild 799 RMD160 0b1a662f022364d55a13acab8e794e492343a756 SHA1 db8938cff64a043e53027bbec45a6ac4a9208ad7 SHA256 41a4a5bc66cb50475742604bd0304c5c72155f32914931799faad9acab9642ac
+MISC ChangeLog 2827 RMD160 643431c075cd90d824a34e8b67b76f3a9f70e736 SHA1 820fd29cd257f155c4cd929dbf5c194fb0199237 SHA256 b9a8f8b67091652dd32acb187549841b446a0d1aac9fcdddefa809f03755eaac
MISC metadata.xml 261 RMD160 5334f981ef24f0e2d90bbf1fc1acfa0861684476 SHA1 9c795ec41d3c4c6c284fc88f292ae04c23083f56 SHA256 3207c8a2b1789cb857ab68170ddb6d4e9e4f970e4a110119e62e7fac0b9f6ddb
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.18 (GNU/Linux)
+Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk5Z5iYACgkQOeoy/oIi7uwuAQCfQpYo0qTeUG8XwBqOqwbsaQoz
-CXQAnRNIinxMjx9kxVqSBZeXtYFZs48S
-=YZm+
+iF4EAREIAAYFAk949/0ACgkQC77qH+pIQ6T4bAD9G9qIwdKvr5UA3epO5SGgYbzt
+jJDUsFGFzzHuNId3K9ABAKB/fExV1JTBCR4ahj5jcfWXORbn0d89UazKYv6x/qn1
+=r5AZ
-----END PGP SIGNATURE-----
diff --git a/app-admin/eselect-boost/eselect-boost-0.4.ebuild b/app-admin/eselect-boost/eselect-boost-0.4.ebuild
new file mode 100644
index 000000000000..ba86d75883db
--- /dev/null
+++ b/app-admin/eselect-boost/eselect-boost-0.4.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-boost/eselect-boost-0.4.ebuild,v 1.1 2012/04/02 00:51:03 floppym Exp $
+
+inherit multilib
+
+DESCRIPTION="boost module for eselect"
+HOMEPAGE="http://www.gentoo.org/proj/en/eselect/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=app-admin/eselect-1.0.5"
+
+src_install() {
+ local mdir="/usr/share/eselect/modules"
+ dodir ${mdir}
+ sed -e "s|%LIBDIR%|$(get_libdir)|g" "${FILESDIR}/boost.eselect-${PVR}" > "${D}${mdir}/boost.eselect" || die "failed to install"
+
+ keepdir /etc/eselect/boost
+ keepdir /usr/share/boost-eselect/profiles
+}
diff --git a/app-admin/eselect-boost/files/boost.eselect-0.4 b/app-admin/eselect-boost/files/boost.eselect-0.4
new file mode 100644
index 000000000000..3baddd74481a
--- /dev/null
+++ b/app-admin/eselect-boost/files/boost.eselect-0.4
@@ -0,0 +1,254 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: boost.eselect-0.4,v 1.1 2012/04/02 00:51:03 floppym Exp $
+
+# This eclass-module has been initially written by Łukasz Michalik <lmi@ift.uni.wroc.pl>
+# Corrections and extensions by Tiziano Müller <dev-zero@gentoo.org>
+
+DESCRIPTION="Manage boost installations"
+MAINTAINER="dev-zero@gentoo.org"
+VERSION="0.4"
+
+_boost_tools="bcp bjam compiler_status inspect library_status process_jam_log quickbook wave"
+
+# ... meaning: <none> and -debug:
+_suffices="|-debug"
+
+find_targets() {
+ local f
+ # use ls here to get a really empty set in case no boost is installed
+ for d in $(ls -d "${ROOT}"/usr/share/boost-eselect/profiles/* 2>/dev/null) ; do
+ for p in "${d}"/* ; do
+ echo "boost-$(basename ${d})/$(basename ${p})"
+ done
+ done
+}
+
+remove_installation() {
+ echo "Removing symlinks from old version"
+
+ local link
+ for link in "${ROOT}/usr/include/boost" "${ROOT}/usr/share/boostbook" ; do
+ if [[ -L "${link}" ]] ; then
+ rm "${link}" || die -q "Couldn't remove \"${link}\" symlink"
+ else
+ [[ -e "${link}" ]] && die -q "\"${link}\" exists and isn't a symlink"
+ fi
+ done
+
+ pushd "${ROOT}/usr/%LIBDIR%" 1>/dev/null
+ local lib
+ for lib in libboost_*.{a,so} ; do
+ [[ -L "${lib}" && "${lib}" != libboost_*[[:digit:]]_[[:digit:]][[:digit:]]@(${_suffices}).@(a|so) ]] || continue
+ rm "${lib}" || die -q "Unable to remove \"/usr/%LIBDIR%/${lib}\" symlink"
+ done
+ popd 1>/dev/null
+
+ pushd "${ROOT}"/usr/bin 1>/dev/null
+ local tool
+ for tool in ${_boost_tools} ; do
+ [[ -L "${tool}" ]] && ( rm "${tool}" || die -q "Unable to remove \"/usr/bin/${tool}\" symlink" )
+ done
+ popd 1>/dev/null
+
+ local python_module python_module_dir
+ for python_module in mpi.py mpi_debug.py ; do
+ for python_module_dir in "${ROOT}"usr/%LIBDIR%/python*/site-packages ; do
+ if [[ -e "${python_module_dir}/${python_module}" ]] ; then
+ rm "${python_module_dir}/${python_module}" || die -q "Unable to remove \"${python_module_dir}/${python_module}\""
+ fi
+ done
+ done
+
+ # Deprecated code for older versions of Boost.
+ local mod="mpi.so"
+ for moddir in "${ROOT}"/usr/%LIBDIR%/python*/site-packages ; do
+ if [ -L "${moddir}/${mod}" ] ; then
+ rm "${moddir}/${mod}" || die -q "Unable to remove \"${moddir}/${mod}\" symlink"
+ else
+ [[ -e "${moddir}/${mod}" ]] && die -q "\"${moddir}/${mod}\" exists and isn't a symlink"
+ fi
+ done
+
+ local python_module
+ for python_module in ${python_modules} ; do
+ local target_python_module="${python_module#*:}"
+ local wrapper_python_module="${python_module%:*}"
+ echo "from ${target_python_module} import *" > "${ROOT}${wrapper_python_module}" || die -q "Couldn't create wrapper python module \"$(pwd)/${wrapper_python_module}\""
+ done
+
+ if [ -L "${ROOT}/etc/eselect/boost/active" ] ; then
+ rm "${ROOT}/etc/eselect/boost/active" || die -q "Unable to remove \"${ROOT}/etc/eselect/boost/active\" symlink"
+ else
+ [[ -e "${ROOT}/etc/eselect/boost/active" ]] && die -q "\"${ROOT}/etc/eselect/boost/active\" exists and isn't a symlink"
+ fi
+}
+
+set_installation() {
+ [[ -z "${1}" ]] && die -q "Too few parameters to set_installation()"
+ local target="${1}"
+
+ echo "Creating symlinks for ${target}"
+
+ local profile="${target/*\/}"
+ local version="${target/\/${profile}}"
+ version="${version/boost-}"
+ version="${version/./_}"
+
+ cd "${ROOT}/etc/eselect/boost"
+ ln -s "${ROOT}/usr/share/boost-eselect/profiles/${target//boost-}" active || die -q "Couldn't create symlink active -> /usr/share/boost-eselect/profiles/${target//boost-}/${profile}"
+
+ . "${ROOT}/usr/share/boost-eselect/profiles/${target//boost-}"
+
+ for t in ${dirs} ${bins} ${libs} ; do
+ [[ -e "${ROOT}${t}" ]] || die -q "\"${t}\" listed as target does not exist"
+
+ pushd "$(dirname ${ROOT}${t})" 1>/dev/null
+ local ts=$(basename "${t}")
+ local tt="${ts//-${version}}"
+ tt="${tt//${suffix}}"
+ ln -s ${ts} ${tt} || die -q "Couldn't create symlink \"$(pwd)/${tt}\""
+ popd 1>/dev/null
+ done
+
+ [[ -d "${ROOT}${includes}" ]] || die -q "\"${includes}\" does not exist"
+ pushd "${ROOT}/usr/include" 1>/dev/null
+ ln -s ${includes//\/usr\/include\/} boost || die -q "Couldn't create symlink \"/usr/include/boost\""
+ popd 1>/dev/null
+
+ local python_module
+ for python_module in ${python_modules} ; do
+ local target_python_module="${python_module#*:}"
+ local wrapper_python_module="${python_module%:*}"
+ echo "from ${target_python_module} import *" > "${ROOT}${wrapper_python_module}" || die -q "Couldn't create wrapper python module \"$(pwd)/${wrapper_python_module}\""
+ done
+
+ # Deprecated code for older versions of Boost.
+ for t in ${python} ; do
+ pushd "$(dirname ${ROOT}${t})/.." 1>/dev/null
+ local ts="$(basename $(dirname ${ROOT}${t}))/${t//*\/}"
+ ts="${ts//${suffix}}"
+ local tt=${t//*\/}
+ ln -s "${ts}" "${tt}" || die -q "Couldn't create symlink \"$(pwd)/${tt}\""
+ popd 1>/dev/null
+ done
+}
+
+### show action ###
+
+describe_show() {
+ echo "Show the current boost version used"
+}
+
+do_show() {
+ local include
+
+ write_list_start "Current boost version:"
+ if [[ -L "${ROOT}"/usr/include/boost ]] ; then
+ include=$(basename $(dirname $(canonicalise "${ROOT}"/usr/include/boost )))
+ write_kv_list_entry "${include%/}" ""
+ else
+ write_kv_list_entry "(unset)" ""
+ fi
+}
+
+### list action ###
+
+describe_list() {
+ echo "List available boost versions"
+}
+
+do_list() {
+ local targets=( $(find_targets ) )
+ write_list_start "Available boost versions:"
+ if [[ -n "${targets[@]}" ]] ; then
+ local i
+ local active_slot=$(canonicalise "${ROOT}/etc/eselect/boost/active")
+ active_slot=${active_slot/"${ROOT}/usr/share/boost-eselect/profiles/"/boost-}
+ for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
+ if [[ "${targets[${i}]}" == ${active_slot} ]] ; then
+ targets[${i}]="${targets[${i}]} $(highlight '*' )"
+ fi
+ done
+ write_numbered_list "${targets[@]}"
+ else
+ write_kv_list_entry "(none found)" ""
+ fi
+}
+
+### set action ###
+
+describe_set() {
+ echo "Set a new boost version"
+}
+
+describe_set_parameters() {
+ echo "<target>"
+}
+
+describe_set_options() {
+ echo "target : Target name or number (from 'list' action)"
+}
+
+do_set() {
+ if [[ -z "${1}" ]] ; then
+ # no parameter
+ die -q "You didn't tell me what to set the version to"
+ fi
+
+ local target="${1}"
+ if is_number "${target}" ; then
+ targets=($(find_targets))
+ target="${targets[$((${target} - 1))]}"
+ fi
+
+ remove_installation
+ set_installation "${target}"
+}
+
+### update action ###
+
+describe_update() {
+ echo "Automatically update boost version used"
+}
+
+do_update() {
+ # set default profile
+ profile="default"
+
+ # extract profile if there's already one boost version selected
+ if [ -L "${ROOT}"/etc/eselect/boost/active ] ; then
+ profile=$(basename $(canonicalise "${ROOT}/etc/eselect/boost/active"))
+ fi
+
+ echo "Previously selected profile: ${profile}"
+
+ remove_installation
+
+ local targets=($(find_targets))
+ [[ ${#targets[@]} -gt 0 ]] || die -q "No slotted boost version found"
+
+ # contains surely the highest available version, but maybe not the right profile
+ local last_target="${targets[@]:(-1)}"
+ # strip profile
+ local target_version="${last_target//\/*}"
+
+ # in case the previously used profile isn't available anymore
+ local target="${target_version}/default"
+ local matching_profile_found=0
+ for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
+ if [[ "${targets[${i}]}" == "${target_version}/${profile}" ]] ; then
+ target="${targets[${i}]}"
+ matching_profile_found=1
+ break
+ fi
+ done
+
+ if [[ "${matching_profile_found}" == 1 ]] ; then
+ echo "Found a matching profile \"${profile}\" for the new version."
+ else
+ echo "Didn't find the previously selected profile \"${profile}\" for the new version. Resetting to \"default\"."
+ fi
+
+ set_installation "${target}"
+}