1 |
commit: 2d4a9bbe950fbbdc14cf7b19d86dbbd200b0bed5 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 18 10:04:48 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 18 11:26:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d4a9bbe |
7 |
|
8 |
net-p2p/litecoind: add 0.18.1 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/607842 |
11 |
Bug: https://bugs.gentoo.org/672326 |
12 |
Bug: https://bugs.gentoo.org/768768 |
13 |
Bug: https://bugs.gentoo.org/788844 |
14 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/21302 |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
net-p2p/litecoind/Manifest | 1 + |
19 |
.../files/litecoind-0.18.1-system-leveldb.patch | 37 +++++++++ |
20 |
net-p2p/litecoind/litecoind-0.18.1.ebuild | 87 ++++++++++++++++++++++ |
21 |
3 files changed, 125 insertions(+) |
22 |
|
23 |
diff --git a/net-p2p/litecoind/Manifest b/net-p2p/litecoind/Manifest |
24 |
index a9ff48ef9e7..d318bafd732 100644 |
25 |
--- a/net-p2p/litecoind/Manifest |
26 |
+++ b/net-p2p/litecoind/Manifest |
27 |
@@ -1 +1,2 @@ |
28 |
DIST litecoin-0.10.4.0.tar.gz 4730189 BLAKE2B 3b3e4db10ca7ebb048853a424438d888a239cc736b1b2aa29dd0b6571daec5a64f95aee98a82991cd3e69b26965151f298655ca09745f103ebde1d15216ae2f8 SHA512 ae17e754d188efb1b51a376a52fe03e43b58c5059673b7dd4ecbf4f48574290b84011525fef2e10893f53e4da3d6ad9b5577001bb40aef7080d4c2479f4714a9 |
29 |
+DIST litecoin-0.18.1.tar.gz 5122629 BLAKE2B c6cb220bb893518eaf04e1b4b825dc0318103c955da6f262ef13fc9d925b7bae1bb0407a701a04a17bb3040c613b666e6de3331d443046e9d83aec4ed559e02e SHA512 59605cc0c4fd67c128bad0e2cabcc7b6bda1ebf5b23b7fcaee9fa69e86a4349598feba413f0ad42aef9338a42b0d6f8c04306634bd543856a2e7a203aa717f40 |
30 |
|
31 |
diff --git a/net-p2p/litecoind/files/litecoind-0.18.1-system-leveldb.patch b/net-p2p/litecoind/files/litecoind-0.18.1-system-leveldb.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..d00748a584f |
34 |
--- /dev/null |
35 |
+++ b/net-p2p/litecoind/files/litecoind-0.18.1-system-leveldb.patch |
36 |
@@ -0,0 +1,37 @@ |
37 |
+--- a/configure.ac |
38 |
++++ b/configure.ac |
39 |
+@@ -894,10 +894,22 @@ |
40 |
+ [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])]) |
41 |
+ fi |
42 |
+ |
43 |
++dnl Check for leveldb, only if explicitly requested |
44 |
+ LEVELDB_CPPFLAGS= |
45 |
+ LIBLEVELDB= |
46 |
+ LIBMEMENV= |
47 |
+-AM_CONDITIONAL([EMBEDDED_LEVELDB],[true]) |
48 |
++AC_ARG_WITH([system-leveldb], |
49 |
++ [AS_HELP_STRING([--with-system-leveldb], |
50 |
++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])], |
51 |
++ [system_leveldb=$withval], |
52 |
++ [system_leveldb=no] |
53 |
++) |
54 |
++if test x$system_leveldb != xno; then |
55 |
++ LEVELDB_CPPFLAGS= |
56 |
++ LIBLEVELDB=-lleveldb |
57 |
++ LIBMEMENV=-lmemenv |
58 |
++fi |
59 |
++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno]) |
60 |
+ AC_SUBST(LEVELDB_CPPFLAGS) |
61 |
+ AC_SUBST(LIBLEVELDB) |
62 |
+ AC_SUBST(LIBMEMENV) |
63 |
+--- a/src/dbwrapper.cpp |
64 |
++++ b/src/dbwrapper.cpp |
65 |
+@@ -10,7 +10,7 @@ |
66 |
+ #include <leveldb/cache.h> |
67 |
+ #include <leveldb/env.h> |
68 |
+ #include <leveldb/filter_policy.h> |
69 |
+-#include <memenv.h> |
70 |
++#include <leveldb/helpers/memenv.h> |
71 |
+ #include <stdint.h> |
72 |
+ #include <algorithm> |
73 |
+ |
74 |
|
75 |
diff --git a/net-p2p/litecoind/litecoind-0.18.1.ebuild b/net-p2p/litecoind/litecoind-0.18.1.ebuild |
76 |
new file mode 100644 |
77 |
index 00000000000..03ac46dc52d |
78 |
--- /dev/null |
79 |
+++ b/net-p2p/litecoind/litecoind-0.18.1.ebuild |
80 |
@@ -0,0 +1,87 @@ |
81 |
+# Copyright 1999-2021 Gentoo Authors |
82 |
+# Distributed under the terms of the GNU General Public License v2 |
83 |
+ |
84 |
+EAPI=7 |
85 |
+ |
86 |
+DB_VER="4.8" |
87 |
+ |
88 |
+inherit autotools db-use flag-o-matic systemd |
89 |
+ |
90 |
+MY_PV="${PV/_/-}" |
91 |
+MY_PN="litecoin" |
92 |
+MY_P="${MY_PN}-${MY_PV}" |
93 |
+ |
94 |
+DESCRIPTION="The offical daemon to run your own (full) Litecoin node" |
95 |
+HOMEPAGE="https://litecoin.org/" |
96 |
+SRC_URI="https://github.com/${MY_PN}-project/${MY_PN}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" |
97 |
+S="${WORKDIR}/${MY_P}" |
98 |
+ |
99 |
+LICENSE="MIT ISC GPL-2" |
100 |
+SLOT="0" |
101 |
+KEYWORDS="~amd64 ~x86" |
102 |
+IUSE="cpu_flags_x86_sse2 upnp +wallet" |
103 |
+ |
104 |
+RDEPEND=" |
105 |
+ acct-group/litecoin |
106 |
+ acct-user/litecoin |
107 |
+ dev-libs/boost:=[threads(+)] |
108 |
+ dev-libs/leveldb:= |
109 |
+ dev-libs/libevent:=[threads(+)] |
110 |
+ dev-libs/openssl:=[-bindist(-)] |
111 |
+ sys-libs/db:$(db_ver_to_slot ${DB_VER})[cxx] |
112 |
+ upnp? ( net-libs/miniupnpc:= )" |
113 |
+DEPEND="${RDEPEND}" |
114 |
+ |
115 |
+PATCHES=( "${FILESDIR}"/${P}-system-leveldb.patch ) |
116 |
+ |
117 |
+src_prepare() { |
118 |
+ default |
119 |
+ rm -r src/leveldb || die |
120 |
+ eautoreconf |
121 |
+} |
122 |
+ |
123 |
+src_configure() { |
124 |
+ # To avoid executable GNU stack. |
125 |
+ append-ldflags -Wl,-z,noexecstack |
126 |
+ |
127 |
+ local myeconfargs=( |
128 |
+ $(use_enable wallet) |
129 |
+ $(use_with upnp miniupnpc) |
130 |
+ $(use_enable upnp upnp-default) |
131 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
132 |
+ --disable-ccache |
133 |
+ --disable-static |
134 |
+ # tests are broken and segfault |
135 |
+ --disable-tests |
136 |
+ --with-system-leveldb |
137 |
+ --without-libs |
138 |
+ --with-daemon |
139 |
+ --without-gui |
140 |
+ --without-qrencode |
141 |
+ ) |
142 |
+ econf "${myeconfargs[@]}" |
143 |
+} |
144 |
+ |
145 |
+src_install() { |
146 |
+ default |
147 |
+ |
148 |
+ insinto /etc/litecoin |
149 |
+ doins "${FILESDIR}"/litecoin.conf |
150 |
+ fowners litecoin:litecoin /etc/litecoin/litecoin.conf |
151 |
+ fperms 600 /etc/litecoin/litecoin.conf |
152 |
+ |
153 |
+ newconfd "${FILESDIR}"/litecoin.confd ${PN} |
154 |
+ newinitd "${FILESDIR}"/litecoin.initd-r1 ${PN} |
155 |
+ systemd_dounit "${FILESDIR}"/litecoin.service |
156 |
+ |
157 |
+ keepdir /var/lib/litecoin/.litecoin |
158 |
+ fperms 700 /var/lib/litecoin |
159 |
+ fowners litecoin:litecoin /var/lib/litecoin/ |
160 |
+ fowners litecoin:litecoin /var/lib/litecoin/.litecoin |
161 |
+ dosym /etc/litecoin/litecoin.conf /var/lib/litecoin/.litecoin/litecoin.conf |
162 |
+ |
163 |
+ dodoc doc/README.md doc/release-notes.md |
164 |
+ |
165 |
+ insinto /etc/logrotate.d |
166 |
+ newins "${FILESDIR}"/litecoind.logrotate litecoind |
167 |
+} |