# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ MY_PV=3.4.3 DESCRIPTION="ghdl Compiler" SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${MY_PV}/gcc-core-${MY_PV}.tar.bz2 http://ghdl.free.fr/ghdl-${PV}.tar.bz2" HOMEPAGE="http://ghdl.free.fr/" DEPEND="" SLOT="0" KEYWORDS="~x86" LICENSE="GPL-2" IUSE="" GCCBUILD="${WORKDIR}/gcc-${MY_PV}" DEPEND="=dev-lang/gnat-3.15p-r4" CFLAGS="-O" src_unpack() { unpack ${A} cp -r ${WORKDIR}/ghdl-${PV}/vhdl ${GCCBUILD}/gcc cd "${GCCBUILD}" patch ${GCCBUILD}/gcc/Makefile.in ${FILESDIR}/gccpatch || die "patch failed" patch ${GCCBUILD}/gcc/vhdl/Makefile.in ${FILESDIR}/ghdlpatch || die "patch failed" } src_compile() { # Configure gcc cd ${GCCBUILD} "${GCCBUILD}"/configure --prefix=/usr \ --program-prefix="ghdl" \ --enable-languages="vhdl" \ --libdir=/usr/lib/ghdl \ --libexecdir=/usr/lib/ghdl \ --datadir=/usr/data/ghdl \ || die "configure failed" make || die "ghdl build" } src_install() { # Install ghdl, tools cd "${GCCBUILD}" #make prefix=${D}/usr \ #libdir=${D}/usr/lib/ghdl \ #libexecdir=${D}/usr/libexec/ghdl \ #datadir=${D}/usr/data/ghdl \ #install || die "died while installing" make install DESTDIR=${D} || die "died while installing" } pkg_postinst() { # recompile the libraries on the system local PDIR=${WORKDIR}/gcc-3.4.3/gcc/vhdl local DDIR=${ROOT}/usr/lib/ghdl/gcc/i686-pc-linux-gnu/3.4.3/vhdl cd ${DDIR} make -f ${PDIR}/Makefile REL_DIR=../../.. LIBSRC_DIR="src" \ srcdir=${PDIR} \ LIB93_DIR=lib/v93 LIB87_DIR=lib/v87 \ ANALYZE="${PDIR}/../ghdl -a --GHDL1=${PDIR}/../ghdl1 --ieee=none" \ std.v93 std.v87 ieee.v93 ieee.v87 synopsys.v93 synopsys.v87 cd ${PDIR} install -m 644 std87_standard.o ${DDIR}/lib/v87/std/std_standard.o install -m 644 std93_standard.o ${DDIR}/lib/v93/std/std_standard.o # Notify the user what changed einfo "" einfo "The compiler has been installed as ghdl." einfo "" }