summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-03-25 01:13:12 +0000
committerAnthony G. Basile <blueness@gentoo.org>2012-03-25 01:13:12 +0000
commit335445ca0c41dc9f81dd604694238b24d5beab8c (patch)
treefa38babb62d909f940774bb5a1f619e4385c8a9d /net-p2p
parentMarch -> Mar. (diff)
downloadgentoo-2-335445ca0c41dc9f81dd604694238b24d5beab8c.tar.gz
gentoo-2-335445ca0c41dc9f81dd604694238b24d5beab8c.tar.bz2
gentoo-2-335445ca0c41dc9f81dd604694238b24d5beab8c.zip
Updates to support BIP16 required by April 1, 2012
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/bitcoind/ChangeLog20
-rw-r--r--net-p2p/bitcoind/bitcoind-0.4.4-r1.ebuild101
-rw-r--r--net-p2p/bitcoind/bitcoind-0.4.5_rc1.ebuild (renamed from net-p2p/bitcoind/bitcoind-0.4.4.ebuild)18
-rw-r--r--net-p2p/bitcoind/bitcoind-0.5.0.4-r1.ebuild115
-rw-r--r--net-p2p/bitcoind/bitcoind-0.5.0.5-r1.ebuild115
-rw-r--r--net-p2p/bitcoind/bitcoind-0.5.0.6_rc1.ebuild (renamed from net-p2p/bitcoind/bitcoind-0.5.0.4.ebuild)18
-rw-r--r--net-p2p/bitcoind/bitcoind-0.5.1.ebuild4
-rw-r--r--net-p2p/bitcoind/bitcoind-0.5.3-r2.ebuild115
-rw-r--r--net-p2p/bitcoind/bitcoind-0.5.4_rc1.ebuild (renamed from net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild)16
-rw-r--r--net-p2p/bitcoind/files/0.4.4+bip16-eligius_sendfee.patch178
-rw-r--r--net-p2p/bitcoind/files/0.5.0.5+bip16-eligius_sendfee.patch169
-rw-r--r--net-p2p/bitcoind/metadata.xml1
12 files changed, 853 insertions, 17 deletions
diff --git a/net-p2p/bitcoind/ChangeLog b/net-p2p/bitcoind/ChangeLog
index d6d485468dd1..742a9ac18fe1 100644
--- a/net-p2p/bitcoind/ChangeLog
+++ b/net-p2p/bitcoind/ChangeLog
@@ -1,6 +1,24 @@
# ChangeLog for net-p2p/bitcoind
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/ChangeLog,v 1.17 2012/03/17 23:27:31 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/ChangeLog,v 1.18 2012/03/25 01:13:12 blueness Exp $
+
+*bitcoind-0.5.4_rc1 (25 Mar 2012)
+*bitcoind-0.5.3-r2 (25 Mar 2012)
+*bitcoind-0.5.0.6_rc1 (25 Mar 2012)
+*bitcoind-0.5.0.5-r1 (25 Mar 2012)
+*bitcoind-0.5.0.4-r1 (25 Mar 2012)
+*bitcoind-0.4.5_rc1 (25 Mar 2012)
+*bitcoind-0.4.4-r1 (25 Mar 2012)
+
+ 25 Mar 2012; Anthony G. Basile <blueness@gentoo.org>
+ +files/0.4.4+bip16-eligius_sendfee.patch, -bitcoind-0.4.4.ebuild,
+ +bitcoind-0.4.4-r1.ebuild, +bitcoind-0.4.5_rc1.ebuild,
+ -bitcoind-0.5.0.4.ebuild, +bitcoind-0.5.0.4-r1.ebuild,
+ +bitcoind-0.5.0.5-r1.ebuild, +bitcoind-0.5.0.6_rc1.ebuild,
+ +files/0.5.0.5+bip16-eligius_sendfee.patch, bitcoind-0.5.1.ebuild,
+ -bitcoind-0.5.3-r1.ebuild, +bitcoind-0.5.3-r2.ebuild,
+ +bitcoind-0.5.4_rc1.ebuild, metadata.xml:
+ Updates to support BIP16 required by April 1, 2012
17 Mar 2012; Anthony G. Basile <blueness@gentoo.org> bitcoind-0.5.0.4.ebuild:
Backport src_test() to 0.5.0.4
diff --git a/net-p2p/bitcoind/bitcoind-0.4.4-r1.ebuild b/net-p2p/bitcoind/bitcoind-0.4.4-r1.ebuild
new file mode 100644
index 000000000000..de2211037e59
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.4.4-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.4.4-r1.ebuild,v 1.1 2012/03/25 01:13:12 blueness Exp $
+
+EAPI="4"
+
+DB_VER="4.8"
+
+inherit db-use eutils versionator
+
+DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
+HOMEPAGE="http://bitcoin.org/"
+SRC_URI="http://gitorious.org/bitcoin/${PN}-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
+ http://luke.dashjr.org/programs/bitcoin/files/bip16/${PV}-Minimal-support-for-validating-BIP16-pay-to-script-h.patch.xz
+ bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/${PV}-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
+ eligius? (
+ !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.4.5rc1-eligius_sendfee.patch.xz )
+ )
+"
+
+LICENSE="MIT ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+bip16 +eligius ssl upnp"
+
+RDEPEND="
+ >=dev-libs/boost-1.41.0
+ dev-libs/crypto++
+ dev-libs/openssl[-bindist]
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+S="${WORKDIR}/bitcoin-${PN}-stable"
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ cd src || die
+ cp "${FILESDIR}/0.4.2-Makefile.gentoo" "Makefile" || die
+ epatch "${WORKDIR}/${PV}-Minimal-support-for-validating-BIP16-pay-to-script-h.patch"
+ if use bip16; then
+ epatch "${WORKDIR}/${PV}-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
+ use eligius && epatch "${FILESDIR}/${PV}+bip16-eligius_sendfee.patch"
+ else
+ use eligius && epatch "${WORKDIR}/0.4.5rc1-eligius_sendfee.patch"
+ fi
+}
+
+src_compile() {
+ local OPTS=()
+ local BOOST_PKG BOOST_VER BOOST_INC
+
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=( "LDFLAGS=${LDFLAGS}")
+
+ OPTS+=("DB_CXXFLAGS=-I$(db_includedir "${DB_VER}")")
+ OPTS+=("DB_LDFLAGS=-ldb_cxx-${DB_VER}")
+
+ BOOST_PKG="$(best_version 'dev-libs/boost')"
+ BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
+ BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
+ BOOST_INC="/usr/include/boost-${BOOST_VER}"
+ OPTS+=("BOOST_CXXFLAGS=-I${BOOST_INC}")
+ OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}")
+
+ use ssl && OPTS+=(USE_SSL=1)
+ use upnp && OPTS+=(USE_UPNP=1)
+
+ cd src || die
+ emake "${OPTS[@]}" ${PN}
+}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/bitcoin
+ newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 600 /etc/bitcoin/bitcoin.conf
+
+ newconfd "${FILESDIR}/bitcoin.confd" ${PN}
+ newinitd "${FILESDIR}/bitcoin.initd" ${PN}
+
+ keepdir /var/lib/bitcoin/.bitcoin
+ fperms 700 /var/lib/bitcoin
+ fowners bitcoin:bitcoin /var/lib/bitcoin/
+ fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
+ dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
+
+ dodoc doc/README
+}
diff --git a/net-p2p/bitcoind/bitcoind-0.4.4.ebuild b/net-p2p/bitcoind/bitcoind-0.4.5_rc1.ebuild
index eb7c1a6b4c79..b6706d4f4b4e 100644
--- a/net-p2p/bitcoind/bitcoind-0.4.4.ebuild
+++ b/net-p2p/bitcoind/bitcoind-0.4.5_rc1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.4.4.ebuild,v 1.1 2012/03/15 16:46:25 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.4.5_rc1.ebuild,v 1.1 2012/03/25 01:13:12 blueness Exp $
-EAPI=4
+EAPI="4"
DB_VER="4.8"
@@ -11,13 +11,16 @@ inherit db-use eutils versionator
DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
HOMEPAGE="http://bitcoin.org/"
SRC_URI="http://gitorious.org/bitcoin/${PN}-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
- eligius? ( http://luke.dashjr.org/programs/bitcoin/files/0.5.2-eligius_sendfee.patch.xz )
+ bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/0.4.4-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
+ eligius? (
+ !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.4.5rc1-eligius_sendfee.patch.xz )
+ )
"
LICENSE="MIT ISC"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="+eligius ssl upnp"
+IUSE="+bip16 +eligius ssl upnp"
RDEPEND="
>=dev-libs/boost-1.41.0
@@ -43,7 +46,12 @@ pkg_setup() {
src_prepare() {
cd src || die
cp "${FILESDIR}/0.4.2-Makefile.gentoo" "Makefile" || die
- use eligius && epatch "${WORKDIR}/0.5.2-eligius_sendfee.patch"
+ if use bip16; then
+ epatch "${WORKDIR}/0.4.4-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
+ use eligius && epatch "${FILESDIR}/0.4.4+bip16-eligius_sendfee.patch"
+ else
+ use eligius && epatch "${WORKDIR}/0.4.5rc1-eligius_sendfee.patch"
+ fi
}
src_compile() {
diff --git a/net-p2p/bitcoind/bitcoind-0.5.0.4-r1.ebuild b/net-p2p/bitcoind/bitcoind-0.5.0.4-r1.ebuild
new file mode 100644
index 000000000000..03a8537cadc5
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.5.0.4-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.0.4-r1.ebuild,v 1.1 2012/03/25 01:13:12 blueness Exp $
+
+EAPI="4"
+
+DB_VER="4.8"
+
+inherit db-use eutils versionator
+
+DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
+HOMEPAGE="http://bitcoin.org/"
+SRC_URI="http://gitorious.org/bitcoin/${PN}-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
+ http://luke.dashjr.org/programs/bitcoin/files/bip16/0.5.0.5-Minimal-support-for-validating-BIP16-pay-to-script-h.patch.xz
+ bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/0.5.0.5-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
+ eligius? (
+ !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.5.0.6rc1-eligius_sendfee.patch.xz )
+ )
+"
+
+LICENSE="MIT ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+bip16 +eligius examples ssl upnp"
+
+RDEPEND="
+ >=dev-libs/boost-1.41.0
+ dev-libs/openssl[-bindist]
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+S="${WORKDIR}/bitcoin-${PN}-stable"
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ cd src || die
+ epatch "${WORKDIR}/0.5.0.5-Minimal-support-for-validating-BIP16-pay-to-script-h.patch"
+ if use bip16; then
+ epatch "${WORKDIR}/0.5.0.5-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
+ use eligius && epatch "${FILESDIR}/0.5.0.5+bip16-eligius_sendfee.patch"
+ else
+ use eligius && epatch "${WORKDIR}/0.5.0.6rc1-eligius_sendfee.patch"
+ fi
+}
+
+src_compile() {
+ OPTS=()
+ local BOOST_PKG BOOST_VER BOOST_INC
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ BOOST_PKG="$(best_version 'dev-libs/boost')"
+ BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
+ BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
+ BOOST_INC="/usr/include/boost-${BOOST_VER}"
+ OPTS+=("BOOST_INCLUDE_PATH=${BOOST_INC}")
+ OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}")
+
+ use ssl && OPTS+=(USE_SSL=1)
+ if use upnp; then
+ OPTS+=(USE_UPNP=1)
+ else
+ OPTS+=(USE_UPNP=)
+ fi
+
+ cd src || die
+ emake -f makefile.unix "${OPTS[@]}" ${PN}
+}
+
+src_test() {
+ cd src || die
+ emake -f makefile.unix "${OPTS[@]}" test_bitcoin
+ ./test_bitcoin || die 'Tests failed'
+}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/bitcoin
+ newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 600 /etc/bitcoin/bitcoin.conf
+
+ newconfd "${FILESDIR}/bitcoin.confd" ${PN}
+ newinitd "${FILESDIR}/bitcoin.initd" ${PN}
+
+ keepdir /var/lib/bitcoin/.bitcoin
+ fperms 700 /var/lib/bitcoin
+ fowners bitcoin:bitcoin /var/lib/bitcoin/
+ fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
+ dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
+
+ dodoc doc/README
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,pyminer,wallettools}
+ fi
+}
diff --git a/net-p2p/bitcoind/bitcoind-0.5.0.5-r1.ebuild b/net-p2p/bitcoind/bitcoind-0.5.0.5-r1.ebuild
new file mode 100644
index 000000000000..3c7fbbaccde9
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.5.0.5-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.0.5-r1.ebuild,v 1.1 2012/03/25 01:13:12 blueness Exp $
+
+EAPI="4"
+
+DB_VER="4.8"
+
+inherit db-use eutils versionator
+
+DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
+HOMEPAGE="http://bitcoin.org/"
+SRC_URI="http://gitorious.org/bitcoin/${PN}-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
+ http://luke.dashjr.org/programs/bitcoin/files/bip16/${PV}-Minimal-support-for-validating-BIP16-pay-to-script-h.patch.xz
+ bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/${PV}-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
+ eligius? (
+ !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.5.0.6rc1-eligius_sendfee.patch.xz )
+ )
+"
+
+LICENSE="MIT ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+bip16 +eligius examples ssl upnp"
+
+RDEPEND="
+ >=dev-libs/boost-1.41.0
+ dev-libs/openssl[-bindist]
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+S="${WORKDIR}/bitcoin-${PN}-stable"
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ cd src || die
+ epatch "${WORKDIR}/${PV}-Minimal-support-for-validating-BIP16-pay-to-script-h.patch"
+ if use bip16; then
+ epatch "${WORKDIR}/${PV}-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
+ use eligius && epatch "${FILESDIR}/${PV}+bip16-eligius_sendfee.patch"
+ else
+ use eligius && epatch "${WORKDIR}/0.5.0.6rc1-eligius_sendfee.patch"
+ fi
+}
+
+src_compile() {
+ OPTS=()
+ local BOOST_PKG BOOST_VER BOOST_INC
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ BOOST_PKG="$(best_version 'dev-libs/boost')"
+ BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
+ BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
+ BOOST_INC="/usr/include/boost-${BOOST_VER}"
+ OPTS+=("BOOST_INCLUDE_PATH=${BOOST_INC}")
+ OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}")
+
+ use ssl && OPTS+=(USE_SSL=1)
+ if use upnp; then
+ OPTS+=(USE_UPNP=1)
+ else
+ OPTS+=(USE_UPNP=)
+ fi
+
+ cd src || die
+ emake -f makefile.unix "${OPTS[@]}" ${PN}
+}
+
+src_test() {
+ cd src || die
+ emake -f makefile.unix "${OPTS[@]}" test_bitcoin
+ ./test_bitcoin || die 'Tests failed'
+}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/bitcoin
+ newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 600 /etc/bitcoin/bitcoin.conf
+
+ newconfd "${FILESDIR}/bitcoin.confd" ${PN}
+ newinitd "${FILESDIR}/bitcoin.initd" ${PN}
+
+ keepdir /var/lib/bitcoin/.bitcoin
+ fperms 700 /var/lib/bitcoin
+ fowners bitcoin:bitcoin /var/lib/bitcoin/
+ fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
+ dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
+
+ dodoc doc/README
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,pyminer,wallettools}
+ fi
+}
diff --git a/net-p2p/bitcoind/bitcoind-0.5.0.4.ebuild b/net-p2p/bitcoind/bitcoind-0.5.0.6_rc1.ebuild
index 93e35b147411..31a2475b48f3 100644
--- a/net-p2p/bitcoind/bitcoind-0.5.0.4.ebuild
+++ b/net-p2p/bitcoind/bitcoind-0.5.0.6_rc1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.0.4.ebuild,v 1.2 2012/03/17 23:27:31 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.0.6_rc1.ebuild,v 1.1 2012/03/25 01:13:12 blueness Exp $
-EAPI=4
+EAPI="4"
DB_VER="4.8"
@@ -11,13 +11,16 @@ inherit db-use eutils versionator
DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
HOMEPAGE="http://bitcoin.org/"
SRC_URI="http://gitorious.org/bitcoin/${PN}-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
- eligius? ( http://luke.dashjr.org/programs/bitcoin/files/0.5.2-eligius_sendfee.patch.xz )
+ bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/0.5.0.5-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
+ eligius? (
+ !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.5.0.6rc1-eligius_sendfee.patch.xz )
+ )
"
LICENSE="MIT ISC"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
-IUSE="+eligius examples ssl upnp"
+IUSE="+bip16 +eligius examples ssl upnp"
RDEPEND="
>=dev-libs/boost-1.41.0
@@ -41,7 +44,12 @@ pkg_setup() {
src_prepare() {
cd src || die
- use eligius && epatch "${WORKDIR}/0.5.2-eligius_sendfee.patch"
+ if use bip16; then
+ epatch "${WORKDIR}/0.5.0.5-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
+ use eligius && epatch "${FILESDIR}/0.5.0.5+bip16-eligius_sendfee.patch"
+ else
+ use eligius && epatch "${WORKDIR}/0.5.0.6rc1-eligius_sendfee.patch"
+ fi
}
src_compile() {
diff --git a/net-p2p/bitcoind/bitcoind-0.5.1.ebuild b/net-p2p/bitcoind/bitcoind-0.5.1.ebuild
index e2a4a4d3a1ba..a80a7137f495 100644
--- a/net-p2p/bitcoind/bitcoind-0.5.1.ebuild
+++ b/net-p2p/bitcoind/bitcoind-0.5.1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.1.ebuild,v 1.3 2012/03/09 08:51:24 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.1.ebuild,v 1.4 2012/03/25 01:13:12 blueness Exp $
-EAPI=4
+EAPI="4"
DB_VER="4.8"
diff --git a/net-p2p/bitcoind/bitcoind-0.5.3-r2.ebuild b/net-p2p/bitcoind/bitcoind-0.5.3-r2.ebuild
new file mode 100644
index 000000000000..46dd6623c230
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.5.3-r2.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.3-r2.ebuild,v 1.1 2012/03/25 01:13:12 blueness Exp $
+
+EAPI="4"
+
+DB_VER="4.8"
+
+inherit db-use eutils versionator toolchain-funcs
+
+DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
+HOMEPAGE="http://bitcoin.org/"
+SRC_URI="http://gitorious.org/bitcoin/bitcoind-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
+ http://luke.dashjr.org/programs/bitcoin/files/bip16/0.5.0.5-Minimal-support-for-validating-BIP16-pay-to-script-h.patch.xz
+ bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/0.5.0.5-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
+ eligius? (
+ !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.5.0.6rc1-eligius_sendfee.patch.xz )
+ )
+"
+
+LICENSE="MIT ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+bip16 +eligius examples ssl upnp"
+
+RDEPEND="
+ >=dev-libs/boost-1.41.0
+ dev-libs/openssl[-bindist]
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+S="${WORKDIR}/bitcoin-bitcoind-stable"
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ cd src || die
+ epatch "${WORKDIR}/0.5.0.5-Minimal-support-for-validating-BIP16-pay-to-script-h.patch"
+ if use bip16; then
+ epatch "${WORKDIR}/0.5.0.5-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
+ use eligius && epatch "${FILESDIR}/0.5.0.5+bip16-eligius_sendfee.patch"
+ else
+ use eligius && epatch "${WORKDIR}/0.5.0.6rc1-eligius_sendfee.patch"
+ fi
+}
+
+src_compile() {
+ OPTS=()
+ local BOOST_PKG BOOST_VER BOOST_INC
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ BOOST_PKG="$(best_version 'dev-libs/boost')"
+ BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
+ BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
+ BOOST_INC="/usr/include/boost-${BOOST_VER}"
+ OPTS+=("BOOST_INCLUDE_PATH=${BOOST_INC}")
+ OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}")
+
+ use ssl && OPTS+=(USE_SSL=1)
+ if use upnp; then
+ OPTS+=(USE_UPNP=1)
+ else
+ OPTS+=(USE_UPNP=)
+ fi
+
+ cd src || die
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
+}
+
+src_test() {
+ cd src || die
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin
+ ./test_bitcoin || die 'Tests failed'
+}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/bitcoin
+ newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 600 /etc/bitcoin/bitcoin.conf
+
+ newconfd "${FILESDIR}/bitcoin.confd" ${PN}
+ newinitd "${FILESDIR}/bitcoin.initd" ${PN}
+
+ keepdir /var/lib/bitcoin/.bitcoin
+ fperms 700 /var/lib/bitcoin
+ fowners bitcoin:bitcoin /var/lib/bitcoin/
+ fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
+ dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
+
+ dodoc doc/README
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,pyminer,wallettools}
+ fi
+}
diff --git a/net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild b/net-p2p/bitcoind/bitcoind-0.5.4_rc1.ebuild
index f760b0d4895a..9cf1b4f1350b 100644
--- a/net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild
+++ b/net-p2p/bitcoind/bitcoind-0.5.4_rc1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild,v 1.1 2012/03/17 23:23:19 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.4_rc1.ebuild,v 1.1 2012/03/25 01:13:12 blueness Exp $
EAPI="4"
@@ -11,13 +11,16 @@ inherit db-use eutils versionator toolchain-funcs
DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
HOMEPAGE="http://bitcoin.org/"
SRC_URI="http://gitorious.org/bitcoin/bitcoind-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz
- eligius? ( http://luke.dashjr.org/programs/bitcoin/files/0.5.2-eligius_sendfee.patch.xz )
+ bip16? ( http://luke.dashjr.org/programs/bitcoin/files/bip16/0.5.0.5-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch.xz )
+ eligius? (
+ !bip16? ( http://luke.dashjr.org/programs/bitcoin/files/eligius_sendfee/0.5.0.6rc1-eligius_sendfee.patch.xz )
+ )
"
LICENSE="MIT ISC"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
-IUSE="+eligius examples ssl upnp"
+IUSE="+bip16 +eligius examples ssl upnp"
RDEPEND="
>=dev-libs/boost-1.41.0
@@ -41,7 +44,12 @@ pkg_setup() {
src_prepare() {
cd src || die
- use eligius && epatch "${WORKDIR}/0.5.2-eligius_sendfee.patch"
+ if use bip16; then
+ epatch "${WORKDIR}/0.5.0.5-Minimal-support-for-mining-BIP16-pay-to-script-hash-.patch"
+ use eligius && epatch "${FILESDIR}/0.5.0.5+bip16-eligius_sendfee.patch"
+ else
+ use eligius && epatch "${WORKDIR}/0.5.0.6rc1-eligius_sendfee.patch"
+ fi
}
src_compile() {
diff --git a/net-p2p/bitcoind/files/0.4.4+bip16-eligius_sendfee.patch b/net-p2p/bitcoind/files/0.4.4+bip16-eligius_sendfee.patch
new file mode 100644
index 000000000000..a289a51c5d82
--- /dev/null
+++ b/net-p2p/bitcoind/files/0.4.4+bip16-eligius_sendfee.patch
@@ -0,0 +1,178 @@
+diff --git a/src/main.cpp b/src/main.cpp
+index 9384916..242867b 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -421,8 +421,10 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
+ if ((int64)nLockTime > INT_MAX)
+ return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet");
+
++ bool fIsMine = pwalletMain->IsMine(*this);
++
+ // Rather not work on nonstandard transactions (unless -testnet)
+- if (!fTestNet && !IsStandard())
++ if (!fTestNet && !IsStandard() && !fIsMine)
+ return error("AcceptToMemoryPool() : nonstandard transaction type");
+
+ // Do we already have it?
+@@ -477,7 +479,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
+ }
+
+ // Check for non-standard pay-to-script-hash in inputs
+- if (!AreInputsStandard(mapInputs) && !fTestNet)
++ if (!AreInputsStandard(mapInputs) && !fIsMine && !fTestNet)
+ return error("AcceptToMemoryPool() : nonstandard transaction input");
+
+ // Note: if you modify this code to accept non-standard transactions, then
+@@ -487,8 +489,11 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
+ int64 nFees = GetValueIn(mapInputs)-GetValueOut();
+ unsigned int nSize = ::GetSerializeSize(*this, SER_NETWORK);
+
++ if (!fIsMine)
++ {
++
+ // Don't accept it if it can't get into a block
+- if (nFees < GetMinFee(1000, true, true))
++ if (nFees < GetMinFee(1000, true, GMF_RELAY))
+ return error("AcceptToMemoryPool() : not enough fees");
+
+ // Continuously rate-limit free transactions
+@@ -516,6 +521,8 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
+ }
+ }
+
++ }
++
+ // Check against previous transactions
+ // This is done last to help prevent CPU exhaustion denial-of-service attacks.
+ if (!ConnectInputs(mapInputs, mapUnused, CDiskTxPos(1,1,1), pindexBest, false, false))
+@@ -2976,6 +2983,9 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
+ // Priority is sum(valuein * age) / txsize
+ dPriority /= ::GetSerializeSize(tx, SER_NETWORK);
+
++ if (pwalletMain->IsMine(tx))
++ dPriority += 100.;
++
+ if (porphan)
+ porphan->dPriority = dPriority;
+ else
+@@ -3013,7 +3023,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
+
+ // Transaction fee required depends on block size
+ bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority));
+- int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree);
++ int64 nMinFee = pwalletMain->IsMine(tx) ? 0 : tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK);
+
+ // Connecting shouldn't fail due to dependency on other memory pool transactions
+ // because we're already processing them in order of dependency
+diff --git a/src/main.h b/src/main.h
+index 5df335a..8e533d1 100644
+--- a/src/main.h
++++ b/src/main.h
+@@ -389,6 +389,13 @@ public:
+ typedef std::map<uint256, std::pair<CTxIndex, CTransaction> > MapPrevTx;
+
+
++enum GetMinFee_mode
++{
++ GMF_BLOCK,
++ GMF_RELAY,
++ GMF_SEND,
++};
++
+ //
+ // The basic transaction that is broadcasted on the network and contained in
+ // blocks. A transaction can contain multiple inputs and outputs.
+@@ -562,13 +569,49 @@ public:
+ return dPriority > COIN * 144 / 250;
+ }
+
+- int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, bool fForRelay=false) const
++ int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, enum GetMinFee_mode mode=GMF_BLOCK) const
+ {
+ // Base fee is either MIN_TX_FEE or MIN_RELAY_TX_FEE
+- int64 nBaseFee = fForRelay ? MIN_RELAY_TX_FEE : MIN_TX_FEE;
++ int64 nBaseFee = (mode == GMF_RELAY) ? MIN_RELAY_TX_FEE : MIN_TX_FEE;
+
+ unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK);
+ unsigned int nNewBlockSize = nBlockSize + nBytes;
++ int64 nMinFeeAlt;
++
++ {
++ // Base fee is 0.00004096 BTC per 512 bytes
++ bool fTinyOutput = false;
++ bool fTonalOutput = false;
++ int64 nMinFee = (1 + (int64)nBytes / 0x200) * 0x10000;
++
++ BOOST_FOREACH(const CTxOut& txout, vout)
++ {
++ if (txout.nValue < 0x100)
++ {
++ fTinyOutput = true;
++ break;
++ }
++ if (0 == txout.nValue % 0x10000)
++ fTonalOutput = true;
++ }
++
++ // Charge extra for ridiculously tiny outputs
++ if (fTinyOutput)
++ nMinFee *= 0x10;
++ else
++ // Waive the fee in a tonal-sized "free tranaction area" if at least one output is TBC (and under 512 bytes) ;)
++ if (fTonalOutput && nNewBlockSize < 0x8000 && nBytes < 0x200)
++ nMinFee = 0;
++ else
++ if (fAllowFree)
++ {
++ // Give a discount to the first so many tx
++ nMinFee /= 0x10;
++ }
++
++ nMinFeeAlt = nMinFee;
++ }
++
+ int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee;
+
+ if (fAllowFree)
+@@ -594,6 +637,8 @@ public:
+ if (txout.nValue < CENT)
+ nMinFee = nBaseFee;
+
++ nMinFee = std::min(nMinFee, nMinFeeAlt);
++
+ // Raise the price as the block approaches full
+ if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2)
+ {
+diff --git a/src/net.cpp b/src/net.cpp
+index a8d3d0b..245b1b9 100644
+--- a/src/net.cpp
++++ b/src/net.cpp
+@@ -1217,6 +1217,7 @@ void MapPort(bool /* unused fMapPort */)
+
+
+ static const char *strDNSSeed[] = {
++ "relay.eligius.st",
+ "bitseed.xf2.org",
+ "dnsseed.bluematt.me",
+ "seed.bitcoin.sipa.be",
+diff --git a/src/wallet.cpp b/src/wallet.cpp
+index 9f7422d..ac9703f 100644
+--- a/src/wallet.cpp
++++ b/src/wallet.cpp
+@@ -939,6 +939,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
+ int64 nChange = nValueIn - nValue - nFeeRet;
+ // if sub-cent change is required, the fee must be raised to at least MIN_TX_FEE
+ // or until nChange becomes zero
++ // NOTE: this depends on the exact behaviour of GetMinFee
+ if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < CENT)
+ {
+ int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet);
+@@ -992,7 +993,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
+ // Check that enough fee is included
+ int64 nPayFee = nTransactionFee * (1 + (int64)nBytes / 1000);
+ bool fAllowFree = CTransaction::AllowFree(dPriority);
+- int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree);
++ int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree, GMF_SEND);
+ if (nFeeRet < max(nPayFee, nMinFee))
+ {
+ nFeeRet = max(nPayFee, nMinFee);
diff --git a/net-p2p/bitcoind/files/0.5.0.5+bip16-eligius_sendfee.patch b/net-p2p/bitcoind/files/0.5.0.5+bip16-eligius_sendfee.patch
new file mode 100644
index 000000000000..ada609211509
--- /dev/null
+++ b/net-p2p/bitcoind/files/0.5.0.5+bip16-eligius_sendfee.patch
@@ -0,0 +1,169 @@
+diff --git a/src/main.cpp b/src/main.cpp
+index 2e8b43d..af5e805 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -428,8 +428,10 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
+ if ((int64)nLockTime > INT_MAX)
+ return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet");
+
++ bool fIsMine = pwalletMain->IsMine(*this);
++
+ // Rather not work on nonstandard transactions (unless -testnet)
+- if (!fTestNet && !IsStandard())
++ if (!fTestNet && !IsStandard() && !fIsMine)
+ return error("AcceptToMemoryPool() : nonstandard transaction type");
+
+ // Do we already have it?
+@@ -494,8 +496,11 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
+ int64 nFees = GetValueIn(mapInputs)-GetValueOut();
+ unsigned int nSize = ::GetSerializeSize(*this, SER_NETWORK);
+
++ if (!fIsMine)
++ {
++
+ // Don't accept it if it can't get into a block
+- if (nFees < GetMinFee(1000, true, true))
++ if (nFees < GetMinFee(1000, true, GMF_RELAY))
+ return error("AcceptToMemoryPool() : not enough fees");
+
+ // Continuously rate-limit free transactions
+@@ -523,6 +528,8 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
+ }
+ }
+
++ }
++
+ // Check against previous transactions
+ // This is done last to help prevent CPU exhaustion denial-of-service attacks.
+ if (!ConnectInputs(mapInputs, mapUnused, CDiskTxPos(1,1,1), pindexBest, false, false))
+@@ -3044,6 +3051,9 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
+ // Priority is sum(valuein * age) / txsize
+ dPriority /= ::GetSerializeSize(tx, SER_NETWORK);
+
++ if (pwalletMain->IsMine(tx))
++ dPriority += 100.;
++
+ if (porphan)
+ porphan->dPriority = dPriority;
+ else
+@@ -3081,7 +3091,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey)
+
+ // Transaction fee required depends on block size
+ bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority));
+- int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree);
++ int64 nMinFee = pwalletMain->IsMine(tx) ? 0 : tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK);
+
+ // Connecting shouldn't fail due to dependency on other memory pool transactions
+ // because we're already processing them in order of dependency
+diff --git a/src/main.h b/src/main.h
+index a918eb5..d3910cd 100644
+--- a/src/main.h
++++ b/src/main.h
+@@ -391,6 +391,13 @@ public:
+ typedef std::map<uint256, std::pair<CTxIndex, CTransaction> > MapPrevTx;
+
+
++enum GetMinFee_mode
++{
++ GMF_BLOCK,
++ GMF_RELAY,
++ GMF_SEND,
++};
++
+ //
+ // The basic transaction that is broadcasted on the network and contained in
+ // blocks. A transaction can contain multiple inputs and outputs.
+@@ -568,13 +575,49 @@ public:
+ return dPriority > COIN * 144 / 250;
+ }
+
+- int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, bool fForRelay=false) const
++ int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, enum GetMinFee_mode mode=GMF_BLOCK) const
+ {
+ // Base fee is either MIN_TX_FEE or MIN_RELAY_TX_FEE
+- int64 nBaseFee = fForRelay ? MIN_RELAY_TX_FEE : MIN_TX_FEE;
++ int64 nBaseFee = (mode == GMF_RELAY) ? MIN_RELAY_TX_FEE : MIN_TX_FEE;
+
+ unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK);
+ unsigned int nNewBlockSize = nBlockSize + nBytes;
++ int64 nMinFeeAlt;
++
++ {
++ // Base fee is 0.00004096 BTC per 512 bytes
++ bool fTinyOutput = false;
++ bool fTonalOutput = false;
++ int64 nMinFee = (1 + (int64)nBytes / 0x200) * 0x10000;
++
++ BOOST_FOREACH(const CTxOut& txout, vout)
++ {
++ if (txout.nValue < 0x100)
++ {
++ fTinyOutput = true;
++ break;
++ }
++ if (0 == txout.nValue % 0x10000)
++ fTonalOutput = true;
++ }
++
++ // Charge extra for ridiculously tiny outputs
++ if (fTinyOutput)
++ nMinFee *= 0x10;
++ else
++ // Waive the fee in a tonal-sized "free tranaction area" if at least one output is TBC (and under 512 bytes) ;)
++ if (fTonalOutput && nNewBlockSize < 0x8000 && nBytes < 0x200)
++ nMinFee = 0;
++ else
++ if (fAllowFree)
++ {
++ // Give a discount to the first so many tx
++ nMinFee /= 0x10;
++ }
++
++ nMinFeeAlt = nMinFee;
++ }
++
+ int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee;
+
+ if (fAllowFree)
+@@ -600,6 +643,8 @@ public:
+ if (txout.nValue < CENT)
+ nMinFee = nBaseFee;
+
++ nMinFee = std::min(nMinFee, nMinFeeAlt);
++
+ // Raise the price as the block approaches full
+ if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2)
+ {
+diff --git a/src/net.cpp b/src/net.cpp
+index f37c675..5cb448d 100644
+--- a/src/net.cpp
++++ b/src/net.cpp
+@@ -1268,6 +1268,7 @@ void MapPort(bool /* unused fMapPort */)
+
+
+ static const char *strDNSSeed[] = {
++ "relay.eligius.st",
+ "bitseed.xf2.org",
+ "dnsseed.bluematt.me",
+ "seed.bitcoin.sipa.be",
+diff --git a/src/wallet.cpp b/src/wallet.cpp
+index 20c3eab..e71994b 100644
+--- a/src/wallet.cpp
++++ b/src/wallet.cpp
+@@ -959,6 +959,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
+ int64 nChange = nValueIn - nValue - nFeeRet;
+ // if sub-cent change is required, the fee must be raised to at least MIN_TX_FEE
+ // or until nChange becomes zero
++ // NOTE: this depends on the exact behaviour of GetMinFee
+ if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < CENT)
+ {
+ int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet);
+@@ -1012,7 +1013,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
+ // Check that enough fee is included
+ int64 nPayFee = nTransactionFee * (1 + (int64)nBytes / 1000);
+ bool fAllowFree = CTransaction::AllowFree(dPriority);
+- int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree);
++ int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree, GMF_SEND);
+ if (nFeeRet < max(nPayFee, nMinFee))
+ {
+ nFeeRet = max(nPayFee, nMinFee);
diff --git a/net-p2p/bitcoind/metadata.xml b/net-p2p/bitcoind/metadata.xml
index e5803dcd78bf..c09a0d2d4dd9 100644
--- a/net-p2p/bitcoind/metadata.xml
+++ b/net-p2p/bitcoind/metadata.xml
@@ -10,6 +10,7 @@
<name>Luke Dashjr</name>
</maintainer>
<use>
+ <flag name='bip16'>Enable backported support for relaying and mining new BIP16 pay-to-script-hash transactions</flag>
<flag name='eligius'>Enable using lower fees accepted by Eligius</flag>
<flag name='upnp'>Enable Universal Plug and Play</flag>
</use>