playonlinux-4.2.8-r1.ebuild 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit gnome2-utils python-single-r1 games
  6. MY_PN="PlayOnLinux"
  7. DESCRIPTION="Set of scripts to easily install and use Windows games and software"
  8. HOMEPAGE="http://playonlinux.com/"
  9. SRC_URI="http://www.playonlinux.com/script_files/${MY_PN}/${PV}/${MY_PN}_${PV}.tar.gz"
  10. LICENSE="GPL-3"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="winbind"
  14. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  15. DEPEND=""
  16. RDEPEND="app-emulation/wine
  17. app-arch/cabextract
  18. app-arch/p7zip
  19. app-arch/unzip
  20. app-crypt/gnupg
  21. dev-python/wxpython:2.8[${PYTHON_USEDEP}]
  22. net-misc/wget
  23. x11-apps/mesa-progs
  24. x11-terms/xterm
  25. media-gfx/icoutils
  26. || ( net-analyzer/netcat net-analyzer/netcat6 )
  27. virtual/imagemagick-tools
  28. winbind? ( net-fs/samba[winbind] ) "
  29. S=${WORKDIR}/${PN}
  30. # TODO:
  31. # Having a real install script and let playonlinux use standard filesystem
  32. # architecture to prevent having everything installed into GAMES_DATADIR
  33. # It will let using LANGUAGES easily
  34. # How to deal with Microsoft Fonts installation asked every time ?
  35. # How to deal with wine version installed ? (have a better mgmt of system one)
  36. # Look at debian pkg: http://packages.debian.org/sid/playonlinux
  37. pkg_setup() {
  38. python-single-r1_pkg_setup
  39. games_pkg_setup
  40. }
  41. src_prepare() {
  42. epatch "${FILESDIR}/${PN}-4.2.4-pol-bash.patch"
  43. epatch "${FILESDIR}/${PN}-4.2.4-binary-plugin.patch"
  44. epatch "${FILESDIR}/${PN}-4.2.6-stop-update-warning.patch"
  45. python_fix_shebang .
  46. # remove playonmac
  47. rm etc/{playonmac.icns,terminal.applescript} || die
  48. # remove desktop integration
  49. rm etc/{PlayOnLinux.desktop,PlayOnLinux.directory,playonlinux-Programmes.menu} || die
  50. }
  51. src_install() {
  52. # all things without exec permissions
  53. insinto "${GAMES_DATADIR}/${PN}"
  54. doins -r resources lang lib etc plugins
  55. # bash/ install
  56. exeinto "${GAMES_DATADIR}/${PN}/bash"
  57. find "${S}/bash" -type f -exec doexe '{}' +
  58. exeinto "${GAMES_DATADIR}/${PN}/bash/expert"
  59. find "${S}/bash/expert" -type f -exec doexe '{}' +
  60. # python/ install
  61. python_moduleinto "${GAMES_DATADIR}/${PN}"
  62. python_domodule python
  63. # main executable files
  64. exeinto "${GAMES_DATADIR}/${PN}"
  65. doexe ${PN}{,-pkg,-bash,-shell,-url_handler}
  66. # icons
  67. doicon -s 128 etc/${PN}.png
  68. for size in 16 22 32; do
  69. newicon -s $size etc/${PN}$size.png ${PN}.png
  70. done
  71. doman "${FILESDIR}"/playonlinux{,-pkg}.1
  72. dodoc CHANGELOG.md
  73. games_make_wrapper ${PN} "./${PN}" "${GAMES_DATADIR}/${PN}"
  74. games_make_wrapper ${PN}-pkg "./${PN}-pkg" "${GAMES_DATADIR}/${PN}"
  75. make_desktop_entry ${PN} ${MY_PN} ${PN} Game
  76. prepgamesdirs
  77. }
  78. pkg_preinst() {
  79. gnome2_icon_savelist
  80. }
  81. pkg_postinst() {
  82. games_pkg_postinst
  83. gnome2_icon_cache_update
  84. }
  85. pkg_prerm() {
  86. if [[ -z ${REPLACING_VERSIONS} ]]; then
  87. elog "Installed softwares and games with playonlinux have not been removed."
  88. elog "To remove them, you can re-install playonlinux and remove them using it"
  89. elog "or do it manually by removing .PlayOnLinux/ in your home directory."
  90. fi
  91. }
  92. pkg_postrm() {
  93. gnome2_icon_cache_update
  94. }