conky-1.10.6-r1.ebuild 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils linux-info readme.gentoo-r1
  5. DESCRIPTION="An advanced, highly configurable system monitor for X"
  6. HOMEPAGE="https://github.com/brndnmtthws/conky"
  7. SRC_URI="https://github.com/brndnmtthws/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-3 BSD LGPL-2.1 MIT"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86"
  11. IUSE="apcupsd audacious cmus curl eve hddtemp ical iconv imlib iostats ipv6 irc
  12. lua-cairo lua-imlib lua-rsvg math moc mpd mysql nano-syntax ncurses
  13. nvidia +portmon pulseaudio rss systemd thinkpad truetype vim-syntax
  14. weather-metar weather-xoap webserver wifi X xmms2"
  15. DEPEND_COMMON="
  16. X? (
  17. imlib? ( media-libs/imlib2[X] )
  18. lua-cairo? (
  19. >=dev-lua/toluapp-1.0.93
  20. x11-libs/cairo[X] )
  21. lua-imlib? (
  22. >=dev-lua/toluapp-1.0.93
  23. media-libs/imlib2[X] )
  24. lua-rsvg? (
  25. >=dev-lua/toluapp-1.0.93
  26. gnome-base/librsvg )
  27. nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )
  28. truetype? ( x11-libs/libXft >=media-libs/freetype-2 )
  29. x11-libs/libX11
  30. x11-libs/libXdamage
  31. x11-libs/libXinerama
  32. x11-libs/libXfixes
  33. x11-libs/libXext
  34. audacious? ( >=media-sound/audacious-1.5 dev-libs/glib:2 )
  35. xmms2? ( media-sound/xmms2 )
  36. )
  37. cmus? ( media-sound/cmus )
  38. curl? ( net-misc/curl )
  39. eve? ( net-misc/curl dev-libs/libxml2 )
  40. ical? ( dev-libs/libical )
  41. iconv? ( virtual/libiconv )
  42. irc? ( net-libs/libircclient )
  43. mysql? ( >=virtual/mysql-5.0 )
  44. ncurses? ( sys-libs/ncurses:= )
  45. pulseaudio? ( media-sound/pulseaudio )
  46. rss? ( dev-libs/libxml2 net-misc/curl dev-libs/glib:2 )
  47. systemd? ( sys-apps/systemd )
  48. wifi? ( net-wireless/wireless-tools )
  49. weather-metar? ( net-misc/curl )
  50. weather-xoap? ( dev-libs/libxml2 net-misc/curl )
  51. webserver? ( net-libs/libmicrohttpd )
  52. >=dev-lang/lua-5.1.4-r8:0
  53. "
  54. RDEPEND="
  55. ${DEPEND_COMMON}
  56. apcupsd? ( sys-power/apcupsd )
  57. hddtemp? ( app-admin/hddtemp )
  58. moc? ( media-sound/moc )
  59. nano-syntax? ( app-editors/nano )
  60. vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )
  61. "
  62. DEPEND="
  63. ${DEPEND_COMMON}
  64. app-text/docbook2X
  65. "
  66. CONFIG_CHECK=~IPV6
  67. DOCS=( README.md TODO ChangeLog NEWS AUTHORS )
  68. PATCHES=( "${FILESDIR}"/${P}-new_graph-oor.patch )
  69. DISABLE_AUTOFORMATTING="yes"
  70. DOC_CONTENTS="You can find sample configurations at ${ROOT%/}/usr/share/doc/${PF}.
  71. To customize, copy to ${XDG_CONFIG_HOME}/conky/conky.conf
  72. and edit it to your liking.
  73. There are pretty html docs available at the conky homepage
  74. or in ${ROOT%/}/usr/share/doc/${PF}/html.
  75. Also see https://wiki.gentoo.org/wiki/Conky/HOWTO"
  76. pkg_setup() {
  77. use ipv6 && linux-info_pkg_setup
  78. }
  79. src_configure() {
  80. local mycmakeargs
  81. if use X; then
  82. mycmakeargs=(
  83. -DBUILD_X11=ON
  84. -DOWN_WINDOW=ON
  85. -DBUILD_XDAMAGE=ON
  86. -DBUILD_XINERAMA=ON
  87. -DBUILD_XDBE=ON
  88. -DBUILD_XFT=$(usex truetype)
  89. -DBUILD_IMLIB2=$(usex imlib)
  90. -DBUILD_XSHAPE=ON
  91. -DBUILD_ARGB=ON
  92. -DBUILD_LUA_CAIRO=$(usex lua-cairo)
  93. -DBUILD_LUA_IMLIB2=$(usex lua-imlib)
  94. -DBUILD_LUA_RSVG=$(usex lua-rsvg)
  95. -DBUILD_NVIDIA=$(usex nvidia)
  96. -DBUILD_AUDACIOUS=$(usex audacious)
  97. -DBUILD_XMMS2=$(usex xmms2)
  98. )
  99. else
  100. mycmakeargs=(
  101. -DBUILD_X11=OFF
  102. -DBUILD_NVIDIA=OFF
  103. -DBUILD_LUA_CAIRO=OFF
  104. -DBUILD_LUA_IMLIB2=OFF
  105. -DBUILD_LUA_RSVG=OFF
  106. -DBUILD_AUDACIOUS=OFF
  107. -DBUILD_XMMS2=OFF
  108. )
  109. fi
  110. mycmakeargs+=(
  111. -DBUILD_APCUPSD=$(usex apcupsd)
  112. -DBUILD_CMUS=$(usex cmus)
  113. -DBUILD_CURL=$(usex curl)
  114. -DBUILD_EVE=$(usex eve)
  115. -DBUILD_HDDTEMP=$(usex hddtemp)
  116. -DBUILD_IOSTATS=$(usex iostats)
  117. -DBUILD_ICAL=$(usex ical)
  118. -DBUILD_ICONV=$(usex iconv)
  119. -DBUILD_IPV6=$(usex ipv6)
  120. -DBUILD_IRC=$(usex irc)
  121. -DBUILD_MATH=$(usex math)
  122. -DBUILD_MOC=$(usex moc)
  123. -DBUILD_MPD=$(usex mpd)
  124. -DBUILD_MYSQL=$(usex mysql)
  125. -DBUILD_NCURSES=$(usex ncurses)
  126. -DBUILD_PORT_MONITORS=$(usex portmon)
  127. -DBUILD_PULSEAUDIO=$(usex pulseaudio)
  128. -DBUILD_RSS=$(usex rss)
  129. -DBUILD_JOURNAL=$(usex systemd)
  130. -DBUILD_IBM=$(usex thinkpad)
  131. -DBUILD_WEATHER_METAR=$(usex weather-metar)
  132. -DBUILD_WEATHER_XOAP=$(usex weather-xoap)
  133. -DBUILD_HTTP=$(usex webserver)
  134. -DBUILD_WLAN=$(usex wifi)
  135. -DBUILD_BUILTIN_CONFIG=ON
  136. -DBUILD_OLD_CONFIG=ON
  137. -DBUILD_I18N=ON
  138. -DMAINTAINER_MODE=OFF
  139. -DRELEASE=ON
  140. -DBUILD_BMPX=OFF
  141. -DDOC_PATH=/usr/share/doc/${PF}
  142. )
  143. # -DMAINTAINER_MODE=OFF disables building documentation and fixes bug #486270
  144. cmake-utils_src_configure
  145. }
  146. src_install() {
  147. cmake-utils_src_install
  148. if use vim-syntax; then
  149. insinto /usr/share/vim/vimfiles/ftdetect
  150. doins "${S}"/extras/vim/ftdetect/conkyrc.vim
  151. insinto /usr/share/vim/vimfiles/syntax
  152. doins "${S}"/extras/vim/syntax/conkyrc.vim
  153. fi
  154. if use nano-syntax; then
  155. insinto /usr/share/nano/
  156. doins "${S}"/extras/nano/conky.nanorc
  157. fi
  158. readme.gentoo_create_doc
  159. }
  160. pkg_postinst() {
  161. readme.gentoo_print_elog
  162. }