/[gentoo-x86]/net-p2p/bitcoin-qt/bitcoin-qt-0.5.8_rc2.ebuild
Gentoo

Contents of /net-p2p/bitcoin-qt/bitcoin-qt-0.5.8_rc2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Apr 8 00:08:53 2013 UTC (15 months, 2 weeks ago) by blueness
Branch: MAIN
Version bumps and cleanup

(Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 2010-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6
7 DB_VER="4.8"
8
9 LANGS="da de en es es_CL hu it nb nl pt_BR ru 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 bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/0.5.6-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
16 "
17
18 LICENSE="MIT ISC GPL-3 LGPL-2.1 public-domain"
19 SLOT="0"
20 KEYWORDS="~amd64 ~arm ~x86"
21 IUSE="$IUSE +bip16 dbus ssl upnp"
22
23 RDEPEND="
24 >=dev-libs/boost-1.41.0[threads(+)]
25 dev-libs/openssl[-bindist]
26 upnp? (
27 net-libs/miniupnpc
28 )
29 sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
30 dev-qt/qtgui:4
31 dbus? (
32 dev-qt/qtdbus:4
33 )
34 "
35 DEPEND="${RDEPEND}
36 >=app-shells/bash-4.1
37 "
38
39 DOCS="doc/README"
40
41 S="${WORKDIR}/bitcoin-bitcoind-stable"
42
43 src_prepare() {
44 cd src || die
45 if use bip16; then
46 epatch "${WORKDIR}/0.5.6-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
47 fi
48
49 local filt= yeslang= nolang=
50
51 for lan in $LANGS; do
52 if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
53 ewarn "Language '$lan' no longer supported. Ebuild needs update."
54 fi
55 done
56
57 for ts in $(ls qt/locale/*.ts)
58 do
59 x="${ts/*bitcoin_/}"
60 x="${x/.ts/}"
61 if ! use "linguas_$x"; then
62 nolang="$nolang $x"
63 rm "$ts"
64 filt="$filt\\|$x"
65 else
66 yeslang="$yeslang $x"
67 fi
68 done
69 filt="bitcoin_\\(${filt:2}\\)\\.qm"
70 sed "/${filt}/d" -i 'qt/bitcoin.qrc'
71 einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
72 }
73
74 src_configure() {
75 OPTS=()
76
77 use dbus && OPTS+=("USE_DBUS=1")
78 use ssl && OPTS+=("DEFINES+=USE_SSL")
79 if use upnp; then
80 OPTS+=("USE_UPNP=1")
81 else
82 OPTS+=("USE_UPNP=-")
83 fi
84
85 OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
86 OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
87
88 eqmake4 "${PN}.pro" "${OPTS[@]}"
89 }
90
91 src_compile() {
92 emake
93 }
94
95 src_test() {
96 cd src || die
97 emake -f makefile.unix "${OPTS[@]}" test_bitcoin
98 ./test_bitcoin || die 'Tests failed'
99 }
100
101 src_install() {
102 qt4-r2_src_install
103 dobin ${PN}
104 insinto /usr/share/pixmaps
105 newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
106 make_desktop_entry ${PN} "Bitcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Network;P2P"
107 }

  ViewVC Help
Powered by ViewVC 1.1.20