Guest User

dev-python/pygtk

a guest
Dec 15th, 2024
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3.  
  4. EAPI="8"
  5. GCONF_DEBUG="no"
  6. GNOME_TARBALL_SUFFIX="bz2"
  7. # Outdated 12/15/2024
  8. #PYTHON_COMPAT=( python2_7 )
  9. PYTHON_COMPAT=( python3_{9..12} )
  10.  
  11. # Outdated 12/15/2024
  12. #inherit autotools eutils flag-o-matic gnome2 python-r1 virtualx
  13. inherit gnome.org python-single-r1 autotools flag-o-matic
  14.  
  15. DESCRIPTION="GTK+2 bindings for Python"
  16. HOMEPAGE="http://www.pygtk.org/"
  17.  
  18. LICENSE="LGPL-2.1"
  19. SLOT="2"
  20. KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
  21. IUSE="doc examples test numpy"
  22. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  23.  
  24. #RDEPEND="${PYTHON_DEPS}
  25. # >=dev-libs/glib-2.8:2
  26. # >=x11-libs/pango-1.16
  27. # >=dev-libs/atk-1.12
  28. # >=x11-libs/gtk+-2.24:2
  29. # >=dev-python/pycairo-1.0.2[${PYTHON_USEDEP}]
  30. # >=dev-python/pygobject-2.26.8-r53:2[${PYTHON_USEDEP}]
  31. # numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
  32. # >=gnome-base/libglade-2.5:2.0
  33. #"
  34. #DEPEND="${RDEPEND}
  35. # virtual/pkgconfig
  36. # doc? (
  37. # dev-libs/libxslt
  38. # >=app-text/docbook-xsl-stylesheets-1.70.1 )
  39. #
  40. #"
  41.  
  42. DEPEND="
  43. >=dev-libs/glib-2.8:2
  44. >=x11-libs/pango-1.16
  45. >=dev-libs/atk-1.12
  46. >=x11-libs/gtk+-2.24:2
  47. >=dev-python/pycairo-1.0.2[python_targets_python3_11]
  48. >=dev-python/pygobject-3.46.0-r1:3[python_targets_python3_11]
  49. numpy? ( dev-python/numpy[python_targets_python3_11] )
  50. >=gnome-base/libglade-2.5:2.0
  51. "
  52.  
  53. RDEPEND="${DEPEND}"
  54.  
  55. src_prepare() {
  56. # This ebuild was acquired after deprecation as an attachment from:
  57. # https://bugs.gentoo.org/662518
  58. # and I do not have any of these patch files, 'frick pastebin censors curses now' I hope I dont need them...
  59. # Fix declaration of codegen in .pc
  60. #epatch "${FILESDIR}/${PN}-2.13.0-fix-codegen-location.patch"
  61. #epatch "${FILESDIR}/${PN}-2.14.1-libdir-pc.patch"
  62.  
  63. # Fix leaks of Pango objects
  64. #epatch "${FILESDIR}/${PN}-2.24.0-fix-leaks.patch"
  65.  
  66. # Fail when tests are failing, bug #391307
  67. #epatch "${FILESDIR}/${PN}-2.24.0-test-fail.patch"
  68.  
  69. # Fix broken tests, https://bugzilla.gnome.org/show_bug.cgi?id=709304
  70. #epatch "${FILESDIR}/${P}-test_dialog.patch"
  71.  
  72. # Fix build on Darwin
  73. #epatch "${FILESDIR}/${PN}-2.24.0-quartz-objc.patch"
  74.  
  75. default
  76. # Examples is handled "manually"
  77. sed -e 's/\(SUBDIRS = .* \)examples/\1/' \
  78. -i Makefile.am Makefile.in || die
  79.  
  80. sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #466968
  81.  
  82. AT_M4DIR="m4" eautoreconf
  83.  
  84. prepare_pygtk() {
  85. mkdir -p "${BUILD_DIR}" || die
  86. }
  87. python_foreach_impl prepare_pygtk
  88. }
  89.  
  90. src_configure() {
  91. use hppa && append-flags -ffunction-sections
  92. configure_pygtk() {
  93. ECONF_SOURCE="${S}" gnome2_src_configure \
  94. $(use_enable doc docs) \
  95. --with-glade \
  96. --enable-thread \
  97. $(use_enable numpy)
  98. }
  99. python_foreach_impl run_in_build_dir configure_pygtk
  100. }
  101.  
  102. src_compile() {
  103. python_foreach_impl run_in_build_dir gnome2_src_compile
  104. }
  105.  
  106. src_test() {
  107. # Let tests pass without permissions problems, bug #245103
  108. gnome2_environment_reset
  109. unset DBUS_SESSION_BUS_ADDRESS
  110.  
  111. testing() {
  112. cd tests
  113. Xemake check-local
  114. }
  115. python_foreach_impl run_in_build_dir testing
  116. }
  117.  
  118. src_install() {
  119. dodoc AUTHORS ChangeLog INSTALL MAPPING NEWS README THREADS TODO
  120.  
  121. if use examples; then
  122. rm examples/Makefile*
  123. insinto /usr/share/doc/${PF}
  124. doins -r examples
  125. fi
  126.  
  127. python_foreach_impl run_in_build_dir gnome2_src_install
  128. prune_libtool_files --modules
  129. }
Advertisement
Add Comment
Please, Sign In to add comment