1 |
commit: 9779295a9d2f79cafdbe7548f7d93d088ebcc80e |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 29 01:42:27 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 29 01:42:58 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9779295a |
7 |
|
8 |
net-p2p/litecoind: 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/litecoind/litecoind-0.10.2.2-r2.ebuild | 99 ++++++++++++++++++++++ |
16 |
2 files changed, 111 insertions(+) |
17 |
|
18 |
diff --git a/net-p2p/litecoind/files/litecoind-0.10.2.2-memenv_h.patch b/net-p2p/litecoind/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/litecoind/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/litecoind/litecoind-0.10.2.2-r2.ebuild b/net-p2p/litecoind/litecoind-0.10.2.2-r2.ebuild |
38 |
new file mode 100644 |
39 |
index 0000000..5951608 |
40 |
--- /dev/null |
41 |
+++ b/net-p2p/litecoind/litecoind-0.10.2.2-r2.ebuild |
42 |
@@ -0,0 +1,99 @@ |
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 |
+inherit autotools db-use eutils systemd user |
52 |
+ |
53 |
+MyPV="${PV/_/-}" |
54 |
+MyPN="litecoin" |
55 |
+MyP="${MyPN}-${MyPV}" |
56 |
+ |
57 |
+DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine" |
58 |
+HOMEPAGE="https://litecoin.org/" |
59 |
+SRC_URI="https://github.com/${MyPN}-project/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyP}.tar.gz" |
60 |
+ |
61 |
+LICENSE="MIT ISC GPL-2" |
62 |
+SLOT="0" |
63 |
+KEYWORDS="~amd64 ~x86" |
64 |
+IUSE="logrotate upnp +wallet" |
65 |
+ |
66 |
+RDEPEND=" |
67 |
+ dev-libs/boost[threads(+)] |
68 |
+ dev-libs/openssl:0[-bindist] |
69 |
+ logrotate? ( app-admin/logrotate ) |
70 |
+ upnp? ( net-libs/miniupnpc ) |
71 |
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] |
72 |
+ >=dev-libs/leveldb-1.18-r1 |
73 |
+" |
74 |
+DEPEND="${RDEPEND} |
75 |
+ >=app-shells/bash-4.1 |
76 |
+ sys-apps/sed |
77 |
+" |
78 |
+ |
79 |
+S="${WORKDIR}/${MyP}" |
80 |
+ |
81 |
+pkg_setup() { |
82 |
+ local UG='litecoin' |
83 |
+ enewgroup "${UG}" |
84 |
+ enewuser "${UG}" -1 -1 /var/lib/litecoin "${UG}" |
85 |
+} |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ epatch "${FILESDIR}/0.9.0-sys_leveldb.patch" |
89 |
+ epatch "${FILESDIR}/${P}-memenv_h.patch" |
90 |
+ eautoreconf |
91 |
+ rm -r src/leveldb |
92 |
+} |
93 |
+ |
94 |
+src_configure() { |
95 |
+ local my_econf= |
96 |
+ if use upnp; then |
97 |
+ my_econf="${my_econf} --with-miniupnpc --enable-upnp-default" |
98 |
+ else |
99 |
+ my_econf="${my_econf} --without-miniupnpc --disable-upnp-default" |
100 |
+ fi |
101 |
+ econf \ |
102 |
+ $(use_enable wallet)\ |
103 |
+ --disable-ccache \ |
104 |
+ --disable-static \ |
105 |
+ --disable-tests \ |
106 |
+ --with-system-leveldb \ |
107 |
+ --with-system-libsecp256k1 \ |
108 |
+ --without-libs \ |
109 |
+ --with-daemon \ |
110 |
+ --without-gui \ |
111 |
+ --without-qrencode \ |
112 |
+ ${my_econf} |
113 |
+} |
114 |
+ |
115 |
+src_install() { |
116 |
+ default |
117 |
+ |
118 |
+ insinto /etc/litecoin |
119 |
+ doins "${FILESDIR}/litecoin.conf" |
120 |
+ fowners litecoin:litecoin /etc/litecoin/litecoin.conf |
121 |
+ fperms 600 /etc/litecoin/litecoin.conf |
122 |
+ |
123 |
+ newconfd "${FILESDIR}/litecoin.confd" ${PN} |
124 |
+ newinitd "${FILESDIR}/litecoin.initd-r1" ${PN} |
125 |
+ systemd_dounit "${FILESDIR}/litecoin.service" |
126 |
+ |
127 |
+ keepdir /var/lib/litecoin/.litecoin |
128 |
+ fperms 700 /var/lib/litecoin |
129 |
+ fowners litecoin:litecoin /var/lib/litecoin/ |
130 |
+ fowners litecoin:litecoin /var/lib/litecoin/.litecoin |
131 |
+ dosym /etc/litecoin/litecoin.conf /var/lib/litecoin/.litecoin/litecoin.conf |
132 |
+ |
133 |
+ dodoc doc/README.md doc/release-notes.md |
134 |
+ newman contrib/debian/manpages/bitcoind.1 litecoind.1 |
135 |
+ newman contrib/debian/manpages/bitcoin.conf.5 litecoin.conf.5 |
136 |
+ |
137 |
+ if use logrotate; then |
138 |
+ insinto /etc/logrotate.d |
139 |
+ newins "${FILESDIR}/litecoind.logrotate" litecoind |
140 |
+ fi |
141 |
+} |