# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_PV="4_21" MY_P="linux-ic-${MY_PV}" # unpacked archive is different from archive name MY_DIR="ic-linux-${MY_PV}" DESCRIPTION="A subset of the C language used for programming the Handyboard and Lego RCX, written by Fred. G. Martin and others at MIT." HOMEPAGE="http://kipr.org/ic/" SRC_URI="http://kipr.org/ic/download/linux/linux-ic-${MY_PV}.tgz" FETCH_URI="http://kipr.org/ic/download.html" SLOT="${MY_PV}" KEYWORDS="~x86" IUSE="" LICENSE="" INSTALLDIR="/opt/${MY_DIR}" RESTRICT="fetch" DEPEND="virtual/x11 virtual/libc x11-libs/qt" pkg_nofetch() { einfo "Please download ${MY_P} from $FETCH_URI." einfo "Make sure to select Linux as your arch." einfo "Once you have downloaded the file, move it to " einfo "/usr/portage/distfiles/${MY_P}.tgz" } src_install() { dodir ${INSTALLDIR} exeinto ${INSTALLDIR} FILES="doc2inf.pl ic4 Interactive_C_Manual.html" for i in ${FILES} do doexe ${WORKDIR}/${MY_DIR}/${i} || die "Could not install ic4 into ${INSTALLDIR}" done DIRS="Handyboard Interactive_C_Manual_Pictures RCX" # adding subdirectories for i in ${DIRS} do if ! [ -d ${i} ] ; then dodir ${INSTALLDIR}/${i} cp -Rd ${WORKDIR}/${MY_DIR}/${i} ${D}${INSTALLDIR} else cp -Rd ${WORKDIR}/${MY_DIR}/${i} ${D}${INSTALLDIR} fi done dodir /etc/env.d echo -e "PATH=\"${INSTALLDIR}\"" > ${D}/etc/env.d/75ic } pkg_postinst () { ewarn ewarn "If you connect a handyboard, the Open function may cause IC to" ewarn "crash with this error:" ewarn ewarn "cannot handle file 'libc.so.6' with TLS data" ewarn ewarn "This is a known bug, but due to the fact that IC is only" ewarn "distributed as binary, it cannot be fixed. IC 5 will be" ewarn "released soon, and will be open source\n\n" ebeep 5 epause 3 }