Change Qt deps
[gentoo-interactive-fiction.git] / games-engines / hugor / hugor-9999.ebuild
Commit [+]AuthorDateLineData
a087852c
NC
Nikos Chantziaras2012-03-02 04:29:45 +02001# 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
a087852c
NC
Nikos Chantziaras2012-03-02 04:29:45 +020021
22DESCRIPTION="Multimedia interpreter for Hugo text adventures"
23HOMEPAGE="http://ifwiki.org/index.php/Hugor"
24
724b2cff Nikos Chantziaras2012-03-08 13:03:43 +020025LICENSE="Hugo"
a087852c Nikos Chantziaras2012-03-02 04:29:45 +020026SLOT="0"
a087852c Nikos Chantziaras2012-03-02 04:29:45 +020027IUSE="fmod +sdl"
4cf15eed Nikos Chantziaras2012-08-08 18:47:50 +030028REQUIRED_USE="^^ ( fmod sdl )"
a087852c Nikos Chantziaras2012-03-02 04:29:45 +020029
840ea00b Nikos Chantziaras2013-03-03 07:46:35 +020030DEPEND="dev-qt/qtgui:4
a087852c
NC
Nikos Chantziaras2012-03-02 04:29:45 +020031 sdl? ( >=media-libs/sdl-mixer-1.2.12[mad,midi,modplug] )
32 fmod? ( media-libs/fmod )
33 x11-misc/shared-mime-info"
34
a087852c
NC
Nikos Chantziaras2012-03-02 04:29:45 +020035src_configure() {
36 if use sdl; then
37 eqmake4 SOUND=sdl
38 else
39 eqmake4 SOUND=fmod
40 fi
41}
42
43src_install() {
44 dogamesbin "hugor"
45 dodoc README
46 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
a087852c Nikos Chantziaras2012-03-02 04:29:45 +020060pkg_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() {
a087852c
NC
Nikos Chantziaras2012-03-02 04:29:45 +020068 fdo-mime_desktop_database_update
69 fdo-mime_mime_database_update
4cf15eed Nikos Chantziaras2012-08-08 18:47:50 +030070 gnome2_icon_cache_update
a087852c Nikos Chantziaras2012-03-02 04:29:45 +020071}