hexchat-2.12.4-r1.ebuild 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python{2_7,3_4,3_5} )
  5. inherit autotools fdo-mime gnome2-utils mono-env python-single-r1
  6. DESCRIPTION="Graphical IRC client based on XChat"
  7. HOMEPAGE="https://hexchat.github.io/"
  8. if [[ "${PV}" == "9999" ]] ; then
  9. inherit git-r3
  10. SRC_URI=""
  11. EGIT_REPO_URI="git://github.com/hexchat/hexchat.git"
  12. else
  13. SRC_URI="https://dl.hexchat.net/hexchat/${P}.tar.xz"
  14. KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux"
  15. fi
  16. LICENSE="GPL-2 plugin-fishlim? ( MIT )"
  17. SLOT="0"
  18. IUSE="dbus debug +gtk libcanberra libnotify libproxy libressl lua nls perl plugin-checksum plugin-fishlim plugin-sysinfo python spell ssl theme-manager"
  19. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  20. COMMON_DEPEND="dev-libs/glib:2
  21. dbus? ( sys-apps/dbus )
  22. gtk? ( x11-libs/gtk+:2 )
  23. libcanberra? ( media-libs/libcanberra )
  24. libproxy? ( net-libs/libproxy )
  25. libnotify? ( x11-libs/libnotify )
  26. lua? ( dev-lang/lua:= )
  27. nls? ( virtual/libintl )
  28. perl? ( dev-lang/perl )
  29. plugin-sysinfo? ( sys-apps/pciutils )
  30. python? ( ${PYTHON_DEPS} )
  31. spell? ( app-text/iso-codes )
  32. ssl? (
  33. !libressl? ( dev-libs/openssl:0= )
  34. libressl? ( dev-libs/libressl:0= )
  35. )
  36. theme-manager? (
  37. || (
  38. ( dev-lang/mono[minimal] dev-dotnet/libgdiplus )
  39. dev-lang/mono[-minimal]
  40. )
  41. )"
  42. RDEPEND="${COMMON_DEPEND}
  43. spell? ( app-text/enchant )"
  44. DEPEND="${COMMON_DEPEND}
  45. app-arch/xz-utils
  46. virtual/pkgconfig
  47. dev-util/intltool
  48. sys-devel/autoconf-archive
  49. theme-manager? ( dev-util/monodevelop )"
  50. PATCHES=(
  51. "${FILESDIR}/hexchat-2.12.2-configure.ac-remove-werror.patch"
  52. "${FILESDIR}/hexchat-2.12.4-libressl.patch"
  53. )
  54. src_prepare() {
  55. default
  56. eautoreconf
  57. }
  58. pkg_setup() {
  59. use python && python-single-r1_pkg_setup
  60. if use theme-manager ; then
  61. mono-env_pkg_setup
  62. export XDG_CACHE_HOME="${T}/.cache"
  63. fi
  64. }
  65. src_configure() {
  66. econf \
  67. --enable-plugin \
  68. $(use_enable nls) \
  69. $(use_enable ssl openssl) \
  70. $(use_enable gtk gtkfe) \
  71. $(use_enable !gtk textfe) \
  72. $(use_enable python python "${EPYTHON}") \
  73. $(use_enable perl) \
  74. $(use_enable plugin-checksum checksum) \
  75. $(use_enable plugin-fishlim fishlim) \
  76. $(use_enable plugin-sysinfo sysinfo) \
  77. $(use_enable dbus) \
  78. $(use_enable lua) \
  79. $(use_enable libnotify) \
  80. $(use_enable libcanberra) \
  81. $(use_enable libproxy) \
  82. $(use_enable spell isocodes) \
  83. $(use_enable debug) \
  84. $(use_with theme-manager)
  85. }
  86. src_install() {
  87. emake DESTDIR="${D}" \
  88. UPDATE_ICON_CACHE=true \
  89. UPDATE_MIME_DATABASE=true \
  90. UPDATE_DESKTOP_DATABASE=true \
  91. install
  92. dodoc readme.md
  93. find "${D}" -name '*.la' -delete || die
  94. }
  95. pkg_preinst() {
  96. if use gtk ; then
  97. gnome2_icon_savelist
  98. fi
  99. }
  100. pkg_postinst() {
  101. if use gtk ; then
  102. gnome2_icon_cache_update
  103. else
  104. elog "You have disabled the gtk USE flag. This means you don't have"
  105. elog "the GTK-GUI for HexChat but only a text interface called \"hexchat-text\"."
  106. fi
  107. if use theme-manager ; then
  108. fdo-mime_desktop_database_update
  109. fdo-mime_mime_database_update
  110. elog "Themes are available at:"
  111. elog " https://hexchat.github.io/themes.html"
  112. fi
  113. elog
  114. elog "optional dependencies:"
  115. elog " media-sound/sox (sound playback if you don't have libcanberra"
  116. elog " enabled)"
  117. elog " x11-plugins/hexchat-javascript (javascript support)"
  118. elog " x11-themes/sound-theme-freedesktop (default BEEP sound,"
  119. elog " needs libcanberra enabled)"
  120. }
  121. pkg_postrm() {
  122. if use gtk ; then
  123. gnome2_icon_cache_update
  124. fi
  125. if use theme-manager ; then
  126. fdo-mime_desktop_database_update
  127. fdo-mime_mime_database_update
  128. fi
  129. }