Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
package primecount
Browse files Browse the repository at this point in the history
  • Loading branch information
videlec committed Mar 30, 2018
1 parent e5c848a commit 074106d
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build/pkgs/primecount/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
= primecount =

== Description ==

primecount is a C++ implementation of several algorithms for
counting primes maintained by Kim Walisch.

Website: https://github.com/kimwalisch/primecount/

== License ==

primecount is licensed BSD 2

== Upstream Contact ==

* https://github.com/kimwalisch/primecount/
4 changes: 4 additions & 0 deletions build/pkgs/primecount/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tarball=primecount-VERSION.tar.gz
sha1=c5e4912f75f096c2a3841c045c85207a78bcd6b5
md5=f06957db6ff92132584794aa53e5b2c8
cksum=1834548948
1 change: 1 addition & 0 deletions build/pkgs/primecount/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake
1 change: 1 addition & 0 deletions build/pkgs/primecount/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.3
19 changes: 19 additions & 0 deletions build/pkgs/primecount/spkg-check
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
###############################################################################
#
# primecount Sage check script
#
###############################################################################

if [ "$SAGE_LOCAL" = "" ]; then
echo >&2 "Error: SAGE_LOCAL undefined - exiting..."
echo >&2 "Maybe run 'sage -sh'?"
exit 1
fi

cd src
$MAKE test

if [ $? -ne 0 ]; then
echo >&2 "Error: primecount failed to pass its test suite."
exit 1
fi
28 changes: 28 additions & 0 deletions build/pkgs/primecount/spkg-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
###############################################################################
#
# primecount Sage install script
#
###############################################################################

if [ "$SAGE_LOCAL" = "" ]; then
echo >&2 "Error: SAGE_LOCAL undefined - exiting..."
echo >&2 "Maybe run 'sage -sh'?"
exit 1
fi

cd src

if [ "$SAGE_FAT_BINARY" = yes ]; then
EXTRA_OPTS="-DWITH_POPCNT=OFF"
fi

echo "Configuring primecount."
cmake . -DCMAKE_INSTALL_PREFIX=${SAGE_LOCAL} \
-DBUILD_STATIC_LIBS=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTS=ON \
${EXTRA_OPTS}

sdh_make

sdh_make_install
1 change: 1 addition & 0 deletions build/pkgs/primecount/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional

0 comments on commit 074106d

Please sign in to comment.