diff options
author | George Shapovalov <george@gentoo.org> | 2007-02-27 11:49:07 +0000 |
---|---|---|
committer | George Shapovalov <george@gentoo.org> | 2007-02-27 11:49:07 +0000 |
commit | f17a1d595fa14058fc9e295a7c80ea3fbf4c2224 (patch) | |
tree | 44291609afc25de1dece8659ba5f279f76a4f324 /dev-ada/asis-gcc | |
parent | Version bump. Thanks to the author, Tony Bybell, for numbering the source tar... (diff) | |
download | gentoo-2-f17a1d595fa14058fc9e295a7c80ea3fbf4c2224.tar.gz gentoo-2-f17a1d595fa14058fc9e295a7c80ea3fbf4c2224.tar.bz2 gentoo-2-f17a1d595fa14058fc9e295a7c80ea3fbf4c2224.zip |
added a fix to building due to gnatmake behavior. Issuing a revbump since the fixed problem might cause incomplete build.
(Portage version: 2.1.2-r12)
Diffstat (limited to 'dev-ada/asis-gcc')
-rw-r--r-- | dev-ada/asis-gcc/ChangeLog | 8 | ||||
-rw-r--r-- | dev-ada/asis-gcc/asis-gcc-4.1.2-r1.ebuild | 164 | ||||
-rw-r--r-- | dev-ada/asis-gcc/files/digest-asis-gcc-4.1.2-r1 | 3 |
3 files changed, 174 insertions, 1 deletions
diff --git a/dev-ada/asis-gcc/ChangeLog b/dev-ada/asis-gcc/ChangeLog index 4f71b33ef873..1e5745025255 100644 --- a/dev-ada/asis-gcc/ChangeLog +++ b/dev-ada/asis-gcc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-ada/asis-gcc # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/ChangeLog,v 1.5 2007/02/17 12:58:25 george Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/ChangeLog,v 1.6 2007/02/27 11:49:07 george Exp $ + +*asis-gcc-4.1.2-r1 (27 Feb 2007) + + 27 Feb 2007; George Shapovalov <george@gentoo.org> + +asis-gcc-4.1.2-r1.ebuild: + added a fix to building due to gnatmake behavior. *asis-gcc-4.1.2 (17 Feb 2007) diff --git a/dev-ada/asis-gcc/asis-gcc-4.1.2-r1.ebuild b/dev-ada/asis-gcc/asis-gcc-4.1.2-r1.ebuild new file mode 100644 index 000000000000..a662513cad46 --- /dev/null +++ b/dev-ada/asis-gcc/asis-gcc-4.1.2-r1.ebuild @@ -0,0 +1,164 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/asis-gcc-4.1.2-r1.ebuild,v 1.1 2007/02/27 11:49:07 george Exp $ + +inherit eutils flag-o-matic gnatbuild + +DESCRIPTION="The Ada Semantic Interface Specification (semantic analysis and tools tied to compiler). GnuAda version" +HOMEPAGE="http://gnuada.sourceforge.net/" +LICENSE="GMGPL" + +KEYWORDS="~amd64 ~x86" + +Gnat_Name="gnat-gcc" +My_PN="asis" +# can reuse the same sources, but we need to force an upgrade +SRC_URI="http://mirrors/gentoo/${P}.tar.bz2" + + +IUSE="doc" +RDEPEND="=dev-lang/gnat-gcc-${PV}*" +DEPEND="${RDEPEND} + doc? ( virtual/tetex + app-text/texi2html )" + +# overwriting gnatboot's S +S="${WORKDIR}/${My_PN}-${PV}" + +# Execstack is not nearly as dangerous in Ada as in C and would require a lot of +# work to work around. See bug #141315. +QA_EXECSTACK="usr/lib/gnat-gcc/*/${SLOT}/adalib/libasis-${SLOT}.so + usr/lib/gnat-gcc/*/${SLOT}/adalib/libasis.a + usr/*/gnat-gcc-bin/${SLOT}/*" + + +# it may be even better to force plain -O2 -pipe here +replace-flags -O3 -O2 + +# we need to adjust some vars defined in gnatbuild.eclass so that they use +# gnat-gcc instead of asis +My_LIBPATH=${LIBPATH/${PN}/${Gnat_Name}} +My_BINPATH=${BINPATH/${PN}/${Gnat_Name}} +My_DATAPATH=${DATAPATH/${PN}/${Gnat_Name}} + +pkg_setup() { + local currGnat=$(eselect --no-color gnat show | grep "gnat-" | awk '{ print $1 }') + if [[ "${currGnat}" != "${CTARGET}-${Gnat_Name}-${SLOT}" ]]; then + echo + eerror "The active gnat profile does not correspond to the selected" + eerror "version of asis! Please install the appropriate gnat (if you" + eerror "did not so yet) and run:" + eerror "eselect gnat set ${CTARGET}-${Gnat_Name}-${SLOT}" + eerror "env-update && source /etc/profile" + eerror "and then emerge =dev-ada/asis-${PV} again.." + echo + die + fi + if [[ -e ${My_LIBPATH}/adalib/libasis.a ]] ; then + echo + ewarn "gnatmake of gnat-gcc unfortunately has problems forcind the build" + ewarn "if the package is already installed." + eerror "Please unmerge asis-gcc first and then resume the merge:" + eerror "emerge --unmerge asis-gcc && emerge asis-gcc" + echo + die + fi +} + +# we need to avoid calling gnatboot_src_unpack +src_unpack() { + unpack ${A} +} + +src_compile() { + # Build the shared library first, we need -fPIC here + gnatmake -f -Pasis_stat -cargs ${CFLAGS} || die "building libasis.a failed" + gnatmake -f -Pasis_dyn -cargs ${CFLAGS} || die "building libasis.so failed" + chmod 0444 lib/*.ali + + # build tools + # we need version.o generated for all the tools + gcc -c -o obj/version.o gnat/version.c + for fn in gnatelim gnatstub gnatpp ; do + pushd tools/${fn} + gnatmake -o ${fn} ${fn}-driver.adb -I../../asis/ -I../../gnat/ \ + -I../tool_utils/ -I../tool_utils/templates/ \ + -L../../lib -cargs ${CFLAGS} -largs -lasis ../../obj/version.o \ + || die "building ${fn} failed" + popd + done + pushd tools/gnatmetric + gnatmake -o gnatmetric metrics-simple_driver.adb -I../../asis/ -I../../gnat/ \ + -I../tool_utils/ -I../tool_utils/templates/ \ + -L../../lib -cargs ${CFLAGS} -largs -lasis ../../obj/version.o \ + || die "building ${fn} failed" + popd + + pushd tools/adabrowse + gcc -c util-nl.c + gnatmake -I../../asis -I../../gnat adabrowse -L../../lib -cargs ${CFLAGS} \ + -largs -lasis ../../obj/version.o || die + popd + pushd tools/semtools + gnatmake -I../../asis -I../../gnat adadep -L../../lib \ + -cargs ${CFLAGS} -largs -lasis ../../obj/version.o || die + gnatmake -I../../asis -I../../gnat adasubst -L../../lib \ + -cargs ${CFLAGS} -largs -lasis ../../obj/version.o || die + popd + + # common stuff is just docs in this case + if use doc; then + pushd documentation + make all || die "Failed while compiling documentation" + for fn in *.ps; do ps2pdf ${fn}; done + popd + fi +} + + +src_install () { + # install the lib + dodir ${My_LIBPATH}/adalib + # doins grossly screws permissions + cp -dpP lib/* ${D}${My_LIBPATH}/adalib +# insinto ${LIBPATH}/adalib +# doins obj/*.ali +# doins lib/libasis* + # make appropriate symlinks +# pushd ${D}${LIBPATH}/adalib +# ln -s libasis-${SLOT}.so libasis.so +# popd + # sources + insinto ${My_LIBPATH}/adainclude + doins gnat/*.ad[sb] + doins asis/*.ad[sb] + + # tools + mkdir -p ${D}${My_BINPATH} + for fn in tools/{adabrowse,gnatelim,gnatstub,gnatpp,gnatmetric}; do + cp ${fn}/${fn:6} ${D}${My_BINPATH} + done + cp tools/semtools/ada{dep,subst} ${D}${My_BINPATH} + + # docs and examples + if use doc ; then + dodoc documentation/*.{txt,ps} + dohtml documentation/*.html + # info's should go into gnat-gpl dirs + insinto ${My_DATAPATH}/info/ + doins documentation/*.info + + insinto /usr/share/doc/${PF} + doins -r documentation/*.pdf examples/ tutorial/ templates/ + + # this version also provides wiki contents, may be added at some point, + # however it seems to make sense to just use the online wiki.. + fi +} + +pkg_postinst() { + echo + elog "The ASIS is installed for the active gnat compiler at gnat's location." + elog "No further configuration is necessary. Enjoy." + echo +} diff --git a/dev-ada/asis-gcc/files/digest-asis-gcc-4.1.2-r1 b/dev-ada/asis-gcc/files/digest-asis-gcc-4.1.2-r1 new file mode 100644 index 000000000000..e1ae2a535c13 --- /dev/null +++ b/dev-ada/asis-gcc/files/digest-asis-gcc-4.1.2-r1 @@ -0,0 +1,3 @@ +MD5 7af938b80b646e19f687e826318a559d asis-gcc-4.1.2.tar.bz2 2617806 +RMD160 851e91181d396c60899858d922edea2ed6f170a6 asis-gcc-4.1.2.tar.bz2 2617806 +SHA256 37466312b6c43ada02b704893b509af449ab1833bc6e3cddea40344cb8972c5e asis-gcc-4.1.2.tar.bz2 2617806 |