bfgminer-3.10.10.ebuild 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
  6. HOMEPAGE="https://bitcointalk.org/?topic=168174"
  7. SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.tbz2"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
  11. # TODO: knc (needs i2c-tools header)
  12. IUSE="+adl antminer avalon bifury bitforce bfsb bigpic bitfury cpumining drillbit examples hardened hashbuster hashbuster2 hashfast icarus klondike +libusb littlefury lm_sensors metabank modminer nanofury ncurses +opencl proxy proxy_getwork proxy_stratum screen scrypt twinfury +udev unicode x6500 ztex"
  13. REQUIRED_USE='
  14. || ( antminer avalon bfsb bifury bigpic bitforce bitfury cpumining drillbit hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 ztex )
  15. adl? ( opencl )
  16. bfsb? ( bitfury )
  17. bigpic? ( bitfury )
  18. drillbit? ( bitfury )
  19. hashbuster? ( bitfury )
  20. hashbuster2? ( bitfury libusb )
  21. klondike? ( libusb )
  22. littlefury? ( bitfury )
  23. lm_sensors? ( opencl )
  24. metabank? ( bitfury )
  25. nanofury? ( bitfury )
  26. scrypt? ( || ( cpumining opencl proxy ) )
  27. twinfury? ( bitfury )
  28. unicode? ( ncurses )
  29. proxy? ( || ( proxy_getwork proxy_stratum ) )
  30. proxy_getwork? ( proxy )
  31. proxy_stratum? ( proxy )
  32. x6500? ( libusb )
  33. ztex? ( libusb )
  34. '
  35. DEPEND='
  36. net-misc/curl
  37. ncurses? (
  38. sys-libs/ncurses:=[unicode?]
  39. )
  40. >=dev-libs/jansson-2
  41. net-libs/libblkmaker:=
  42. udev? (
  43. virtual/udev
  44. )
  45. hashbuster? (
  46. dev-libs/hidapi
  47. )
  48. libusb? (
  49. virtual/libusb:1
  50. )
  51. lm_sensors? (
  52. sys-apps/lm_sensors
  53. )
  54. nanofury? (
  55. dev-libs/hidapi
  56. )
  57. proxy_getwork? (
  58. net-libs/libmicrohttpd
  59. )
  60. proxy_stratum? (
  61. dev-libs/libevent
  62. )
  63. screen? (
  64. app-misc/screen
  65. || (
  66. >=sys-apps/coreutils-8.15
  67. sys-freebsd/freebsd-bin
  68. app-misc/realpath
  69. )
  70. )
  71. '
  72. RDEPEND="${DEPEND}
  73. opencl? (
  74. || (
  75. virtual/opencl
  76. dev-util/nvidia-cuda-sdk[opencl]
  77. )
  78. )
  79. "
  80. DEPEND="${DEPEND}
  81. virtual/pkgconfig
  82. >=dev-libs/uthash-1.9.7
  83. sys-apps/sed
  84. cpumining? (
  85. amd64? (
  86. >=dev-lang/yasm-1.0.1
  87. )
  88. x86? (
  89. >=dev-lang/yasm-1.0.1
  90. )
  91. )
  92. "
  93. src_configure() {
  94. local CFLAGS="${CFLAGS}"
  95. local with_curses
  96. use hardened && CFLAGS="${CFLAGS} -nopie"
  97. if use ncurses; then
  98. if use unicode; then
  99. with_curses='--with-curses=ncursesw'
  100. else
  101. with_curses='--with-curses=ncurses'
  102. fi
  103. else
  104. with_curses='--without-curses'
  105. fi
  106. CFLAGS="${CFLAGS}" \
  107. econf \
  108. --docdir="/usr/share/doc/${PF}" \
  109. $(use_enable adl) \
  110. $(use_enable antminer) \
  111. $(use_enable avalon) \
  112. $(use_enable bifury) \
  113. $(use_enable bitforce) \
  114. $(use_enable bfsb) \
  115. $(use_enable bigpic) \
  116. $(use_enable bitfury) \
  117. $(use_enable cpumining) \
  118. $(use_enable drillbit) \
  119. $(use_enable hashbuster) \
  120. $(use_enable hashbuster2 hashbusterusb) \
  121. $(use_enable hashfast) \
  122. $(use_enable icarus) \
  123. $(use_enable klondike) \
  124. $(use_enable littlefury) \
  125. $(use_enable metabank) \
  126. $(use_enable modminer) \
  127. $(use_enable nanofury) \
  128. $(use_enable opencl) \
  129. $(use_enable scrypt) \
  130. $(use_enable twinfury) \
  131. --with-system-libblkmaker \
  132. $with_curses \
  133. $(use_with udev libudev) \
  134. $(use_with lm_sensors sensors) \
  135. $(use_with proxy_getwork libmicrohttpd) \
  136. $(use_with proxy_stratum libevent) \
  137. $(use_enable x6500) \
  138. $(use_enable ztex)
  139. }
  140. src_install() {
  141. emake install DESTDIR="$D"
  142. if ! use examples; then
  143. rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
  144. fi
  145. if ! use screen; then
  146. rm "${D}/usr/bin/start-bfgminer.sh"
  147. fi
  148. }