/[gentoo-x86]/sci-electronics/ghdl/ghdl-0.29.ebuild
Gentoo

Contents of /sci-electronics/ghdl/ghdl-0.29.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat May 14 14:34:21 2011 UTC (3 years, 7 months ago) by tomjbe
Branch: MAIN
Changes since 1.2: +3 -3 lines
Switch to EAPI=3 to fix bug #192761

(Portage version: 2.1.9.46/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-electronics/ghdl/ghdl-0.29.ebuild,v 1.2 2010/07/24 15:39:14 tomjbe Exp $
4
5 EAPI="3"
6
7 inherit multilib
8
9 GCC_VERSION="4.3.4"
10 GNATGCC_SLOT="4.3"
11
12 DESCRIPTION="Complete VHDL simulator using the GCC technology"
13 HOMEPAGE="http://ghdl.free.fr"
14 SRC_URI="http://ghdl.free.fr/${P}.tar.bz2
15 mirror://gnu/gcc/releases/gcc-${GCC_VERSION}/gcc-core-${GCC_VERSION}.tar.bz2"
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~ppc ~x86"
19 IUSE=""
20 DEPEND=">=sys-apps/portage-2.1.2.10
21 dev-lang/gnat-gcc:${GNATGCC_SLOT}"
22 RDEPEND=""
23 S="${WORKDIR}/gcc-${GCC_VERSION}"
24
25 ADA_INCLUDE_PATH="${ROOT}/usr/lib/gnat-gcc/${CHOST}/${GNATGCC_SLOT}/adainclude"
26 ADA_OBJECTS_PATH="${ROOT}/usr/lib/gnat-gcc/${CHOST}/${GNATGCC_SLOT}/adalib"
27 GNATGCC_PATH="${ROOT}/usr/${CHOST}/gnat-gcc-bin/${GNATGCC_SLOT}:${ROOT}/usr/libexec/gnat-gcc/${CHOST}/${GNATGCC_SLOT}"
28
29 src_prepare() {
30 mv "${WORKDIR}/${P}"/vhdl gcc
31 sed -i -e 's/ADAC = \$(CC)/ADAC = gnatgcc/' gcc/vhdl/Makefile.in || die "sed failed"
32 sed -i \
33 -e 's/AGCC_CFLAGS=-g/AGCC_CFLAGS=$(CFLAGS)/' \
34 -e 's/rm -rf $(infodir)/rm -rf $(DESTDIR)$(infodir)/' \
35 gcc/vhdl/Make-lang.in || die "sed failed"
36
37 # Fix issue similar to bug #195074, ported from vapier's fix for binutils
38 sed -i -e "s:egrep.*texinfo.*dev/null:egrep 'texinfo[^0-9]*(4\.([4-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null:" \
39 configure* || die "sed failed"
40
41 # For multilib profile arch, see bug #203721
42 if (has_multilib_profile || use multilib ) ; then
43 for T_LINUX64 in `find "${S}/gcc/config" -name t-linux64` ;
44 do
45 einfo "sed for ${T_LINUX64} for multilib. :)"
46 sed -i \
47 -e "s:\(MULTILIB_OSDIRNAMES = \).*:\1../lib64 ../lib32:" \
48 "${T_LINUX64}" \
49 || die "sed for ${T_LINUX64} failed. :("
50 done
51 fi
52 }
53
54 src_configure() {
55 PATH="${GNATGCC_PATH}:${PATH}" econf --enable-languages=vhdl
56 }
57
58 src_compile() {
59 PATH="${GNATGCC_PATH}:${PATH}" emake -j1 || die "Compilation failed"
60 }
61
62 src_install() {
63 # bug #277644
64 PATH="${GNATGCC_PATH}:${PATH}" emake -j1 DESTDIR="${D}" install || die "Installation failed"
65
66 cd "${D}"/usr/bin ; rm `ls --ignore=ghdl`
67 rm -rf "${D}"/usr/include
68 rm "${D}"/usr/$(get_libdir)/lib*
69 cd "${D}"/usr/$(get_libdir)/gcc/${CHOST}/${GCC_VERSION} ; rm -rf `ls --ignore=vhdl*`
70 cd "${D}"/usr/libexec/gcc/${CHOST}/${GCC_VERSION} ; rm -rf `ls --ignore=ghdl*`
71 cd "${D}"/usr/share/info ; rm `ls --ignore=ghdl*`
72 cd "${D}"/usr/share/man/man1 ; rm `ls --ignore=ghdl*`
73 rm -Rf "${D}"/usr/share/locale
74 rm -Rf "${D}"/usr/share/man/man7
75 }

  ViewVC Help
Powered by ViewVC 1.1.20