diff options
Diffstat (limited to 'games-rpg/dragonhunt')
-rw-r--r-- | games-rpg/dragonhunt/ChangeLog | 7 | ||||
-rw-r--r-- | games-rpg/dragonhunt/dragonhunt-3.56-r1.ebuild | 93 |
2 files changed, 99 insertions, 1 deletions
diff --git a/games-rpg/dragonhunt/ChangeLog b/games-rpg/dragonhunt/ChangeLog index 60a90dd6cbab..76f3db8892b3 100644 --- a/games-rpg/dragonhunt/ChangeLog +++ b/games-rpg/dragonhunt/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-rpg/dragonhunt # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-rpg/dragonhunt/ChangeLog,v 1.7 2013/02/07 22:12:52 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-rpg/dragonhunt/ChangeLog,v 1.8 2013/06/14 23:08:31 hasufell Exp $ + +*dragonhunt-3.56-r1 (14 Jun 2013) + + 14 Jun 2013; Julian Ospald <hasufell@gentoo.org> +dragonhunt-3.56-r1.ebuild: + convert to python-single-r1 07 Feb 2013; Ulrich Müller <ulm@gentoo.org> dragonhunt-3.56.ebuild: Move Creative Commons licenses to shorter names. diff --git a/games-rpg/dragonhunt/dragonhunt-3.56-r1.ebuild b/games-rpg/dragonhunt/dragonhunt-3.56-r1.ebuild new file mode 100644 index 000000000000..d3e0f61eb0d4 --- /dev/null +++ b/games-rpg/dragonhunt/dragonhunt-3.56-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-rpg/dragonhunt/dragonhunt-3.56-r1.ebuild,v 1.1 2013/06/14 23:08:31 hasufell Exp $ + +EAPI=5 +PYTHON_COMPAT=( python2_5 python2_6 python2_7 ) +inherit eutils python-single-r1 games + +MY_P="Dragon_Hunt-${PV}" +DESCRIPTION="A simple graphical RPG" +HOMEPAGE="http://emhsoft.com/dh.html" +SRC_URI="http://emhsoft.com/dh/${MY_P}.tar.gz" + +LICENSE="GPL-2 CC-SA-1.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND="${PYTHON_DEPS}" +RDEPEND="${DEPEND} + dev-python/pygame[${PYTHON_USEDEP}]" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + games_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + # Where to look for modules to load. + sed -i "s:\.\./modules/:${GAMES_DATADIR}/${PN}/:" \ + code/g.py \ + code/map_editor.py \ + code/rpg.py \ + || die "Could not change module path." + + # Where to look for keybinding + sed -i "s:\.\./settings:${GAMES_SYSCONFDIR}/${PN}/settings:" \ + code/g.py \ + || die "Could not change settings.txt directory" + + # Save games in ~/.${PN}/. + sed -i \ + -e "s:^\(from os import.*\):\1\, environ:" \ + -e "s:g.mod_dir.*\"/saves/\?\":environ[\"HOME\"] + \"/.${PN}/\":" \ + code/g.py code/loadgame.py \ + || die "Could not change savegames location." + + # Save maps in ~/. + sed -i \ + -e "s:^\(from os import.*\):\1\, environ:" \ + -e "s:g.mod_dir.*\"map\.txt\":environ[\"HOME\"]\ +\ \"/dh_map.txt\":" \ + code/map_editor.py \ + || die "Could not change map location." +} + +src_install() { + insinto "${GAMES_DATADIR}"/${PN} + doins -r modules/* || die "doins modules failed" + + insinto "${GAMES_SYSCONFDIR}"/${PN} + doins settings.txt || die "doins settings.txt failed" + + insinto "$(games_get_libdir)"/${PN} + doins code/*.py || die "doins code failed" + + games_make_wrapper ${PN} "${EPYTHON} ./rpg.py" "$(games_get_libdir)"/${PN} + games_make_wrapper ${PN}-mapeditor "${EPYTHON} ./map_editor.py" \ + "$(games_get_libdir)"/${PN} + + newicon modules/default/images/buttons/icon.png ${PN}.png + make_desktop_entry ${PN} "Dragon Hunt" + make_desktop_entry ${PN}-mapeditor "Dragon Hunt - Editor" + + dodoc README.txt docs/{Changelog,Items.txt,example_map.txt,tiles.txt} + dohtml docs/*.html + + python_optimize "${ED}$(games_get_libdir)"/${PN} \ + "${ED}${GAMES_DATADIR}/${PN}/Dark Ages/data/make_map.py" + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + echo + elog "If you use the map editor then note that maps will be saved as" + elog "~/dh_map.txt and must be move to the correct module directory" + elog "(within ${GAMES_DATADIR}/${PN}) by hand." + echo +} |