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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Jul 4 19:09:38 2015 UTC (3 years, 5 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove older insecure versions.

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

1 # Copyright 2010-2015 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.8.6-r1.ebuild,v 1.3 2015/01/28 18:46:36 blueness Exp $
4
5 EAPI=5
6
7 DB_VER="4.8"
8
9 LANGS="af_ZA ar bg bs ca ca_ES cs cy da de el_GR en eo es es_CL et eu_ES fa fa_IR fi fr fr_CA gu_IN he hi_IN hr hu it ja la lt lv_LV nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN zh_TW"
10 inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2 versionator
11
12 MyPV="${PV/_/}"
13 MyPN="bitcoin"
14 MyP="${MyPN}-${MyPV}"
15
16 DESCRIPTION="An end-user Qt4 GUI for the Bitcoin crypto-currency"
17 HOMEPAGE="http://bitcoin.org/"
18 SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyPN}-v${PV}.tgz
19 1stclassmsg? ( http://luke.dashjr.org/programs/bitcoin/files/bitcoind/luke-jr/1stclassmsg/0.8.2-1stclassmsg.patch.xz )
20 "
21
22 LICENSE="MIT ISC GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
23 SLOT="0"
24 KEYWORDS="amd64 arm x86"
25 IUSE="$IUSE 1stclassmsg dbus ipv6 kde +qrcode upnp"
26
27 RDEPEND="
28 >=dev-libs/boost-1.41.0[threads(+)]
29 dev-libs/openssl:0[-bindist]
30 qrcode? (
31 media-gfx/qrencode
32 )
33 upnp? (
34 net-libs/miniupnpc
35 )
36 sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
37 virtual/bitcoin-leveldb
38 dev-qt/qtgui:4
39 dbus? (
40 dev-qt/qtdbus:4
41 )
42 "
43 DEPEND="${RDEPEND}
44 >=app-shells/bash-4.1
45 "
46
47 DOCS="doc/README.md doc/release-notes.md"
48
49 S="${WORKDIR}/${MyP}"
50
51 src_prepare() {
52 epatch "${FILESDIR}/0.8-openssl-101k.patch"
53 use 1stclassmsg && epatch "${WORKDIR}/0.8.2-1stclassmsg.patch"
54 epatch "${FILESDIR}/0.8.2-sys_leveldb.patch"
55 rm -r src/leveldb
56
57 cd src || die
58
59 local filt= yeslang= nolang=
60
61 for lan in $LANGS; do
62 if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
63 ewarn "Language '$lan' no longer supported. Ebuild needs update."
64 fi
65 done
66
67 for ts in $(ls qt/locale/*.ts)
68 do
69 x="${ts/*bitcoin_/}"
70 x="${x/.ts/}"
71 if ! use "linguas_$x"; then
72 nolang="$nolang $x"
73 rm "$ts"
74 filt="$filt\\|$x"
75 else
76 yeslang="$yeslang $x"
77 fi
78 done
79 filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
80 sed "/${filt}/d" -i 'qt/bitcoin.qrc'
81 einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
82 }
83
84 src_configure() {
85 OPTS=()
86
87 use dbus && OPTS+=("USE_DBUS=1")
88 if use upnp; then
89 OPTS+=("USE_UPNP=1")
90 else
91 OPTS+=("USE_UPNP=-")
92 fi
93 use qrcode && OPTS+=("USE_QRCODE=1")
94 use 1stclassmsg && OPTS+=("FIRST_CLASS_MESSAGING=1")
95 use ipv6 || OPTS+=("USE_IPV6=-")
96
97 OPTS+=("USE_SYSTEM_LEVELDB=1")
98
99 OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
100 OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
101
102 if has_version '>=dev-libs/boost-1.52'; then
103 OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX")
104 fi
105
106 eqmake4 "${PN}.pro" "${OPTS[@]}"
107 }
108
109 src_test() {
110 cd src || die
111 emake -f makefile.unix "${OPTS[@]}" test_bitcoin
112 ./test_bitcoin || die 'Tests failed'
113 }
114
115 src_install() {
116 qt4-r2_src_install
117 dobin ${PN}
118 insinto /usr/share/pixmaps
119 newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
120 make_desktop_entry "${PN} %u" "Bitcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/bitcoin;\nTerminal=false"
121
122 dodoc doc/README.md doc/release-notes.md
123 dodoc doc/assets-attribution.txt
124 doman contrib/debian/manpages/bitcoin-qt.1
125
126 if use kde; then
127 insinto /usr/share/kde4/services
128 doins contrib/debian/bitcoin-qt.protocol
129 fi
130 }
131
132 update_caches() {
133 gnome2_icon_cache_update
134 fdo-mime_desktop_database_update
135 buildsycoca
136 }
137
138 pkg_postinst() {
139 update_caches
140 }
141
142 pkg_postrm() {
143 update_caches
144 }

  ViewVC Help
Powered by ViewVC 1.1.20