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: asis-gcc-4.3.1-r1.ebuild ChangeLog
Date: Fri, 27 Apr 2012 13:53:38
Message-Id: 20120427135311.8F86D2004B@flycatcher.gentoo.org
1 george 12/04/27 13:53:11
2
3 Modified: ChangeLog
4 Added: asis-gcc-4.3.1-r1.ebuild
5 Log:
6 fix info collision upon update
7
8 (Portage version: 2.1.10.56/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.16 dev-ada/asis-gcc/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ada/asis-gcc/ChangeLog?rev=1.16&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ada/asis-gcc/ChangeLog?rev=1.16&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ada/asis-gcc/ChangeLog?r1=1.15&r2=1.16
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/ChangeLog,v
20 retrieving revision 1.15
21 retrieving revision 1.16
22 diff -u -r1.15 -r1.16
23 --- ChangeLog 19 Apr 2012 13:30:42 -0000 1.15
24 +++ ChangeLog 27 Apr 2012 13:53:11 -0000 1.16
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-ada/asis-gcc
27 # Copyright 2002-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/ChangeLog,v 1.15 2012/04/19 13:30:42 george Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/ChangeLog,v 1.16 2012/04/27 13:53:11 george Exp $
30 +
31 +*asis-gcc-4.3.1-r1 (27 Apr 2012)
32 +
33 + 27 Apr 2012; george <george@g.o> +asis-gcc-4.3.1-r1.ebuild:
34 + fix info collision upon update
35
36 *asis-gcc-4.3.1 (19 Apr 2012)
37
38
39
40
41 1.1 dev-ada/asis-gcc/asis-gcc-4.3.1-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ada/asis-gcc/asis-gcc-4.3.1-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ada/asis-gcc/asis-gcc-4.3.1-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: asis-gcc-4.3.1-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2012 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-ada/asis-gcc/asis-gcc-4.3.1-r1.ebuild,v 1.1 2012/04/27 13:53:11 george Exp $
51
52 inherit eutils flag-o-matic gnatbuild
53
54 ACT_Ver=2009
55 Gnat_Name="gnat-gcc"
56
57 DESCRIPTION="The Ada Semantic Interface Specification (semantic analysis and tools tied to compiler)"
58 SRC_URI="http://dev.gentoo.org/~george/src/asis-gpl-${ACT_Ver}-src.tgz"
59 HOMEPAGE="https://libre.adacore.com/"
60 LICENSE="GPL-2"
61
62 KEYWORDS="~amd64 ~x86"
63
64 IUSE="doc"
65 RDEPEND="=dev-lang/gnat-gcc-${SLOT}*"
66 DEPEND="${RDEPEND}
67 doc? ( virtual/latex-base
68 app-text/texi2html )"
69
70 S="${WORKDIR}/asis-${ACT_Ver}-src"
71
72 # it may be even better to force plain -O2 -pipe -ftracer here
73 replace-flags -O3 -O2
74
75 # we need to adjust some vars defined in gnatbuild.eclass so that they use
76 # gnat-gcc instead of asis
77 LIBPATH=${LIBPATH/${PN}/${Gnat_Name}}
78 BINPATH=${BINPATH/${PN}/${Gnat_Name}}
79 DATAPATH=${DATAPATH/${PN}/${Gnat_Name}}
80
81 #QA_EXECSTACK="${BINPATH:1}/*
82 # ${LIBPATH:1}/adalib/libasis-${ACT_Ver}.so"
83
84 pkg_setup() {
85 currGnat=$(eselect --no-color gnat show | grep "gnat-" | awk '{ print $1 }')
86 if [[ "${currGnat}" != "${CTARGET}-${Gnat_Name}-${SLOT}" ]]; then
87 echo
88 eerror "The active gnat profile does not correspond to the selected"
89 eerror "version of asis! Please install the appropriate gnat (if you"
90 eerror "did not so yet) and run:"
91 eerror "eselect gnat set ${CTARGET}-${Gnat_Name}-${SLOT}"
92 eerror "env-update && source /etc/profile"
93 eerror "and then emerge asis-gcc:${SLOT} again.."
94 echo
95 die
96 fi
97 }
98
99 # we need to override the eclass defined src_unpack
100 # and change gcc to gnatgcc where appropriate
101 src_unpack() {
102 unpack ${A}
103 cd "${S}"/gnat/
104 # newer versions autogen snames.ad?
105 # Looks logical to keep it here, as this is a part of source prep
106 gnatmake xsnamest.adb
107 ./xsnamest
108 mv snames.ns snames.ads
109 mv snames.nb snames.adb
110 # need to change gcc -> gnatgcc
111 cd "${S}"
112 for fn in asis/a4g-gnat_int.adb \
113 asis/a4g-contt.adb \
114 gnat/snames.adb \
115 tools/tool_utils/asis_ul-common.adb \
116 tools/gnatmetric/metrics-compute.adb; do
117 sed -i -e "s:\"gcc:\"gnatgcc:" ${fn}
118 done
119 }
120
121 src_compile() {
122 # Build the shared library first, we need -fPIC here
123 gnatmake -Pasis_bld -XBLD=prod -XOPSYS=default_Unix -cargs ${CFLAGS} -fPIC \
124 || die "building libasis.a failed"
125 gnatgcc -shared -Wl,-soname,libasis-${ACT_Ver}.so \
126 -o obj/libasis-${ACT_Ver}.so obj/*.o -lc \
127 || die "building libasis.so failed"
128
129 # build tools
130 for fn in tools/*; do
131 pushd ${fn}
132 gnatmake -P${fn:6}.gpr || die "building ${fn:6} failed"
133 popd
134 done
135
136 # common stuff is just docs in this case
137 if use doc; then
138 emake -C documentation all || die "Failed while compiling documentation"
139 fi
140 }
141
142 src_install () {
143 # README asks to run make install, claiming that some sources are built at
144 # that point
145 make all install prefix="${D}"
146 # now manually move all the stuff to proper places
147 mkdir -p "${D}${LIBPATH}"
148 mv "${D}"lib/asis/ "${D}${LIBPATH}"/adalib
149 # install the shared lib
150 chmod 0755 obj/libasis-${ACT_Ver}.so
151 cp obj/libasis-${ACT_Ver}.so "${D}${LIBPATH}"/adalib
152 # make appropriate symlinks
153 pushd "${D}${LIBPATH}"/adalib
154 ln -s libasis-${ACT_Ver}.so libasis.so
155 popd
156 # sources
157 mv "${D}"include/asis/ "${D}${LIBPATH}"/adainclude
158
159 # tools
160 mkdir -p "${D}${BINPATH}"
161 find "${S}"/tools/ -type f -executable -exec cp {} "${D}${BINPATH}" \;
162 rm -f "${D}${BINPATH}"/Makefile*
163
164 # docs and examples
165 cd "${S}"/documentation/
166 dodoc *.txt
167 dohtml *.html
168 cd "${S}"
169 insinto /usr/share/doc/${PF}
170 doins -r documentation/*.pdf documentation/*.info tutorial/ templates/
171
172 # cleanup empty dirs
173 rm -rf "${D}"/{bin,include,lib,share}
174 }
175
176 pkg_postinst() {
177 echo
178 elog "The ASIS is installed for the active gnat compiler at gnat's location."
179 elog "No further configuration is necessary. Enjoy."
180 echo
181 }