| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoin-qt/bitcoin-qt-0.7.2_rc2.ebuild,v 1.3 2013/02/07 22:39:22 ulm Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
DB_VER="4.8"
|
| 8 |
|
| 9 |
LANGS="bg ca_ES cs da de el_GR en es es_CL et eu_ES fa fa_IR fi fr fr_CA he hr hu it lt nb nl pl pt_BR pt_PT ro_RO ru sk sr sv tr uk zh_CN zh_TW"
|
| 10 |
inherit db-use eutils qt4-r2 versionator
|
| 11 |
|
| 12 |
DESCRIPTION="An end-user Qt4 GUI for the Bitcoin crypto-currency"
|
| 13 |
HOMEPAGE="http://bitcoin.org/"
|
| 14 |
SRC_URI="http://gitorious.org/bitcoin/bitcoind-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
|
| 15 |
1stclassmsg? ( http://luke.dashjr.org/programs/bitcoin/files/bitcoind/luke-jr/1stclassmsg/0.7.1-1stclassmsg.patch.xz )
|
| 16 |
eligius? ( http://luke.dashjr.org/programs/bitcoin/files/bitcoind/eligius/sendfee/0.7.1-eligius_sendfee.patch.xz )
|
| 17 |
"
|
| 18 |
|
| 19 |
LICENSE="MIT ISC GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
|
| 20 |
SLOT="0"
|
| 21 |
KEYWORDS="~amd64 ~arm ~x86"
|
| 22 |
IUSE="$IUSE 1stclassmsg dbus +eligius ipv6 +qrcode upnp"
|
| 23 |
|
| 24 |
RDEPEND="
|
| 25 |
>=dev-libs/boost-1.41.0[threads(+)]
|
| 26 |
dev-libs/openssl[-bindist]
|
| 27 |
qrcode? (
|
| 28 |
media-gfx/qrencode
|
| 29 |
)
|
| 30 |
upnp? (
|
| 31 |
net-libs/miniupnpc
|
| 32 |
)
|
| 33 |
sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
|
| 34 |
dev-qt/qtgui:4
|
| 35 |
dbus? (
|
| 36 |
dev-qt/qtdbus:4
|
| 37 |
)
|
| 38 |
"
|
| 39 |
DEPEND="${RDEPEND}
|
| 40 |
>=app-shells/bash-4.1
|
| 41 |
"
|
| 42 |
|
| 43 |
DOCS="doc/README"
|
| 44 |
|
| 45 |
S="${WORKDIR}/bitcoin-bitcoind-stable"
|
| 46 |
|
| 47 |
src_prepare() {
|
| 48 |
use 1stclassmsg && epatch "${WORKDIR}/0.7.1-1stclassmsg.patch"
|
| 49 |
cd src || die
|
| 50 |
use eligius && epatch "${WORKDIR}/0.7.1-eligius_sendfee.patch"
|
| 51 |
|
| 52 |
local filt= yeslang= nolang=
|
| 53 |
|
| 54 |
for lan in $LANGS; do
|
| 55 |
if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
|
| 56 |
ewarn "Language '$lan' no longer supported. Ebuild needs update."
|
| 57 |
fi
|
| 58 |
done
|
| 59 |
|
| 60 |
for ts in $(ls qt/locale/*.ts)
|
| 61 |
do
|
| 62 |
x="${ts/*bitcoin_/}"
|
| 63 |
x="${x/.ts/}"
|
| 64 |
if ! use "linguas_$x"; then
|
| 65 |
nolang="$nolang $x"
|
| 66 |
rm "$ts"
|
| 67 |
filt="$filt\\|$x"
|
| 68 |
else
|
| 69 |
yeslang="$yeslang $x"
|
| 70 |
fi
|
| 71 |
done
|
| 72 |
filt="bitcoin_\\(${filt:2}\\)\\.qm"
|
| 73 |
sed "/${filt}/d" -i 'qt/bitcoin.qrc'
|
| 74 |
einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
|
| 75 |
}
|
| 76 |
|
| 77 |
src_configure() {
|
| 78 |
OPTS=()
|
| 79 |
|
| 80 |
use dbus && OPTS+=("USE_DBUS=1")
|
| 81 |
if use upnp; then
|
| 82 |
OPTS+=("USE_UPNP=1")
|
| 83 |
else
|
| 84 |
OPTS+=("USE_UPNP=-")
|
| 85 |
fi
|
| 86 |
use qrcode && OPTS+=("USE_QRCODE=1")
|
| 87 |
use 1stclassmsg && OPTS+=("FIRST_CLASS_MESSAGING=1")
|
| 88 |
use ipv6 || OPTS+=("USE_IPV6=-")
|
| 89 |
|
| 90 |
OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
|
| 91 |
OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
|
| 92 |
|
| 93 |
eqmake4 "${PN}.pro" "${OPTS[@]}"
|
| 94 |
}
|
| 95 |
|
| 96 |
src_compile() {
|
| 97 |
# Workaround for bug #440034
|
| 98 |
share/genbuild.sh build/build.h
|
| 99 |
|
| 100 |
emake
|
| 101 |
}
|
| 102 |
|
| 103 |
src_test() {
|
| 104 |
cd src || die
|
| 105 |
emake -f makefile.unix "${OPTS[@]}" test_bitcoin
|
| 106 |
./test_bitcoin || die 'Tests failed'
|
| 107 |
}
|
| 108 |
|
| 109 |
src_install() {
|
| 110 |
qt4-r2_src_install
|
| 111 |
dobin ${PN}
|
| 112 |
insinto /usr/share/pixmaps
|
| 113 |
newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
|
| 114 |
make_desktop_entry ${PN} "Bitcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Network;P2P"
|
| 115 |
}
|