--- /usr/portage/games-sports/xmoto/xmoto-0.3.4.ebuild 2007-10-21 23:30:42.000000000 +0200 +++ /usr/portage/games-sports/xmoto/xmoto-0.3.4.ebuild 2008-03-05 17:16:08.000000000 +0100 @@ -31,6 +31,15 @@ >=dev-db/sqlite-3 nls? ( sys-devel/gettext )" +pkg_setup() { + if has_version ">=dev-lang/lua-5.1.3-r1" && ! built_with_use dev-lang/lua deprecated ; then + eerror "Re-emerge dev-lang/lua with 'depercated' USE flag" + eerror "Check your USE flags, re-emerge the dependencies and then" + eerror "emerge this package." + die + fi +} + src_unpack() { unpack ${A} cd "${S}" @@ -51,7 +60,25 @@ src_install() { emake DESTDIR="${D}" install || die "emake install failed" - + ## if it is not working nice way, we'll do it ugly way + if use nls ; then + PD="${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}" + if ! [ -d ${PD}/image//usr/share/games/locale ] ; then + mkdir -p ${PD}/image//usr/share/locale/ \ + || die "lang mkdir failed" + fi + cd ${S}/po + for i in `ls -c1 |grep "\.gmo$"` ; do + BASE=$(echo ${i} |sed 's/\.gmo$//g') + if ! [ -d ${PD}/image//usr/share/locale/${BASE}/LC_MESSAGES ] ; then + mkdir -p ${PD}/image//usr/share/locale/${BASE}/LC_MESSAGES \ + || die "lang mkdir failed" + fi + msgfmt -v -o ${BASE}.mo ${BASE}.po + mv ${BASE}.gmo ${PD}/image//usr/share/locale/${BASE}/LC_MESSAGES/xmoto.mo \ + || die "unable to copy lang files" + done; + fi dodoc README TODO ChangeLog doicon extra/xmoto.xpm @@ -70,7 +97,7 @@ if use editor; then elog "If you want to know how to create Xmoto levels" elog "have a look at this Tutorial:" - elog "http://wiki.xmoto.free.fr/index.php?title=Inkscape-0.3.0#Tutorial" + elog "http://wiki.xmoto.tuxfamily.org/index.php?title=Inkscape-0.4.0" elog "You can share your levels on the Xmoto homepage." fi }