wxGTK-3.0.2.0-r2.ebuild 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils flag-o-matic multilib-minimal
  5. DESCRIPTION="GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit"
  6. HOMEPAGE="http://wxwidgets.org/"
  7. # we use the wxPython tarballs because they include the full wxGTK sources and
  8. # docs, and are released more frequently than wxGTK.
  9. SRC_URI="mirror://sourceforge/wxpython/wxPython-src-${PV}.tar.bz2
  10. doc? ( mirror://sourceforge/wxpython/wxPython-docs-${PV}.tar.bz2 )"
  11. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
  12. IUSE="+X aqua doc debug gstreamer libnotify opengl sdl tiff webkit"
  13. SLOT="3.0"
  14. RDEPEND="
  15. dev-libs/expat[${MULTILIB_USEDEP}]
  16. sdl? ( media-libs/libsdl[${MULTILIB_USEDEP}] )
  17. X? (
  18. >=dev-libs/glib-2.22:2[${MULTILIB_USEDEP}]
  19. media-libs/libpng:0=[${MULTILIB_USEDEP}]
  20. sys-libs/zlib[${MULTILIB_USEDEP}]
  21. virtual/jpeg:0=[${MULTILIB_USEDEP}]
  22. >=x11-libs/gtk+-2.18:2[${MULTILIB_USEDEP}]
  23. x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}]
  24. x11-libs/libSM[${MULTILIB_USEDEP}]
  25. x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
  26. x11-libs/pango[X,${MULTILIB_USEDEP}]
  27. gstreamer? (
  28. media-libs/gstreamer:0.10[${MULTILIB_USEDEP}]
  29. media-libs/gst-plugins-base:0.10[${MULTILIB_USEDEP}] )
  30. libnotify? ( x11-libs/libnotify[${MULTILIB_USEDEP}] )
  31. opengl? ( virtual/opengl[${MULTILIB_USEDEP}] )
  32. tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
  33. webkit? ( net-libs/webkit-gtk:2 )
  34. )
  35. aqua? (
  36. x11-libs/gtk+:2[aqua=,${MULTILIB_USEDEP}]
  37. virtual/jpeg:0=[${MULTILIB_USEDEP}]
  38. tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
  39. )"
  40. DEPEND="${RDEPEND}
  41. virtual/pkgconfig[${MULTILIB_USEDEP}]
  42. opengl? ( virtual/glu[${MULTILIB_USEDEP}] )
  43. X? (
  44. x11-proto/xproto[${MULTILIB_USEDEP}]
  45. x11-proto/xineramaproto[${MULTILIB_USEDEP}]
  46. x11-proto/xf86vidmodeproto[${MULTILIB_USEDEP}]
  47. )"
  48. PDEPEND=">=app-eselect/eselect-wxwidgets-20131230"
  49. LICENSE="wxWinLL-3
  50. GPL-2
  51. doc? ( wxWinFDL-3 )"
  52. S="${WORKDIR}/wxPython-src-${PV}"
  53. src_prepare() {
  54. epatch "${FILESDIR}"/${PN}-3.0.0.0-collision.patch
  55. epatch_user
  56. # https://bugs.gentoo.org/536004
  57. sed \
  58. -e 's:3\.0\.1:3.0.2:g' \
  59. -e 's:^wx_release_number=1$:wx_release_number=2:' \
  60. -i "${S}"/configure || die
  61. }
  62. multilib_src_configure() {
  63. local myconf
  64. # X independent options
  65. myconf="
  66. --with-zlib=sys
  67. --with-expat=sys
  68. --enable-compat28
  69. $(use_with sdl)"
  70. # debug in >=2.9
  71. # there is no longer separate debug libraries (gtk2ud)
  72. # wxDEBUG_LEVEL=1 is the default and we will leave it enabled
  73. # wxDEBUG_LEVEL=2 enables assertions that have expensive runtime costs.
  74. # apps can disable these features by building w/ -NDEBUG or wxDEBUG_LEVEL_0.
  75. # http://docs.wxwidgets.org/3.0/overview_debugging.html
  76. # https://groups.google.com/group/wx-dev/browse_thread/thread/c3c7e78d63d7777f/05dee25410052d9c
  77. use debug \
  78. && myconf="${myconf} --enable-debug=max"
  79. # wxGTK options
  80. # --enable-graphics_ctx - needed for webkit, editra
  81. # --without-gnomevfs - bug #203389
  82. use X && \
  83. myconf="${myconf}
  84. --enable-graphics_ctx
  85. --with-gtkprint
  86. --enable-gui
  87. --with-libpng=sys
  88. --with-libxpm=sys
  89. --with-libjpeg=sys
  90. --without-gnomevfs
  91. $(use_enable gstreamer mediactrl)
  92. $(multilib_native_use_enable webkit webview)
  93. $(use_with libnotify)
  94. $(use_with opengl)
  95. $(use_with tiff libtiff sys)"
  96. use aqua && \
  97. myconf="${myconf}
  98. --enable-graphics_ctx
  99. --enable-gui
  100. --with-libpng=sys
  101. --with-libxpm=sys
  102. --with-libjpeg=sys
  103. --with-mac
  104. --with-opengl"
  105. # cocoa toolkit seems to be broken
  106. # wxBase options
  107. if use !X && use !aqua ; then
  108. myconf="${myconf}
  109. --disable-gui"
  110. fi
  111. ECONF_SOURCE="${S}" econf ${myconf}
  112. }
  113. multilib_src_install_all() {
  114. cd "${S}"/docs || die
  115. dodoc changes.txt readme.txt
  116. newdoc base/readme.txt base_readme.txt
  117. newdoc gtk/readme.txt gtk_readme.txt
  118. if use doc; then
  119. dodoc -r "${S}"/docs/doxygen/out/html
  120. fi
  121. # Stray windows locale file, causes collisions
  122. local wxmsw="${ED}usr/share/locale/it/LC_MESSAGES/wxmsw.mo"
  123. [[ -e ${wxmsw} ]] && rm "${wxmsw}"
  124. }
  125. pkg_postinst() {
  126. has_version app-eselect/eselect-wxwidgets \
  127. && eselect wxwidgets update
  128. }
  129. pkg_postrm() {
  130. has_version app-eselect/eselect-wxwidgets \
  131. && eselect wxwidgets update
  132. }