Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Oct 17th, 2014 292 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/games-fps/urbanterror/urbanterror-4.2.019.ebuild,v 1.1 2014/09/19 13:43:50 hasufell Exp $
  4.  
  5. EAPI=5
  6.  
  7. inherit check-reqs eutils gnome2-utils games
  8.  
  9. ENGINE_PV=${PV}
  10. FULL_P=UrbanTerror42_full020
  11. UPDATE_PV=${PV:0:3}.${FULL_P#*full}
  12. DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine"
  13. HOMEPAGE="http://www.urbanterror.info/home/"
  14. SRC_URI="http://cdn.urbanterror.info/urt/42/zips/${FULL_P}.zip
  15.         https://github.com/Barbatos/ioq3-for-UrbanTerror-4/archive/release-${ENGINE_PV}.tar.gz -> ${PN}-${ENGINE_PV}.tar.gz
  16.         http://upload.wikimedia.org/wikipedia/en/5/56/Urbanterror.svg -> ${PN}.svg"
  17.  
  18. # fetch updates
  19. if [[ ${FULL_P#*full} != ${PV##*.} ]] ; then
  20.         UPDATE_I=${UPDATE_PV:6:1}
  21.         while [[ ${UPDATE_I} -lt ${PV:6:1} ]] ; do
  22.                 SRC_URI="${SRC_URI} http://cdn.urbanterror.info/urt/42/zips/UrbanTerror-${PV:0:6}${UPDATE_I}-to-${PV:0:6}$(( ${UPDATE_I} + 1)).zip"
  23.                 UPDATE_I=$(( ${UPDATE_I} + 1))
  24.         done
  25. fi
  26. unset UPDATE_I
  27.  
  28. LICENSE="GPL-2 Q3AEULA-20000111 urbanterror-4.2-maps"
  29. SLOT="0"
  30. KEYWORDS="~amd64 ~x86"
  31. IUSE="+altgamma +curl debug dedicated openal +sdl server smp vorbis"
  32. RESTRICT="mirror"
  33.  
  34. RDEPEND="
  35.         !dedicated? (
  36.                 virtual/opengl
  37.                 curl? ( net-misc/curl )
  38.                 openal? ( media-libs/openal )
  39.                 sdl? ( media-libs/libsdl[X,sound,joystick,opengl,video] )
  40.                 !sdl? ( x11-libs/libX11
  41.                         x11-libs/libXext
  42.                         x11-libs/libXxf86dga
  43.                         x11-libs/libXxf86vm )
  44.                 vorbis? ( media-libs/libogg
  45.                         media-libs/libvorbis )
  46.         )"
  47. DEPEND="${RDEPEND}
  48.         app-arch/unzip
  49.         dedicated? ( curl? ( net-misc/curl ) )"
  50.  
  51. S=${WORKDIR}/ioq3-for-UrbanTerror-4-release-${ENGINE_PV}
  52. S_DATA=${WORKDIR}/UrbanTerror42
  53.  
  54. CHECKREQS_DISK_BUILD="3300M"
  55. CHECKREQS_DISK_USR="1550M"
  56.  
  57. pkg_pretend() {
  58.         check-reqs_pkg_pretend
  59.  
  60.         if ! use dedicated ; then
  61.                 if ! use sdl && ! use openal ; then
  62.                         ewarn
  63.                         ewarn "Sound support disabled. Enable 'sdl' or 'openal' useflag."
  64.                         ewarn
  65.                 fi
  66.         fi
  67. }
  68.  
  69. src_unpack() {
  70.         local UPDATE_I
  71.         default
  72.         # apply updates
  73.         if [[ ${FULL_P#*full} != ${PV##*.} ]] ; then
  74.                 UPDATE_I=${UPDATE_PV:6:1}
  75.                 while [[ ${UPDATE_I} -lt ${PV:6:1} ]] ; do
  76.                         cp -dRpf \
  77.                                 "${WORKDIR}"/UrbanTerror-${PV:0:6}${UPDATE_I}-to-${PV:0:6}$((${UPDATE_I} + 1))/* \
  78.                                 "${S_DATA}"/ || die
  79.                         UPDATE_I=$(( ${UPDATE_I} + 1))
  80.                 done
  81.         fi
  82. }
  83.  
  84. src_prepare() {
  85.         epatch "${FILESDIR}"/${PN}-${ENGINE_PV}-build.patch
  86. }
  87.  
  88. src_compile() {
  89.         buildit() { use $1 && echo 1 || echo 0 ; }
  90.         nobuildit() { use $1 && echo 0 || echo 1 ; }
  91.  
  92.         emake \
  93.                 ARCH=$(usex amd64 "x86_64" "i386") \
  94.                 DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \
  95.                 BUILD_CLIENT=$(nobuildit dedicated) \
  96.                 BUILD_CLIENT_SMP=$(usex smp "$(nobuildit dedicated)" "0") \
  97.                 BUILD_SERVER=$(usex dedicated "1" "$(buildit server)") \
  98.                 USE_SDL=$(buildit sdl) \
  99.                 USE_OPENAL=$(buildit openal) \
  100.                 USE_OPENAL_DLOPEN=0 \
  101.                 USE_CURL=$(buildit curl) \
  102.                 USE_CURL_DLOPEN=0 \
  103.                 USE_CODEC_VORBIS=$(buildit vorbis) \
  104.                 USE_ALTGAMMA=$(buildit altgamma) \
  105.                 USE_LOCAL_HEADERS=0 \
  106.                 Q="" \
  107.                 $(usex debug "debug" "release")
  108. }
  109.  
  110. src_install() {
  111.         local my_arch=$(usex amd64 "x86_64" "i386")
  112.  
  113.         dodoc ChangeLog README md4-readme.txt
  114.         dodoc "${S_DATA}"/q3ut4/readme42.txt
  115.         insinto "${GAMES_DATADIR}"/${PN}/q3ut4
  116.         doins "${S_DATA}"/q3ut4/*.pk3
  117.  
  118.         if use !dedicated ; then
  119.                 newgamesbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT$(usex smp "-smp" "").${my_arch} ${PN}
  120.                 doicon -s scalable "${DISTDIR}"/${PN}.svg
  121.                 make_desktop_entry ${PN} "UrbanTerror"
  122.         fi
  123.  
  124.         if use dedicated || use server ; then
  125.                 newgamesbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-dedicated
  126.                 docinto examples
  127.                 dodoc "${S_DATA}"/q3ut4/{server_example.cfg,mapcycle_example.txt}
  128.         fi
  129.  
  130.         prepgamesdirs
  131. }
  132.  
  133. pkg_preinst() {
  134.         games_pkg_preinst
  135.         use dedicated || gnome2_icon_savelist
  136. }
  137.  
  138. pkg_postinst() {
  139.         games_pkg_postinst
  140.         use dedicated || gnome2_icon_cache_update
  141.  
  142.         if use openal && ! use dedicated ; then
  143.                 einfo
  144.                 elog "You might need to set:"
  145.                 elog "  seta s_useopenal \"1\""
  146.                 elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work."
  147.                 einfo
  148.         fi
  149. }
  150.  
  151. pkg_postrm() {
  152.         use dedicated || gnome2_icon_cache_update
  153. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top