math/mprime: avoid runtime issue
PR: 236546 Submitted by: rozhuk.im@gmail.com (maintainer)
This commit is contained in:
parent
0088edb80e
commit
d0d7addef8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=498741
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= mprime
|
||||
PORTVERSION= 29.4b7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= math benchmarks net
|
||||
MASTER_SITES= http://www.mersenne.org/ftp_root/gimps/ \
|
||||
ftp://mersenne.org/gimps/
|
||||
@ -23,11 +24,13 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
|
||||
libgmp.so:math/gmp
|
||||
|
||||
USES= zip
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
PATCH_WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
MAKEFILE= makebsd
|
||||
ALL_TARGET= mprime
|
||||
LLD_UNSAFE= yes
|
||||
|
||||
SUB_FILES= wrapper.sh
|
||||
|
||||
@ -48,9 +51,9 @@ post-patch:
|
||||
|
||||
pre-build:
|
||||
.if ${ARCH} == "amd64"
|
||||
@${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${PATCH_WRKSRC}/gwnum -f makebsd64
|
||||
@${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${PATCH_WRKSRC}/gwnum ${MAKE_FLAGS} makebsd64 ${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g}
|
||||
.elif ${ARCH} == "i386"
|
||||
@${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${PATCH_WRKSRC}/gwnum -f makemsys
|
||||
@${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${PATCH_WRKSRC}/gwnum ${MAKE_FLAGS} makemsys ${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g}
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
|
21
math/mprime/files/patch-gwnum_makebsd64
Normal file
21
math/mprime/files/patch-gwnum_makebsd64
Normal file
@ -0,0 +1,21 @@
|
||||
--- gwnum/makebsd64.orig 2017-04-25 17:00:32.000000000 +0300
|
||||
+++ gwnum/makebsd64 2019-02-16 02:43:48.159335000 +0300
|
||||
@@ -1,13 +1,13 @@
|
||||
# Makefile for FreeBSD 10.0 64-bit gwnum library
|
||||
#
|
||||
|
||||
-CC = cc
|
||||
-CFLAGS = -I.. -I../sqlite-amalgamation-3180000 -DX86_64 -O2
|
||||
+#CC = cc
|
||||
+CFLAGS += -I.. -I../sqlite-amalgamation-3180000 -DX86_64
|
||||
|
||||
-CPP = cc
|
||||
-CPPFLAGS = -I.. -I../qd -DX86_64 -O2
|
||||
+CPP = ${CXX}
|
||||
+CPPFLAGS = ${CXXFLAGS} -I.. -I../qd -DX86_64
|
||||
|
||||
-AR = ar
|
||||
+#AR = ar
|
||||
|
||||
LINUXOBJS = cpuid.o gwnum.o gwtables.o gwthread.o gwini.o gwbench.o gwutil.o gwdbldbl.o giants.o ecmstag1.o
|
||||
|
@ -1,18 +1,21 @@
|
||||
--- gwnum/makemsys.orig 2016-10-30 18:42:08 UTC
|
||||
+++ gwnum/makemsys
|
||||
@@ -1,11 +1,11 @@
|
||||
@@ -1,13 +1,13 @@
|
||||
# Makefile for Mingw/msys gwnum library
|
||||
#
|
||||
|
||||
-CC = gcc
|
||||
-CFLAGS = -I.. -I../sqlite-amalgamation-3180000 -O2 -march=i486 -malign-double
|
||||
+CC = cc
|
||||
+CFLAGS = -I.. -I../sqlite-amalgamation-3180000 -O2 -march=i486
|
||||
+#CC = cc
|
||||
+CFLAGS += -I.. -I../sqlite-amalgamation-3180000 -march=i486
|
||||
|
||||
-CPP = g++
|
||||
-CPPFLAGS = -I.. -I../qd -O2 -march=i486 -malign-double
|
||||
+CPP = cc
|
||||
+CPPFLAGS = -I.. -I../qd -O2 -march=i486
|
||||
+CPP = ${CXX}
|
||||
+CPPFLAGS = ${CXXFLAGS} -I.. -I../qd -march=i486
|
||||
|
||||
AR = ar
|
||||
-AR = ar
|
||||
+#AR = ar
|
||||
|
||||
LINUXOBJS = cpuid.o gwnum.o gwtables.o gwthread.o gwini.o gwbench.o gwutil.o gwdbldbl.o giants.o ecmstag1.o
|
||||
|
||||
|
@ -10,17 +10,20 @@
|
||||
# Configure hwloc with --enable-static --disable-shared --disable-pci --disable-cuda --disable-gl
|
||||
#
|
||||
|
||||
CC = cc
|
||||
-CC = cc
|
||||
-CFLAGS = -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2
|
||||
+CFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -DX86_64 -O2
|
||||
+#CC = cc
|
||||
+CFLAGS += -I.. -I../gwnum -I%%LOCALBASE%%/include -DX86_64
|
||||
|
||||
CPP = cc
|
||||
CPPFLAGS = -I.. -I../gwnum -DX86_64 -O2
|
||||
-CPP = cc
|
||||
-CPPFLAGS = -I.. -I../gwnum -DX86_64 -O2
|
||||
+CPP = ${CXX}
|
||||
+CPPFLAGS = ${CXXFLAGS} -I.. -I../gwnum -DX86_64
|
||||
|
||||
-LFLAGS = -L/usr/local/lib -Wl,-M
|
||||
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread /usr/local/lib/libhwloc.a -lcurl -lstdc++ -lcompat -lgmp
|
||||
+LFLAGS = -L%%LOCALBASE%%/lib
|
||||
+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lhwloc -lcurl -lcompat -lgmp
|
||||
+LFLAGS += -L%%LOCALBASE%%/lib ${LDFLAGS}
|
||||
+LIBS += ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lhwloc -lcurl -lcompat -lgmp
|
||||
|
||||
FACTOROBJ = factor64.o
|
||||
OBJS = prime.o menu.o
|
||||
|
@ -6,17 +6,17 @@
|
||||
|
||||
-CC = gcc
|
||||
-CFLAGS = -I.. -I../gwnum -I/usr/local/include -O2 -march=i486 -malign-double
|
||||
+CC = cc
|
||||
+#CC = cc
|
||||
+CFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -O2 -march=i486
|
||||
|
||||
-CPP = g++
|
||||
-CPPFLAGS = -I.. -I../gwnum -I/usr/local/include -O2 -march=i486 -malign-double
|
||||
+CPP = cc
|
||||
+CPPFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -O2 -march=i486
|
||||
+CPP = ${CXX}
|
||||
+CPPFLAGS = ${CXXFLAGS} -I.. -I../gwnum -I%%LOCALBASE%%/include -O2 -march=i486
|
||||
|
||||
-LFLAGS = -Wl,-M -L/usr/local/lib
|
||||
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic /usr/local/lib/libhwloc.a -Wl,-Bstatic /usr/local/lib/libcurl.a -lz -lcompat -lstdc++ -Wl,-Bdynamic -lssl -lgmp
|
||||
+LFLAGS = -L%%LOCALBASE%%/lib
|
||||
+LFLAGS = -L%%LOCALBASE%%/lib ${LDFLAGS}
|
||||
+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lcurl -lhwloc -lz -lcompat -lssl -lgmp
|
||||
|
||||
FACTOROBJ = factor32.o
|
||||
|
Loading…
Reference in New Issue
Block a user