summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Gardner <je_fro@gentoo.org>2012-01-03 19:51:09 +0000
committerJeffrey Gardner <je_fro@gentoo.org>2012-01-03 19:51:09 +0000
commitb2b2b9388d398fdeee8d6b6f887211839b961cff (patch)
tree7b4bb21e31f278955b106733001cfeacb6ee8358 /app-misc
parentmanifest (diff)
downloadje_fro-b2b2b9388d398fdeee8d6b6f887211839b961cff.tar.gz
je_fro-b2b2b9388d398fdeee8d6b6f887211839b961cff.tar.bz2
je_fro-b2b2b9388d398fdeee8d6b6f887211839b961cff.zip
add latest cgminer
svn path=/; revision=319
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/cgminer/Manifest2
-rw-r--r--app-misc/cgminer/cgminer-2.1.1.ebuild96
2 files changed, 98 insertions, 0 deletions
diff --git a/app-misc/cgminer/Manifest b/app-misc/cgminer/Manifest
new file mode 100644
index 0000000..573bf92
--- /dev/null
+++ b/app-misc/cgminer/Manifest
@@ -0,0 +1,2 @@
+DIST cgminer-2.1.1.tar.bz2 351317 RMD160 5cd3e3555587426c01009400a2b0a66a09318f83 SHA1 3a1e0dbd8250d28e7ae85e6727c50332e835e73b SHA256 c0af455481c62919253c9bebd0c289f93e6d28c9b0e2de43894e77eba424f27e
+EBUILD cgminer-2.1.1.ebuild 1980 RMD160 bcced23a29d9352f2fcc536001320a38ee920092 SHA1 3d0fb32ec13a444e27f4a2e58cae0f25f746e6ac SHA256 1f8ace8d5b61e3259e36349aae3883428907e9410f40be8ffe576b9872ffa811
diff --git a/app-misc/cgminer/cgminer-2.1.1.ebuild b/app-misc/cgminer/cgminer-2.1.1.ebuild
new file mode 100644
index 0000000..afd1884
--- /dev/null
+++ b/app-misc/cgminer/cgminer-2.1.1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+DESCRIPTION="CPU/GPU miner in c for bitcoin"
+HOMEPAGE="https://bitcointalk.org/index.php?topic=28402.0"
+SRC_URI="http://ck.kolivas.org/apps/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+IUSE="adl altivec opencl padlock sse2 sse2_4way sse4"
+REQUIRED_USE='
+ adl? ( opencl )
+ altivec? ( ppc ppc64 )
+ padlock? ( || ( amd64 x86 ) )
+ sse2? ( || ( amd64 x86 ) )
+ sse4? ( amd64 )
+'
+
+DEPEND='
+ net-misc/curl
+ sys-libs/ncurses
+ >=dev-libs/jansson-2
+ sse2? (
+ >=dev-lang/yasm-1.0.1
+ )
+ sse4? (
+ >=dev-lang/yasm-1.0.1
+ )
+ opencl? (
+ || (
+ virtual/opencl-sdk
+ app-admin/eselect-opencl
+ dev-util/ati-stream-sdk
+ dev-util/ati-stream-sdk-bin
+ dev-util/amdstream
+ dev-util/amd-app-sdk
+ dev-util/amd-app-sdk-bin
+ dev-util/nvidia-cuda-sdk[opencl]
+ dev-util/intel-opencl-sdk
+ )
+ )
+'
+RDEPEND="${DEPEND}"
+DEPEND="${DEPEND}
+ dev-util/pkgconfig
+ sys-apps/sed
+ adl? (
+ dev-util/amd-adl-sdk
+ )
+"
+
+src_prepare() {
+ sed -i 's/\(^\#define WANT_.*\(SSE\|PADLOCK\|ALTIVEC\)\)/\/\/ \1/' miner.h
+ ln -s /usr/include/ADL/* ADL_SDK/
+}
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ if ! use altivec; then
+ sed -i 's/-faltivec//g' configure
+ else
+ CFLAGS="${CFLAGS} -DWANT_ALTIVEC=1"
+ fi
+ use padlock && CFLAGS="${CFLAGS} -DWANT_VIA_PADLOCK=1"
+ if use sse2; then
+ if use amd64; then
+ CFLAGS="${CFLAGS} -DWANT_X8664_SSE2=1"
+ else
+ CFLAGS="${CFLAGS} -DWANT_X8632_SSE2=1"
+ fi
+ fi
+ use sse2_4way && CFLAGS="${CFLAGS} -DWANT_SSE2_4WAY=1"
+ use sse4 && CFLAGS="${CFLAGS} -DWANT_X8664_SSE4=1"
+ CFLAGS="${CFLAGS}" \
+ econf \
+ $(use_enable adl) \
+ $(use_enable opencl)
+ if use opencl; then
+ # sanitize directories
+ sed -i 's/^(\#define CGMINER_PREFIX ).*$/\1"'"${EPREFIX}/usr/share/cgminer"'"/' config.h
+ fi
+}
+
+src_install() {
+ dobin cgminer
+ dodoc AUTHORS NEWS README
+ if use opencl; then
+ insinto /usr/share/cgminer
+ doins *.cl
+ fi
+}