summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2009-04-07 09:39:39 +0000
committerTiziano Müller <dev-zero@gentoo.org>2009-04-07 09:39:39 +0000
commit98aabe656a43f51e393ca55dce8b7f595d691d5c (patch)
tree412077a1b447a7f1dfadfb2b594933a0ba533632 /app-admin/eselect-boost
parentAdd in vmware-workstation files for 6.5.2.156725 (why didn't repoman add thes... (diff)
downloadhistorical-98aabe656a43f51e393ca55dce8b7f595d691d5c.tar.gz
historical-98aabe656a43f51e393ca55dce8b7f595d691d5c.tar.bz2
historical-98aabe656a43f51e393ca55dce8b7f595d691d5c.zip
Version bump for new boost versions: full profile support using profile files.
Package-Manager: portage-2.1.6.11/cvs/Linux x86_64
Diffstat (limited to 'app-admin/eselect-boost')
-rw-r--r--app-admin/eselect-boost/ChangeLog9
-rw-r--r--app-admin/eselect-boost/Manifest4
-rw-r--r--app-admin/eselect-boost/eselect-boost-0.3.ebuild25
-rw-r--r--app-admin/eselect-boost/files/boost.eselect-0.3229
4 files changed, 265 insertions, 2 deletions
diff --git a/app-admin/eselect-boost/ChangeLog b/app-admin/eselect-boost/ChangeLog
index face1db27d4f..c5329e2dd058 100644
--- a/app-admin/eselect-boost/ChangeLog
+++ b/app-admin/eselect-boost/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-admin/eselect-boost
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-boost/ChangeLog,v 1.3 2009/02/24 19:24:24 fmccor Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-boost/ChangeLog,v 1.4 2009/04/07 09:39:39 dev-zero Exp $
+
+*eselect-boost-0.3 (07 Apr 2009)
+
+ 07 Apr 2009; Tiziano Müller <dev-zero@gentoo.org>
+ +files/boost.eselect-0.3, +eselect-boost-0.3.ebuild:
+ Version bump for new boost versions: full profile support using profile
+ files.
24 Feb 2009; Ferris McCormick <fmccor@gentoo.org>
eselect-boost-0.2.ebuild:
diff --git a/app-admin/eselect-boost/Manifest b/app-admin/eselect-boost/Manifest
index 8c70f8a1be2e..50e73d309863 100644
--- a/app-admin/eselect-boost/Manifest
+++ b/app-admin/eselect-boost/Manifest
@@ -1,4 +1,6 @@
AUX boost.eselect-0.2 5948 RMD160 76068cda427412a4114f65b24be6a4d3943fba6b SHA1 9bbfb775a9bb96b9a028023ffe7edeb49fffe6fa SHA256 90f3f8bd647b054b7275bcffaf22359281139fe15df3d47c1b085096c81d79be
+AUX boost.eselect-0.3 6588 RMD160 a52d57aea2dce6bcdab5de0f8a1d23d9b1f216d6 SHA1 3f7d98d4cf9be5b3de8fb570b7fbf879cee4cc27 SHA256 e5457ae15543f21ec81df4d78c8d74d170682dfa9bf435ecaf2ca875ac0bf7f5
EBUILD eselect-boost-0.2.ebuild 663 RMD160 0eb076d04f09b64f3782c5c3cfb7731bebfd8dc7 SHA1 8505b89c0bddb8bf04ee30cd84c47a607c6add50 SHA256 7fc5e0265e6be81ee206d1f095b1b68fdacace5ff8d6014396f773e59bc3cda3
-MISC ChangeLog 833 RMD160 2448548cb44c5e1a8111a0f9172291a3e3a6fce3 SHA1 bbc30c404da25d831af7f6b8ec807e20fce08af4 SHA256 5b3a8055cda95c2cb67f41d65414f4fb7f43b2222a37dfd47dcccfd64bc87c91
+EBUILD eselect-boost-0.3.ebuild 737 RMD160 1213769340e7d95a5c09e62d7680ff105208223e SHA1 458a6bee6c0ecdf50175b36941e999e7d6da8045 SHA256 223119bcd5a97c0a9bc813187b92a8ff694901360c0691c47ba8b97e298324c9
+MISC ChangeLog 1061 RMD160 55619f29b6f6856453b88ff555c030a153723015 SHA1 d981618dc1dedda6c3bc1c907b6a5b2fd6dd41ce SHA256 a4f63e1c8edc3c7c06bcc4c9b878a3f642a7a9203c53edd3e7db777a76b90a9c
MISC metadata.xml 261 RMD160 5334f981ef24f0e2d90bbf1fc1acfa0861684476 SHA1 9c795ec41d3c4c6c284fc88f292ae04c23083f56 SHA256 3207c8a2b1789cb857ab68170ddb6d4e9e4f970e4a110119e62e7fac0b9f6ddb
diff --git a/app-admin/eselect-boost/eselect-boost-0.3.ebuild b/app-admin/eselect-boost/eselect-boost-0.3.ebuild
new file mode 100644
index 000000000000..24feb8b4b6b8
--- /dev/null
+++ b/app-admin/eselect-boost/eselect-boost-0.3.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2009 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.3.ebuild,v 1.1 2009/04/07 09:39:39 dev-zero Exp $
+
+inherit multilib
+
+DESCRIPTION="boost module for eselect"
+HOMEPAGE="http://www.gentoo.org/proj/en/eselect/"
+SRC_URI=""
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+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.3 b/app-admin/eselect-boost/files/boost.eselect-0.3
new file mode 100644
index 000000000000..b074062f7f51
--- /dev/null
+++ b/app-admin/eselect-boost/files/boost.eselect-0.3
@@ -0,0 +1,229 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: boost.eselect-0.3,v 1.1 2009/04/07 09:39:39 dev-zero 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.3"
+
+_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 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
+
+ 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
+
+ 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 "Automaticly 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}"
+}