dev-libs/dht - 0.27 (edgets)

Search

Install

Install this version:

emerge -a =dev-libs/dht-0.27

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-libs/dht-0.27

Or alternatively:

emerge --autounmask-write -a =dev-libs/dht-0.27

Package Information

Description:
BitTorrent DHT library
Homepage:
https://github.com/jech/dht
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
0.27 8 ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="BitTorrent DHT library"
HOMEPAGE="https://github.com/jech/dht"
SRC_URI="${HOMEPAGE}/archive/refs/tags/${P}.tar.gz"
S="${WORKDIR}/${PN}-${P}"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
RESTRICT="mirror"
IUSE="examples"

DEPEND="examples? ( virtual/libcrypt )"
RDEPEND="${DEPEND}"

src_compile() {
	tc-export CC AR

	${CC} ${CFLAGS} ${CPPFLAGS} -c -o dht.o dht.c || die
	${AR} rcs libdht.a dht.o || die

	if use examples; then
		${CC} ${CFLAGS} ${CPPFLAGS} -c -o dht-example.o dht-example.c || die
		${CC} ${CFLAGS} ${LDFLAGS} -o dht-example dht-example.o dht.o -lcrypt || die
	fi
}

src_install() {
	dolib.a libdht.a
	doheader dht.h

	use examples && dobin dht-example

	einstalldocs
}

USE Flags

Manage flags for this package: euse -i <flag> -p dev-libs/dht | euse -E <flag> -p dev-libs/dht | euse -D <flag> -p dev-libs/dht

Global/Standard Flags

Inherited Eclasses

Dependencies

DEPEND

examples? ( virtual/libcrypt )

RDEPEND

examples? ( virtual/libcrypt )