Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2019 20:17:32 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r498741 - in head/math/mprime: . files
Message-ID:  <201904122017.x3CKHWrC070811@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Fri Apr 12 20:17:32 2019
New Revision: 498741
URL: https://svnweb.freebsd.org/changeset/ports/498741

Log:
  math/mprime: avoid runtime issue
  
  PR:		236546
  Submitted by:	rozhuk.im@gmail.com (maintainer)

Added:
  head/math/mprime/files/patch-gwnum_makebsd64   (contents, props changed)
Modified:
  head/math/mprime/Makefile   (contents, props changed)
  head/math/mprime/files/patch-gwnum_makemsys   (contents, props changed)
  head/math/mprime/files/patch-linux64_makebsd   (contents, props changed)
  head/math/mprime/files/patch-linux_makebsd   (contents, props changed)

Modified: head/math/mprime/Makefile
==============================================================================
--- head/math/mprime/Makefile	Fri Apr 12 20:03:33 2019	(r498740)
+++ head/math/mprime/Makefile	Fri Apr 12 20:17:32 2019	(r498741)
@@ -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:

Added: head/math/mprime/files/patch-gwnum_makebsd64
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/mprime/files/patch-gwnum_makebsd64	Fri Apr 12 20:17:32 2019	(r498741)
@@ -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
+ 

Modified: head/math/mprime/files/patch-gwnum_makemsys
==============================================================================
--- head/math/mprime/files/patch-gwnum_makemsys	Fri Apr 12 20:03:33 2019	(r498740)
+++ head/math/mprime/files/patch-gwnum_makemsys	Fri Apr 12 20:17:32 2019	(r498741)
@@ -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
  

Modified: head/math/mprime/files/patch-linux64_makebsd
==============================================================================
--- head/math/mprime/files/patch-linux64_makebsd	Fri Apr 12 20:03:33 2019	(r498740)
+++ head/math/mprime/files/patch-linux64_makebsd	Fri Apr 12 20:17:32 2019	(r498741)
@@ -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

Modified: head/math/mprime/files/patch-linux_makebsd
==============================================================================
--- head/math/mprime/files/patch-linux_makebsd	Fri Apr 12 20:03:33 2019	(r498740)
+++ head/math/mprime/files/patch-linux_makebsd	Fri Apr 12 20:17:32 2019	(r498741)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904122017.x3CKHWrC070811>