primesieve-7.4.recipe revision 82f14323
1SUMMARY="Fast C/C++ prime number generator library"
2DESCRIPTION="primesieve is a program and C/C++ library that generates primes \
3using a highly optimized sieve of Eratosthenes implementation. It counts the \
4primes below 10^10 in just 0.45 seconds on an Intel Core i7-6700 CPU \
5(4 x 3.4GHz). primesieve can generate primes and prime k-tuplets up to 2^64."
6HOMEPAGE="https://primesieve.org/"
7COPYRIGHT="2010-2019 Kim Walisch"
8LICENSE="BSD (2-clause)"
9REVISION="1"
10SOURCE_URI="https://github.com/kimwalisch/primesieve/archive/v$portVersion.tar.gz"
11CHECKSUM_SHA256="ff9b9e8c6ca3b5c642f9a334cc399dd55830a8d9c25afd066528aa2040032399"
12SOURCE_FILENAME="primesieve-$portVersion.tar.gz"
13
14ARCHITECTURES="!x86_gcc2 x86 x86_64"
15SECONDARY_ARCHITECTURES="x86"
16
17commandSuffix=$secondaryArchSuffix
18commandBinDir=$binDir
19if [ "$targetArchitecture" = x86_gcc2 ]; then
20	commandSuffix=
21	commandBinDir=$prefix/bin
22fi
23
24libVersion="9.4.0"
25libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
26
27PROVIDES="
28	primesieve$secondaryArchSuffix = $portVersion
29	cmd:primesieve$commandSuffix = $portVersion
30	lib:libprimesieve$secondaryArchSuffix = $libVersionCompat
31	"
32REQUIRES="
33	haiku$secondaryArchSuffix
34	lib:libgomp$secondaryArchSuffix
35	"
36
37PROVIDES_devel="
38	primesieve${secondaryArchSuffix}_devel = $portVersion
39	devel:libprimesieve$secondaryArchSuffix = $libVersionCompat
40	"
41REQUIRES_devel="
42	primesieve$secondaryArchSuffix == $portVersion base
43	"
44
45BUILD_REQUIRES="
46	haiku${secondaryArchSuffix}_devel
47	"
48BUILD_PREREQUIRES="
49	cmd:cmake
50	cmd:gcc$secondaryArchSuffix
51	cmd:libtoolize$secondaryArchSuffix
52	cmd:make
53	"
54
55BUILD()
56{
57	mkdir -p build && cd build
58
59	cmake .. \
60		-DCMAKE_INSTALL_BINDIR="$commandBinDir" \
61		-DCMAKE_INSTALL_LIBDIR="$libDir" \
62		-DCMAKE_INSTALL_INCLUDEDIR="$includeDir" \
63		-DCMAKE_INSTALL_DOCDIR="$docDir" \
64		-DCMAKE_INSTALL_MANDIR="$manDir" \
65		-DBUILD_TESTS=ON
66
67	make $jobArgs
68}
69
70INSTALL()
71{
72	cd build
73	make install
74
75	prepareInstalledDevelLib libprimesieve
76	fixPkgconfig
77
78	packageEntries devel \
79		$developDir \
80		$libDir/cmake
81}
82
83TEST()
84{
85	cd build
86	make test
87}
88