conky-1.10.6-r2.ebuild 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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_prepare() {
  80. default
  81. sed -i -e "s|find_program(APP_MAN man)|set(APP_MAN $(which man) CACHE FILEPATH MAN_BINARY)|" \
  82. cmake/ConkyPlatformChecks.cmake || die
  83. }
  84. src_configure() {
  85. local mycmakeargs
  86. if use X; then
  87. mycmakeargs=(
  88. -DBUILD_X11=ON
  89. -DOWN_WINDOW=ON
  90. -DBUILD_XDAMAGE=ON
  91. -DBUILD_XINERAMA=ON
  92. -DBUILD_XDBE=ON
  93. -DBUILD_XFT=$(usex truetype)
  94. -DBUILD_IMLIB2=$(usex imlib)
  95. -DBUILD_XSHAPE=ON
  96. -DBUILD_ARGB=ON
  97. -DBUILD_LUA_CAIRO=$(usex lua-cairo)
  98. -DBUILD_LUA_IMLIB2=$(usex lua-imlib)
  99. -DBUILD_LUA_RSVG=$(usex lua-rsvg)
  100. -DBUILD_NVIDIA=$(usex nvidia)
  101. -DBUILD_AUDACIOUS=$(usex audacious)
  102. -DBUILD_XMMS2=$(usex xmms2)
  103. )
  104. else
  105. mycmakeargs=(
  106. -DBUILD_X11=OFF
  107. -DBUILD_NVIDIA=OFF
  108. -DBUILD_LUA_CAIRO=OFF
  109. -DBUILD_LUA_IMLIB2=OFF
  110. -DBUILD_LUA_RSVG=OFF
  111. -DBUILD_AUDACIOUS=OFF
  112. -DBUILD_XMMS2=OFF
  113. )
  114. fi
  115. mycmakeargs+=(
  116. -DBUILD_APCUPSD=$(usex apcupsd)
  117. -DBUILD_CMUS=$(usex cmus)
  118. -DBUILD_CURL=$(usex curl)
  119. -DBUILD_EVE=$(usex eve)
  120. -DBUILD_HDDTEMP=$(usex hddtemp)
  121. -DBUILD_IOSTATS=$(usex iostats)
  122. -DBUILD_ICAL=$(usex ical)
  123. -DBUILD_ICONV=$(usex iconv)
  124. -DBUILD_IPV6=$(usex ipv6)
  125. -DBUILD_IRC=$(usex irc)
  126. -DBUILD_MATH=$(usex math)
  127. -DBUILD_MOC=$(usex moc)
  128. -DBUILD_MPD=$(usex mpd)
  129. -DBUILD_MYSQL=$(usex mysql)
  130. -DBUILD_NCURSES=$(usex ncurses)
  131. -DBUILD_PORT_MONITORS=$(usex portmon)
  132. -DBUILD_PULSEAUDIO=$(usex pulseaudio)
  133. -DBUILD_RSS=$(usex rss)
  134. -DBUILD_JOURNAL=$(usex systemd)
  135. -DBUILD_IBM=$(usex thinkpad)
  136. -DBUILD_WEATHER_METAR=$(usex weather-metar)
  137. -DBUILD_WEATHER_XOAP=$(usex weather-xoap)
  138. -DBUILD_HTTP=$(usex webserver)
  139. -DBUILD_WLAN=$(usex wifi)
  140. -DBUILD_BUILTIN_CONFIG=ON
  141. -DBUILD_OLD_CONFIG=ON
  142. -DBUILD_I18N=ON
  143. -DMAINTAINER_MODE=ON
  144. -DRELEASE=ON
  145. -DBUILD_BMPX=OFF
  146. -DDOC_PATH=/usr/share/doc/${PF}
  147. )
  148. cmake-utils_src_configure
  149. }
  150. src_install() {
  151. cmake-utils_src_install
  152. if use vim-syntax; then
  153. insinto /usr/share/vim/vimfiles/ftdetect
  154. doins "${S}"/extras/vim/ftdetect/conkyrc.vim
  155. insinto /usr/share/vim/vimfiles/syntax
  156. doins "${S}"/extras/vim/syntax/conkyrc.vim
  157. fi
  158. if use nano-syntax; then
  159. insinto /usr/share/nano/
  160. doins "${S}"/extras/nano/conky.nanorc
  161. fi
  162. readme.gentoo_create_doc
  163. }
  164. pkg_postinst() {
  165. readme.gentoo_print_elog
  166. }