gnome-games.eclass 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # @ECLASS: gnome-games.eclass
  4. # @MAINTAINER:
  5. # Gnome team <gnome@gentoo.org>
  6. # @AUTHOR:
  7. # Author: Pacho Ramos <pacho@gentoo.org>
  8. # @BLURB: An eclass to build gnome-games.
  9. # @DESCRIPTION:
  10. # An eclass to build gnome-games using proper phases from gnome2 and
  11. # games eclasses.
  12. case "${EAPI:-0}" in
  13. 0|1)
  14. die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
  15. ;;
  16. 2|3|4|5)
  17. ;;
  18. *)
  19. die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
  20. ;;
  21. esac
  22. inherit autotools games gnome2
  23. EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
  24. if [[ ! ${_GNOME_GAMES} ]]; then
  25. DEPEND=">=dev-util/intltool-0.50.2-r1"
  26. RDEPEND="!gnome-extra/gnome-games"
  27. # @FUNCTION: gnome-games_pkg_setup
  28. # @DESCRIPTION:
  29. # Set proper phase defaults
  30. gnome-games_pkg_setup() {
  31. debug-print-function ${FUNCNAME} "${@}"
  32. games_pkg_setup
  33. }
  34. # @FUNCTION: gnome-games_src_prepare
  35. # @DESCRIPTION:
  36. # Set proper phase defaults
  37. gnome-games_src_prepare() {
  38. debug-print-function ${FUNCNAME} "${@}"
  39. # Fix intltoolize broken file:
  40. # https://bugs.launchpad.net/intltool/+bug/398571
  41. intltoolize --force --copy --automake || die "intltoolize failed"
  42. eautoreconf
  43. gnome2_src_prepare
  44. }
  45. # @FUNCTION: gnome-games_src_configure
  46. # @DESCRIPTION:
  47. # Set proper phase defaults, relying on gnome2_src_configure
  48. # and passing extra arguments from egamesconf (games.eclass)
  49. gnome-games_src_configure() {
  50. debug-print-function ${FUNCNAME} "${@}"
  51. gnome2_src_configure \
  52. --prefix="${GAMES_PREFIX}" \
  53. --libdir="$(games_get_libdir)" \
  54. --sysconfdir="${GAMES_SYSCONFDIR}" \
  55. --localstatedir=/var \
  56. --localedir=/usr/share/locale \
  57. "$@"
  58. }
  59. # @FUNCTION: gnome-games_src_compile
  60. # @DESCRIPTION:
  61. # Set proper phase defaults
  62. gnome-games_src_compile() {
  63. debug-print-function ${FUNCNAME} "${@}"
  64. gnome2_src_compile
  65. }
  66. # @FUNCTION: gnome-games_src_install
  67. # @DESCRIPTION:
  68. # Set proper phase defaults
  69. gnome-games_src_install() {
  70. debug-print-function ${FUNCNAME} "${@}"
  71. gnome2_src_install
  72. prepgamesdirs
  73. }
  74. # @FUNCTION: gnome-games_pkg_preinst
  75. # @DESCRIPTION:
  76. # Set proper phase defaults
  77. gnome-games_pkg_preinst() {
  78. debug-print-function ${FUNCNAME} "${@}"
  79. gnome2_pkg_preinst
  80. games_pkg_preinst
  81. }
  82. # @FUNCTION: gnome-games_pkg_postinst
  83. # @DESCRIPTION:
  84. # Set proper phase defaults
  85. gnome-games_pkg_postinst() {
  86. debug-print-function ${FUNCNAME} "${@}"
  87. gnome2_pkg_postinst
  88. games_pkg_postinst
  89. }
  90. # @FUNCTION: gnome-games_pkg_postrm
  91. # @DESCRIPTION:
  92. # Set proper phase defaults
  93. gnome-games_pkg_postrm() {
  94. debug-print-function ${FUNCNAME} "${@}"
  95. gnome2_pkg_postrm
  96. }
  97. _GNOME_GAMES=1
  98. fi