mprime: 28.7 -> 29.4b
This commit is contained in:
parent
b51280ef3a
commit
a5ebf4ad9a
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, unzip, pkgconfig, curl }:
|
{ stdenv, lib, fetchurl, unzip, curl, hwloc, gmp }:
|
||||||
|
|
||||||
let
|
let
|
||||||
srcDir =
|
srcDir =
|
||||||
@ -14,25 +14,24 @@ let
|
|||||||
else throwSystem;
|
else throwSystem;
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "mprime-28.7";
|
name = "mprime-${version}";
|
||||||
|
version = "29.4b7";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://www.mersenne.org/ftp_root/gimps/p95v287.source.zip;
|
url = "http://www.mersenne.org/ftp_root/gimps/p95v${lib.replaceStrings ["."] [""] version}.source.zip";
|
||||||
sha256 = "1k3gxhs3g8hfghzpmidhcwpwyayj8r83v8zjai1z4xgsql4jwby1";
|
sha256 = "0idaqm46m4yis7vl014scx57lpccvjbnyy79gmj8caxghyajws0m";
|
||||||
};
|
};
|
||||||
|
|
||||||
unpackCmd = "unzip -d src -q $curSrc";
|
unpackCmd = "unzip -d src -q $curSrc || true";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ unzip ];
|
||||||
buildInputs = [ unzip curl ];
|
buildInputs = [ curl hwloc gmp ];
|
||||||
|
|
||||||
patches = [ ./makefile.patch ];
|
patches = [ ./makefile.patch ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
make -C gwnum -f ${gwnum}
|
make -C gwnum -f ${gwnum}
|
||||||
echo 'override CFLAGS := $(CFLAGS)' $(pkg-config --cflags libcurl) >> ${srcDir}/makefile
|
|
||||||
echo 'override LIBS := $(LIBS)' $(pkg-config --libs libcurl) >> ${srcDir}/makefile
|
|
||||||
make -C ${srcDir}
|
make -C ${srcDir}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -48,7 +47,7 @@ stdenv.mkDerivation {
|
|||||||
client. It is identical to Prime95 in functionality, except it lacks a
|
client. It is identical to Prime95 in functionality, except it lacks a
|
||||||
graphical user interface.
|
graphical user interface.
|
||||||
'';
|
'';
|
||||||
homepage = http://www.mersenne.org/;
|
homepage = "http://www.mersenne.org/";
|
||||||
# Unfree, because of a license requirement to share prize money if you find
|
# Unfree, because of a license requirement to share prize money if you find
|
||||||
# a suitable prime. http://www.mersenne.org/legal/#EULA
|
# a suitable prime. http://www.mersenne.org/legal/#EULA
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = stdenv.lib.licenses.unfree;
|
||||||
|
@ -1,46 +1,41 @@
|
|||||||
diff -ru orig/linux/makefile patched/linux/makefile
|
diff -dur src.old/linux/makefile src.new/linux/makefile
|
||||||
--- orig/linux/makefile 2015-08-09 21:06:18.000000000 +0100
|
--- src.old/linux/makefile 2018-01-04 20:49:00.000000000 +0300
|
||||||
+++ patched/linux/makefile 2016-02-16 16:25:45.988662423 +0000
|
+++ src.new/linux/makefile 2018-02-15 12:32:02.913011604 +0300
|
||||||
@@ -25,8 +25,8 @@
|
@@ -28,8 +28,8 @@
|
||||||
CPP = g++
|
CPP = g++
|
||||||
CPPFLAGS = -I.. -I../gwnum -O2 -march=i486 -malign-double
|
CPPFLAGS = -I.. -I../gwnum -O2 -march=i486 -malign-double
|
||||||
|
|
||||||
-LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
|
-LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
|
||||||
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl
|
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp
|
||||||
+LFLAGS =
|
+LFLAGS =
|
||||||
+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lrt -lstdc++ -ldl
|
+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lhwloc -lcurl -lrt -lstdc++ -ldl -lgmp
|
||||||
|
|
||||||
FACTOROBJ = factor32.o
|
FACTOROBJ = factor32.o
|
||||||
LINUXOBJS = prime.o menu.o
|
LINUXOBJS = prime.o menu.o
|
||||||
diff -ru orig/linux64/makefile patched/linux64/makefile
|
diff -dur src.old/linux64/makefile src.new/linux64/makefile
|
||||||
--- orig/linux64/makefile 2015-08-09 21:06:20.000000000 +0100
|
--- src.old/linux64/makefile 2018-01-04 20:49:00.000000000 +0300
|
||||||
+++ patched/linux64/makefile 2016-02-16 16:25:57.076531585 +0000
|
+++ src.new/linux64/makefile 2018-02-15 12:32:28.836286995 +0300
|
||||||
@@ -13,13 +13,13 @@
|
@@ -26,9 +26,9 @@
|
||||||
# LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic $(shell pkg-config --static --libs libcurl) -lstdc++ -Wl,-Bdynamic -ldl
|
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
-CFLAGS = -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2
|
|
||||||
+CFLAGS = -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2
|
|
||||||
|
|
||||||
CPP = g++
|
CPP = g++
|
||||||
CPPFLAGS = -I.. -I../gwnum -DX86_64 -O2
|
CPPFLAGS = -I.. -I../gwnum -DX86_64 -O2
|
||||||
|
|
||||||
-LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
|
-LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
|
||||||
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl
|
|
||||||
+LFLAGS =
|
+LFLAGS =
|
||||||
+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lrt -lstdc++ -ldl
|
#LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -lz -lxml2 -ldl -lgmp
|
||||||
|
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp
|
||||||
|
+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lhwloc -lcurl -lrt -lstdc++ -ldl -lgmp
|
||||||
|
|
||||||
FACTOROBJ = factor64.o
|
FACTOROBJ = factor64.o
|
||||||
LINUXOBJS = prime.o menu.o
|
LINUXOBJS = prime.o menu.o
|
||||||
diff -ru orig/macosx64/makefile patched/macosx64/makefile
|
diff -dur src.old/macosx64/makefile src.new/macosx64/makefile
|
||||||
--- orig/macosx64/makefile 2015-08-09 21:06:22.000000000 +0100
|
--- src.old/macosx64/makefile 2018-01-04 20:49:02.000000000 +0300
|
||||||
+++ patched/macosx64/makefile 2016-02-16 16:19:03.988415925 +0000
|
+++ src.new/macosx64/makefile 2018-02-15 12:33:32.401902535 +0300
|
||||||
@@ -10,7 +10,7 @@
|
@@ -12,7 +12,7 @@
|
||||||
|
CPP = g++
|
||||||
CPPFLAGS = -I.. -I../gwnum -I../linux -O2 -DX86_64 -DCOMMAND_LINE_MPRIME -m64
|
CPPFLAGS = -I.. -I../gwnum -I../linux -O2 -DX86_64 -DCOMMAND_LINE_MPRIME -m64
|
||||||
|
|
||||||
LFLAGS = -m64 -Wl,-no_pie
|
-LFLAGS = -m64 -Wl,-no_pie -L/usr/local/lib
|
||||||
-LIBS = ../gwnum/amd64/release/gwnum.a -lm -lpthread -lcurl -framework IOKit -framework CoreFoundation -lstdc++
|
+LFLAGS = -m64 -Wl,-no_pie
|
||||||
+LIBS = ../gwnum/amd64/release/gwnum.a -lm -lpthread -framework IOKit -framework CoreFoundation -lstdc++
|
LIBS = ../gwnum/amd64/release/gwnum.a -lm -lpthread -lhwloc -lcurl -framework IOKit -framework CoreFoundation -lstdc++ -lgmp
|
||||||
|
|
||||||
FACTOROBJ = ../prime95/macosx64/factor64.o
|
FACTOROBJ = ../prime95/macosx64/factor64.o
|
||||||
OBJS = prime.o menu.o
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user