# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Maintainer: Gustavo Sverzut Barbieri # $Header:$ IUSE="" KEYWORDS="~x86" SLOT="0" MY_P="${PN}-v${PV}" MY_PKG="${MY_P}.tgz" S="${WORKDIR}/${PN}" DESCRIPTION="ArchC is an open-source architecture description language" SRC_URI="http://unc.dl.sourceforge.net/sourceforge/archc/${MY_PKG}" HOMEPAGE="http://www.archc.org" LICENSE="GPL-2" DEPEND=">=sys-devel/bison-1.35 >=sys-devel/flex-2.5.4 >=sys-devel/gcc-3.2 >=app-sci/systemc-2.0.1" DEPEND="${DEPEND}" src_compile() { # Stupid Makefile... just "make" already install :( cd ${S} emake acpp || die } src_install () { cd ${S} # Do install manually until they implement a descent install method dodir /usr/share/archc/config dodir /usr/share/archc/src dodir /usr/share/archc/include # Copy binary dobin acpp # Copy src and include insopts -m0644 insinto /usr/share/archc/src doins src/* insinto /usr/share/archc/include doins include/* insinto /usr/share/archc doins ac_decoder.o # Values from install.sh local ARCHC_PATH="" local SYSTEMC_PATH=$(dirname "$(qpkg -nc -l systemc | grep /libsystemc.a)") local CC="g++" local optflag="" local debugflag="-g" local otherflag="-Wall -Wno-deprecated -Wno-char-subscripts" local SYSTEMC_TARGET="linux" cat > ${D}/usr/share/archc/config/archc.conf < ${D}/etc/env.d/99archc # ArchC expects SystemC to be in ${SYSTEMC_PATH}/lib-linux/libsystemc.a dodir ${SYSTEMC_PATH}/lib-linux dosym ${SYSTEMC_PATH}/libsystemc.a ${SYSTEMC_PATH}/lib-linux # Install documentation. dodoc ChangeLog COPYING COPYING.LIB README } pkg_postinst() { einfo "The environment has been set up to ArchC find its files." einfo "In order to immediately activate these settings please do:" einfo " env-update" einfo " source /etc/profile" einfo "Otherwise the settings will become active next time you login." }