summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-12-28 16:15:54 +0000
committerAnthony G. Basile <blueness@gentoo.org>2013-12-28 16:15:54 +0000
commit5b82d34ed88a833e0c23013a6f3153311ae67a44 (patch)
treec50cace1c6fc99de9c94286114a372adfc9bc4cb /net-p2p
parentFix underlinking (#496136 by kalle) (diff)
downloadhistorical-5b82d34ed88a833e0c23013a6f3153311ae67a44.tar.gz
historical-5b82d34ed88a833e0c23013a6f3153311ae67a44.tar.bz2
historical-5b82d34ed88a833e0c23013a6f3153311ae67a44.zip
Initial commit. Thanks likewhoa\!
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/datacoin-hp/ChangeLog12
-rw-r--r--net-p2p/datacoin-hp/Manifest29
-rw-r--r--net-p2p/datacoin-hp/datacoin-hp-9999.ebuild124
-rw-r--r--net-p2p/datacoin-hp/files/datacoin-hp-sys_leveldb.patch179
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.conf5
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.confd9
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.initd104
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.logrotate7
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.service30
-rw-r--r--net-p2p/datacoin-hp/metadata.xml15
10 files changed, 514 insertions, 0 deletions
diff --git a/net-p2p/datacoin-hp/ChangeLog b/net-p2p/datacoin-hp/ChangeLog
new file mode 100644
index 000000000000..a700f4a59dbf
--- /dev/null
+++ b/net-p2p/datacoin-hp/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-p2p/datacoin-hp
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/datacoin-hp/ChangeLog,v 1.1 2013/12/28 16:15:40 blueness Exp $
+
+*datacoin-hp-9999 (28 Dec 2013)
+
+ 28 Dec 2013; Anthony G. Basile <blueness@gentoo.org>
+ +datacoin-hp-9999.ebuild, +files/datacoin.conf, +files/datacoin.confd,
+ +files/datacoin.initd, +files/datacoin.logrotate, +files/datacoin.service,
+ +files/datacoin-hp-sys_leveldb.patch, +metadata.xml:
+ Initial commit. Thanks likewhoa\!
+
diff --git a/net-p2p/datacoin-hp/Manifest b/net-p2p/datacoin-hp/Manifest
new file mode 100644
index 000000000000..ba09633a56f6
--- /dev/null
+++ b/net-p2p/datacoin-hp/Manifest
@@ -0,0 +1,29 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX datacoin-hp-sys_leveldb.patch 6653 SHA256 67bd9bd4b3d0f90688aa8635588b296d326032be5474581397f263f75a3e9ba5 SHA512 b8cfc741682df5b3f1330a2dbc01c47b4c597b8cd7e7d97c150eec66e1659b056cfa3f3703bb95d21f82e349d220a75bc7c1a97916d84d25261bffb165a3627c WHIRLPOOL eb9a0104975eee4223eeaec3751514df22e7669161265c4534abe692ab1148a6ea1648570cd3ba22e9662fbf33c05dfd6541c5e0f14f9d0f3f70406379286f3c
+AUX datacoin.conf 108 SHA256 490bd98e4fae82d04aac70d030f8d5c8aa9fd22a8ff5d2c8238e49c26fb215b2 SHA512 e1c34d0a2799d618fb0b5dd17a5117957fb18532a1ecd223e3dfd6f815352c71abaaa7653715491f8e10ab6684b793da43e1841a1c63f5b5ed20c82dddee9ff6 WHIRLPOOL d1dd055b338c5fa5d0b94a1cd4f9ba686a310a0012788585ff1b73942284fbd4d87c4ebad8f11eb446a39b0ed1039994bf4eff4a7c01bd17995ba26836a59a70
+AUX datacoin.confd 194 SHA256 7415d875efd0b19a0f28abddaa9b54ad4748b91d543ca9791331c55078a7f884 SHA512 696a884f4f8b38d330547cf72c5f113b82a2a3e3583fa7fe4803ad4d90c25fc2a5a5536700b4e0f0a83be6fbeb51c61fe3d27973fe6fda530dba7e31e5f6ceb6 WHIRLPOOL cca73de6c5e32b384e9ca5dd0b67460b822ffa62b1064e7a8ed1feba9d750e0f9fee04e291e456d0696b4af3f50670aaa332de95cbd87459bd528d5366aec1fa
+AUX datacoin.initd 2511 SHA256 9b91f3869835cec68c577bd452572dd035f4ccc7507e4b9d1602570affac84fe SHA512 e75f69552e51029cffcb93fefe72a19c51aaae67ac68713a751dba128214409eeef901efa8b08d264d056b277ca5c963dbc754fd2d3fbbd55c1fae1dc0558a79 WHIRLPOOL 41694d3d221ca1a887080be7d0e722b70dd6f041d4e5f8620ca5e50e903a189cac3eb0df784eb07bf24025f7f325161de9faa79c7addf254dcc241073e2db09e
+AUX datacoin.logrotate 113 SHA256 b87dad90d7a14f6715f173b79dff9fbb8c751e5db56cda31e246476be46a3c71 SHA512 f77f8aca6ea979374e2d0a8661afab8bff0d3b65ad903a3bbdee0339271f947e0c0dd41aa884175ef6837b54227ad02e48b91255362dabb1fc16b038af1ede59 WHIRLPOOL 568bde8af0f7a852f53834c89a124f3584619dc6ff32f273b7efa6f70cb871f8951cbaa48ccfc35b36430732c3d0986501d691ef8e17c88d6c8cbe12f5100da7
+AUX datacoin.service 880 SHA256 a5840f12b558ef99cddfba4360a92064ebe4b88c5626cfe2c5e189a205e2d512 SHA512 3bb8639e1d95fb89949d65f7d0dffdcd9562b4a4d6cfd5523a4832f46091b6fe16ca84557e358c330e26f45701d2279f5b3cd06f29990b7457535e53b3f5df9c WHIRLPOOL be8767e02c7508d0789bc65d8cd67642831bd131cb3d0c4665ec541432235f0f23adc0dc847c0054794ea5889d2fac158290a433501e7a03a0c89e62ca5d1426
+EBUILD datacoin-hp-9999.ebuild 3107 SHA256 a8618be613d289f13a42409cd3b0c2b8ebbe831b289cae355077e30fc990fe35 SHA512 3347ea0a4e1bf4f46b3654f22c263b0dbc6315f159f914272fdcec65f9b63e1db4d5bcde8f28f01c6393c57aa4ff70d705bbe453344ff21a72ab61d6b58670ef WHIRLPOOL c706cacf381299ff05b7328439c347e1f9cd5c7a8d0b2777874bbf2d65d85fbb2ce4de1ff23c90d7ae8bdb287893fb44a17faffad27f12ba7b9a617d1d39f326
+MISC ChangeLog 543 SHA256 0e1a3d1971fd3c1b8b056f2305eb3f6635fe4632bd261b3524a1154a38994cb1 SHA512 2e842a5d1a0b9ad688cc7266775460839b5ba8f03fa883f72c6068e216b56b52ea1985e780521715ac62d09f70743807ff7df7f5042f822b2e578c26a9832d17 WHIRLPOOL 2506376b0abca917c88218dbf23464827e6124e551ae24c80b37afc6214f3074e5a9d9049078e60c258270754a1cd9d543d8163857a438be59564204608a39f9
+MISC metadata.xml 428 SHA256 37185f0813deae6715abf70319a9a2c1f66a5d7fcef18ec86c49f690b4c610fc SHA512 fcb008832f815b27d3f488a7514d9b9caa2077adecaf742c040f8f4143fc9c6b53e058e0a48584eb83e9cee72bf43e114a36b5b419c9583647a24034be5324df WHIRLPOOL 8c6d8845baff5e9b60a55a1f78195f030eae39867faf12c2e8ab764a1e7c3f1e8687d99990491679175103319f5f00668cf1be8a67b92b6f18a2854ec5aa46e3
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.22 (GNU/Linux)
+
+iQIcBAEBCAAGBQJSvvlqAAoJEJOE+m71LUu6zekQAKPxZo19QF9UuFeIMwYhNUhC
+ChVQObu19D/JiaDgsJyHtoHRgd3Od1dwD7fTxVcV04DNbst/5Pb2wrjW1bS6iuR8
+95lxNb1ZNOJqMHA8T5hifyJ0QglKuDsIgLxDKjEB0FsfBOjplvjFHj+PLv3vwoXz
+Rh9eF3K2Re7HLguFXHrR6pGvbhjICQhALmOfQ30l2/TbND1GuLVTS8fqby38AFI6
+uvmMlLmJT+8KQwi+fY9+zeg5T1obl714Ab3cRfM4ooMcIn0udTEHYmNm06KtgiBJ
+Taa0j6auZbt644x0hwsYLnTj9p+i6MMmnty+Hel8wp8saQ8Tz9wB756Zw7xcdoWo
+bW6Zn5GeUxPMqYLR05B4MU5nFMijH/8VJQKYpxEOviVq+kvrR005rqDZhfWcSeKd
+fOOVLL+BHS/D6N3meXay8OZjT1Pc8KKdr4HiCX51Zy6HWkjJSnNLBiR8LTfC7ywF
+518O6lMMA3JrWOd1y6uWRXbL6djtAXMejWvpCsBQW17d8sw5gb4xpsXLBDgOysR6
+46ZYr4ZczUwdJ9NUq61YN5Ic4hYm7BLnluJkFmw9GKSaaK/bpnzl1GabsTbvFsfS
+zgoXlx38GaUfez2+Z0xytOBN+g4OSMesy+bYdwzdv/uw6dJgdzTzADLobJKXKLEJ
+VOxnI5F52QqH9qaclkh5
+=YVGj
+-----END PGP SIGNATURE-----
diff --git a/net-p2p/datacoin-hp/datacoin-hp-9999.ebuild b/net-p2p/datacoin-hp/datacoin-hp-9999.ebuild
new file mode 100644
index 000000000000..0a4bc94a42e1
--- /dev/null
+++ b/net-p2p/datacoin-hp/datacoin-hp-9999.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/datacoin-hp/datacoin-hp-9999.ebuild,v 1.1 2013/12/28 16:15:40 blueness Exp $
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit bash-completion-r1 git-2 eutils db-use systemd
+
+MyPV="${PV/_/-}"
+MyPN="${PN/-hp/d}"
+MyP="primecoin-${MyPV}"
+
+DESCRIPTION="High-performance version of datacoin (primecoin-hp fork)."
+HOMEPAGE="https://github.com/foo1inge/datacoin-hp"
+EGIT_REPO_URI="https://github.com/foo1inge/${PN}.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion examples upnp ipv6 examples logrotate hardened"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ <=dev-libs/leveldb-1.12.0[-snappy]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+ net-p2p/bitcoind
+"
+
+S="${WORKDIR}/${MyP}-linux/src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-sys_leveldb.patch
+ rm -r src/leveldd
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ sed -i 's/\(-l db_cxx\)/-l boost_chrono$(BOOST_LIB_SUFFIX) \1/' src/makefile.unix
+ fi
+}
+
+pkg_setup() {
+ local UG="${PN}"
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/datacoin "${UG}"
+}
+
+src_configure() {
+ OPTS=()
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=")
+ fi
+
+ use ipv6 || OPTS+=("USE_IPV6=0")
+
+ use hardened || OPTS+=("PIE=1")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ cd src || die
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${MyPN}
+}
+
+#Tests are broken with and without our primecoin-sys_leveldb.patch.
+#When tests work, make sure to inherit toolchain-funcs
+#src_test() {
+# cd src || die
+# emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_primecoin
+# ./test_primecoin || die 'Tests failed'
+#}
+
+src_install() {
+ dobin src/${MyPN}
+
+ insinto /etc/datacoin
+ doins "${FILESDIR}/datacoin.conf"
+ fowners ${PN}:${PN} /etc/datacoin/datacoin.conf
+ fperms 600 /etc/datacoin/datacoin.conf
+
+ newconfd "${FILESDIR}/datacoin.confd" ${PN}
+ newinitd "${FILESDIR}/datacoin.initd" ${PN}
+ systemd_dounit "${FILESDIR}/datacoin.service"
+
+ keepdir /var/lib/datacoin/.datacoin
+ fperms 700 /var/lib/datacoin
+ fowners ${PN}:${PN} /var/lib/datacoin/
+ fowners ${PN}:${PN} /var/lib/datacoin/.datacoin
+ dosym /etc/datacoin/datacoin.conf /var/lib/datacoin/.datacoin/datacoin.conf
+
+ dodoc doc/README.md doc/release-notes.md
+ newman contrib/debian/manpages/bitcoind.1 ${MyPN}.1
+ newman contrib/debian/manpages/bitcoin.conf.5 datacoin.conf.5
+
+ if use bash-completion; then
+ newbashcomp contrib/bitcoind.bash-completion ${PN}.bash-completion
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,pyminer,spendfrom,tidy_datadir.sh,wallettools}
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/datacoind.logrotate" ${MyPN}
+ fi
+}
diff --git a/net-p2p/datacoin-hp/files/datacoin-hp-sys_leveldb.patch b/net-p2p/datacoin-hp/files/datacoin-hp-sys_leveldb.patch
new file mode 100644
index 000000000000..2f85d6a11993
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin-hp-sys_leveldb.patch
@@ -0,0 +1,179 @@
+diff --git a/datacoin-qt.pro b/datacoin-qt.pro
+index f531607..df0ecc4 100644
+--- a/datacoin-qt.pro
++++ b/datacoin-qt.pro
+@@ -4,7 +4,7 @@ macx:TARGET = "Datacoin-Qt"
+ VERSION = 0.8.3
+ INCLUDEPATH += src src/json src/qt
+ QT += network
+-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV
+ CONFIG += no_include_pwd
+ CONFIG += thread
+
+@@ -104,25 +104,29 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
+ QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
+ }
+
++contains(USE_SYSTEM_LEVELDB, 1) {
++ LIBS += -lleveldb
++} else {
+ INCLUDEPATH += src/leveldb/include src/leveldb/helpers
+-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
++LIBS += $$PWD/src/leveldb/libleveldb.a
+ !win32 {
+ # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a
+ } else {
+ # make an educated guess about what the ranlib command is called
+ isEmpty(QMAKE_RANLIB) {
+ QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
+ }
+ LIBS += -lshlwapi
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a
+ }
+ genleveldb.target = $$PWD/src/leveldb/libleveldb.a
+ genleveldb.depends = FORCE
+ PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
+ QMAKE_EXTRA_TARGETS += genleveldb
++}
+ # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
+-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true
+
+ # regenerate src/build.h
+ !win32|contains(USE_BUILD_INFO, 1) {
+diff --git a/src/leveldb.cpp b/src/leveldb.cpp
+index e66f851..2856d70 100644
+--- a/src/leveldb.cpp
++++ b/src/leveldb.cpp
+@@ -8,7 +8,9 @@
+ #include <leveldb/env.h>
+ #include <leveldb/cache.h>
+ #include <leveldb/filter_policy.h>
+-#include <memenv/memenv.h>
++#ifndef LEVELDB_WITHOUT_MEMENV
++#include <memenv.h>
++#endif
+
+ #include <boost/filesystem.hpp>
+
+@@ -43,8 +45,12 @@ CLevelDB::CLevelDB(const boost::filesystem::path &path, size_t nCacheSize, bool
+ options = GetOptions(nCacheSize);
+ options.create_if_missing = true;
+ if (fMemory) {
++#ifndef LEVELDB_WITHOUT_MEMENV
+ penv = leveldb::NewMemEnv(leveldb::Env::Default());
+ options.env = penv;
++#else
++ throw std::runtime_error("CLevelDB(): compiled without memenv support");
++#endif
+ } else {
+ if (fWipe) {
+ printf("Wiping LevelDB in %s\n", path.string().c_str());
+diff --git a/src/makefile.unix b/src/makefile.unix
+index 359ac3d..ec1e075 100644
+--- a/src/makefile.unix
++++ b/src/makefile.unix
+@@ -120,8 +120,7 @@ xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-para
+ # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.
+ xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
+
+-OBJS= \
+- leveldb/libleveldb.a \
++BASEOBJS := \
+ obj/alert.o \
+ obj/version.o \
+ obj/checkpoints.o \
+@@ -130,7 +129,6 @@ OBJS= \
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -150,25 +148,44 @@ OBJS= \
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.o \
+ obj/prime.o \
+ obj/checkpointsync.o
+
++OBJS := \
++ obj/leveldb.o \
++ obj/init.o \
++ $(BASEOBJS)
++
++TESTOBJS := \
++ obj-test/leveldb.o \
++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
++ $(BASEOBJS)
++
+ all: datacoind
+
+ test check: test_primecoin FORCE
+ ./test_primecoin
+
++ifdef USE_SYSTEM_LEVELDB
++ LIBS += -lleveldb
++ TESTLIBS += -lmemenv
++else
+ #
+ # LevelDB support
+ #
+ MAKEOVERRIDES =
+-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
++LIBS += $(CURDIR)/leveldb/libleveldb.a
++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/include)
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
+ leveldb/libleveldb.a:
+- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd ..
++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd ..
++leveldb/libmemenv.a:
++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd ..
++OBJS += leveldb/libleveldb.a
++TESTOBJS += leveldb/libmemenv.a
++endif
+
+ # auto-generated dependencies:
+ -include obj/*.P
+@@ -179,24 +196,22 @@ obj/build.h: FORCE
+ version.cpp: obj/build.h
+ DEFS += -DHAVE_BUILD_INFO
+
+-obj/%.o: %.cpp
+- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++P_TO_D = \
+ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+ rm -f $(@:%.o=%.d)
+
+-datacoind: $(OBJS:obj/%=obj/%)
+- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
++obj/%.o: %.cpp
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
++datacoind: $(OBJS)
++ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
+
+ obj-test/%.o: test/%.cpp
+- $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
+- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+- rm -f $(@:%.o=%.d)
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+ test_primecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
diff --git a/net-p2p/datacoin-hp/files/datacoin.conf b/net-p2p/datacoin-hp/files/datacoin.conf
new file mode 100644
index 000000000000..65c9767ea571
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.conf
@@ -0,0 +1,5 @@
+# see https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File
+#
+
+#rpcuser=
+#rpcpassword=
diff --git a/net-p2p/datacoin-hp/files/datacoin.confd b/net-p2p/datacoin-hp/files/datacoin.confd
new file mode 100644
index 000000000000..95939b8b19a3
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/datacoind
+
+# owner of datacoind process (don't change, must be existing)
+DATACOIN_USER="datacoin-hp"
+
+DATACOIN_OPTS="${DATACOIN_OPTS}"
+
+# nice level
+NICELEVEL="19"
diff --git a/net-p2p/datacoin-hp/files/datacoin.initd b/net-p2p/datacoin-hp/files/datacoin.initd
new file mode 100644
index 000000000000..415f410d31fc
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.initd
@@ -0,0 +1,104 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+VARDIR="/var/lib/datacoin"
+CONFFILE="${VARDIR}/.datacoin/datacoin.conf"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [[ "${DATACOIN_USER}" == "" ]] ; then
+ eerror "Please edit /etc/conf.d/datacoind"
+ eerror "A user must be specified to run datacoind as that user."
+ eerror "Modify USER to your needs (you may also add a group after a colon)"
+ return 1
+ fi
+ if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${DATACOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/datacoind"
+ eerror "Specified user must exist!"
+ return 1
+ fi
+ if `echo "${DATACOIN_USER}" | grep ':' -sq` ; then
+ if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${DATACOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/datacoind"
+ eerror "Specified group must exist!"
+ return 1
+ fi
+ fi
+ if ! grep -q '^rpcpassword=' "${CONFFILE}"; then
+ eerror "Please edit `readlink -f ${CONFFILE}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+ if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then
+ eerror "`readlink -f ${CONFFILE}` should not be readable by other users"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Datacoind daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ start_openrc
+ else
+ start_baselayout
+ fi
+}
+
+stop() {
+ ebegin "Stopping Datacoin daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ stop_openrc
+ else
+ stop_baselayout
+ fi
+}
+
+start_openrc() {
+ start-stop-daemon \
+ --start --user "${DATACOIN_USER}" --name datacoind \
+ --pidfile /var/run/datacoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/datacoind \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ --wait 2000 \
+ -- ${DATACOIN_OPTS}
+ eend $?
+}
+
+stop_openrc() {
+ start-stop-daemon --stop --user "${DATACOIN_USER}" \
+ --name datacoind --pidfile /var/run/datacoind.pid \
+ --wait 30000 \
+ --progress
+ eend $?
+}
+
+start_baselayout() {
+ start-stop-daemon \
+ --start --user "${DATACOIN_USER}" --name datacoind \
+ --pidfile /var/run/datacoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/datacoind \
+ --chuid "${DATACOIN_USER}" \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ -- ${DATACOIN_OPTS}
+ eend $?
+}
+
+stop_baselayout() {
+ start-stop-daemon \
+ --stop \
+ --user "${DATACOIN_USER}" \
+ --name datacoind \
+ --pidfile /var/run/datacoind.pid
+ eend $?
+}
diff --git a/net-p2p/datacoin-hp/files/datacoin.logrotate b/net-p2p/datacoin-hp/files/datacoin.logrotate
new file mode 100644
index 000000000000..910bafe7de1d
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.logrotate
@@ -0,0 +1,7 @@
+/var/lib/datacoin/.datacoin/debug.log {
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP datacoind
+ endscript
+}
diff --git a/net-p2p/datacoin-hp/files/datacoin.service b/net-p2p/datacoin-hp/files/datacoin.service
new file mode 100644
index 000000000000..e0cb83190a11
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.service
@@ -0,0 +1,30 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/datacoind.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change some daemon and/or unit options,
+# create a file named
+# "/etc/systemd/system/datacoind.service.d/myopts.conf"
+# containing:
+# [Service]
+# Environment="DATACOIN_OPTS=-debug -logtimestamps"
+# Nice=10
+# This will override the setting appearing below.
+
+# Note that almost all daemon options could be specified in
+# /etc/primecoin/datacoin.conf
+
+[Unit]
+Description=Datacoin Daemon
+After=network.target
+
+[Service]
+User=datacoin
+Environment=DATACOIN_OPTS=
+ExecStart=/usr/bin/datacoind -daemon=0 $DATACOIN_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/datacoin-hp/metadata.xml b/net-p2p/datacoin-hp/metadata.xml
new file mode 100644
index 000000000000..9d01f8f6dc25
--- /dev/null
+++ b/net-p2p/datacoin-hp/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>email@missionaccomplish.com</email>
+ <name>Fernando V.</name>
+ </maintainer>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name='logrotate'>Use app-admin/logrotate for rotating logs</flag>
+ </use>
+</pkgmetadata>