Gentoo Archives: gentoo-commits

From: "George Shapovalov (george)" <george@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ada/asis-gcc: ChangeLog asis-gcc-4.2.2.ebuild
Date: Fri, 08 Feb 2008 14:33:11
Message-Id: E1JNUHs-00041J-Ro@stork.gentoo.org
1 george 08/02/08 14:33:08
2
3 Modified: ChangeLog
4 Added: asis-gcc-4.2.2.ebuild
5 Log:
6 added (finally) an asis version for gnat-gcc-4.2 series.
7 (Portage version: 2.1.4.1)
8
9 Revision Changes Path
10 1.8 dev-ada/asis-gcc/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ada/asis-gcc/ChangeLog?rev=1.8&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ada/asis-gcc/ChangeLog?rev=1.8&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ada/asis-gcc/ChangeLog?r1=1.7&r2=1.8
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/ChangeLog,v
19 retrieving revision 1.7
20 retrieving revision 1.8
21 diff -u -r1.7 -r1.8
22 --- ChangeLog 27 Feb 2007 12:27:14 -0000 1.7
23 +++ ChangeLog 8 Feb 2008 14:33:08 -0000 1.8
24 @@ -1,6 +1,13 @@
25 # ChangeLog for dev-ada/asis-gcc
26 -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/ChangeLog,v 1.7 2007/02/27 12:27:14 george Exp $
28 +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/ChangeLog,v 1.8 2008/02/08 14:33:08 george Exp $
30 +
31 +*asis-gcc-4.2.2 (08 Feb 2008)
32 +
33 + 08 Feb 2008; George Shapovalov <george@g.o> +asis-gcc-4.2.2.ebuild:
34 + added (finally) an asis version for gnat-gcc-4.2 series. Only one per major
35 + version seems sufficient now, as Ada stuff in gcc is kept stable between
36 + major releases. Adjusted DEPEND correspondingly.
37
38 27 Feb 2007; George Shapovalov <george@g.o> asis-gcc-4.1.1.ebuild, asis-gcc-3.4.6.ebuild:
39 backported gnatmake related fix from 4.1.2
40
41
42
43 1.1 dev-ada/asis-gcc/asis-gcc-4.2.2.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ada/asis-gcc/asis-gcc-4.2.2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ada/asis-gcc/asis-gcc-4.2.2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: asis-gcc-4.2.2.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/asis-gcc-4.2.2.ebuild,v 1.1 2008/02/08 14:33:08 george Exp $
53
54 inherit eutils flag-o-matic gnatbuild multilib
55
56 DESCRIPTION="The Ada Semantic Interface Specification (tools tied to compiler). GnuAda version"
57 HOMEPAGE="http://gnuada.sourceforge.net/"
58 LICENSE="GMGPL"
59
60 KEYWORDS="~amd64 ~x86"
61
62 Gnat_Name="gnat-gcc"
63 My_PN="asis"
64 SRC_URI="http://dev.gentoo.org/~george/src/${P}.tar.bz2"
65
66 IUSE="doc"
67 RDEPEND="=dev-lang/gnat-gcc-${SLOT}*"
68 DEPEND="${RDEPEND}
69 doc? ( virtual/tetex
70 app-text/texi2html )"
71
72 # overwriting gnatboot's S
73 S="${WORKDIR}/${My_PN}-${PV}"
74
75 # Execstack is not nearly as dangerous in Ada as in C and would require a lot of
76 # work to work around. See bug #141315.
77 QA_EXECSTACK="usr/$(get_libdir)/gnat-gcc/*/${SLOT}/adalib/libasis-${SLOT}.so
78 usr/$(get_libdir)/gnat-gcc/*/${SLOT}/adalib/libasis.a
79 usr/*/gnat-gcc-bin/${SLOT}/*"
80
81 # it may be even better to force plain -O2 -pipe here
82 replace-flags -O3 -O2
83
84 # we need to adjust some vars defined in gnatbuild.eclass so that they use
85 # gnat-gcc instead of asis
86 My_LIBPATH=${LIBPATH/${PN}/${Gnat_Name}}
87 My_BINPATH=${BINPATH/${PN}/${Gnat_Name}}
88 My_DATAPATH=${DATAPATH/${PN}/${Gnat_Name}}
89
90 pkg_setup() {
91 local currGnat=$(eselect --no-color gnat show | grep "gnat-" | awk '{ print $1 }')
92 if [[ "${currGnat}" != "${CTARGET}-${Gnat_Name}-${SLOT}" ]]; then
93 echo
94 eerror "The active gnat profile does not correspond to the selected"
95 eerror "version of asis! Please install the appropriate gnat (if you"
96 eerror "did not so yet) and run:"
97 eerror "eselect gnat set ${CTARGET}-${Gnat_Name}-${SLOT}"
98 eerror "env-update && source /etc/profile"
99 eerror "and then emerge =dev-ada/asis-${PV} again.."
100 echo
101 die
102 fi
103 if [[ -e ${My_LIBPATH}/adalib/libasis.a ]] ; then
104 echo
105 ewarn "gnatmake of gnat-gcc unfortunately has problems forcing the build"
106 ewarn "if the package is already installed."
107 eerror "Please unmerge asis-gcc first and then resume the merge:"
108 eerror "emerge --unmerge asis-gcc && emerge asis-gcc"
109 echo
110 die
111 fi
112 }
113
114 # we need to avoid calling gnatboot_src_unpack
115 src_unpack() {
116 unpack ${A}
117 }
118
119 src_compile() {
120 # Build the shared library first, we need -fPIC here
121 gnatmake -f -Pasis_stat -cargs ${CFLAGS} || die "building libasis.a failed"
122 gnatmake -f -Pasis_dyn -cargs ${CFLAGS} || die "building libasis.so failed"
123 chmod 0444 lib/*.ali
124
125 # build tools
126 # we need version.o generated for all the tools
127 gcc -c -o obj/version.o gnat/version.c
128 for fn in gnatelim gnatstub gnatpp ; do
129 pushd tools/${fn}
130 gnatmake -o ${fn} ${fn}-driver.adb -I../../asis/ -I../../gnat/ \
131 -I../tool_utils/ -I../tool_utils/templates/ \
132 -L../../lib -cargs ${CFLAGS} -largs -lasis ../../obj/version.o \
133 || die "building ${fn} failed"
134 popd
135 done
136 pushd tools/gnatmetric
137 gnatmake -o gnatmetric metrics-simple_driver.adb -I../../asis/ -I../../gnat/ \
138 -I../tool_utils/ -I../tool_utils/templates/ \
139 -L../../lib -cargs ${CFLAGS} -largs -lasis ../../obj/version.o \
140 || die "building ${fn} failed"
141 popd
142
143 pushd tools/adabrowse
144 gcc -c util-nl.c
145 gnatmake -I../../asis -I../../gnat adabrowse -L../../lib -cargs ${CFLAGS} \
146 -largs -lasis ../../obj/version.o || die
147 popd
148 pushd tools/semtools
149 gnatmake -I../../asis -I../../gnat adadep -L../../lib \
150 -cargs ${CFLAGS} -largs -lasis ../../obj/version.o || die
151 gnatmake -I../../asis -I../../gnat adasubst -L../../lib \
152 -cargs ${CFLAGS} -largs -lasis ../../obj/version.o || die
153 popd
154
155 # common stuff is just docs in this case
156 if use doc; then
157 pushd documentation
158 make all || die "Failed while compiling documentation"
159 for fn in *.ps; do ps2pdf ${fn}; done
160 popd
161 fi
162 }
163
164 src_install () {
165 # install the lib
166 dodir ${My_LIBPATH}/adalib
167 # doins grossly screws permissions
168 cp -dpP lib/* "${D}${My_LIBPATH}"/adalib
169 # sources
170 insinto ${My_LIBPATH}/adainclude
171 doins gnat/*.ad[sb]
172 doins asis/*.ad[sb]
173 # two files are already part of gnat, removing to avoid collision
174 rm "${D}${My_LIBPATH}"/adainclude/g-string.ad?
175
176 # tools
177 mkdir -p "${D}${My_BINPATH}"
178 for fn in tools/{adabrowse,gnatelim,gnatstub,gnatpp,gnatmetric}; do
179 cp ${fn}/${fn:6} "${D}${My_BINPATH}"
180 done
181 cp tools/semtools/ada{dep,subst} "${D}${My_BINPATH}"
182
183 # docs and examples
184 if use doc ; then
185 dodoc documentation/*.{txt,ps}
186 dohtml documentation/*.html
187 # info's should go into gnat-gpl dirs
188 insinto ${My_DATAPATH}/info/
189 doins documentation/*.info
190
191 insinto /usr/share/doc/${PF}
192 doins -r documentation/*.pdf examples/ tutorial/ templates/
193 fi
194 }
195
196 pkg_postinst() {
197 echo
198 elog "The ASIS is installed for the active gnat compiler at gnat's location."
199 elog "No further configuration is necessary. Enjoy."
200 echo
201 }
202
203
204
205 --
206 gentoo-commits@l.g.o mailing list