2011-03-10 06:16:31 +01:00
|
|
|
# Copyright 1999-2011 Gentoo Foundation
|
2010-07-22 03:46:11 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2010-08-27 01:28:29 +02:00
|
|
|
# $Header: $
|
|
|
|
|
2011-03-10 06:16:31 +01:00
|
|
|
#TODO: Header, add cdecimal
|
|
|
|
|
2010-08-17 20:59:51 +02:00
|
|
|
EAPI="2"
|
2010-07-22 03:46:11 +02:00
|
|
|
|
2010-08-29 18:25:41 +02:00
|
|
|
inherit eutils games
|
2010-07-22 03:46:11 +02:00
|
|
|
|
|
|
|
DESCRIPTION="A free/open source tracker/HUD for use with online poker"
|
|
|
|
HOMEPAGE="http://fpdb.wiki.sourceforge.net/"
|
2011-04-04 03:38:39 +02:00
|
|
|
SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.bz2"
|
2010-07-22 03:46:11 +02:00
|
|
|
|
|
|
|
LICENSE="AGPL-3"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
2011-04-04 03:38:39 +02:00
|
|
|
#note: fpdb has only been tested on x86 and amd64, but should work on other arches, too
|
2010-07-22 03:46:11 +02:00
|
|
|
|
2011-04-07 00:02:58 +02:00
|
|
|
IUSE="graph mysql postgres sqlite linguas_de linguas_es linguas_fr linguas_hu linguas_it linguas_pl linguas_pt linguas_ru linguas_zh"
|
2010-07-22 03:46:11 +02:00
|
|
|
RDEPEND="
|
2010-08-27 01:28:29 +02:00
|
|
|
mysql? ( virtual/mysql
|
|
|
|
dev-python/mysql-python )
|
|
|
|
postgres? ( dev-db/postgresql-server
|
|
|
|
dev-python/psycopg )
|
|
|
|
sqlite? ( dev-lang/python[sqlite]
|
|
|
|
dev-python/numpy )
|
|
|
|
>=x11-libs/gtk+-2.10
|
|
|
|
dev-python/pygtk
|
|
|
|
graph? ( dev-python/numpy
|
|
|
|
dev-python/matplotlib[gtk] )
|
|
|
|
dev-python/python-xlib
|
2010-12-26 19:09:36 +01:00
|
|
|
dev-python/pytz
|
|
|
|
x11-apps/xwininfo"
|
2010-07-22 03:46:11 +02:00
|
|
|
DEPEND="${RDEPEND}"
|
|
|
|
|
|
|
|
src_install() {
|
2010-08-27 01:28:29 +02:00
|
|
|
insinto "${GAMES_DATADIR}"/${PN}
|
2010-08-29 18:25:41 +02:00
|
|
|
doins -r gfx || die "failed to install gfx directory"
|
|
|
|
doins -r pyfpdb || die "failed to install pyfpdb directory"
|
2010-08-27 01:28:29 +02:00
|
|
|
|
2011-04-04 03:38:39 +02:00
|
|
|
if use linguas_de; then
|
|
|
|
msgfmt pyfpdb/locale/fpdb-de_DE.po -o pyfpdb/locale/de.mo || die "failed to create German mo file"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if use linguas_es; then
|
|
|
|
msgfmt pyfpdb/locale/fpdb-es_ES.po -o pyfpdb/locale/es.mo || die "failed to create Spanish mo file"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if use linguas_fr; then
|
|
|
|
msgfmt pyfpdb/locale/fpdb-fr_FR.po -o pyfpdb/locale/fr.mo || die "failed to create French mo file"
|
|
|
|
fi
|
|
|
|
|
2010-08-27 01:28:29 +02:00
|
|
|
if use linguas_hu; then
|
2011-04-04 03:38:39 +02:00
|
|
|
msgfmt pyfpdb/locale/fpdb-hu_HU.po -o pyfpdb/locale/hu.mo || die "failed to create Hungarian mo file"
|
|
|
|
fi
|
|
|
|
|
2011-04-04 23:47:05 +02:00
|
|
|
if use linguas_it; then
|
|
|
|
msgfmt pyfpdb/locale/fpdb-it_IT.po -o pyfpdb/locale/it.mo || die "failed to create Italian mo file"
|
|
|
|
fi
|
|
|
|
|
2011-04-04 03:38:39 +02:00
|
|
|
if use linguas_pl; then
|
|
|
|
msgfmt pyfpdb/locale/fpdb-pl_PL.po -o pyfpdb/locale/pl.mo || die "failed to create Polish mo file"
|
|
|
|
fi
|
|
|
|
|
2011-04-07 00:02:58 +02:00
|
|
|
if use linguas_pt; then
|
2011-04-07 00:04:48 +02:00
|
|
|
msgfmt pyfpdb/locale/fpdb-pt_BR.po -o pyfpdb/locale/pt.mo || die "failed to create Portuguese mo file"
|
2011-04-07 00:02:58 +02:00
|
|
|
fi
|
|
|
|
|
2011-04-04 03:38:39 +02:00
|
|
|
if use linguas_ru; then
|
|
|
|
msgfmt pyfpdb/locale/fpdb-ru_RU.po -o pyfpdb/locale/ru.mo || die "failed to create Russian mo file"
|
2010-08-27 01:28:29 +02:00
|
|
|
fi
|
2010-08-29 17:51:05 +02:00
|
|
|
|
2011-04-07 00:02:58 +02:00
|
|
|
if use linguas_zh; then
|
|
|
|
msgfmt pyfpdb/locale/fpdb-zh_CN.po -o pyfpdb/locale/zh.mo || die "failed to create Chinese mo file"
|
|
|
|
fi
|
|
|
|
|
2010-08-29 18:25:41 +02:00
|
|
|
domo pyfpdb/locale/*.mo || die "failed to install mo files"
|
2010-08-12 18:50:21 +02:00
|
|
|
|
2010-08-29 18:25:41 +02:00
|
|
|
doins readme.txt || die "failed to install readme.txt file"
|
2010-08-12 18:50:21 +02:00
|
|
|
|
2010-08-27 01:28:29 +02:00
|
|
|
exeinto "${GAMES_DATADIR}"/${PN}
|
2010-08-29 18:25:41 +02:00
|
|
|
doexe run_fpdb.py || die "failed to install executable run_fpdb.py"
|
2010-08-12 18:50:21 +02:00
|
|
|
|
2010-08-27 01:28:29 +02:00
|
|
|
dodir "${GAMES_BINDIR}"
|
2011-04-04 03:38:39 +02:00
|
|
|
dosym "${GAMES_DATADIR}"/${PN}/run_fpdb.py "${GAMES_BINDIR}"/${PN} || die "failed to create symlink for starting fpdb"
|
2010-08-25 23:17:30 +02:00
|
|
|
|
2010-08-29 18:25:41 +02:00
|
|
|
newicon gfx/fpdb-icon.png ${PN}.png || die "failed to install fpdb icon"
|
|
|
|
make_desktop_entry ${PN} || die "failed to create desktop entry"
|
2010-08-25 23:17:30 +02:00
|
|
|
|
2010-08-29 18:25:41 +02:00
|
|
|
fperms +x "${GAMES_DATADIR}"/${PN}/pyfpdb/*.pyw
|
2010-08-27 01:28:29 +02:00
|
|
|
prepgamesdirs
|
2010-07-22 03:46:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
2010-08-27 01:28:29 +02:00
|
|
|
games_pkg_postinst
|
|
|
|
elog "Note that if you really want to use mysql or postgresql you will have to create"
|
|
|
|
elog "the database and user yourself and enter it into the fpdb config."
|
|
|
|
elog "You can find the instructions on the project's website."
|
2010-07-22 03:46:11 +02:00
|
|
|
}
|