aboutsummaryrefslogtreecommitdiff
blob: 4ab317599971cb147066390e8cf2127e3775181b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
WANT_AUTOCONF="2.5"
inherit autotools desktop xdg-utils
DESCRIPTION="Dogecoin Core Qt for desktop. Downloaded blockchain is under 2.2GB. Much secure."
HOMEPAGE="https://github.com/dogecoin"
SRC_URI="https://github.com/dogecoin/dogecoin/archive/refs/tags/v${PV}.tar.gz -> ${PN}-v${PV}.tar.gz"

LICENSE="MIT"
SLOT="0"
DB_VER="5.3"
KEYWORDS="~amd64"
IUSE="cpu_flags_x86_avx2 dogecoind +pie +prune tests utils +wallet zmq"
REQUIRED_USE="dogecoind? ( utils )"
DOGEDIR="/opt/${PN}"
DEPEND="
	sys-libs/db:"${DB_VER}"=[cxx]
	dev-libs/libevent:=
	dev-libs/protobuf
	dev-libs/openssl
	sys-devel/libtool
	sys-devel/automake:=
	>=dev-libs/boost-1.81.0-r1
	dev-qt/qtcore
	dev-qt/qtgui
	dev-qt/qtwidgets
	dev-qt/qtdbus
	dev-qt/qtnetwork
	dev-qt/qtprintsupport
	dev-qt/linguist-tools:=
	cpu_flags_x86_avx2? ( app-crypt/intel-ipsec-mb )
	wallet? ( media-gfx/qrencode )
	zmq? ( net-libs/cppzmq )
"
RDEPEND="${DEPEND}"
BDEPEND="
	sys-devel/autoconf
	sys-devel/automake
"

PATCHES=(
	"${FILESDIR}"/"${PV}"-net_processing.patch
	"${FILESDIR}"/"${PV}"-paymentserver.patch
	"${FILESDIR}"/"${PV}"-transactiondesc.patch
	"${FILESDIR}"/"${PV}"-deque.patch
	"${FILESDIR}"/"${PV}"-gcc13.patch
)

WORKDIR_="${WORKDIR}/dogecoin-${PV}"
S=${WORKDIR_}

src_prepare() {
	default

	einfo "Generating autotools files..."
	eaclocal -I "${WORKDIR_}"
	eautoreconf
}

src_configure() {
	local my_econf=(
		--enable-cxx
		--bindir="${DOGEDIR}/bin"
		--with-gui=qt5
		--with-qt-incdir="/usr/include/qt5"
		--disable-bench
		$(use_with cpu_flags_x86_avx2 intel-avx2)
		$(use_with dogecoind daemon)
		$(use_with utils utils)
		$(use_enable wallet)
		$(use_enable zmq)
		$(use_enable pie hardening)
	)

	econf "${my_econf[@]}"
}

src_install() {
	emake DESTDIR="${D}" install
	insinto "${DOGEDIR}/bin"
	insinto /usr/share/pixmaps
	doins src/qt/res/icons/dogecoin.png
	dosym "${DOGEDIR}/bin/${PN}" "/usr/bin/${PN}"

	if use prune ; then
		domenu "${FILESDIR}"/"${PN}-prune.desktop"
	else
		domenu "${FILESDIR}"/"${PN}.desktop"
	fi

	find "${ED}" -type f -name '*.la' -delete || die
}

pkg_postinst() {
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
	elog "Dogecoin Core Qt ${PV} has been installed."
	elog "Dogecoin Core Qt binaries have been placed in ${DOGEDIR}/bin."
	elog "${PN} has been symlinked with /usr/bin/${PN}."
}

pkg_postrm() {
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
}