Change Qt deps
[gentoo-interactive-fiction.git] / games-engines / hugor / hugor-0.9.ebuild
Commit [+]AuthorDateLineData
3565e1b8
NC
Nikos Chantziaras2011-08-21 22:57:59 +03001# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
4cf15eed Nikos Chantziaras2012-08-08 18:47:50 +03005EAPI="4"
c19fc55e Nikos Chantziaras2012-03-27 07:16:44 +03006
c4a36fd9
NC
Nikos Chantziaras2012-03-23 01:42:16 +02007if [ "$PV" != "9999" ]; then
8 SRC_URI="http://foss.aegean.gr/~realnc/hugor/${P}.tar.bz2"
9 KEYWORDS="x86 amd64"
10else
11 SRC_URI=""
c4a36fd9 Nikos Chantziaras2012-03-23 01:42:16 +020012 KEYWORDS=""
c19fc55e
NC
Nikos Chantziaras2012-03-27 07:16:44 +030013fi
14
4cf15eed Nikos Chantziaras2012-08-08 18:47:50 +030015inherit eutils gnome2-utils fdo-mime games qt4-r2 confutils
c19fc55e
NC
Nikos Chantziaras2012-03-27 07:16:44 +030016
17if [ "$PV" == "9999" ]; then
18 EGIT_REPO_URI="git://git.assembla.com/hugor.git"
c4a36fd9
NC
Nikos Chantziaras2012-03-23 01:42:16 +020019 inherit git-2
20fi
3565e1b8
NC
Nikos Chantziaras2011-08-21 22:57:59 +030021
22DESCRIPTION="Multimedia interpreter for Hugo text adventures"
23HOMEPAGE="http://ifwiki.org/index.php/Hugor"
3565e1b8 Nikos Chantziaras2011-08-21 22:57:59 +030024
724b2cff Nikos Chantziaras2012-03-08 13:03:43 +020025LICENSE="Hugo"
3565e1b8 Nikos Chantziaras2011-08-21 22:57:59 +030026SLOT="0"
c4a36fd9 Nikos Chantziaras2012-03-23 01:42:16 +020027IUSE="fmod +sdl"
4cf15eed Nikos Chantziaras2012-08-08 18:47:50 +030028REQUIRED_USE="^^ ( fmod sdl )"
3565e1b8 Nikos Chantziaras2011-08-21 22:57:59 +030029
840ea00b Nikos Chantziaras2013-03-03 07:46:35 +020030DEPEND="dev-qt/qtgui:4
c4a36fd9
NC
Nikos Chantziaras2012-03-23 01:42:16 +020031 sdl? ( >=media-libs/sdl-mixer-1.2.12[mad,midi,modplug] )
32 fmod? ( media-libs/fmod )
3565e1b8
NC
Nikos Chantziaras2011-08-21 22:57:59 +030033 x11-misc/shared-mime-info"
34
c4a36fd9
NC
Nikos Chantziaras2012-03-23 01:42:16 +020035src_configure() {
36 if use sdl; then
37 eqmake4 SOUND=sdl
3565e1b8 Nikos Chantziaras2011-08-21 22:57:59 +030038 else
c4a36fd9 Nikos Chantziaras2012-03-23 01:42:16 +020039 eqmake4 SOUND=fmod
3565e1b8 Nikos Chantziaras2011-08-21 22:57:59 +030040 fi
c4a36fd9
NC
Nikos Chantziaras2012-03-23 01:42:16 +020041}
42
43src_install() {
44 dogamesbin "hugor"
45 dodoc README
3565e1b8
NC
Nikos Chantziaras2011-08-21 22:57:59 +030046 doicon "${FILESDIR}/hugor.png"
47 make_desktop_entry hugor Hugor "hugor" Game "GenericName=Hugo Multimedia Interpreter\nMimeType=application/x-hugo-image;"
48 insinto /usr/share/icons
49 doins -r "${FILESDIR}/hicolor"
50 insinto /usr/share/mime/packages
51 doins "${FILESDIR}/hugor.xml"
52 prepgamesdirs
53}
54
4cf15eed
NC
Nikos Chantziaras2012-08-08 18:47:50 +030055pkg_preinst() {
56 games_pkg_preinst
57 gnome2_icon_savelist
58}
59
3565e1b8 Nikos Chantziaras2011-08-21 22:57:59 +030060pkg_postinst() {
4cf15eed
NC
Nikos Chantziaras2012-08-08 18:47:50 +030061 games_pkg_postinst
62 fdo-mime_desktop_database_update
63 fdo-mime_mime_database_update
64 gnome2_icon_cache_update
65}
66
67pkg_postrm() {
3565e1b8
NC
Nikos Chantziaras2011-08-21 22:57:59 +030068 fdo-mime_desktop_database_update
69 fdo-mime_mime_database_update
4cf15eed Nikos Chantziaras2012-08-08 18:47:50 +030070 gnome2_icon_cache_update
3565e1b8 Nikos Chantziaras2011-08-21 22:57:59 +030071}