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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Sat Jun 16 08:54:41 2012 UTC (2 years, 4 months ago) by blueness
Branch: MAIN
Changes since 1.4: +2 -1 lines
Add needed ncurses dep for opencl

(Portage version: 2.1.10.49/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 blueness 1.5 # $Header: /var/cvsroot/gentoo-x86/net-misc/cgminer/cgminer-2.3.5.ebuild,v 1.4 2012/05/22 16:10:53 ssuominen Exp $
4 blueness 1.1
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 blueness 1.2 SRC_URI="http://ck.kolivas.org/apps/${PN}/${PN}-2.3/${PN}-${MY_PV}.tar.bz2"
15 blueness 1.1
16     LICENSE="GPL-3"
17     SLOT="0"
18     KEYWORDS="~x86 ~amd64"
19    
20     IUSE="+adl altivec bitforce +cpumining examples hardened icarus ncurses +opencl padlock sse2 sse2_4way sse4 +udev ztex"
21     REQUIRED_USE="
22     || ( bitforce cpumining icarus opencl ztex )
23     adl? ( opencl )
24     altivec? ( cpumining ppc ppc64 )
25 blueness 1.5 opencl? ( ncurses )
26 blueness 1.1 padlock? ( cpumining || ( amd64 x86 ) )
27     sse2? ( cpumining || ( amd64 x86 ) )
28     sse4? ( cpumining amd64 )
29     "
30    
31     DEPEND="
32     net-misc/curl
33     ncurses? (
34     sys-libs/ncurses
35     )
36     dev-libs/jansson
37     opencl? (
38     virtual/opencl
39     )
40     udev? (
41     sys-fs/udev
42     )
43     ztex? (
44 ssuominen 1.4 virtual/libusb:1
45 blueness 1.1 )
46     "
47     RDEPEND="${DEPEND}"
48     DEPEND="${DEPEND}
49 jdhore 1.3 virtual/pkgconfig
50 blueness 1.1 sys-apps/sed
51     adl? (
52     x11-libs/amd-adl-sdk
53     )
54     sse2? (
55     >=dev-lang/yasm-1.0.1
56     )
57     sse4? (
58     >=dev-lang/yasm-1.0.1
59     )
60     "
61    
62     src_prepare() {
63     sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
64     ln -s /usr/include/ADL/* ADL_SDK/
65     }
66    
67     src_configure() {
68     local CFLAGS="${CFLAGS}"
69     if ! use altivec; then
70     sed -i 's/-faltivec//g' configure
71     else
72     CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
73     fi
74     use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
75     if use sse2; then
76     if use amd64; then
77     CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
78     else
79     CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
80     fi
81     fi
82     use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
83     use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
84     use hardened && CFLAGS="${CFLAGS} -nopie"
85    
86     CFLAGS="${CFLAGS}" \
87     econf \
88     $(use_enable adl) \
89     $(use_enable bitforce) \
90     $(use_enable cpumining) \
91     $(use_enable icarus) \
92     $(use_with ncurses curses) \
93     $(use_enable opencl) \
94     $(use_with udev libudev) \
95     $(use_enable ztex)
96     if use opencl; then
97     # sanitize directories
98     sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/cgminer/opencl"'"~' config.h
99     fi
100     if use ztex; then
101     sed -i 's~bitstreams/~'"${EPREFIX}"'/usr/lib/cgminer/ztex/~' libztex.c
102     fi
103     }
104    
105     src_install() {
106     dobin cgminer
107     dodoc AUTHORS NEWS README
108     if use opencl; then
109     insinto /usr/lib/cgminer/opencl
110     doins *.cl
111     fi
112     if use ztex; then
113     insinto /usr/lib/cgminer/ztex
114     doins bitstreams/*.bit
115     fi
116     if use examples; then
117     docinto examples
118     dodoc api-example.php miner.php API.java api-example.c
119     fi
120     }

  ViewVC Help
Powered by ViewVC 1.1.20