/[gentoo-x86]/net-p2p/bitcoin-qt/bitcoin-qt-0.5.0.5-r1.ebuild
Gentoo

Contents of /net-p2p/bitcoin-qt/bitcoin-qt-0.5.0.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue May 15 00:08:14 2012 UTC (2 years, 3 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove vulnerable versions, CVE-2012-2459, bug #415973

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.5.0.5-r1.ebuild,v 1.1 2012/03/25 01:46:02 blueness Exp $
4
5 EAPI="4"
6
7 DB_VER="4.8"
8
9 LANGS="da de en es es_CL nb nl ru 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 http://luke.dashjr.org/programs/bitcoin/files/bip16/${PV}-Minimal-support-for-validating-BIP16-pay-to-script-h.patch.xz
16 bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/${PV}-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
17 eligius? (
18 !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.5.0.6rc1-eligius_sendfee.patch.xz )
19 )
20 "
21
22 LICENSE="MIT ISC CCPL-Attribution-3.0 GPL-3 md2k7-asyouwish LGPL-2.1 public-domain"
23 SLOT="0"
24 KEYWORDS="~amd64 ~arm ~x86"
25 IUSE="$IUSE +bip16 dbus +eligius ssl upnp"
26
27 RDEPEND="
28 >=dev-libs/boost-1.41.0
29 dev-libs/openssl[-bindist]
30 upnp? (
31 net-libs/miniupnpc
32 )
33 sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
34 x11-libs/qt-gui
35 dbus? (
36 x11-libs/qt-dbus
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 cd src || die
49 epatch "${WORKDIR}/${PV}-Minimal-support-for-validating-BIP16-pay-to-script-h.patch"
50 if use bip16; then
51 epatch "${WORKDIR}/${PV}-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
52 use eligius && epatch "${FILESDIR}/${PV}+bip16-eligius_sendfee.patch"
53 else
54 use eligius && epatch "${WORKDIR}/0.5.0.6rc1-eligius_sendfee.patch"
55 fi
56
57 local filt= yeslang= nolang=
58
59 for lan in $LANGS; do
60 if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
61 ewarn "Language '$lan' no longer supported. Ebuild needs update."
62 fi
63 done
64
65 for ts in $(ls qt/locale/*.ts)
66 do
67 x="${ts/*bitcoin_/}"
68 x="${x/.ts/}"
69 if ! use "linguas_$x"; then
70 nolang="$nolang $x"
71 rm "$ts"
72 filt="$filt\\|$x"
73 else
74 yeslang="$yeslang $x"
75 fi
76 done
77 filt="bitcoin_\\(${filt:2}\\)\\.qm"
78 sed "/${filt}/d" -i 'qt/bitcoin.qrc'
79 einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
80 }
81
82 src_configure() {
83 OPTS=()
84 local BOOST_PKG BOOST_VER
85
86 use dbus && OPTS+=("USE_DBUS=1")
87 use ssl && OPTS+=("DEFINES+=USE_SSL")
88 if use upnp; then
89 OPTS+=("USE_UPNP=1")
90 else
91 OPTS+=("USE_UPNP=-")
92 fi
93
94 OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
95 OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
96
97 BOOST_PKG="$(best_version 'dev-libs/boost')"
98 BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
99 BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
100 OPTS+=("BOOST_INCLUDE_PATH=/usr/include/boost-${BOOST_VER}")
101 OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}")
102
103 eqmake4 "${PN}.pro" "${OPTS[@]}"
104 }
105
106 src_compile() {
107 emake
108 }
109
110 src_test() {
111 cd src || die
112 emake -f makefile.unix "${OPTS[@]}" test_bitcoin
113 ./test_bitcoin || die 'Tests failed'
114 }
115
116 src_install() {
117 qt4-r2_src_install
118 dobin ${PN}
119 insinto /usr/share/pixmaps
120 newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
121 make_desktop_entry ${PN} "Bitcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Network;P2P"
122 }

  ViewVC Help
Powered by ViewVC 1.1.20