gimps: new recipe (#1828)

This commit is contained in:
Damillora
2017-12-16 03:09:02 +07:00
committed by fbrosson
parent 36ae2b1fd0
commit 524bcc8abc
2 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
SUMMARY="Finds new Mersenne primes"
DESCRIPTION="GIMPS stands for the \"Great Internet Mersenne Prime Search\". \
It's a collaborative project of volunteers who use freely available software \
to search for Mersenne prime numbers. To perform its testing, the project \
relies primarily on Lucas-Lehmer primality test, an algorithm that is both \
specialized to testing Mersenne primes and particularly efficient on binary \
computer architectures. They also have a trial division phase, used to rapidly \
eliminate Mersenne numbers with small factors which make up a large proportion \
of candidates. Pollard's p - 1 algorithm is also used to search for larger \
factors."
HOMEPAGE="https://www.mersenne.org/"
COPYRIGHT="1996-2017 Mersenne Research, Inc."
LICENSE="GIMPS"
REVISION="1"
SOURCE_URI="http://www.mersenne.org/ftp_root/gimps/p95v${portVersion//.}.source.zip"
CHECKSUM_SHA256="21cdd387e73c3386389386b480d0f7f97073dcd70a4dcf9031112f575594443e"
SOURCE_DIR=""
ARCHITECTURES="!x86_gcc2 ?x86 !x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
gimps$secondaryArchSuffix = $portVersion
cmd:mprime$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libgmp$secondaryArchSuffix
lib:libhwloc$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libgmp$secondaryArchSuffix
devel:libhwloc$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:make
cmd:sed
"
defineDebugInfoPackage gimps$secondaryArchSuffix \
$binDir/mprime
BUILD()
{
#dirty workaround
mkdir -p arch
ln -sf `finddir B_SYSTEM_HEADERS_DIRECTORY`/posix/arch/$effectiveTargetArchitecture/signal.h arch/signal.h
make -C gwnum -f makehaiku $jobArgs
make -C linux -f makehaikugcc4 $jobArgs
}
INSTALL()
{
install -d $binDir
install -t $binDir linux/mprime
}

View File

@@ -0,0 +1,15 @@
Software End User License Agreement ("EULA")
* This EULA applies to all versions of GIMPS Prime95 and MPrime software and
source code ("Software").
* Software is free to download and use indefinitely on any computer(s) you
own or for which you have permission and authority to install and run
Software. Software is not export-restricted.
* To use the Software you agree to be bound by this EULA and the Terms and
Conditions of Use.
* GIMPS reserves the right to change this EULA without notice and with
reasonable retroactive effect. Last updated 15 October 2008.
* GIMPS not responsible for any damages or losses arising from use of Software.
SOFTWARE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.