/[gentoo-x86]/net-misc/cgminer/cgminer-4.9.0.ebuild
Gentoo

Contents of /net-misc/cgminer/cgminer-4.9.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Dec 16 17:43:02 2014 UTC (3 years, 10 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +6 -2 lines
Fix up supported hardware for 4.9.0

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/cgminer/cgminer-4.9.0.ebuild,v 1.1 2014/12/16 17:29:55 blueness Exp $
4
5 EAPI=5
6
7 inherit autotools eutils flag-o-matic
8
9 DESCRIPTION="Bitcoin CPU/GPU/FPGA/ASIC miner in C"
10 HOMEPAGE="http://bitcointalk.org/?topic=28402.msg357369 http://github.com/ckolivas/cgminer"
11 SRC_URI="http://ck.kolivas.org/apps/cgminer/${P}.tar.bz2"
12 #SRC_URI="http://ck.kolivas.org/apps/cgminer/4.5/${P}.tar.bz2"
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm ~x86"
17
18 HARDWARE="ants1 ants2 avalon avalon2 avalon4 bab bitmine_A1 bflsc bitforce bitfury blockerupter cointerra drillbit hashfast hashratio icarus klondike knc minion modminer spondoolies"
19 IUSE="doc examples udev hardened ncurses ${HARDWARE}"
20
21 REQUIRED_USE="|| ( ${HARDWARE} )"
22
23 RDEPEND="net-misc/curl
24 >=dev-libs/jansson-2.6
25 ncurses? ( sys-libs/ncurses )
26 ants1? ( virtual/libusb:1[udev] )
27 ants2? ( virtual/libusb:1[udev] )
28 avalon? ( virtual/libusb:1[udev] )
29 avalon2? ( virtual/libusb:1[udev] )
30 avalon4? ( virtual/libusb:1[udev] )
31 bflsc? ( virtual/libusb:1[udev] )
32 bitforce? ( virtual/libusb:1[udev] )
33 bitfury? ( virtual/libusb:1[udev] )
34 blockerupter? ( virtual/libusb:1[udev] )
35 cointerra? ( virtual/libusb:1[udev] )
36 drillbit? ( virtual/libusb:1[udev] )
37 hashfast? ( virtual/libusb:1[udev] )
38 hashratio? ( virtual/libusb:1[udev] )
39 icarus? ( virtual/libusb:1[udev] )
40 klondike? ( virtual/libusb:1[udev] )
41 modminer? ( virtual/libusb:1[udev] )
42 spondoolies? ( virtual/libusb:1[udev] )
43 udev? ( virtual/libudev )"
44 DEPEND="virtual/pkgconfig
45 ${RDEPEND}"
46
47 src_prepare() {
48 epatch "${FILESDIR}"/${PN}-4.4.2-system-jansson.patch
49 eautoreconf
50 }
51
52 src_configure() {
53 use hardened && append-cflags "-nopie"
54
55 econf $(use_with ncurses curses) \
56 $(use_enable ants1) \
57 $(use_enable ants2) \
58 $(use_enable avalon) \
59 $(use_enable avalon2) \
60 $(use_enable avalon4) \
61 $(use_enable bab) \
62 $(use_enable bitmine_A1) \
63 $(use_enable bflsc) \
64 $(use_enable bitforce) \
65 $(use_enable bitfury) \
66 $(use_enable blockerupter) \
67 $(use_enable cointerra) \
68 $(use_enable drillbit) \
69 $(use_enable hashfast) \
70 $(use_enable hashratio) \
71 $(use_enable icarus) \
72 $(use_enable klondike) \
73 $(use_enable knc) \
74 $(use_enable minion) \
75 $(use_enable modminer) \
76 $(use_enable spondoolies) \
77 $(use_enable udev) \
78 --disable-forcecombo \
79 --with-system-libusb
80 # sanitize directories (is this still needed?)
81 sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/cgminer"'"~' config.h
82 }
83
84 src_install() { # How about using some make install?
85 dobin cgminer
86
87 if use udev; then
88 insinto /lib/udev/rules.d
89 use udev && doins 01-cgminer.rules
90 fi
91
92 if use doc; then
93 dodoc AUTHORS NEWS README API-README
94 use icarus || use bitforce || use modminer && dodoc FPGA-README
95 use avalon || use bflsc && dodoc ASIC-README
96 fi
97
98 if use examples; then
99 docinto examples
100 dodoc api-example.php miner.php API.java api-example.c example.conf
101 fi
102 }

  ViewVC Help
Powered by ViewVC 1.1.20