summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2013-09-29 15:41:57 +0400
committerAlexey Shvetsov <alexxy@gentoo.org>2013-09-29 15:41:57 +0400
commit6155ee1e40acd718ca98ea6793017488540eae82 (patch)
tree4d51f03e4ff9ff9f44cc7e111f0aa5887b61157d
parentUpdate layout.conf and drop old ebuilds (diff)
downloadalexxy-6155ee1e40acd718ca98ea6793017488540eae82.tar.gz
alexxy-6155ee1e40acd718ca98ea6793017488540eae82.tar.bz2
alexxy-6155ee1e40acd718ca98ea6793017488540eae82.zip
Add live bfgminer with bitfury support
Package-Manager: portage-2.2.7
-rw-r--r--net-misc/bfgminer/bfgminer-9999.ebuild130
-rw-r--r--net-misc/bfgminer/files/3.1.0-Bugfix-opencl-Add-missing-include-for-fpgautils.h-ne.patch25
-rw-r--r--net-misc/bfgminer/files/3.1.0-Bugfix-opencl-Build-fpgautils-even-if-OpenCL-is-the-.patch26
-rw-r--r--net-misc/bfgminer/files/Bugfix-Fix-building-without-OpenCL-support.patch32
-rw-r--r--net-misc/bfgminer/metadata.xml38
5 files changed, 251 insertions, 0 deletions
diff --git a/net-misc/bfgminer/bfgminer-9999.ebuild b/net-misc/bfgminer/bfgminer-9999.ebuild
new file mode 100644
index 0000000..9ddc66b
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-9999.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/bfgminer/bfgminer-3.2.1.ebuild,v 1.1 2013/09/19 16:25:45 blueness Exp $
+
+EAPI="5"
+
+if [[ $PV = *9999* ]]; then
+ scm_eclass=git-3
+ EGIT_REPO_URI="https://github.com/luke-jr/bfgminer
+ git://github.com/luke-jr/bfgminer"
+ # bitfury lives in separate branch
+ if use bitfury; then
+ EGIT_BRACNH="bitfury"
+ fi
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.tbz2"
+ KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+fi
+
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+IUSE="+adl avalon bfsb bitforce bitfury bigpic cpumining examples hardened icarus lm_sensors littlefury modminer metabank ncurses +opencl proxy scrypt +udev unicode x6500 ztex"
+REQUIRED_USE="
+ || ( avalon bitforce cpumining icarus modminer opencl proxy x6500 ztex )
+ adl? ( opencl )
+ bfsb? ( bitfury )
+ bigpic? ( bitfury )
+ littlefury? ( bitfury )
+ metabank? ( bitfury )
+ lm_sensors? ( opencl )
+ scrypt? ( || ( cpumining opencl ) )
+ unicode? ( ncurses )
+"
+
+DEPEND="
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ net-libs/libblkmaker
+ udev? (
+ virtual/udev
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ proxy? (
+ net-libs/libmicrohttpd
+ )
+ x6500? (
+ virtual/libusb:1
+ )
+ ztex? (
+ virtual/libusb:1
+ )
+"
+RDEPEND="${DEPEND}
+ opencl? (
+ virtual/opencl
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.2
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_enable adl) \
+ $(use_enable avalon) \
+ $(use_enable bfsb) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable bitforce) \
+ $(use_enable cpumining) \
+ $(use_enable icarus) \
+ $(use_enable littlefury) \
+ $(use_enable modminer) \
+ $(use_enable metabank) \
+ $(use_with ncurses curses) \
+ $(use_enable opencl) \
+ $(use_enable scrypt) \
+ $(use_with udev libudev) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy libmicrohttpd) \
+ $(use_enable x6500) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+}
diff --git a/net-misc/bfgminer/files/3.1.0-Bugfix-opencl-Add-missing-include-for-fpgautils.h-ne.patch b/net-misc/bfgminer/files/3.1.0-Bugfix-opencl-Add-missing-include-for-fpgautils.h-ne.patch
new file mode 100644
index 0000000..3c941f3
--- /dev/null
+++ b/net-misc/bfgminer/files/3.1.0-Bugfix-opencl-Add-missing-include-for-fpgautils.h-ne.patch
@@ -0,0 +1,25 @@
+From d65e37e05203a4e88b42680fd9504c54833f28a6 Mon Sep 17 00:00:00 2001
+From: Luke Dashjr <luke-jr+git@utopios.org>
+Date: Fri, 14 Jun 2013 18:06:02 +0000
+Subject: [PATCH] Bugfix: opencl: Add missing include for fpgautils.h (needed
+ for open_bitstream)
+
+---
+ ocl.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ocl.c b/ocl.c
+index 15bd86c..12a3d29 100644
+--- a/ocl.c
++++ b/ocl.c
+@@ -34,6 +34,7 @@
+ #define OMIT_OPENCL_API
+
+ #include "findnonce.h"
++#include "fpgautils.h"
+ #include "ocl.h"
+
+ /* Platform API */
+--
+1.8.1.5
+
diff --git a/net-misc/bfgminer/files/3.1.0-Bugfix-opencl-Build-fpgautils-even-if-OpenCL-is-the-.patch b/net-misc/bfgminer/files/3.1.0-Bugfix-opencl-Build-fpgautils-even-if-OpenCL-is-the-.patch
new file mode 100644
index 0000000..27eef4d
--- /dev/null
+++ b/net-misc/bfgminer/files/3.1.0-Bugfix-opencl-Build-fpgautils-even-if-OpenCL-is-the-.patch
@@ -0,0 +1,26 @@
+From fa2f27dbc7b1bffc77526a752824a7dc7cfa6a77 Mon Sep 17 00:00:00 2001
+From: Luke Dashjr <luke-jr+git@utopios.org>
+Date: Sat, 15 Jun 2013 19:20:47 +0000
+Subject: [PATCH] Bugfix: opencl: Build fpgautils even if OpenCL is the only
+ driver, now that it uses it for kernel-finding
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 97aa8c7..c69d01d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -525,7 +525,7 @@ AC_SUBST(libblkmaker_LIBS)
+
+ AM_CONDITIONAL([NEED_LIBBLKMAKER], [test x$with_system_libblkmaker != xyes])
+ AM_CONDITIONAL([NEED_DYNCLOCK], [test x$icarus$modminer$x6500$ztex != xnonono])
+-AM_CONDITIONAL([NEED_FPGAUTILS], [test x$avalon$icarus$bitforce$modminer$x6500$ztex != xnononononono])
++AM_CONDITIONAL([NEED_FPGAUTILS], [test x$avalon$icarus$bitforce$modminer$opencl$x6500$ztex != xnonononononono])
+ AM_CONDITIONAL([HAS_SCRYPT], [test x$scrypt = xyes])
+ AM_CONDITIONAL([HAVE_CURSES], [test x$curses = xyes])
+ AM_CONDITIONAL([HAVE_SENSORS], [test x$with_sensors = xyes])
+--
+1.8.1.5
+
diff --git a/net-misc/bfgminer/files/Bugfix-Fix-building-without-OpenCL-support.patch b/net-misc/bfgminer/files/Bugfix-Fix-building-without-OpenCL-support.patch
new file mode 100644
index 0000000..8d09aa3
--- /dev/null
+++ b/net-misc/bfgminer/files/Bugfix-Fix-building-without-OpenCL-support.patch
@@ -0,0 +1,32 @@
+From f7125dc965963bd9860dc92616e2499a02297587 Mon Sep 17 00:00:00 2001
+From: Luke Dashjr <luke-jr+git@utopios.org>
+Date: Thu, 26 Apr 2012 21:25:32 -0400
+Subject: [PATCH] Bugfix: Fix building without OpenCL support
+
+---
+ driver-opencl.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/driver-opencl.c b/driver-opencl.c
+index 82b8cf3..2e1d4cd 100644
+--- a/driver-opencl.c
++++ b/driver-opencl.c
+@@ -44,6 +44,7 @@
+ /* TODO: cleanup externals ********************/
+
+
++#ifdef HAVE_OPENCL
+ /* Platform API */
+ CL_API_ENTRY cl_int CL_API_CALL
+ (*clGetPlatformIDs)(cl_uint /* num_entries */,
+@@ -248,6 +249,7 @@ load_opencl_symbols() {
+
+ return true;
+ }
++#endif
+
+
+ #ifdef HAVE_CURSES
+--
+1.7.3.4
+
diff --git a/net-misc/bfgminer/metadata.xml b/net-misc/bfgminer/metadata.xml
new file mode 100644
index 0000000..97d3ca9
--- /dev/null
+++ b/net-misc/bfgminer/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+ <maintainer>
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <use>
+ <flag name='adl'>Enable support for controlling fans and overclocking on AMD cards with AMD Display Library</flag>
+ <flag name='avalon'>Enable support for mining with Avalon ASIC modules</flag>
+ <flag name='bigpic'>Enable support for mining with BigPic usb ASIC</flag>
+ <flag name='bitforce'>Enable support for mining with ButterFly Labs BitFORCE ASICs and/or FPGAs</flag>
+ <flag name='bitfury'>Enable support for generic bitfury chip ASICs</flag>
+ <flag name='bfsb'>Enable support for mining with BitfuryStrikeBack ASICs</flag>
+ <flag name='cpumining'>Enable support for mining with CPUs</flag>
+ <flag name='icarus'>Enable support for mining with Icarus-compatible devices (including Block Erupter Sapphire ASICs)</flag>
+ <flag name='littlefury'>Enable support for mining with LittleFury usb ASIC</flag>
+ <flag name='modminer'>Enable support for mining with ModMiner FPGAs</flag>
+ <flag name='metabank'>Enable support for mining with MetaBank ASIC</flag>
+ <flag name='opencl'>Enable support for mining with OpenCL-capable devices (GPUs)</flag>
+ <flag name='padlock'>Enable support for mining with VIA Padlock CPUs</flag>
+ <flag name='proxy'>Enable support for getwork proxy device (often used with Block Erupter Blades)</flag>
+ <flag name='scrypt'>Enable support for scrypt mining algorithm</flag>
+ <flag name='sse2_4way'>Enable support for CPU SSE2 4way mining algorithm</flag>
+ <flag name='sse4'>Enable support for CPU SSE4 mining algorithm</flag>
+ <flag name='x6500'>Enable support for mining with X6500 FPGAs</flag>
+ <flag name='ztex'>Enable support for mining with Ztex FPGAs</flag>
+ </use>
+</pkgmetadata>