crossover-bin-12.5.0-r2.ebuild 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. PYTHON_REQ_USE="threads"
  6. inherit python-single-r1 unpacker
  7. DESCRIPTION="Commercial version of app-emulation/wine with paid support"
  8. HOMEPAGE="http://www.codeweavers.com/products/crossover/"
  9. SRC_URI="install-crossover-${PV}.bin"
  10. LICENSE="CROSSOVER-2"
  11. SLOT="0"
  12. KEYWORDS="-* ~amd64 ~x86"
  13. IUSE="+capi +cups doc +gphoto2 +gsm +jpeg +lcms +ldap +mp3 +nls +openal +opengl +png +scanner +ssl +v4l"
  14. RESTRICT="bindist fetch test"
  15. QA_FLAGS_IGNORED="opt/cxoffice/.*"
  16. QA_PRESTRIPPED="opt/cxoffice/lib/.*
  17. opt/cxoffice/bin/cxburner
  18. opt/cxoffice/bin/cxntlm_auth
  19. opt/cxoffice/bin/wineserver
  20. opt/cxoffice/bin/unrar
  21. opt/cxoffice/bin/wine-preloader
  22. opt/cxoffice/bin/cxdiag
  23. opt/cxoffice/bin/cxgettext
  24. opt/cxoffice/bin/wineloader
  25. "
  26. S="${WORKDIR}"
  27. DEPEND="dev-lang/perl
  28. app-arch/unzip
  29. ${PYTHON_DEPS}"
  30. RDEPEND="${DEPEND}
  31. !prefix? ( sys-libs/glibc )
  32. >=dev-python/pygtk-2.10[${PYTHON_USEDEP}]
  33. dev-python/dbus-python[${PYTHON_USEDEP}]
  34. dev-util/desktop-file-utils
  35. !app-emulation/crossover-office-pro-bin
  36. !app-emulation/crossover-office-bin
  37. capi? ( net-dialup/capi4k-utils )
  38. cups? ( net-print/cups[abi_x86_32(-)] )
  39. gsm? ( media-sound/gsm[abi_x86_32(-)] )
  40. jpeg? ( virtual/jpeg[abi_x86_32(-)] )
  41. lcms? ( media-libs/lcms:2 )
  42. ldap? ( net-nds/openldap[abi_x86_32(-)] )
  43. gphoto2? ( media-libs/libgphoto2[abi_x86_32(-)] )
  44. mp3? ( >=media-sound/mpg123-1.5.0[abi_x86_32(-)] )
  45. nls? ( sys-devel/gettext[abi_x86_32(-)] )
  46. openal? ( media-libs/openal[abi_x86_32(-)] )
  47. opengl? (
  48. virtual/glu[abi_x86_32(-)]
  49. virtual/opengl[abi_x86_32(-)]
  50. )
  51. png? ( media-libs/libpng:0[abi_x86_32(-)] )
  52. scanner? ( media-gfx/sane-backends[abi_x86_32(-)] )
  53. ssl? ( dev-libs/openssl:0[abi_x86_32(-)] )
  54. v4l? ( media-libs/libv4l[abi_x86_32(-)] )
  55. media-libs/alsa-lib[abi_x86_32(-)]
  56. >=media-libs/freetype-2.0.0[abi_x86_32(-)]
  57. media-libs/mesa[abi_x86_32(-)]
  58. sys-apps/util-linux[abi_x86_32(-)]
  59. sys-libs/zlib[abi_x86_32(-)]
  60. x11-libs/libICE[abi_x86_32(-)]
  61. x11-libs/libSM[abi_x86_32(-)]
  62. x11-libs/libX11[abi_x86_32(-)]
  63. x11-libs/libXau[abi_x86_32(-)]
  64. x11-libs/libXdmcp[abi_x86_32(-)]
  65. x11-libs/libXext[abi_x86_32(-)]
  66. x11-libs/libXi[abi_x86_32(-)]
  67. x11-libs/libXrandr[abi_x86_32(-)]
  68. x11-libs/libXxf86vm[abi_x86_32(-)]
  69. x11-libs/libxcb[abi_x86_32(-)]"
  70. pkg_nofetch() {
  71. einfo "Please visit ${HOMEPAGE}"
  72. einfo "and place ${A} in ${DISTDIR}"
  73. }
  74. src_unpack() {
  75. # self unpacking zip archive; unzip warns about the exe stuff
  76. unpack_zip ${A}
  77. }
  78. src_prepare() {
  79. python_fix_shebang .
  80. sed -e 's:/usr/local/etc/xdg /etc/xdg::' -i "${WORKDIR}/bin/locate_gui.sh" \
  81. || die "Could not patch ${WORKDIR}/bin/locate_gui.sh"
  82. # Remove unnecessary files
  83. rm -r license.txt guis/ || die "Could not remove files"
  84. use doc || rm -r doc/ || die "Could not remove files"
  85. }
  86. src_install() {
  87. # Install crossover symlink, bug #476314
  88. dosym /opt/cxoffice/bin/crossover /opt/bin/crossover
  89. # Install documentation
  90. dodoc README changelog.txt
  91. rm README changelog.txt || die "Could not remove README and changelog.txt"
  92. # Install files
  93. dodir /opt/cxoffice
  94. cp -r ./* "${ED}opt/cxoffice" \
  95. || die "Could not install into ${ED}opt/cxoffice"
  96. # Install configuration file
  97. insinto /opt/cxoffice/etc
  98. doins share/crossover/data/cxoffice.conf
  99. # Install requisite directories for menus
  100. dodir "/usr/share/applications"
  101. dodir "/etc/xdg/menus/applications-merged"
  102. # Install menus
  103. XDG_CONFIG_DIRS="${ED}etc/xdg" \
  104. XDG_DATA_DIRS="${ED}usr/share" \
  105. "${ED}opt/cxoffice/bin/cxmenu" --crossover --install \
  106. || die "Could not install menus"
  107. # Fix menus
  108. sed -e "s:${ED}:/:" -i "${ED}usr/share/applications/"* \
  109. || die "Could not fix menus"
  110. }