# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header:$ inherit eutils VER="MuPAD-3.1.1" MY_P="mupad_linux_311" # using .tgz file rather than .rpm; JJS 2/23/05 DESCRIPTION="MuPAD is an open computer algebra system" SRC_URI="ftp://ftp.mupad.de/MuPAD/distrib/unix/${MY_P}.tgz" HOMEPAGE="http://research.mupad.de/home.html" SLOT="0" KEYWORDS="~x86" LICENSE="mupad" IUSE="" DEPEND="virtual/libc !sci-mathematics/mupad-scilab" # shouldn't have both mupad and mupad-scilab installed at the same time; JJS 2/23/05 RDEPEND=">=dev-lang/tk-8.3" src_unpack() { cd ${WORKDIR} tar -xzvf ${DISTDIR}/${A} } src_install() { dodir /opt/MuPAD mv ${WORKDIR}/* ${D}/opt/MuPAD/. cd ${D}/opt/MuPAD/share/bin FILES=$(ls -1) # hard-code mupad install directory in the run scripts for FILE in ${FILES} do sed -i /SHARE_BIN=/,/export\ MuPAD_ROOT_PATH/d ${FILE} sed -i s':# Special settings to run MuPAD without any local modifications:MuPAD_ROOT_PATH=/opt/MuPAD\ export MuPAD_ROOT_PATH:'g ${FILE} done dodir /opt/bin cd ${D}/opt/bin for FILE in ${FILES} do ln -s ../MuPAD/share/bin/${FILE} . done } pkg_postinst() { echo "" einfo "SOME IMPORTANT NOTES:" einfo "" einfo " - This version of MuPAD has does not have Scilab functionality" einfo " integrated. If you want Scilab integrated, emerge mupad-scilab" einfo "" einfo " - MuPAD is only free for non-commercial use. Visit" einfo " http://www.mupad.com/ for commercial downloads." einfo "" einfo " - In this non-commercial version, you must register to" einfo " obtain a license key in order to deactivate the memory" einfo " limit. The memory limit prevents large calculations." einfo " Read the documentation or visit" einfo "" einfo " ${HOMEPAGE}" einfo "" einfo " for more info." echo "" }