summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Shapovalov <george@gentoo.org>2008-05-16 22:09:38 +0000
committerGeorge Shapovalov <george@gentoo.org>2008-05-16 22:09:38 +0000
commit4464a2d515958a789103dc0c58f3c8b82cdd190e (patch)
treed04ffa536cc647289307728497b7cd366674a0b2 /app-admin
parentVersion bump (diff)
downloadhistorical-4464a2d515958a789103dc0c58f3c8b82cdd190e.tar.gz
historical-4464a2d515958a789103dc0c58f3c8b82cdd190e.tar.bz2
historical-4464a2d515958a789103dc0c58f3c8b82cdd190e.zip
fixed incorrect semicolon in ADA_PROJECT_PATH
Package-Manager: portage-2.1.5
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/eselect-gnat/ChangeLog8
-rw-r--r--app-admin/eselect-gnat/Manifest4
-rw-r--r--app-admin/eselect-gnat/eselect-gnat-1.4-r1.ebuild35
-rw-r--r--app-admin/eselect-gnat/files/gnat-common-1.4-r1.bash226
4 files changed, 271 insertions, 2 deletions
diff --git a/app-admin/eselect-gnat/ChangeLog b/app-admin/eselect-gnat/ChangeLog
index d1f1813bff73..a90a8f427299 100644
--- a/app-admin/eselect-gnat/ChangeLog
+++ b/app-admin/eselect-gnat/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-admin/eselect-gnat
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-gnat/ChangeLog,v 1.25 2008/04/14 14:50:48 george Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-gnat/ChangeLog,v 1.26 2008/05/16 22:09:38 george Exp $
+
+*eselect-gnat-1.4-r1 (16 May 2008)
+
+ 16 May 2008; George Shapovalov <george@gentoo.org>
+ +files/gnat-common-1.4-r1.bash, +eselect-gnat-1.4-r1.ebuild:
+ fixed incorrect semicolon in ADA_PROJECT_PATH
*eselect-gnat-1.4 (14 Apr 2008)
diff --git a/app-admin/eselect-gnat/Manifest b/app-admin/eselect-gnat/Manifest
index ddfe99044d46..42745089f7f0 100644
--- a/app-admin/eselect-gnat/Manifest
+++ b/app-admin/eselect-gnat/Manifest
@@ -1,10 +1,12 @@
AUX gnat-common-1.2.bash 7020 RMD160 b97f0b72dd97ea8a9a811115d5a21ec106fe2032 SHA1 521ccf56eba14ab35046a4d31f3440aabaf54a3e SHA256 26adff0b6bc5cfdaa968204e546e4cafe9630edcf27e63bbf7831299e0b75b36
AUX gnat-common-1.3-r1.bash 6852 RMD160 e4dfca2ec70c724ff5b762408926c6c404c379c8 SHA1 494746b084e60e43e951fc8457310b0088b9f5a9 SHA256 4454521fc50121ab749daa442674e4240d2f0c25e00e40eca3bf947765afa9c8
+AUX gnat-common-1.4-r1.bash 6808 RMD160 9f4b9735c460d2a9528cf1725b4f18dab03d59ee SHA1 3caa03b14c11c7a2baadda8b62bcc5766b8e011f SHA256 3085ce636b4070015a747b2c82b24e4342a57a320cf9d2ca4c4eda93eb0740d9
AUX gnat.eselect-1.2 5295 RMD160 ffe82cc91a960c747ea11e1d6c216458019e718e SHA1 a63a6eee419dac265164a6579b7cd1ecce548787 SHA256 e7bc45fabba2060403ae0c5d5f822a1095c32543afc3078b91ad8fe4ac6d607b
AUX gnat.eselect-1.3 5309 RMD160 86e9172a9fff2d05961ec858383ec410f2f7f67a SHA1 4e1f8451c96d46e2f1a4017e6faf476cfb1e7dae SHA256 7474707a58cfe8e9714fd5e5982cb7fac8356927452487331d2051c3c0ff673e
AUX gnat.eselect-1.4 6032 RMD160 80c307c750de0e6e7f0bef0dcd1c460cf52dbda0 SHA1 577efc1edd60fd9b3a15121d3a69e16b694be730 SHA256 51529ecca25200b3cfaa4bc2a240cdc5df313c9cf8a4f238abf3482492521010
EBUILD eselect-gnat-1.2.ebuild 792 RMD160 69ab712fbb9766de7353e5e8469dee4292f76aca SHA1 92ef4bc71db44705b938723e653b89566d3ce4c9 SHA256 d0018f3b317c87389086f36d50fcc7c8ae3079191379a75801a42dde8a42de75
EBUILD eselect-gnat-1.3-r1.ebuild 792 RMD160 8eb2909062d0205811aa5b3cf17b223f6bdcc6db SHA1 10d83f585e3bca4a5b200b18ec1cee716836f8fa SHA256 5a05472eaa5ec150cf90501289b64e761d8f85bc4ace20fd2604dea5a7931a57
+EBUILD eselect-gnat-1.4-r1.ebuild 893 RMD160 4bec5d576c08028799cf349812db7354439f11aa SHA1 c121719c4eb228cc8a59beacebce792f40e4413a SHA256 705f4ef6161abae31d810da97ded5ef9b4807895d24ace7877ea685f7fb38593
EBUILD eselect-gnat-1.4.ebuild 890 RMD160 6c21fcc83145f0bee8be89d2f0c1bb03c0c46896 SHA1 6fed4b4a5429ac7da1688d995c3a0ad40f71e5f7 SHA256 50cfe41ae51b4c863c7299681be597a9c70d9fd7aa477db1b7871423b9bdddb9
-MISC ChangeLog 5216 RMD160 6261892ddcba0d877077ea5bcaa7a3a19b4efc87 SHA1 54a0d803e5c157526d32288edcad05ec63fd6324 SHA256 ffc6adc3936f530fa1ded23e2d9e16ee3b700f97bdb1fca3ec06646da615afbd
+MISC ChangeLog 5417 RMD160 4483862519ea16c71f7e72fe84d524df02796a9c SHA1 4cde5bfbdab61476468f0916effc5fbd2f9b33dc SHA256 b82e4a439139af8c976a0636bab5bb2051d17300b91d17192f6dade812b7a910
MISC metadata.xml 244 RMD160 784e7fb6660b05dbdd027b1e23975e26e72b7a39 SHA1 e2df521788bf35a7cf98d8b44adca1a1b03df544 SHA256 c32a1e42a5f85acb0b69af3e2644f98213d48492817c90a82c833927d2881419
diff --git a/app-admin/eselect-gnat/eselect-gnat-1.4-r1.ebuild b/app-admin/eselect-gnat/eselect-gnat-1.4-r1.ebuild
new file mode 100644
index 000000000000..685ee2ea1d6c
--- /dev/null
+++ b/app-admin/eselect-gnat/eselect-gnat-1.4-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-gnat/eselect-gnat-1.4-r1.ebuild,v 1.1 2008/05/16 22:09:38 george Exp $
+
+inherit eutils
+
+DESCRIPTION="gnat module for eselect."
+HOMEPAGE="http://www.gentoo.org"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE=""
+RDEPEND="app-admin/eselect"
+
+MODULEDIR="/usr/share/eselect/modules"
+
+# NOTE!!
+# This path is duplicated in gnat-eselect module,
+# adjust in both locations!
+LIBDIR="/usr/share/gnat/lib"
+
+src_install() {
+ dodir ${MODULEDIR}
+ insinto ${MODULEDIR}
+ newins "${FILESDIR}"/gnat.eselect-${PV} gnat.eselect
+ dodir ${LIBDIR}
+ insinto ${LIBDIR}
+ # !ATTN!
+ # Make sure to adjust version of installed file to a proper one if there is
+ # a change!
+ newins "${FILESDIR}"/gnat-common-${PVR}.bash gnat-common.bash
+}
diff --git a/app-admin/eselect-gnat/files/gnat-common-1.4-r1.bash b/app-admin/eselect-gnat/files/gnat-common-1.4-r1.bash
new file mode 100644
index 000000000000..90612c85cc34
--- /dev/null
+++ b/app-admin/eselect-gnat/files/gnat-common-1.4-r1.bash
@@ -0,0 +1,226 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-gnat/files/gnat-common-1.4-r1.bash,v 1.1 2008/05/16 22:09:38 george Exp $
+
+#
+# Author: George Shapovalov <george@gentoo.org>
+# Purpose: Contains common vars/locations and functions for use by gnat.eclass,
+# gnat.eselect and gnatbuild.eclass.
+#
+# NOTE!!!
+# This code should just define vars (try to limit these!) and simple functions.
+# No bash extensions!!
+# That is, no portage or eclass constructs are allowed!
+#
+
+
+
+# ----------------------------------
+# Globals
+
+# Environmantal stuff (for env update)
+SPECSDIR="/usr/share/gnat/eselect"
+ENVDIR="/etc/env.d"
+MARKER="55gnat-"
+
+# User configurable settings
+SETTINGSDIR="/etc/ada"
+PRIMELIST="${SETTINGSDIR}/primary_compilers"
+
+## Lib install locations
+##
+## Gnat profile dependent files go under under ${LibTop}/${Gnat_Profile}/${PN}
+## and common files go unde SpecsDir, DataDir
+#PREFIX=/usr
+## Replace %LIBDIR% below with $(get_libdir) in eclasses and ebuilds (top level Ok, inherit multilib)
+## or $(profile2libdir ${profile}) in this code, eselect module or anywhere
+## outside portage (as profile will be available only during actual execution, this only should
+## be done inside corresponding functions).
+#AdalibSpecsDir=${PREFIX}/include/ada
+#AdalibDataDir=${PREFIX}/share/ada
+#AdalibLibTop=${PREFIX}/%LIBDIR%/ada
+
+
+# ------------------------------------
+# Helpers
+#
+
+# get_all_profile_components splits gnat profile and returns pace separated list of its components:
+# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu gcc 4.1
+# args:
+# $1 - the string to split
+get_all_profile_components() {
+ local GnatSLOT=${1##*-}
+ local remainder=${1%-*}
+ local GnatPkg=${remainder##*-}
+ remainder=${remainder%-gnat-*}
+ echo "${remainder} ${GnatPkg} ${GnatSLOT}"
+}
+
+# similar to above, returns only SLOT component:
+# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> 4.1
+# args:
+# $1 - the string to extract the slot from
+get_gnat_SLOT() {
+ echo "${1##*-}"
+}
+
+# returns only Pkg component:
+# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> gcc
+# args:
+# $1 - the string to extract the slot from
+get_gnat_Pkg() {
+ local remainder=${1%-*}
+ echo "${remainder##*-}"
+}
+
+# returns only Arch component:
+# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu
+# args:
+# $1 - the string to extract the slot from
+get_gnat_Arch() {
+ echo ${1%-gnat-*}
+}
+
+
+
+## -------------------------------------------
+# gnat profile and lib detection functions
+
+
+# create a list of all gnat env.d files
+# for now use trivial implementation - store name of active profile in the
+# env file name, so it gets called 55gnat-${ARCH}-${PN}-${SLOT}
+get_env_list() {
+ for fn in ${ENVDIR}/${MARKER}*; do
+ echo $(basename ${fn})
+ done
+}
+
+
+
+# find all installed compilers and return a list
+find_all_compilers() {
+ [[ ! -d ${SPECSDIR} ]] && exit
+ for fn in ${SPECSDIR}/*; do
+ [[ ! -d ${fn} ]] && echo $(basename ${fn});
+ done
+}
+
+# find installed primary compilers and return a list
+find_primary_compilers() {
+ [[ ! -f ${PRIMELIST} ]] && exit
+ for fn in $(cat ${PRIMELIST}); do
+ [[ -f ${SPECSDIR}/${fn} ]] && echo ${fn};
+ done
+}
+
+# find installed libs and return a list
+find_all_libs() {
+ [[ ! -d ${SPECSDIR} ]] && exit
+ for fn in ${SPECSDIR}/*; do
+ [[ -d ${fn} ]] && echo $(basename ${fn});
+ done
+}
+
+# find libs that have been built for a given profile
+# Arguments:
+# $1 - gnat profile for which to detect active libs
+find_libs4profile() {
+ libs=( $(find_all_libs) )
+
+ for (( i = 0 ; i < ${#libs[@]} ; i = i + 1 )) ; do
+ [[ -f ${SPECSDIR}/${libs[$i]}/$1 ]] && echo "${libs[$i]}"
+ done
+}
+
+
+
+
+## -----------------------
+# main action - central part of do_set and helpers
+
+
+# extracts values of the passed var definition from given spec file
+# params:
+# $1: spec file (as generated by gnabuild.eclass)
+# $2: variable name
+get_var_from_spec() {
+ local var=$(grep -e "^ *$2=" $1|cut -d= -f2)
+ echo ${var}
+}
+
+
+# Cycle through given libs and form a ':' separated list of settings for the given
+# var. Repeating settings are omitted, that is unique entry is added only first
+# time it is encountered.
+#
+# params:
+# $1 - name of env var to process
+# $2 - name of gnat profile
+# $3.. - list of libs to check (to avoid its composition every time)
+# - the list is expanded to list of args at the point of call
+get_lib_var_settings() {
+ local envVar=$1
+ local toset=$2
+ #echo "get_lib_var_settings params:$@" >> /tmp/eselect-gnat.rep
+ if [[ "none" != ${3} ]]; then
+ local envString
+ local specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar})
+ if [[ -n ${specLine} ]]; then
+ envString="${specLine}"
+ fi
+ shift
+ #
+ while [[ -n $3 ]]; do
+ specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar})
+ #echo "$3:${specLine}." >> /tmp/eselect-gnat.rep
+ if [[ -n ${specLine} ]] && [[ ! ${envString} =~ ${specLine} ]]; then
+ envString="${envString}:${specLine}"
+ fi
+ shift
+ done
+ echo "${envString}"
+ fi
+}
+
+
+
+# The action!
+# Part common for do_set and do_update of gnat.eselect, also used in gnat.eclass
+# to set environment during lib build and installation
+#
+# params:
+# $1 - profile to set (toset param inside)
+# $2 - envfile
+
+generate_envFile() {
+ local toset=$1
+ local envfile=$2
+
+ local binpath="$(get_var_from_spec ${SPECSDIR}/${toset} binpath)"
+ local libexecpath="$(get_var_from_spec ${SPECSDIR}/${toset} libexecpath)"
+ local libs=( $(find_libs4profile ${toset}) )
+ #echo "generate_envFile: ${libs[@]}" >> /tmp/eselect-gnat.rep
+ if (( 0 == ${#libs[@]} )); then
+ libs="none"
+ fi
+
+ local MyPath="${binpath}:${libexecpath}:$(get_lib_var_settings PATH ${toset} ${libs[@]})"
+ echo "PATH=${MyPath}" > "${envfile}"
+ echo "ROOTPATH=${MyPath}" >> "${envfile}"
+ echo "MANPATH=$(get_var_from_spec ${SPECSDIR}/${toset} manpath):$(get_lib_var_settings MANPATH ${toset} ${libs[@]})" >> "${envfile}"
+ echo "INFOPATH=$(get_var_from_spec ${SPECSDIR}/${toset} infopath):$(get_lib_var_settings INFOPATH ${toset} ${libs[@]})" >> "${envfile}"
+ # the next three use the common base
+ local libBase=$(get_var_from_spec ${SPECSDIR}/${toset} ldpath)
+ echo "LDPATH=${libBase}:${libBase}/adalib:$(get_lib_var_settings LDPATH ${toset} ${libs[@]})" >> "${envfile}"
+ echo "ADA_INCLUDE_PATH=${libBase}/adainclude:$(get_lib_var_settings ADA_INCLUDE_PATH ${toset} ${libs[@]})" >> "${envfile}"
+ echo "ADA_OBJECTS_PATH=${libBase}/adalib:$(get_lib_var_settings ADA_OBJECTS_PATH ${toset} ${libs[@]})" >> "${envfile}"
+ # ADA_PROJECT_PATH may not be set in any of the installed packages,
+ # we should only create this line if cumulative var is non-empty
+ My_ProjectPath=$(get_lib_var_settings ADA_PROJECT_PATH ${toset} ${libs[@]})
+ if [[ -n ${My_ProjectPath} ]]; then
+ echo "ADA_PROJECT_PATH=${My_ProjectPath}" >> "${envfile}"
+ fi
+}
+