logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

wine-proton-9999.ebuild (17372B)


  1. # Copyright 1999-2018 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PLOCALES="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW"
  5. PLOCALE_BACKUP="en"
  6. inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
  7. MY_PN="${PN%%-*}"
  8. MY_P="${MY_PN}-${PV}"
  9. if [[ ${PV} == "9999" ]] ; then
  10. EGIT_REPO_URI="https://github.com/ValveSoftware/wine.git"
  11. inherit git-r3
  12. SRC_URI=""
  13. #KEYWORDS=""
  14. else
  15. MAJOR_V=$(get_version_component_range 1)
  16. SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
  17. KEYWORDS="-* ~amd64 ~x86"
  18. fi
  19. S="${WORKDIR}/${MY_P}"
  20. GWP_V="20180120"
  21. PATCHDIR="${WORKDIR}/gentoo-wine-patches"
  22. DESCRIPTION="Free implementation of Windows(tm) on Unix, with a bit of extra spice"
  23. HOMEPAGE="https://github.com/ValveSoftware/wine https://github.com/ValveSoftware/Proton"
  24. SRC_URI="${SRC_URI}
  25. https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
  26. "
  27. LICENSE="LGPL-2.1"
  28. SLOT="${PV}"
  29. IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks v4l vkd3d vulkan +X +xcomposite xinerama +xml"
  30. REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
  31. X? ( truetype )
  32. elibc_glibc? ( threads )
  33. osmesa? ( opengl )
  34. test? ( abi_x86_32 )
  35. vkd3d? ( vulkan )" # osmesa-opengl #286560 # X-truetype #551124
  36. # FIXME: the test suite is unsuitable for us; many tests require net access
  37. # or fail due to Xvfb's opengl limitations.
  38. RESTRICT="test"
  39. COMMON_DEPEND="
  40. X? (
  41. x11-libs/libXcursor[${MULTILIB_USEDEP}]
  42. x11-libs/libXext[${MULTILIB_USEDEP}]
  43. x11-libs/libXfixes[${MULTILIB_USEDEP}]
  44. x11-libs/libXrandr[${MULTILIB_USEDEP}]
  45. x11-libs/libXi[${MULTILIB_USEDEP}]
  46. x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
  47. )
  48. alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
  49. capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
  50. cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
  51. fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
  52. gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
  53. gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
  54. gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
  55. gstreamer? (
  56. media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
  57. media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
  58. )
  59. jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
  60. kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
  61. lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
  62. ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
  63. mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
  64. ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
  65. netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
  66. nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
  67. odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
  68. openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
  69. opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
  70. opengl? (
  71. virtual/glu[${MULTILIB_USEDEP}]
  72. virtual/opengl[${MULTILIB_USEDEP}]
  73. )
  74. osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
  75. pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
  76. png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
  77. pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
  78. scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
  79. sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] )
  80. ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
  81. truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
  82. udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
  83. udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
  84. v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
  85. vkd3d? ( app-emulation/vkd3d[${MULTILIB_USEDEP}] )
  86. vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
  87. xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
  88. xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
  89. xml? (
  90. dev-libs/libxml2[${MULTILIB_USEDEP}]
  91. dev-libs/libxslt[${MULTILIB_USEDEP}]
  92. )"
  93. RDEPEND="${COMMON_DEPEND}
  94. app-emulation/wine-desktop-common
  95. >app-eselect/eselect-wine-0.3
  96. !app-emulation/wine:0
  97. dos? ( >=games-emulation/dosbox-0.74_p20160629 )
  98. gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
  99. mono? ( app-emulation/wine-mono:4.7.3 )
  100. perl? (
  101. dev-lang/perl
  102. dev-perl/XML-Simple
  103. )
  104. pulseaudio? (
  105. realtime? ( sys-auth/rtkit )
  106. )
  107. samba? ( >=net-fs/samba-3.0.25[winbind] )
  108. selinux? ( sec-policy/selinux-wine )
  109. udisks? ( sys-fs/udisks:2 )"
  110. # tools/make_requests requires perl
  111. DEPEND="${COMMON_DEPEND}
  112. sys-devel/flex
  113. >=sys-kernel/linux-headers-2.6
  114. virtual/pkgconfig
  115. virtual/yacc
  116. X? ( x11-base/xorg-proto )
  117. prelink? ( sys-devel/prelink )
  118. xinerama? ( x11-base/xorg-proto )"
  119. # These use a non-standard "Wine" category, which is provided by
  120. # /etc/xdg/applications-merged/wine.menu
  121. QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
  122. usr/share/applications/wine-notepad.desktop
  123. usr/share/applications/wine-uninstaller.desktop
  124. usr/share/applications/wine-winecfg.desktop"
  125. PATCHES=(
  126. "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
  127. "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
  128. "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
  129. "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
  130. )
  131. PATCHES_BIN=()
  132. # https://bugs.gentoo.org/show_bug.cgi?id=635222
  133. if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
  134. DEPEND+=" dev-util/patchbin"
  135. fi
  136. wine_compiler_check() {
  137. [[ ${MERGE_TYPE} = "binary" ]] && return 0
  138. # GCC-specific bugs
  139. if tc-is-gcc; then
  140. # bug #549768
  141. if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
  142. ebegin "Checking for gcc-5 ms_abi compiler bug"
  143. $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
  144. # Run in subshell to prevent "Aborted" message
  145. ( "${T}"/pr66838 || false ) >/dev/null 2>&1
  146. if ! eend $?; then
  147. eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
  148. eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
  149. eerror "or use gcc-config to select a different compiler version."
  150. eerror "See https://bugs.gentoo.org/549768"
  151. eerror
  152. return 1
  153. fi
  154. fi
  155. # bug #574044
  156. if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
  157. ebegin "Checking for gcc-5-3 stack realignment compiler bug"
  158. # Compile in subshell to prevent "Aborted" message
  159. ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
  160. if ! eend $?; then
  161. eerror "Wine cannot be built with this version of gcc-5.3"
  162. eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
  163. eerror "or use gcc-config to select a different compiler version."
  164. eerror "See https://bugs.gentoo.org/574044"
  165. eerror
  166. return 1
  167. fi
  168. fi
  169. fi
  170. # Ensure compiler support
  171. if use abi_x86_64; then
  172. ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
  173. # Compile in subshell to prevent "Aborted" message
  174. ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
  175. if ! eend $?; then
  176. eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
  177. eerror
  178. eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
  179. eerror
  180. return 1
  181. fi
  182. fi
  183. }
  184. wine_build_environment_check() {
  185. [[ ${MERGE_TYPE} = "binary" ]] && return 0
  186. if use abi_x86_64; then
  187. if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
  188. eerror "You need gcc-4.4+ to compile 64-bit wine"
  189. die
  190. elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
  191. eerror "You need clang-3.8+ to compile 64-bit wine"
  192. die
  193. fi
  194. fi
  195. if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
  196. ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
  197. ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
  198. ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
  199. fi
  200. if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
  201. if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
  202. ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
  203. ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
  204. ewarn "See package.env in man 5 portage for more information on how to do this."
  205. ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
  206. fi
  207. fi
  208. if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
  209. eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
  210. eerror "See https://bugs.gentoo.org/487864 for more details."
  211. eerror
  212. return 1
  213. fi
  214. }
  215. wine_env_vcs_vars() {
  216. local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
  217. local pn_live_val="${pn_live_var}"
  218. eval pn_live_val='$'${pn_live_val}
  219. if [[ ! -z ${EGIT_COMMIT} ]]; then
  220. eerror "Commits must now be specified using the environmental variables"
  221. eerror "WINE_COMMIT"
  222. eerror
  223. return 1
  224. fi
  225. }
  226. pkg_pretend() {
  227. wine_build_environment_check || die
  228. # Verify OSS support
  229. if use oss && ! use kernel_FreeBSD; then
  230. if ! has_version ">=media-sound/oss-4"; then
  231. eerror "You cannot build wine with USE=oss without having support from a"
  232. eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
  233. eerror
  234. die
  235. fi
  236. fi
  237. }
  238. pkg_setup() {
  239. wine_build_environment_check || die
  240. wine_env_vcs_vars || die
  241. WINE_VARIANT="${PN#wine}-${PV}"
  242. WINE_VARIANT="${WINE_VARIANT#-}"
  243. MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
  244. MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
  245. MY_DATADIR="${MY_DATAROOTDIR}"
  246. MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
  247. MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
  248. MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
  249. MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
  250. MY_MANDIR="${MY_DATADIR}/man"
  251. }
  252. src_unpack() {
  253. if [[ ${PV} == "9999" ]] ; then
  254. EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
  255. fi
  256. default
  257. l10n_find_plocales_changes "${S}/po" "" ".po"
  258. }
  259. src_prepare() {
  260. eapply_bin(){
  261. local patch
  262. for patch in ${PATCHES_BIN[@]}; do
  263. patchbin --nogit < "${patch}" || die
  264. done
  265. }
  266. local md5="$(md5sum server/protocol.def)"
  267. default
  268. eapply_bin
  269. eautoreconf
  270. # Modification of the server protocol requires regenerating the server requests
  271. if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
  272. einfo "server/protocol.def was patched; running tools/make_requests"
  273. tools/make_requests || die #432348
  274. fi
  275. sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
  276. if ! use run-exes; then
  277. sed -i '/^MimeType/d' loader/wine.desktop || die #117785
  278. fi
  279. # Edit wine.desktop to work for specific variant
  280. sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
  281. # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
  282. cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
  283. l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
  284. # Fix manpage generation for locales #469418 and abi_x86_64 #617864
  285. # Duplicate manpages input files for wine64
  286. local f
  287. for f in loader/*.man.in; do
  288. cp ${f} ${f/wine/wine64} || die
  289. done
  290. # Add wine64 manpages to Makefile
  291. if use abi_x86_64; then
  292. sed -i "/wine.man.in/i \
  293. \\\twine64.man.in \\\\" loader/Makefile.in || die
  294. sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
  295. \164\2/' loader/Makefile.in || die
  296. fi
  297. rm_man_file(){
  298. local file="${1}"
  299. loc=${2}
  300. sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
  301. }
  302. while read f; do
  303. l10n_for_each_disabled_locale_do rm_man_file "${f}"
  304. done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
  305. }
  306. src_configure() {
  307. wine_compiler_check || die
  308. export LDCONFIG=/bin/true
  309. use custom-cflags || strip-flags
  310. multilib-minimal_src_configure
  311. }
  312. multilib_src_configure() {
  313. local myconf=(
  314. --prefix="${MY_PREFIX}"
  315. --datarootdir="${MY_DATAROOTDIR}"
  316. --datadir="${MY_DATADIR}"
  317. --docdir="${MY_DOCDIR}"
  318. --includedir="${MY_INCLUDEDIR}"
  319. --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
  320. --libexecdir="${MY_LIBEXECDIR}"
  321. --localstatedir="${MY_LOCALSTATEDIR}"
  322. --mandir="${MY_MANDIR}"
  323. --sysconfdir=/etc/wine
  324. $(use_with alsa)
  325. $(use_with capi)
  326. $(use_with lcms cms)
  327. $(use_with cups)
  328. $(use_with ncurses curses)
  329. $(use_with udisks dbus)
  330. $(use_with fontconfig)
  331. $(use_with ssl gnutls)
  332. $(use_enable gecko mshtml)
  333. $(use_with gphoto2 gphoto)
  334. $(use_with gsm)
  335. $(use_with gssapi)
  336. $(use_with gstreamer)
  337. --without-hal
  338. $(use_with jpeg)
  339. $(use_with kerberos krb5)
  340. $(use_with ldap)
  341. $(use_enable mono mscoree)
  342. $(use_with mp3 mpg123)
  343. $(use_with netapi)
  344. $(use_with nls gettext)
  345. $(use_with openal)
  346. $(use_with opencl)
  347. $(use_with opengl)
  348. $(use_with osmesa)
  349. $(use_with oss)
  350. $(use_with pcap)
  351. $(use_with png)
  352. $(use_with pulseaudio pulse)
  353. $(use_with threads pthread)
  354. $(use_with scanner sane)
  355. $(use_with sdl)
  356. $(use_enable test tests)
  357. $(use_with truetype freetype)
  358. $(use_with udev)
  359. $(use_with v4l)
  360. $(use_with vkd3d)
  361. $(use_with vulkan)
  362. $(use_with X x)
  363. $(use_with X xfixes)
  364. $(use_with xcomposite)
  365. $(use_with xinerama)
  366. $(use_with xml)
  367. $(use_with xml xslt)
  368. )
  369. local PKG_CONFIG AR RANLIB
  370. # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
  371. # set AR and RANLIB to make QA scripts happy; #483342
  372. tc-export PKG_CONFIG AR RANLIB
  373. if use amd64; then
  374. if [[ ${ABI} == amd64 ]]; then
  375. myconf+=( --enable-win64 )
  376. else
  377. myconf+=( --disable-win64 )
  378. fi
  379. # Note: using --with-wine64 results in problems with multilib.eclass
  380. # CC/LD hackery. We're using separate tools instead.
  381. fi
  382. ECONF_SOURCE=${S} \
  383. econf "${myconf[@]}"
  384. emake depend
  385. }
  386. multilib_src_test() {
  387. # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
  388. if [[ ${ABI} == x86 ]]; then
  389. if [[ $(id -u) == 0 ]]; then
  390. ewarn "Skipping tests since they cannot be run under the root user."
  391. ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
  392. return
  393. fi
  394. WINEPREFIX="${T}/.wine-${ABI}" \
  395. Xemake test
  396. fi
  397. }
  398. multilib_src_install_all() {
  399. local DOCS=( ANNOUNCE AUTHORS README )
  400. add_locale_docs() {
  401. local locale_doc="documentation/README.$1"
  402. [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
  403. }
  404. l10n_for_each_locale_do add_locale_docs
  405. einstalldocs
  406. prune_libtool_files --all
  407. if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
  408. rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
  409. "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
  410. fi
  411. # Remove wineconsole if neither backend is installed #551124
  412. if ! use X && ! use ncurses; then
  413. rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
  414. rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
  415. rm_wineconsole() {
  416. rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
  417. }
  418. multilib_foreach_abi rm_wineconsole
  419. fi
  420. use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
  421. use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
  422. if use abi_x86_64 && ! use abi_x86_32; then
  423. dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
  424. dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
  425. fi
  426. # Failglob for binloops, shouldn't be necessary, but including to stay safe
  427. eshopts_push -s failglob #615218
  428. # Make wrappers for binaries for handling multiple variants
  429. # Note: wrappers instead of symlinks because some are shell which use basename
  430. local b
  431. for b in "${D%/}${MY_PREFIX}"/bin/*; do
  432. make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
  433. done
  434. eshopts_pop
  435. }
  436. pkg_postinst() {
  437. eselect wine register ${P}
  438. if [[ ${PN} == "wine-vanilla" ]]; then
  439. eselect wine register --vanilla ${P} || die
  440. fi
  441. eselect wine update --all --if-unset || die
  442. xdg_desktop_database_update
  443. if ! use gecko; then
  444. ewarn "Without Wine Gecko, wine prefixes will not have a default"
  445. ewarn "implementation of iexplore. Many older windows applications"
  446. ewarn "rely upon the existence of an iexplore implementation, so"
  447. ewarn "you will likely need to install an external one, like via winetricks"
  448. fi
  449. if ! use mono; then
  450. ewarn "Without Wine Mono, wine prefixes will not have a default"
  451. ewarn "implementation of .NET. Many windows applications rely upon"
  452. ewarn "the existence of a .NET implementation, so you will likely need"
  453. ewarn "to install an external one, like via winetricks"
  454. fi
  455. }
  456. pkg_prerm() {
  457. eselect wine deregister ${P}
  458. if [[ ${PN} == "wine-vanilla" ]]; then
  459. eselect wine deregister --vanilla ${P} || die
  460. fi
  461. eselect wine update --all --if-unset || die
  462. }
  463. pkg_postrm() {
  464. xdg_desktop_database_update
  465. }