aboutsummaryrefslogtreecommitdiffstats
path: root/math/mprime
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2003-04-29 20:23:05 +0800
committerlioux <lioux@FreeBSD.org>2003-04-29 20:23:05 +0800
commit78a91b718859fd5e29c2f50c21d2c843cf82f890 (patch)
treee925b22764ea8271c497af769a2ab0413d0b5d34 /math/mprime
parent8104e3ec94ae4c400441c791b501b04358bd839e (diff)
downloadfreebsd-ports-gnome-78a91b718859fd5e29c2f50c21d2c843cf82f890.tar.gz
freebsd-ports-gnome-78a91b718859fd5e29c2f50c21d2c843cf82f890.tar.zst
freebsd-ports-gnome-78a91b718859fd5e29c2f50c21d2c843cf82f890.zip
New port mprime version 0.0.22.12: mersenne.org distributed Great
Internet Mersenne Prime Search
Diffstat (limited to 'math/mprime')
-rw-r--r--math/mprime/Makefile66
-rw-r--r--math/mprime/distinfo2
-rw-r--r--math/mprime/files/wrapper.sh23
-rw-r--r--math/mprime/pkg-descr15
-rw-r--r--math/mprime/pkg-message10
-rw-r--r--math/mprime/pkg-plist8
6 files changed, 124 insertions, 0 deletions
diff --git a/math/mprime/Makefile b/math/mprime/Makefile
new file mode 100644
index 000000000000..4edb70521a80
--- /dev/null
+++ b/math/mprime/Makefile
@@ -0,0 +1,66 @@
+# New ports collection makefile for: mprime aka prime95
+# Date created: Tue Apr 29 03:11:28 UTC 2003
+# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= mprime
+PORTVERSION= 0.0.${SOURCE_VERSION}
+CATEGORIES= math benchmarks
+MASTER_SITES= ftp://mersenne.org/gimps/ \
+ ${MASTER_SITE_LOCAL:S/$/:local/}
+MASTER_SITE_SUBDIR= lioux/:local
+DISTFILES= source${PORTVERSION:S/^0.0.//:R}.zip \
+ prime95-text-${TEXT_DATE}-${SOURCE_VERSION}.tar.bz2:local
+DIST_SUBDIR= ${PORTNAME}
+EXTRACT_ONLY=
+
+MAINTAINER= lioux@FreeBSD.org
+COMMENT= mersenne.org distributed Great Internet Mersenne Prime Search
+
+ONLY_FOR_ARCHS= i386
+USE_REINPLACE= yes
+USE_ZIP= yes
+USE_BZIP2= yes
+USE_GMAKE= yes
+WRKSRC= ${WRKDIR}/linux
+MAKEFILE= makebsd
+ALL_TARGET= clean mprime
+
+# source code version
+SOURCE_VERSION= 22.12
+# document date version
+TEXT_DATE= 2003042900
+
+post-extract:
+ @cd ${WRKDIR} && ${LOCALBASE}/bin/unzip -qq \
+ ${DISTDIR}/${DIST_SUBDIR}/source${PORTVERSION:S/^0.0.//:R}.zip
+ @cd ${WRKDIR} && ${TAR} -xjf \
+ ${DISTDIR}/${DIST_SUBDIR}/prime95-text-${TEXT_DATE}-${SOURCE_VERSION}.tar.bz2
+
+post-patch:
+ @${REINPLACE_CMD} -E \
+ -e 's| ||' \
+ -e 's|^(CC).*$$|\1=${CC}|' \
+ -e 's|^(CFLAGS)[[:space:]]*=|\1+=|' \
+ -e 's|^(CFLAGS.*)-m486|\1|' \
+ -e 's|^(CFLAGS.*)-O2|\1|' \
+ ${WRKSRC}/makebsd
+# prepare wrapper
+ @${SED} \
+ -e 's|%%PREFIX%%|${PREFIX}|' ${FILESDIR}/wrapper.sh > \
+ ${WRKDIR}/wrapper.sh
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/mprime ${PREFIX}/bin/mprime-real
+ @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/mprime
+.ifndef(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}${PKGNAMESUFFIX}
+ @${INSTALL_DATA} ${WRKDIR}/*.txt ${DOCSDIR}${PKGNAMESUFFIX}
+.endif
+
+post-install:
+ @${SED} -e 's|/usr/local/|${PREFIX}/|' ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/math/mprime/distinfo b/math/mprime/distinfo
new file mode 100644
index 000000000000..d466923d372f
--- /dev/null
+++ b/math/mprime/distinfo
@@ -0,0 +1,2 @@
+MD5 (mprime/source22.zip) = 4ac3d4fcb6219b4a25968bb17def217e
+MD5 (mprime/prime95-text-2003042900-22.12.tar.bz2) = 8488a53735577fe0a2b181fe76724ec4
diff --git a/math/mprime/files/wrapper.sh b/math/mprime/files/wrapper.sh
new file mode 100644
index 000000000000..3276091dc060
--- /dev/null
+++ b/math/mprime/files/wrapper.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+PREFIX="%%PREFIX%%"
+PROGRAM="${0}"
+DIRNAME=${HOME}/.mprime
+
+if [ ! -d ${DIRNAME} ]
+then
+ mkdir -p ${DIRNAME}
+fi
+
+if [ ! -h ${DIRNAME}/${PROGRAM##*/} ]
+then
+ ln -sf ${PREFIX}/bin/${PROGRAM##*/}-real ${DIRNAME}/${PROGRAM##*/}
+fi
+
+echo " ${*} " | grep " \-createdironly " ||
+{
+ cd ${DIRNAME} &&
+ echo Running under ${DIRNAME} &&
+ exec ./${PROGRAM##*/} "${@}" ||
+ echo PROBLEM. Cannot create directory ${DIRNAME}, make sure you have the proper permissions to create it and try again
+}
diff --git a/math/mprime/pkg-descr b/math/mprime/pkg-descr
new file mode 100644
index 000000000000..d26307ea6217
--- /dev/null
+++ b/math/mprime/pkg-descr
@@ -0,0 +1,15 @@
+[ excerpt from developer's www site ]
+
+This is the mersenne.org's client.
+
+Welcome to the Great Internet Mersenne Prime Search!
+
+To use this program you must agree to the prize rules at
+http://www.mersenne.org/prize.htm
+
+In case you ever forget, the URL is http://www.mersenne.org/prime.htm.
+The author's email address is woltman@alum.mit.edu. For networking
+questions, contact Scott Kurowski's technical support team at
+primenet@entropia.com.
+
+WWW: http://www.mersenne.org/
diff --git a/math/mprime/pkg-message b/math/mprime/pkg-message
new file mode 100644
index 000000000000..3c0c8b1aed04
--- /dev/null
+++ b/math/mprime/pkg-message
@@ -0,0 +1,10 @@
+ ATTENTIONATTENTION:
+
+Please, make sure that you read
+/usr/local/share/doc/mprime/license.txt
+and agree to the licensing terms before running this application.
+
+Furthermore, read
+/usr/local/share/doc/mprime/readme.txt
+It contains important information about both configuring and running
+mprime. You will have problems running it if you do not read it.
diff --git a/math/mprime/pkg-plist b/math/mprime/pkg-plist
new file mode 100644
index 000000000000..74d640e2b1ad
--- /dev/null
+++ b/math/mprime/pkg-plist
@@ -0,0 +1,8 @@
+bin/mprime
+bin/mprime-real
+%%PORTDOCS%%%%DOCSDIR%%/license.txt
+%%PORTDOCS%%%%DOCSDIR%%/readme.txt
+%%PORTDOCS%%%%DOCSDIR%%/stress.txt
+%%PORTDOCS%%%%DOCSDIR%%/undoc.txt
+%%PORTDOCS%%%%DOCSDIR%%/whatsnew.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%