1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
8 inherit desktop eutils python-single-r1 xdg
12 DESCRIPTION="Set of scripts to easily install and use Windows games and software"
13 HOMEPAGE="https://playonlinux.com/"
14 SRC_URI="https://www.playonlinux.com/script_files/${MY_PN}/${PV}/${MY_PN}_${PV}.tar.gz"
18 KEYWORDS="~amd64 ~x86"
20 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
23 RDEPEND="${PYTHON_DEPS}
29 $(python_gen_cond_dep '
30 dev-python/wxpython:3.0[${PYTHON_MULTI_USEDEP}]
33 || ( net-analyzer/netcat net-analyzer/openbsd-netcat )
35 virtual/imagemagick-tools
37 winbind? ( net-fs/samba[winbind] )
45 # Having a real install script
46 # It will let using LANGUAGES easily
47 # How to deal with Microsoft Fonts installation asked every time ?
48 # How to deal with wine version installed ? (have a better mgmt of system one)
49 # Look at debian pkg: https://packages.debian.org/sid/playonlinux
52 "${FILESDIR}/${PN}-4.2.4-pol-bash.patch"
53 "${FILESDIR}/${PN}-4.2.4-binary-plugin.patch"
54 "${FILESDIR}/${PN}-4.2.6-stop-update-warning.patch"
63 rm etc/{playonmac.icns,terminal.applescript} || die
65 # remove desktop integration
66 rm etc/{PlayOnLinux.desktop,PlayOnLinux.directory,playonlinux-Programs.menu} || die
70 # all things without exec permissions
71 insinto "/usr/share/${PN}"
72 doins -r resources lang lib etc plugins
75 exeinto "/usr/share/${PN}/bash"
76 find "${S}/bash" -type f -exec doexe '{}' +
77 exeinto "/usr/share/${PN}/bash/expert"
78 find "${S}/bash/expert" -type f -exec doexe '{}' +
81 python_moduleinto "/usr/share/${PN}"
82 python_domodule python
84 # main executable files
85 exeinto "/usr/share/${PN}"
86 doexe ${PN}{,-pkg,-bash,-shell,-url_handler}
89 doicon -s 128 etc/${PN}.png
90 for size in 16 22 32; do
91 newicon -s $size etc/${PN}$size.png ${PN}.png
94 doman "${FILESDIR}"/playonlinux{,-pkg}.1
97 make_wrapper ${PN} "./${PN}" "/usr/share/${PN}"
98 make_wrapper ${PN}-pkg "./${PN}-pkg" "/usr/share/${PN}"
99 make_desktop_entry ${PN} ${MY_PN} ${PN} Game
103 if [[ -z ${REPLACING_VERSIONS} ]]; then
104 elog "Installed software and games with playonlinux have not been removed."
105 elog "To remove them, you can re-install playonlinux and remove them using it,"
106 elog "or do it manually by removing .PlayOnLinux/ in your home directory."