From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1J7oT7-000806-Jm for garchives@archives.gentoo.org; Thu, 27 Dec 2007 08:51:58 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.2/8.14.0) with SMTP id lBR8porN019710; Thu, 27 Dec 2007 08:51:50 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.2/8.14.0) with ESMTP id lBR8pnFh019705 for ; Thu, 27 Dec 2007 08:51:50 GMT Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 4551865694 for ; Thu, 27 Dec 2007 08:51:49 +0000 (UTC) Received: from george by stork.gentoo.org with local (Exim 4.60) (envelope-from ) id 1J7oSy-00051g-25 for gentoo-commits@lists.gentoo.org; Thu, 27 Dec 2007 08:51:48 +0000 From: "George Shapovalov (george)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, george@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: gnatbuild.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: gnatbuild.eclass X-VCS-Directories: eclass X-VCS-Committer: george X-VCS-Committer-Name: George Shapovalov Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: Sender: George Shapovalov Date: Thu, 27 Dec 2007 08:51:48 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@gentoo.org X-Archives-Salt: 45701db2-c1d1-4c9c-955e-33d12750cca0 X-Archives-Hash: 2e64c71a9530b9b8b18d3a82c7008bcd george 07/12/27 08:51:48 Modified: gnatbuild.eclass Log: updated gnatbuild.eclass to support primary compilers (#151343) Revision Changes Path 1.35 eclass/gnatbuild.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/gnatbuild.eclass?rev=1.35&view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/gnatbuild.eclass?rev=1.35&content-type=text/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/gnatbuild.eclass?r1=1.34&r2=1.35 Index: gnatbuild.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- gnatbuild.eclass 10 Oct 2007 18:17:58 -0000 1.34 +++ gnatbuild.eclass 27 Dec 2007 08:51:47 -0000 1.35 @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.34 2007/10/10 18:17:58 george Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.35 2007/12/27 08:51:47 george Exp $ # # Author: George Shapovalov # Belongs to: ada herd @@ -17,10 +17,13 @@ IUSE="nls" # multilib is supported via profiles now, multilib usevar is deprecated -DEPEND="!dev-lang/gnat" +DEPEND=">=app-admin/eselect-gnat-1.3" RDEPEND="app-admin/eselect-gnat" -#PROVIDE="virtual/gnat" +# Note! +# It may not be safe to source this at top level. Only source inside local +# functions! +GnatCommon="/usr/share/gnat/lib/gnat-common.bash" #---->> globals and SLOT <<---- @@ -88,7 +91,8 @@ DATAPATH=${PREFIX}/share/${PN}-data/${CTARGET}/${SLOT} # ATTN! the one below should match the path defined in eselect-gnat module CONFIG_PATH="/usr/share/gnat/eselect" -gnat_config_file="${D}/${CONFIG_PATH}/${CTARGET}-${PN}-${SLOT}" +gnat_profile="${CTARGET}-${PN}-${SLOT}" +gnat_config_file="${CONFIG_PATH}/${gnat_profile}" # ebuild globals @@ -142,27 +146,27 @@ local abi=$2 local var - echo >> ${gnat_config_file} + echo >> "${D}/${gnat_config_file}" if ! is_multilib ; then - echo " ctarget=${CTARGET}" >> ${gnat_config_file} + echo " ctarget=${CTARGET}" >> "${D}/${gnat_config_file}" else - echo "[${abi}]" >> ${gnat_config_file} + echo "[${abi}]" >> "${D}/${gnat_config_file}" var="CTARGET_${abi}" if [[ -n ${!var} ]] ; then - echo " ctarget=${!var}" >> ${gnat_config_file} + echo " ctarget=${!var}" >> "${D}/${gnat_config_file}" else var="CHOST_${abi}" if [[ -n ${!var} ]] ; then - echo " ctarget=${!var}" >> ${gnat_config_file} + echo " ctarget=${!var}" >> "${D}/${gnat_config_file}" else - echo " ctarget=${CTARGET}" >> ${gnat_config_file} + echo " ctarget=${CTARGET}" >> "${D}/${gnat_config_file}" fi fi fi var="CFLAGS_${abi}" if [[ -n ${!var} ]] ; then - echo " cflags=${!var}" >> ${gnat_config_file} + echo " cflags=${!var}" >> "${D}/${gnat_config_file}" fi } @@ -172,19 +176,17 @@ dodir ${CONFIG_PATH} - echo "[global]" > ${gnat_config_file} - echo " version=${CTARGET}-${SLOT}" >> ${gnat_config_file} - echo " binpath=${BINPATH}" >> ${gnat_config_file} - echo " libexecpath=${LIBEXECPATH}" >> ${gnat_config_file} - echo " ldpath=${LIBPATH}" >> ${gnat_config_file} - echo " manpath=${DATAPATH}/man" >> ${gnat_config_file} - echo " infopath=${DATAPATH}/info" >> ${gnat_config_file} -# echo " alias_cc=gcc" >> ${compiler_config_file} -# echo " stdcxx_incdir=${STDCXX_INCDIR##*/}" >> ${compiler_config_file} - echo " bin_prefix=${CTARGET}" >> ${gnat_config_file} + echo "[global]" > "${D}/${gnat_config_file}" + echo " version=${CTARGET}-${SLOT}" >> "${D}/${gnat_config_file}" + echo " binpath=${BINPATH}" >> "${D}/${gnat_config_file}" + echo " libexecpath=${LIBEXECPATH}" >> "${D}/${gnat_config_file}" + echo " ldpath=${LIBPATH}" >> "${D}/${gnat_config_file}" + echo " manpath=${DATAPATH}/man" >> "${D}/${gnat_config_file}" + echo " infopath=${DATAPATH}/info" >> "${D}/${gnat_config_file}" + echo " bin_prefix=${CTARGET}" >> "${D}/${gnat_config_file}" for abi in $(get_all_abis) ; do - add_profile_eselect_conf "${gnat_config_file}" "${abi}" + add_profile_eselect_conf "${D}/${gnat_config_file}" "${abi}" done } @@ -277,6 +279,18 @@ if should_we_eselect_gnat; then do_gnat_config fi + + # if primary compiler list is empty, add this profile to the list, so + # that users are not left without active compilers (making sure that + # libs are getting built for at least one) + elog "" + . ${GnatCommon} || die "failed to source common code" + if [[ ! -f ${PRIMELIST} ]] || [[ ! -s ${PRIMELIST} ]]; then + echo "${gnat_profile}" > ${PRIMELIST} + elog "The list of primary compilers was empty and got assigned ${gnat_profile}." + fi + elog "Please edit ${PRIMELIST} and list there gnat profiles intended" + elog "for common use." } @@ -517,7 +531,7 @@ # Looks like we need an access to the bootstrap compiler here too # as gnat apparently wants to compile something during the installation # The spotted obuser was xgnatugn, used to process gnat_ugn_urw.texi, - # during prepping the documentation. + # during preparison of the docs. export PATH="${GNATBOOT}/bin:${PATH}" GNATLIB="${GNATBOOT}/lib/gnatgcc/${BOOT_TARGET}/${BOOT_SLOT}" @@ -545,13 +559,6 @@ cd "${GNATBUILD}" make DESTDIR=${D} install || die -# # The install itself. Straight make DESTDIR=${D} install causes access -# # violation (unlink of gprmake). A siple workaround for now. -# cd "${GNATBUILD}" -# make DESTDIR=${D} bindir="${D}${BINPATH}" install || die -# mv "${D}${D}${PREFIX}/${CTARGET}" "${D}${PREFIX}" \ -# || die "please post the fialed mv line to #178140" -# rm -rf "${D}var" #make a convenience info link dosym ${DATAPATH}/info/gnat_ugn_unw.info ${DATAPATH}/info/gnat.info -- gentoo-commits@gentoo.org mailing list