Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/litecoin-qt/files/, net-p2p/litecoin-qt/
Date: Sat, 29 Aug 2015 01:46:34
Message-Id: 1440813012.edfc7249d2f5f33ce615c70c1d4cd9762e57e8f6.blueness@gentoo
1 commit: edfc7249d2f5f33ce615c70c1d4cd9762e57e8f6
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 29 01:50:12 2015 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 29 01:50:12 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edfc7249
7
8 net-p2p/litecoin-qt: patch to build with leveldb-1.18
9
10 Gentoo-Bug: 555588
11
12 Package-Manager: portage-2.2.20.1
13
14 .../files/litecoind-0.10.2.2-memenv_h.patch | 12 ++
15 net-p2p/litecoin-qt/litecoin-qt-0.10.2.2-r1.ebuild | 144 +++++++++++++++++++++
16 2 files changed, 156 insertions(+)
17
18 diff --git a/net-p2p/litecoin-qt/files/litecoind-0.10.2.2-memenv_h.patch b/net-p2p/litecoin-qt/files/litecoind-0.10.2.2-memenv_h.patch
19 new file mode 100644
20 index 0000000..e181e4d
21 --- /dev/null
22 +++ b/net-p2p/litecoin-qt/files/litecoind-0.10.2.2-memenv_h.patch
23 @@ -0,0 +1,12 @@
24 +diff -Naur litecoin-0.10.2.2.orig/src/leveldbwrapper.cpp litecoin-0.10.2.2/src/leveldbwrapper.cpp
25 +--- litecoin-0.10.2.2.orig/src/leveldbwrapper.cpp 2015-06-15 04:51:30.000000000 -0400
26 ++++ litecoin-0.10.2.2/src/leveldbwrapper.cpp 2015-08-28 21:30:45.968538185 -0400
27 +@@ -11,7 +11,7 @@
28 + #include <leveldb/cache.h>
29 + #include <leveldb/env.h>
30 + #include <leveldb/filter_policy.h>
31 +-#include <memenv.h>
32 ++#include <leveldb/helpers/memenv.h>
33 +
34 + void HandleError(const leveldb::Status& status) throw(leveldb_error)
35 + {
36
37 diff --git a/net-p2p/litecoin-qt/litecoin-qt-0.10.2.2-r1.ebuild b/net-p2p/litecoin-qt/litecoin-qt-0.10.2.2-r1.ebuild
38 new file mode 100644
39 index 0000000..6c2056b
40 --- /dev/null
41 +++ b/net-p2p/litecoin-qt/litecoin-qt-0.10.2.2-r1.ebuild
42 @@ -0,0 +1,144 @@
43 +# Copyright 1999-2015 Gentoo Foundation
44 +# Distributed under the terms of the GNU General Public License v2
45 +# $Id$
46 +
47 +EAPI=5
48 +
49 +DB_VER="4.8"
50 +
51 +LANGS="ach af_ZA ar be_BY bg bs ca_ES ca ca@valencia cmn cs cy da de el_GR en eo es_CL es_DO es_MX es es_UY et eu_ES fa_IR fa fi fr_CA fr gl gu_IN he hi_IN hr hu id_ID it ja ka kk_KZ ko_KR ky la lt lv_LV mn ms_MY nb nl pam pl pt_BR pt_PT ro_RO ru sah sk sl_SI sq sr sv th_TH tr uk ur_PK uz@Cyrl vi vi_VN zh_CN zh_HK zh_TW"
52 +
53 +inherit autotools db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2
54 +
55 +MyPV="${PV/_/-}"
56 +MyPN="litecoin"
57 +MyP="${MyPN}-${MyPV}"
58 +
59 +DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine"
60 +HOMEPAGE="https://litecoin.org/"
61 +SRC_URI="https://github.com/${MyPN}-project/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyP}.tar.gz"
62 +
63 +LICENSE="MIT ISC GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
64 +SLOT="0"
65 +KEYWORDS="~amd64 ~x86"
66 +IUSE="dbus kde +qrcode qt5 upnp"
67 +
68 +RDEPEND="
69 + dev-libs/boost[threads(+)]
70 + dev-libs/openssl:0[-bindist]
71 + dev-libs/protobuf:=
72 + qrcode? (
73 + media-gfx/qrencode
74 + )
75 + upnp? (
76 + net-libs/miniupnpc
77 + )
78 + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
79 + >=dev-libs/leveldb-1.18-r1
80 + !qt5? (
81 + dev-qt/qtgui:4
82 + dbus? (
83 + dev-qt/qtdbus:4
84 + )
85 + )
86 + qt5? (
87 + dev-qt/qtgui:5
88 + dbus? (
89 + dev-qt/qtdbus:5
90 + )
91 + )
92 +"
93 +DEPEND="${RDEPEND}
94 + >=app-shells/bash-4.1
95 +"
96 +
97 +DOCS="doc/README.md doc/release-notes.md"
98 +
99 +S="${WORKDIR}/${MyP}"
100 +
101 +src_prepare() {
102 + epatch "${FILESDIR}/0.9.0-sys_leveldb.patch"
103 + epatch "${FILESDIR}/litecoind-0.10.2.2-memenv_h.patch"
104 + eautoreconf
105 + rm -r src/leveldb
106 +
107 + cd src || die
108 +
109 + local filt= yeslang= nolang=
110 +
111 + for lan in $LANGS; do
112 + if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
113 + ewarn "Language '$lan' no longer supported. Ebuild needs update."
114 + fi
115 + done
116 +
117 + for ts in $(ls qt/locale/*.ts)
118 + do
119 + x="${ts/*bitcoin_/}"
120 + x="${x/.ts/}"
121 + if ! use "linguas_$x"; then
122 + nolang="$nolang $x"
123 + #rm "$ts"
124 + filt="$filt\\|$x"
125 + else
126 + yeslang="$yeslang $x"
127 + fi
128 + done
129 +
130 + filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
131 + sed "/${filt}/d" -i 'qt/bitcoin_locale.qrc'
132 + einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
133 +}
134 +
135 +src_configure() {
136 + local my_econf=
137 + if use upnp; then
138 + my_econf="${my_econf} --with-miniupnpc --enable-upnp-default"
139 + else
140 + my_econf="${my_econf} --without-miniupnpc --disable-upnp-default"
141 + fi
142 + econf \
143 + --enable-wallet \
144 + --disable-ccache \
145 + --disable-static \
146 + --disable-tests \
147 + --with-system-leveldb \
148 + --with-system-libsecp256k1 \
149 + --without-libs \
150 + --without-utils \
151 + --without-daemon \
152 + --with-gui=$(usex qt5 qt5 qt4) \
153 + $(use_with dbus qtdbus) \
154 + $(use_with qrcode qrencode) \
155 + ${my_econf}
156 +}
157 +
158 +src_install() {
159 + default
160 +
161 + insinto /usr/share/pixmaps
162 + newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
163 +
164 + make_desktop_entry "${PN} %u" "Litecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/litecoin;\nTerminal=false"
165 +
166 + newman contrib/debian/manpages/bitcoin-qt.1 ${PN}.1
167 +
168 + if use kde; then
169 + insinto /usr/share/kde4/services
170 + newins contrib/debian/bitcoin-qt.protocol ${PN}.protocol
171 + fi
172 +}
173 +
174 +update_caches() {
175 + gnome2_icon_cache_update
176 + fdo-mime_desktop_database_update
177 + buildsycoca
178 +}
179 +
180 +pkg_postinst() {
181 + update_caches
182 +}
183 +
184 +pkg_postrm() {
185 + update_caches
186 +}