1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils fdo-mime gnome2-utils versionator
7 MY_PV=$(delete_all_version_separators ${PV})
8 MY_P="${PN/-bin}-${MY_PV}-pc-linux"
10 DESCRIPTION="Powerful software tool to experiment with musical tunings"
11 HOMEPAGE="http://www.huygens-fokker.org/scala/"
12 SRC_URI="http://www.huygens-fokker.org/software/${MY_P}.tar.bz2"
19 RDEPEND="=virtual/gnat-4.1*
20 >=dev-ada/gtkada-2.8.0
21 midi? ( media-sound/playmidi )"
23 RESTRICT="mirror strip test"
29 rm -f libgtkada-2.8.so.0 || die "cannot delete bundled gtkada"
33 for i in html xpm ; do
34 insinto /opt/${PN}/${i}
35 doins ${i}/* || die "doins failed"
39 doins *.{clv,gif,htm,html,kbm,par,scl,seq} scala.{ini,ico} scalarc || die "doins failed"
41 exeinto /opt/${PN}/cmd
42 doexe cmd/* || die "doexe failed"
44 doexe *.cmd || die "doexe failed"
46 doexe scala || die "failed to install main binary"
47 dosym /opt/${PN}/scala /opt/bin/scala
48 doicon "${FILESDIR}"/${PN}.png || die
49 make_desktop_entry scala Scala ${PN} \
50 'AudioVideo;Audio;GNOME;GTK;Midi;Music' Path=/opt/${PN}
52 dodoc cmdlist.txt commands.txt dummies.txt first.txt readme.txt || die
54 echo 'SCALA_HOME="/opt/scala-bin"' > "${T}"/99${PN}
55 doenvd "${T}"/99${PN} || die
59 fdo-mime_desktop_database_update
60 gnome2_icon_cache_update
62 elog "A collection of over 3600 scales can be downloaded from"
63 elog " http://www.huygens-fokker.org/docs/scales.zip"
64 elog "Unpack them to /opt/${PN}/scl directory using unzip -a scales.zip command."
66 elog "NOTE: The -a option is important! The files cannot be opened if"
67 elog "NOTE: they are unzipped on Linux without this option!"
71 fdo-mime_desktop_database_update
72 gnome2_icon_cache_update
74 if [[ -d ${ROOT}/opt/${PN}/scl ]] ; then
75 elog "Seems that you have installed custom scales to ${ROOT}/opt/${PN}/scl"
76 elog "You will have to delete this directory manually."