# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils games MY_PN="CrayonPhysicsDeluxe" DESCRIPTION="Crayon Physics Deluxe: a 2D physics puzzle" HOMEPAGE="http://www.crayonphysics.com" #SRC_URI="${PN}_release${PV//./_}.tar.gz" SRC_URI="crayon-physics-deluxe_${PV}_i386.tar.gz" RESTRICT="fetch strip" LICENSE="crayon" SLOT="0" KEYWORDS="amd64 x86" IUSE="" DEPEND="" RDEPEND="media-libs/glew media-libs/libsdl[audio,joystick,video] media-libs/mesa media-libs/sdl-image[jpeg,png] media-libs/sdl-mixer[vorbis,wav] x11-libs/libX11 x11-libs/qt-core:4 x11-libs/qt-gui:4 virtual/opengl amd64? ( app-emulation/emul-linux-x86-qtlibs app-emulation/emul-linux-x86-sdl )" S="${WORKDIR}/${MY_PN}" GAMEDIR="${GAMES_PREFIX_OPT}/${PN}" pkg_nofetch() { einfo "" einfo "Please buy and download \"${SRC_URI}\" from:" einfo " ${HOMEPAGE}" einfo "and move/link it to \"${DISTDIR}\"" einfo "" } src_install() { # Install data files: insinto "${GAMEDIR}" || die "insinto \"${GAMEDIR}\" failed" doins -r "cache" "data" || die "doins data files failed" # Install needed config files: doins "autoexec.txt" || die "doins config files failed" # Install libs (needs an old libstdc++ and libGLEW): GAMELIBS="${GAMEDIR}/lib" exeinto "${GAMELIBS}" || die "insinto \"${GAMELIBS}\" failed" doexe "lib32/libstdc++.so.6" || die "doexe libs failed" doexe "lib32/libGLEW.so.1.5" || die "doexe libs failed" # Install executables: exeinto "${GAMEDIR}" || die "exeinto \${GAMEDIR}\" failed" doexe "${PN}" || die "doexe \"${PN}\" failed" # Make and install game wrapper: dodir "${GAMES_BINDIR}" || die "dodir \"${GAMES_BINDIR}\" failed" local wrapper="${D}/${GAMES_BINDIR}/${PN}" touch "${wrapper}" || die "touch \"${wrapper}\" failed" cat << EOF >> "${wrapper}" || die "echo failed" #!/bin/sh cd "${GAMEDIR}" LD_LIBRARY_PATH="${GAMELIBS}:\${LD_LIBRARY_PATH}" exec ./${PN} "\${@}" EOF # Install icon and desktop file: newicon "icon.png" "${PN}.png" || die "newicon \"${PN}.png\" failed" make_desktop_entry "${PN}" "${MY_PN}" "/usr/share/pixmaps/${PN}.png" || die "make_desktop_entry failed" # Install documentation: dodoc "changelog.txt" || die "dodoc failed" dohtml *.html # Setting permissions: prepgamesdirs } pkg_postinst() { echo "" games_pkg_postinst }