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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed Aug 22 02:19:27 2012 UTC (2 years ago) by blueness
Branch: MAIN
Version bumps

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 blueness 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/net-misc/cgminer/cgminer-2.6.3.ebuild,v 1.1 2012/08/06 16:20:09 blueness Exp $
4    
5     EAPI="4"
6    
7     inherit versionator
8    
9     MY_PV="$(replace_version_separator 3 -)"
10     S="${WORKDIR}/${PN}-${MY_PV}"
11    
12     DESCRIPTION="Bitcoin CPU/GPU/FPGA miner in C"
13     HOMEPAGE="https://bitcointalk.org/index.php?topic=28402.0"
14     SRC_URI="http://ck.kolivas.org/apps/${PN}/2.6/${PN}-${MY_PV}.tar.bz2"
15    
16     LICENSE="GPL-3"
17     SLOT="0"
18     KEYWORDS="~x86 ~amd64"
19    
20     IUSE="+adl altivec bitforce +cpumining examples hardened icarus modminer ncurses +opencl padlock scrypt sse2 sse2_4way sse4 +udev ztex"
21     REQUIRED_USE="
22     || ( bitforce cpumining icarus modminer opencl ztex )
23     adl? ( opencl )
24     altivec? ( cpumining ppc ppc64 )
25     opencl? ( ncurses )
26     padlock? ( cpumining || ( amd64 x86 ) )
27     scrypt? ( opencl )
28     sse2? ( cpumining || ( amd64 x86 ) )
29     sse4? ( cpumining amd64 )
30     "
31    
32     DEPEND="
33     net-misc/curl
34     ncurses? (
35     sys-libs/ncurses
36     )
37     dev-libs/jansson
38     opencl? (
39     virtual/opencl
40     )
41     udev? (
42     sys-fs/udev
43     )
44     ztex? (
45     virtual/libusb:1
46     )
47     "
48     RDEPEND="${DEPEND}"
49     DEPEND="${DEPEND}
50     virtual/pkgconfig
51     sys-apps/sed
52     adl? (
53     x11-libs/amd-adl-sdk
54     )
55     sse2? (
56     >=dev-lang/yasm-1.0.1
57     )
58     sse4? (
59     >=dev-lang/yasm-1.0.1
60     )
61     "
62    
63     src_prepare() {
64     sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
65     ln -s /usr/include/ADL/* ADL_SDK/
66     }
67    
68     src_configure() {
69     local CFLAGS="${CFLAGS}"
70     if ! use altivec; then
71     sed -i 's/-faltivec//g' configure
72     else
73     CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
74     fi
75     use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
76     if use sse2; then
77     if use amd64; then
78     CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
79     else
80     CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
81     fi
82     fi
83     use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
84     use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
85     use hardened && CFLAGS="${CFLAGS} -nopie"
86    
87     CFLAGS="${CFLAGS}" \
88     econf \
89     $(use_enable adl) \
90     $(use_enable bitforce) \
91     $(use_enable cpumining) \
92     $(use_enable icarus) \
93     $(use_enable modminer) \
94     $(use_with ncurses curses) \
95     $(use_enable opencl) \
96     $(use_enable scrypt) \
97     $(use_with udev libudev) \
98     $(use_enable ztex)
99     # sanitize directories
100     sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/cgminer"'"~' config.h
101     }
102    
103     src_install() {
104     dobin cgminer
105     dodoc AUTHORS NEWS README API-README
106     if use scrypt; then
107     dodoc SCRYPT-README
108     fi
109     if use icarus || use bitforce; then
110     dodoc FPGA-README
111     fi
112     if use modminer; then
113     insinto /usr/lib/cgminer/modminer
114     doins bitstreams/*.ncd
115     dodoc bitstreams/COPYING_fpgaminer
116     fi
117     if use opencl; then
118     insinto /usr/lib/cgminer
119     doins *.cl
120     fi
121     if use ztex; then
122     insinto /usr/lib/cgminer/ztex
123     doins bitstreams/*.bit
124     dodoc bitstreams/COPYING_ztex
125     fi
126     if use examples; then
127     docinto examples
128     dodoc api-example.php miner.php API.java api-example.c
129     fi
130     }

  ViewVC Help
Powered by ViewVC 1.1.20