1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

New port primegen version 0.97: A small, fast library to generate

prime numbers in order
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2009-03-27 12:47:38 +00:00
parent 9f1145d18e
commit 3ace356255
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=231112
8 changed files with 110 additions and 0 deletions

View File

@ -387,6 +387,7 @@
SUBDIR += ploticus-nox11
SUBDIR += plplot
SUBDIR += polymake
SUBDIR += primegen
SUBDIR += proofgeneral
SUBDIR += pspp
SUBDIR += py-basemap

61
math/primegen/Makefile Normal file
View File

@ -0,0 +1,61 @@
# New ports collection makefile for: primegen
# Date created: Fri Mar 27 2009 12:04:22 UTC
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= primegen
PORTVERSION= 0.97
CATEGORIES= math
MASTER_SITES= http://cr.yp.to/primegen/
MAINTAINER= lioux@FreeBSD.org
COMMENT= A small, fast library to generate prime numbers in order
ALL_TARGET=
MAKE_JOBS_SAFE= yes
MAN1= primes.1 primegaps.1
MAN3= primegen.3
PROGRAM_FILES= primes primegaps
HEADER_FILES= primegen.h
LIB_FILES= libprimegen.a
# programs
PLIST_FILES+= ${PROGRAM_FILES:S,^,bin/,}
# header files
PLIST_FILES+= ${HEADER_FILES:S,^,include/,}
# libraries
PLIST_FILES+= ${LIB_FILES:S,^,lib/,}
post-patch:
@${FIND} ${WRKSRC} -type f -exec \
${REINPLACE_CMD} -E -e 's!(primegen.a)!lib\1!' {} \;
do-configure:
@${ECHO_CMD} '${CC} ${CFLAGS} -fsigned-char -fPIC' > ${WRKSRC}/conf-cc
@${ECHO_CMD} '${CC}' > ${WRKSRC}/conf-ld
@${ECHO_CMD} '${PREFIX}' > ${WRKSRC}/conf-home
do-install:
.for file in ${PROGRAM_FILES}
@${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/bin
.endfor
.for file in ${HEADER_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/include
.endfor
.for file in ${LIB_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/lib
.endfor
.for file in ${MAN1}
@${INSTALL_MAN} ${WRKSRC}/${file} ${MAN1PREFIX}/man/man1
.endfor
.for file in ${MAN3}
@${INSTALL_MAN} ${WRKSRC}/${file} ${MAN3PREFIX}/man/man3
.endfor
.include <bsd.port.mk>

3
math/primegen/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (primegen-0.97.tar.gz) = 7f2a260e5d0c0a4f9dd2e10cc6c8b984
SHA256 (primegen-0.97.tar.gz) = 54285baf8eed9e421ff2220a2112d38cfb20c1ebef6014ef3f0004c22c95f40d
SIZE (primegen-0.97.tar.gz) = 31491

View File

@ -0,0 +1,11 @@
--- eratspeed.c.orig 2009-03-27 09:16:52.000000000 -0300
+++ eratspeed.c 2009-03-27 09:18:29.000000000 -0300
@@ -1,6 +1,8 @@
#define B32 1001
#define B (B32 * 32)
+#include <stdio.h>
+#include <stdlib.h>
#include "timing.h"
#include "uint32.h"

View File

@ -0,0 +1,8 @@
--- primegaps.c.orig 2009-03-27 09:17:07.000000000 -0300
+++ primegaps.c 2009-03-27 09:17:19.000000000 -0300
@@ -1,4 +1,5 @@
#include <math.h>
+#include <stdio.h>
#include "primegen.h"
primegen pg;

View File

@ -0,0 +1,8 @@
--- primes.c.orig 2009-03-27 09:19:08.000000000 -0300
+++ primes.c 2009-03-27 09:19:14.000000000 -0300
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#include "primegen.h"
#include "fs64.h"

View File

@ -0,0 +1,8 @@
--- primespeed.c.orig 2009-03-27 09:17:41.000000000 -0300
+++ primespeed.c 2009-03-27 09:18:54.000000000 -0300
@@ -1,3 +1,5 @@
+#include <stdio.h>
+#include <stdlib.h>
#include "timing.h"
#include "primegen.h"
#include "primegen_impl.h"

10
math/primegen/pkg-descr Normal file
View File

@ -0,0 +1,10 @@
primegen is a small, fast library to generate prime numbers in
order. It generates the 50847534 primes up to 1000000000 in just 8
seconds on a Pentium II-350; it prints them in decimal in just 35
seconds.
primegen can generate primes up to 1000000000000000, although it
is not optimized for primes past 32 bits. It uses the Sieve of Atkin
instead of the traditional Sieve of Eratosthenes.
WWW: http://cr.yp.to/primegen.html