1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic systemd
8 DESCRIPTION="Optimized multi algo CPU miner"
9 HOMEPAGE="https://github.com/JayDDee/cpuminer-opt"
10 IUSE="cpu_flags_x86_avx2 cpu_flags_x86_sse2 curl libressl"
13 REQUIRED_USE="cpu_flags_x86_sse2"
17 curl? ( >=net-misc/curl-7.15[ssl] )
18 !libressl? ( dev-libs/openssl:0= )
19 libressl? ( dev-libs/libressl:0= )
22 if [[ ${PV} == "9999" ]] ; then
24 EGIT_REPO_URI="https://github.com/JayDDee/${PN}.git"
28 SRC_URI="https://github.com/JayDDee/${PN}/archive/v${PV}.tar.gz"
37 append-ldflags -Wl,-z,noexecstack
38 use cpu_flags_x86_avx2 && append-cflags "-DFOUR_WAY"
39 econf --with-crypto $(use_with curl)
44 systemd_dounit "${FILESDIR}"/${PN}.service
46 doins cpuminer-conf.json