inherit eutils games DESCRIPTION="World of Padman: Stand Alone Complex" HOMEPAGE="http://worldofpadman.com/" SRC_URI="(http://thilo.kickchat.com/download/worldofpadman.run http://camelot.snt.utwente.nl/padman/worldofpadman.run http://download.cfs.game-host.org/get.php?get=/pub/games/wop/worldofpadman.run http://btc3x6.che.uni-bayreuth.de/~tl/wop_final/worldofpadman.run ftp://ftp.kickchat.com/wop/wop_patch_1_2.run) mappack? (http://thilo.kickchat.com/download/wop_padpack.zip)" LICENSE="WOP-EULA" SLOT="0" KEYWORDS="-* ~x86 ~amd64 ~ppc" # Please add dedicated USE and necessary lines of code IUSE="doc source dedicated opengl mappack" UIDEPEND="virtual/opengl x86? ( x11-libs/libXext x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp ) amd64? ( app-emulation/emul-linux-x86-xlibs || ( >=app-emulation/emul-linux-x86-xlibs-7.0 x11-drivers/nvidia-drivers x11-drivers/nvidia-legacy-drivers >=x11-drivers/ati-drivers-8.8.25-r1 ) )" DEPEND="" RDEPEND="sys-libs/glibc media-libs/libvorbis amd64? ( app-emulation/emul-linux-x86-baselibs ) opengl? ( ${UIDEPEND} )" # check license needs the license to be installed into licenses directory... #GAMES_CHECK_LICENSE="yes" dir=${GAMES_PREFIX_OPT}/WoP src_unpack() { unpack_makeself worldofpadman.run # unpack 1.2 patch unpack_makeself wop_patch_1_2.run mkdir ${T}/engine cd ${T}/engine use x86 && tar -xf ${WORKDIR}/wop-engine.i386.tar use amd64 && tar -xf ${WORKDIR}/wop-engine.x86_64.tar use ppc && tar -xf ${WORKDIR}/wop-engine.ppc.tar mkdir ${T}/data cd ${T}/data tar -xf ${WORKDIR}/wop-data.tar tar -xf ${WORKDIR}/wop-data-1.2.tar # unpack mappack if use mappack ; then unpack wop_padpack.zip fi # unpack additional *.cfg files tar -xf ${WORKDIR}/extras.tar if use doc ; then mkdir ${T}/readme cd ${T}/readme tar -xf ${WORKDIR}/readme.tar fi } src_install() { einfo "Installing WoP" dodir ${dir} insinto ${dir} doins ${WORKDIR}/copyright_en.txt ${WORKDIR}/wop.png einfo "Installing WoP data files" dodir ${dir}/wop insinto ${dir}/wop doins ${T}/data/* einfo "Installing WoP engine" exeinto ${dir} if use opengl ; then doexe ${T}/engine/wop-engine.* || die "doexe" fi if use dedicated ; then doexe ${T}/engine/wopded.* || die "doexe" fi if use x86 ; then arch="i386" fi if use amd64 ; then arch="x86_64" fi if use ppc ; then arch="ppc" fi games_make_wrapper wop ./wop-engine.${arch} ${dir} ${dir} if use dedicated ; then games_make_wrapper wopded ./wopded.${arch} ${dir} ${dir} fi newicon ${WORKDIR}/wop.png ${PN}.png make_desktop_entry ${PN} "World of Padman (binary)" ${PN}.png if use doc ; then einfo "Installing WoP Documentation" dohtml -r ${T}/readme/* fi prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "to start WoP, launch 'wop-bin'" # einfo "to start WoP as dedicated server, launch 'wopded'" if use amd64 ; then ewarn "NOTE: IA32 Emulation must be compiled into your kernel for WoP to run." fi }