summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-08-28 21:42:27 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-08-28 21:42:58 -0400
commit9779295a9d2f79cafdbe7548f7d93d088ebcc80e (patch)
tree413b6b65640ef0a627120d429c96bf68a1717d74 /net-p2p
parentdev-python/readme: remove old (diff)
downloadgentoo-9779295a9d2f79cafdbe7548f7d93d088ebcc80e.tar.gz
gentoo-9779295a9d2f79cafdbe7548f7d93d088ebcc80e.tar.bz2
gentoo-9779295a9d2f79cafdbe7548f7d93d088ebcc80e.zip
net-p2p/litecoind: patch to build with leveldb-1.18
Gentoo-Bug: 555588 Package-Manager: portage-2.2.20.1
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/litecoind/files/litecoind-0.10.2.2-memenv_h.patch12
-rw-r--r--net-p2p/litecoind/litecoind-0.10.2.2-r2.ebuild99
2 files changed, 111 insertions, 0 deletions
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
new file mode 100644
index 000000000000..e181e4db5a91
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoind-0.10.2.2-memenv_h.patch
@@ -0,0 +1,12 @@
+diff -Naur litecoin-0.10.2.2.orig/src/leveldbwrapper.cpp litecoin-0.10.2.2/src/leveldbwrapper.cpp
+--- litecoin-0.10.2.2.orig/src/leveldbwrapper.cpp 2015-06-15 04:51:30.000000000 -0400
++++ litecoin-0.10.2.2/src/leveldbwrapper.cpp 2015-08-28 21:30:45.968538185 -0400
+@@ -11,7 +11,7 @@
+ #include <leveldb/cache.h>
+ #include <leveldb/env.h>
+ #include <leveldb/filter_policy.h>
+-#include <memenv.h>
++#include <leveldb/helpers/memenv.h>
+
+ void HandleError(const leveldb::Status& status) throw(leveldb_error)
+ {
diff --git a/net-p2p/litecoind/litecoind-0.10.2.2-r2.ebuild b/net-p2p/litecoind/litecoind-0.10.2.2-r2.ebuild
new file mode 100644
index 000000000000..5951608269e1
--- /dev/null
+++ b/net-p2p/litecoind/litecoind-0.10.2.2-r2.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit autotools db-use eutils systemd user
+
+MyPV="${PV/_/-}"
+MyPN="litecoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine"
+HOMEPAGE="https://litecoin.org/"
+SRC_URI="https://github.com/${MyPN}-project/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="logrotate upnp +wallet"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ logrotate? ( app-admin/logrotate )
+ upnp? ( net-libs/miniupnpc )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ >=dev-libs/leveldb-1.18-r1
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+"
+
+S="${WORKDIR}/${MyP}"
+
+pkg_setup() {
+ local UG='litecoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/litecoin "${UG}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/0.9.0-sys_leveldb.patch"
+ epatch "${FILESDIR}/${P}-memenv_h.patch"
+ eautoreconf
+ rm -r src/leveldb
+}
+
+src_configure() {
+ local my_econf=
+ if use upnp; then
+ my_econf="${my_econf} --with-miniupnpc --enable-upnp-default"
+ else
+ my_econf="${my_econf} --without-miniupnpc --disable-upnp-default"
+ fi
+ econf \
+ $(use_enable wallet)\
+ --disable-ccache \
+ --disable-static \
+ --disable-tests \
+ --with-system-leveldb \
+ --with-system-libsecp256k1 \
+ --without-libs \
+ --with-daemon \
+ --without-gui \
+ --without-qrencode \
+ ${my_econf}
+}
+
+src_install() {
+ default
+
+ insinto /etc/litecoin
+ doins "${FILESDIR}/litecoin.conf"
+ fowners litecoin:litecoin /etc/litecoin/litecoin.conf
+ fperms 600 /etc/litecoin/litecoin.conf
+
+ newconfd "${FILESDIR}/litecoin.confd" ${PN}
+ newinitd "${FILESDIR}/litecoin.initd-r1" ${PN}
+ systemd_dounit "${FILESDIR}/litecoin.service"
+
+ keepdir /var/lib/litecoin/.litecoin
+ fperms 700 /var/lib/litecoin
+ fowners litecoin:litecoin /var/lib/litecoin/
+ fowners litecoin:litecoin /var/lib/litecoin/.litecoin
+ dosym /etc/litecoin/litecoin.conf /var/lib/litecoin/.litecoin/litecoin.conf
+
+ dodoc doc/README.md doc/release-notes.md
+ newman contrib/debian/manpages/bitcoind.1 litecoind.1
+ newman contrib/debian/manpages/bitcoin.conf.5 litecoin.conf.5
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/litecoind.logrotate" litecoind
+ fi
+}