Skip to content

Commit

Permalink
bitcoincore 0.11.1 & 9999: hasufell's suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr authored and blueness committed Oct 23, 2015
1 parent 7f15599 commit 20bb60b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 40 deletions.
1 change: 1 addition & 0 deletions eclass/bitcoincore.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ bitcoincore_pkg_pretend() {
}

bitcoincore_prepare() {
local mypolicy
if [ -n "${BITCOINCORE_NO_SYSLIBS}" ]; then
true
elif [ "${PV}" = "9999" ]; then
Expand Down
2 changes: 1 addition & 1 deletion net-p2p/bitcoin-cli/bitcoin-cli-0.11.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"

src_prepare() {
sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind \)bitcoind \(bitcoin-cli\)$/\1\2/' contrib/bitcoind.bash-completion
sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind \)bitcoind \(bitcoin-cli\)$/\1\2/' contrib/bitcoind.bash-completion || die
bitcoincore_src_prepare
}

Expand Down
2 changes: 1 addition & 1 deletion net-p2p/bitcoin-cli/bitcoin-cli-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ KEYWORDS=""

src_prepare() {
bitcoincore_prepare
sed -i 's/bitcoin-tx//' src/Makefile.am
sed -i 's/bitcoin-tx//' src/Makefile.am || die
bitcoincore_autoreconf
}

Expand Down
16 changes: 10 additions & 6 deletions net-p2p/bitcoin-qt/bitcoin-qt-0.11.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,34 @@ RDEPEND="
DEPEND="${RDEPEND}
qt5? ( dev-qt/linguist-tools:5 )
"
REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )"
REQUIRED_USE="^^ ( qt4 qt5 )"

src_prepare() {
bitcoincore_prepare

local filt= yeslang= nolang=
local filt= yeslang= nolang= lan ts x

for lan in $LANGS; do
if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
die "Language '$lan' no longer supported. Ebuild needs update."
fi
done

for ts in $(ls src/qt/locale/*.ts)
for ts in src/qt/locale/*.ts
do
x="${ts/*bitcoin_/}"
x="${x/.ts/}"
if ! use "linguas_$x"; then
nolang="$nolang $x"
rm "$ts"
rm "$ts" || die
filt="$filt\\|$x"
else
yeslang="$yeslang $x"
fi
done
filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc'
sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include'
sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc' || die
sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"

bitcoincore_autoreconf
Expand Down Expand Up @@ -89,6 +89,10 @@ src_install() {
fi
}

pkg_preinst() {
gnome2_icon_savelist
}

update_caches() {
gnome2_icon_cache_update
fdo-mime_desktop_database_update
Expand Down
16 changes: 10 additions & 6 deletions net-p2p/bitcoin-qt/bitcoin-qt-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,34 @@ RDEPEND="
DEPEND="${RDEPEND}
qt5? ( dev-qt/linguist-tools:5 )
"
REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )"
REQUIRED_USE="^^ ( qt4 qt5 )"

src_prepare() {
bitcoincore_prepare

local filt= yeslang= nolang=
local filt= yeslang= nolang= lan ts x

for lan in $LANGS; do
if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
ewarn "Language '$lan' no longer supported. Ebuild needs update."
fi
done

for ts in $(ls src/qt/locale/*.ts)
for ts in src/qt/locale/*.ts
do
x="${ts/*bitcoin_/}"
x="${x/.ts/}"
if ! use "linguas_$x"; then
nolang="$nolang $x"
rm "$ts"
rm "$ts" || die
filt="$filt\\|$x"
else
yeslang="$yeslang $x"
fi
done
filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc'
sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include'
sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc' || die
sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"

bitcoincore_autoreconf
Expand Down Expand Up @@ -86,6 +86,10 @@ src_install() {
fi
}

pkg_preinst() {
gnome2_icon_savelist
}

update_caches() {
gnome2_icon_cache_update
fdo-mime_desktop_database_update
Expand Down
17 changes: 4 additions & 13 deletions net-p2p/bitcoind/bitcoind-0.11.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EAPI=5

BITCOINCORE_COMMITHASH="cf33f196e79b1e61d6266f8e5190a0c4bfae7224"
BITCOINCORE_LJR_DATE="20150921"
BITCOINCORE_IUSE="addrindex examples ljr logrotate test upnp +wallet zeromq"
BITCOINCORE_IUSE="addrindex examples ljr test upnp +wallet zeromq"
BITCOINCORE_ADDRINDEX_DIFF="8a915e56f4be5d090d79f01cbd4a23ce1b7e9168...4a6331c5068d8f2c95731518445a57267d506bb5"
BITCOINCORE_ADDRINDEX_PATCHFILE="bitcoin-addrindex-v0.11.0.patch"
BITCOINCORE_POLICY_PATCHES="cltv cpfp dcmp rbf spamfilter"
Expand All @@ -19,21 +19,14 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"

RDEPEND="
logrotate? (
app-admin/logrotate
)
"
DEPEND="${RDEPEND}"

pkg_setup() {
local UG='bitcoin'
enewgroup "${UG}"
enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
}

src_prepare() {
sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion
sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion || die
bitcoincore_src_prepare
}

Expand Down Expand Up @@ -70,8 +63,6 @@ src_install() {
dodoc -r contrib/{bitrpc,qos,spendfrom,tidy_datadir.sh}
fi

if use logrotate; then
insinto /etc/logrotate.d
newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
fi
insinto /etc/logrotate.d
newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
}
17 changes: 4 additions & 13 deletions net-p2p/bitcoind/bitcoind-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

EAPI=5

BITCOINCORE_IUSE="examples logrotate test upnp +wallet"
BITCOINCORE_IUSE="examples test upnp +wallet"
BITCOINCORE_NEED_LEVELDB=1
BITCOINCORE_NEED_LIBSECP256K1=1
inherit bash-completion-r1 bitcoincore user systemd
Expand All @@ -14,21 +14,14 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS=""

RDEPEND="
logrotate? (
app-admin/logrotate
)
"
DEPEND="${RDEPEND}"

pkg_setup() {
local UG='bitcoin'
enewgroup "${UG}"
enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
}

src_prepare() {
sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion
sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion || die
bitcoincore_src_prepare
}

Expand Down Expand Up @@ -65,8 +58,6 @@ src_install() {
dodoc -r contrib/{bitrpc,qos,spendfrom,tidy_datadir.sh}
fi

if use logrotate; then
insinto /etc/logrotate.d
newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
fi
insinto /etc/logrotate.d
newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
}

0 comments on commit 20bb60b

Please sign in to comment.