sci-mathematics/msieve - 1.53 (gentoo)

Search

Install

Install this version:

emerge -a =sci-mathematics/msieve-1.53

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

autounmask =sci-mathematics/msieve-1.53

Or alternatively:

emerge --autounmask-write -a =sci-mathematics/msieve-1.53

Package Information

Description:
A C library implementing a suite of algorithms to factor large integers
Homepage:
https://sourceforge.net/projects/msieve/
License:
public-domain

Ebuild Details

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

EAPI=8

inherit dot-a toolchain-funcs

DESCRIPTION="A C library implementing a suite of algorithms to factor large integers"
HOMEPAGE="https://sourceforge.net/projects/msieve/"
SRC_URI="https://downloads.sourceforge.net/${PN}/${PN}/Msieve%20v${PV}/${PN}${PV/./}_src.tar.gz -> ${P}.tar.gz"

LICENSE="public-domain"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="zlib +ecm mpi"

RDEPEND="
	dev-libs/gmp:=
	ecm? ( sci-mathematics/gmp-ecm )
	mpi? ( virtual/mpi )
	zlib? ( virtual/zlib:= )
"
DEPEND="${RDEPEND}"

PATCHES=(
	# TODO: Integrate ggnfs properly
	"${FILESDIR}"/${PN}-1.51-reduce-printf.patch
	"${FILESDIR}"/${PN}-1.53-fix-version.patch
	"${FILESDIR}"/${PN}-1.53-makefile.patch
	"${FILESDIR}"/${PN}-1.53-gzfile.patch
)

src_configure() {
	tc-export AR CC RANLIB
	lto-guarantee-fat

	use ecm && export ECM=1

	if use mpi; then
		export MPI=1
		export CC=mpicc
	fi

	use zlib && export ZLIB=1
}

src_compile() {
	emake all
}

src_test() {
	"${S}"/msieve 3595 || die Failed to factor small semiprime
}

src_install() {
	dobin msieve

	insinto /usr/include/msieve
	doins -r include/.

	dolib.a libmsieve.a
	strip-lto-bytecode

	dodoc Readme*
}

USE Flags

Manage flags for this package: euse -i <flag> -p sci-mathematics/msieve | euse -E <flag> -p sci-mathematics/msieve | euse -D <flag> -p sci-mathematics/msieve

Global/Standard Flags

ecm
Default: Enabled (+)
mpi

Inherited Eclasses

Dependencies

DEPEND

	dev-libs/gmp:=
	ecm? ( sci-mathematics/gmp-ecm )
	mpi? ( virtual/mpi )
	zlib? ( virtual/zlib:= )

RDEPEND

	dev-libs/gmp:=
	ecm? ( sci-mathematics/gmp-ecm )
	mpi? ( virtual/mpi )
	zlib? ( virtual/zlib:= )

Manifest for 1.53

Type File Size Source URLs
DIST msieve-1.53.tar.gz 976135 bytes https://downloads.sourceforge.net/msieve/msieve/Msieve%20v1.53/msieve153_src.tar.gz