app-misc/infnoise - 0.3.3 (guru)

Search

Install

Install this version:

emerge -a =app-misc/infnoise-0.3.3

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

autounmask =app-misc/infnoise-0.3.3

Or alternatively:

emerge --autounmask-write -a =app-misc/infnoise-0.3.3

Package Information

Description:
infinite noise TRNG program
Homepage:
https://github.com/leetronics/infnoise
License:
CC0-1.0

Ebuild Details

Version EAPI Keywords Slot
0.3.3 8 ~amd64 0
View Raw Ebuild
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="infinite noise TRNG program"
HOMEPAGE="https://github.com/leetronics/infnoise"
SRC_URI="https://github.com/leetronics/infnoise/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="CC0-1.0"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="dev-embedded/libftdi"
RDEPEND="${DEPEND}"

inherit udev toolchain-funcs

src_prepare() {
	default
	tc-export AR RANLIB
	sed -i 's|PREFIX = $(DESTDIR)/usr/local|PREFIX=${DESTDIR}|' "${S}/software/Makefile.linux"
	sed -i '31s/ar/${AR}/' "${S}/software/Makefile.linux"
	sed -i '32s/ranlib/${RANLIB}/' "${S}/software/Makefile.linux"
	sed -i '18s/$(CFLAGS)/$(CFLAGS) $(LDFLAGS)/' "${S}/software/Makefile.linux"
	sed -i '36s/$(CFLAGS)/$(CFLAGS) $(LDFLAGS)/' "${S}/software/Makefile.linux"
	sed -i '/^GIT_/d' "${S}/software/Makefile.linux"
}

src_compile() {
	local ftdi_cflags
	local ftdi_ldflags

	ftdi_cflags=$(pkg-config --cflags libftdi1)
	ftdi_ldflags=$(pkg-config --libs libftdi1)

	origCFLAGS="-fPIC -std=c99 -DLINUX -I Keccak -DGIT_VERSION=\\\"\\\" -DGIT_COMMIT=\\\"\\\" -DGIT_DATE=\\\"\\\""

	cd "${S}"/software
	emake -f Makefile.linux CFLAGS="${CFLAGS} ${origCFLAGS} ${ftdi_cflags}" LDFLAGS="${LDFLAGS}\
		${ftdi_ldflags}" -j$(nproc)
}

src_install() {
	newinitd "${FILESDIR}"/infnoise.initd infnoise

	cd "${S}"/software
	export DESTDIR="${D}"
	emake -f Makefile.linux install DESTDIR="${D}"
}

pkg_postinst() {
	udev_reload
}

pkg_postrm() {
	udev_reload
}

Inherited Eclasses

Dependencies

DEPEND

dev-embedded/libftdi

RDEPEND

dev-embedded/libftdi

Manifest for 0.3.3

Type File Size Source URLs
DIST infnoise-0.3.3.tar.gz 25531663 bytes https://github.com/leetronics/infnoise/archive/refs/tags/0.3.3.tar.gz