svn commit: r454695 - in head/math/mprime: . files
Steve Wills
swills at FreeBSD.org
Wed Nov 22 17:40:26 UTC 2017
Author: swills
Date: Wed Nov 22 17:40:24 2017
New Revision: 454695
URL: https://svnweb.freebsd.org/changeset/ports/454695
Log:
math/mprime: Fix some issues from the previous commit
Put back original creator and whitespace
Fix patching
Greatly simplify the Makefile
Make it LOCALBASE safe
Reported by: danfe
Pointyhat to: swills
Added:
head/math/mprime/files/patch-commonc.c (contents, props changed)
head/math/mprime/files/patch-ecm.c (contents, props changed)
head/math/mprime/files/patch-gwnum_gwnum.c (contents, props changed)
head/math/mprime/files/patch-gwnum_gwutil.c (contents, props changed)
head/math/mprime/files/patch-gwnum_makemsys (contents, props changed)
head/math/mprime/files/patch-gwtest.c (contents, props changed)
head/math/mprime/files/patch-linux64_makebsd (contents, props changed)
head/math/mprime/files/patch-linux_makebsd (contents, props changed)
Deleted:
head/math/mprime/Makefile.amd64
head/math/mprime/Makefile.i386
Modified:
head/math/mprime/Makefile
Modified: head/math/mprime/Makefile
==============================================================================
--- head/math/mprime/Makefile Wed Nov 22 17:39:01 2017 (r454694)
+++ head/math/mprime/Makefile Wed Nov 22 17:40:24 2017 (r454695)
@@ -1,51 +1,58 @@
-# Created by: Rozhuk Ivan <rozhuk.im at gmail.com>
+# Created by: Mario Sergio Fujikawa Ferreira <lioux at FreeBSD.org>
# $FreeBSD$
-PORTNAME= mprime
-PORTVERSION= 28.10
-CATEGORIES= math benchmarks net
-MASTER_SITES= http://www.mersenne.org/ftp_root/gimps/ \
- ftp://mersenne.org/gimps/
-DISTNAME= p95v${PORTVERSION:R}${PORTVERSION:E}.source
+PORTNAME= mprime
+PORTVERSION= 28.10
+CATEGORIES= math benchmarks net
+MASTER_SITES= http://www.mersenne.org/ftp_root/gimps/ \
+ ftp://mersenne.org/gimps/
+DISTNAME= p95v${PORTVERSION:R}${PORTVERSION:E}.source
-MAINTAINER= rozhuk.im at gmail.com
-COMMENT= Great Internet Mersenne Prime Search
+MAINTAINER= rozhuk.im at gmail.com
+COMMENT= Great Internet Mersenne Prime Search
-LICENSE= EULA
-LICENSE_NAME= EULA
-LICENSE_FILE= ${FILESDIR}/LICENSE
-LICENSE_PERMS= dist-mirror pkg-mirror auto-accept
+LICENSE= EULA
+LICENSE_NAME= EULA
+LICENSE_FILE= ${FILESDIR}/LICENSE
+LICENSE_PERMS= dist-mirror pkg-mirror auto-accept
-ONLY_FOR_ARCHS= amd64 i386
+ONLY_FOR_ARCHS= amd64 i386
-LIB_DEPENDS= libcurl.so:ftp/curl
+LIB_DEPENDS= libcurl.so:ftp/curl
-USES= zip
-USE_LDCONFIG= yes
-NO_WRKSUBDIR= yes
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-ALL_TARGET= mprime
+USES= zip
+NO_WRKSUBDIR= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+PATCH_WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+MAKEFILE= makebsd
+ALL_TARGET= mprime
-SUB_FILES= wrapper.sh
+SUB_FILES= wrapper.sh
-PLIST_FILES+=\
- bin/mprime \
- bin/mprime-real
+PLIST_FILES+= bin/mprime bin/mprime-real
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
+WRKSRC_SUBDIR= linux64
+.else
+WRKSRC_SUBDIR= linux
+.endif
+
post-patch:
- @${REINPLACE_CMD} -e 's| abs (| labs (|g ; \
- s|(abs (|(labs (|g ; \
- s| abs(| labs(|g ; \
- s|(abs(|(labs(|g' \
- ${WRKSRC}/../gwnum/gwnum.c \
- ${WRKSRC}/../commonc.c \
- ${WRKSRC}/../ecm.c \
- ${WRKSRC}/../gwtest.c
- @${REINPLACE_CMD} -e 's|__APPLE__|__FreeBSD__|g' \
- ${WRKSRC}/../gwnum/gwutil.c
+ @${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
+ ${PATCH_WRKSRC}/linux64/makebsd \
+ ${PATCH_WRKSRC}/linux/makebsd
+pre-build:
+.if ${ARCH} == "amd64"
+ @${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${PATCH_WRKSRC}/gwnum -f makebsd64
+.elif ${ARCH} == "i386"
+ @${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${PATCH_WRKSRC}/gwnum -f makemsys
+.endif
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/mprime ${STAGEDIR}${PREFIX}/bin/mprime-real
${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${STAGEDIR}${PREFIX}/bin/mprime
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Added: head/math/mprime/files/patch-commonc.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/mprime/files/patch-commonc.c Wed Nov 22 17:40:24 2017 (r454695)
@@ -0,0 +1,18 @@
+--- commonc.c.orig 2016-09-14 03:33:00 UTC
++++ commonc.c
+@@ -3247,13 +3247,13 @@ void tempFileName (
+ /* From now on, we will use k and c to generate the filename. To reduce */
+ /* upgrading problems, old save file names are renamed. */
+
+- if (w->k != 1.0 || abs(w->c) != 1) {
++ if (w->k != 1.0 || labs(w->c) != 1) {
+ char v258_filename[32];
+ strcpy (v258_filename, buf);
+ buf[1] = 0;
+ if (w->k != 1.0) sprintf (buf+strlen(buf), "%g", fmod (w->k, 1000000.0));
+ sprintf (buf+strlen(buf), "_%ld", p);
+- if (abs(w->c) != 1) sprintf (buf+strlen(buf), "_%d", abs(w->c) % 1000);
++ if (labs(w->c) != 1) sprintf (buf+strlen(buf), "_%d", labs(w->c) % 1000);
+ rename (v258_filename, buf);
+ if (buf[0] == 'p') {
+ v258_filename[0] = buf[0] = 'q';
Added: head/math/mprime/files/patch-ecm.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/mprime/files/patch-ecm.c Wed Nov 22 17:40:24 2017 (r454695)
@@ -0,0 +1,20 @@
+--- ecm.c.orig 2016-05-02 04:44:52 UTC
++++ ecm.c
+@@ -1068,7 +1068,7 @@ int setN (
+ }
+
+ if (IniGetInt (INI_FILE, "PhiExtensions", 0) &&
+- w->k == 1.0 && abs(w->c) == 1 && (w->n%3) == 0) { /*=== this input means Phi(3,-b^(n/3)) ===*/
++ w->k == 1.0 && labs(w->c) == 1 && (w->n%3) == 0) { /*=== this input means Phi(3,-b^(n/3)) ===*/
+ giant tmp = allocgiant ((bits >> 5) + 5);
+ if (tmp == NULL) return (OutOfMemory (thread_num));
+ ultog (w->b, tmp);
+@@ -1156,7 +1156,7 @@ int setN (
+ /* Open file of known factors. This code has been obsoleted by the */
+ /* known factors list in worktodo.ini. */
+
+- if (w->k != 1.0 || w->b != 2 || abs(w->c) != 1) return (0);
++ if (w->k != 1.0 || w->b != 2 || labs(w->c) != 1) return (0);
+ fd = fopen (w->c == 1 ? "lowp.txt" : "lowm.txt", "r");
+ if (fd == NULL) return (0);
+
Added: head/math/mprime/files/patch-gwnum_gwnum.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/mprime/files/patch-gwnum_gwnum.c Wed Nov 22 17:40:24 2017 (r454695)
@@ -0,0 +1,153 @@
+--- gwnum/gwnum.c.orig 2016-10-30 14:22:26 UTC
++++ gwnum/gwnum.c
+@@ -170,7 +170,7 @@ void *avx_carries_prctab[] = {
+ /* b or blank (b > 2 or not) */
+ /* s4 or blank (SSE4 or not) */
+ /* k or blank (k for XMM_K_HI is zero or not) */
+-/* c1 or cm1 or blank (c=1, c=-1, abs(c)!=1) */
++/* c1 or cm1 or blank (c=1, c=-1, labs(c)!=1) */
+ /* We also define a macro that will pick the correct entry from the array. */
+
+ #define avx_explode(macro) avx_explode1(macro,yr) avx_explode1(macro,yi)
+@@ -767,17 +767,17 @@ int gwinfo ( /* Return zero-padded fft flag or error
+ log2k = log2 (k);
+ logbk = logb (k);
+ log2b = log2 (b);
+- log2c = log2 (abs (c));
++ log2c = log2 (labs (c));
+ log2maxmulbyconst = log2 (gwdata->maxmulbyconst);
+
+ /* First, see what FFT length we would get if we emulate the k*b^n+c modulo */
+-/* with a zero padded FFT. If k is 1 and abs (c) is 1 then we can skip this */
++/* with a zero padded FFT. If k is 1 and labs (c) is 1 then we can skip this */
+ /* loop as we're sure to find an IBDWT that will do the job. */
+
+ again: zpad_jmptab = NULL;
+ generic_jmptab = NULL;
+ if (! gwdata->force_general_mod &&
+- (k > 1.0 || n < 500 || abs (c) > 1) &&
++ (k > 1.0 || n < 500 || labs (c) > 1) &&
+ gwdata->qa_pick_nth_fft < 1000) {
+
+ /* Use the proper 2^N-1 jmptable */
+@@ -984,7 +984,7 @@ next1: while (zpad_jmptab->flags & 0x80000000) INC_J
+ /* the bits per word. An FFT result word cannot be more than 5 times */
+ /* bits-per-word (bits-per-word are stored in the current word and the */
+ /* 4 words we propagate carries to). How many bits are in an FFT result */
+-/* word? Well, because of balanced representation the abs(input word) is */
++/* word? Well, because of balanced representation the labs(input word) is */
+ /* (bits_per_word-1) bits long. An FFT result word contains multiplied data */
+ /* words, that's (bits_per_word-1)*2 bits. Adding up many multiplied data */
+ /* words adds some bits proportional to the size of the FFT. Experience */
+@@ -1789,13 +1789,13 @@ int gwsetup (
+
+ if (c == 0)
+ gcd = 0;
+- else if (k == 1.0 || abs (c) == 1)
++ else if (k == 1.0 || labs (c) == 1)
+ gcd = 1;
+ else {
+ stackgiant(kg,2);
+ stackgiant(cg,2);
+ dbltog (k, kg);
+- itog (abs (c), cg);
++ itog (labs (c), cg);
+ gcdg (kg, cg);
+ gcd = cg->n[0];
+ }
+@@ -1809,7 +1809,7 @@ int gwsetup (
+
+ if (gcd == 1 &&
+ k * gwdata->maxmulbyconst <= MAX_ZEROPAD_K &&
+- abs (c) * gwdata->maxmulbyconst <= MAX_ZEROPAD_C &&
++ labs (c) * gwdata->maxmulbyconst <= MAX_ZEROPAD_C &&
+ log2(b) * (double) n >= 350.0 &&
+ (b == 2 || (gwdata->cpu_flags & (CPU_AVX | CPU_SSE2))) &&
+ !gwdata->force_general_mod) {
+@@ -2429,12 +2429,12 @@ int internal_gwsetup (
+ gwdata->NUM_B_PER_SMALL_WORD = (unsigned long) gwdata->avg_num_b_per_word;
+
+ /* Set a flag if this is a rational FFT. That is, an FFT where all the */
+-/* weighting factors are 1.0. This happens when abs(c) is 1 and every */
++/* weighting factors are 1.0. This happens when labs(c) is 1 and every */
+ /* FFT word has the same number of b's. The assembly code can make some */
+ /* obvious optimizations when all the FFT weights are one. */
+
+ gwdata->RATIONAL_FFT = asm_data->RATIONAL_FFT =
+- ((double) gwdata->NUM_B_PER_SMALL_WORD == gwdata->avg_num_b_per_word) && (abs (c) == 1);
++ ((double) gwdata->NUM_B_PER_SMALL_WORD == gwdata->avg_num_b_per_word) && (labs (c) == 1);
+
+ /* Remember the maximum number of bits per word that this FFT length */
+ /* supports. We this in gwnear_fft_limit. Note that zero padded FFTs */
+@@ -3688,7 +3688,7 @@ int internal_gwsetup (
+ if (gwdata->ZERO_PADDED_FFT ||
+ 3.0 * gwdata->NUM_B_PER_SMALL_WORD * log2 (b) >
+ 2.0 * ((gwdata->NUM_B_PER_SMALL_WORD + 1) * log2 (b) - 1) +
+- 0.6 * log2 (gwdata->FFTLEN) + log2 (k) + 1.7 * log2 (abs (c)))
++ 0.6 * log2 (gwdata->FFTLEN) + log2 (k) + 1.7 * log2 (labs (c)))
+ asm_data->SPREAD_CARRY_OVER_EXTRA_WORDS = FALSE;
+ else
+ asm_data->SPREAD_CARRY_OVER_EXTRA_WORDS = TRUE;
+@@ -6262,7 +6262,7 @@ void gw_as_string (
+ sprintf (buf, "%.0f", k + c);
+ else if (k != 1.0)
+ sprintf (buf, "%.0f*%lu^%lu%c%lu", k, b, n,
+- c < 0 ? '-' : '+', (unsigned long) abs (c));
++ c < 0 ? '-' : '+', (unsigned long) labs (c));
+ else if (b == 2 && c == -1)
+ sprintf (buf, "M%lu", n);
+ else {
+@@ -6272,7 +6272,7 @@ void gw_as_string (
+ sprintf (buf, "F%lu", cnt);
+ else
+ sprintf (buf, "%lu^%lu%c%lu", b, n,
+- c < 0 ? '-' : '+', (unsigned long) abs (c));
++ c < 0 ? '-' : '+', (unsigned long) labs (c));
+ }
+ }
+
+@@ -6357,7 +6357,7 @@ double virtual_bits_per_word (
+ weighted_bits_per_output_word =
+ 2.0 * ((b_per_input_word + 1.0) * log2b - 1.0) +
+ 0.6 * log2 (gwdata->FFTLEN) +
+- log2 (gwdata->k) + 1.7 * log2 (abs (gwdata->c));
++ log2 (gwdata->k) + 1.7 * log2 (labs (gwdata->c));
+ if (gwdata->k == 1.0 && gwdata->n % gwdata->FFTLEN == 0)
+ weighted_bits_per_output_word -= ((log2b <= 4.0) ? log2b : 1.4 * log2b);
+ else if (num_big_words == 1 && gwdata->k > 1.0)
+@@ -6756,7 +6756,7 @@ void gwsetaddin (
+ {
+ unsigned long word, b_in_word;
+
+- ASSERTG (gwdata->k == 1.0 || abs (gwdata->c) == 1);
++ ASSERTG (gwdata->k == 1.0 || labs (gwdata->c) == 1);
+
+ /* In a zero-padded FFT, the value is added into ZPAD0 */
+
+@@ -7022,7 +7022,7 @@ void gianttogw (
+ /* Small numbers can also be optimized for many moduli by zeroing all the */
+ /* FFT data using memset and then setting only the affected FFT elements. */
+
+- else if (a->sign == 1 && (gwdata->k == 1.0 || abs (gwdata->c) == 1)) {
++ else if (a->sign == 1 && (gwdata->k == 1.0 || labs (gwdata->c) == 1)) {
+ uint32_t low_addin;
+ int i;
+
+@@ -7639,7 +7639,7 @@ void specialmodg (
+ }
+
+ /* Do the quick modulus code twice because in the case where */
+-/* abs(c) > k once won't get us close enough. */
++/* labs(c) > k once won't get us close enough. */
+
+ neg = FALSE;
+ for (count = 0; count < 2; count++) {
+@@ -7647,7 +7647,7 @@ void specialmodg (
+ /* Handle negative input values */
+
+ neg ^= (g->sign < 0);
+- g->sign = abs (g->sign);
++ g->sign = labs (g->sign);
+
+ /* If number is bigger than the modulus, do a mod using shifts and adds */
+ /* This will get us close to the right answer. */
Added: head/math/mprime/files/patch-gwnum_gwutil.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/mprime/files/patch-gwnum_gwutil.c Wed Nov 22 17:40:24 2017 (r454695)
@@ -0,0 +1,11 @@
+--- gwnum/gwutil.c.orig 2016-09-07 01:25:20 UTC
++++ gwnum/gwutil.c
+@@ -17,7 +17,7 @@
+ #include <malloc.h>
+ #include <memory.h>
+ #endif
+-#ifdef __APPLE__
++#ifdef __APPLE__ || __FreeBSD__
+ #include <memory.h>
+ #endif
+ #include "gwcommon.h"
Added: head/math/mprime/files/patch-gwnum_makemsys
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/mprime/files/patch-gwnum_makemsys Wed Nov 22 17:40:24 2017 (r454695)
@@ -0,0 +1,18 @@
+--- gwnum/makemsys.orig 2016-10-30 18:42:08 UTC
++++ gwnum/makemsys
+@@ -1,11 +1,11 @@
+ # Makefile for Mingw/msys gwnum library
+ #
+
+-CC = gcc
+-CFLAGS = -I.. -O2 -march=i486 -malign-double
++CC = cc
++CFLAGS = -I.. -O2 -march=i486
+
+-CPP = g++
+-CPPFLAGS = -I.. -I../qd -O2 -march=i486 -malign-double
++CPP = cc
++CPPFLAGS = -I.. -I../qd -O2 -march=i486
+
+ AR = ar
+
Added: head/math/mprime/files/patch-gwtest.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/mprime/files/patch-gwtest.c Wed Nov 22 17:40:24 2017 (r454695)
@@ -0,0 +1,80 @@
+--- gwtest.c.orig 2015-12-14 04:55:34 UTC
++++ gwtest.c
+@@ -306,7 +306,7 @@ void test_it_all (
+ gwstartnextfft (&gwdata, (i & 3) == 2);
+
+ /* Test gwsetaddin without and with POSTFFT set */
+- if ((i == 45 || i == 46) && abs (c) == 1)
++ if ((i == 45 || i == 46) && labs (c) == 1)
+ gwsetaddin (&gwdata, -31);
+
+ /* Test several different ways to square a number */
+@@ -326,7 +326,7 @@ void test_it_all (
+ /* Remember maximum difference */
+ diff = fabs (gwsuminp (&gwdata, x) - gwsumout (&gwdata, x));
+ if (diff > maxdiff) maxdiff = diff;
+- if ((i == 45 || i == 46) && abs (c) == 1)
++ if ((i == 45 || i == 46) && labs (c) == 1)
+ gwsetaddin (&gwdata, 0);
+ }
+ if (gwdata.MAXDIFF < 1e50)
+@@ -347,7 +347,7 @@ void test_it_all (
+ /* Test square and mul carefully */
+
+ gwfree (&gwdata, x3); gwfree (&gwdata, x4);
+- if (abs (c) == 1) gwsetaddin (&gwdata, -42);
++ if (labs (c) == 1) gwsetaddin (&gwdata, -42);
+ gwsquare_carefully (&gwdata, x);
+ diff = fabs (gwsuminp (&gwdata, x) - gwsumout (&gwdata, x));
+ if (diff > maxdiff) maxdiff = diff;
+@@ -355,7 +355,7 @@ void test_it_all (
+ gwfree (&gwdata, gwdata.GW_RANDOM); gwdata.GW_RANDOM = NULL;
+ diff = fabs (gwsuminp (&gwdata, x) - gwsumout (&gwdata, x));
+ if (diff > maxdiff) maxdiff = diff;
+- if (abs (c) == 1) gwsetaddin (&gwdata, 0);
++ if (labs (c) == 1) gwsetaddin (&gwdata, 0);
+
+ /* Test gwaddquick, gwsubquick */
+
+@@ -499,7 +499,7 @@ void test_it (
+ gwstartnextfft (gwdata, (i & 3) == 2);
+
+ /* Test gwsetaddin without and with POSTFFT set */
+- if ((i == 45 || i == 46) && abs (gwdata->c) == 1)
++ if ((i == 45 || i == 46) && labs (gwdata->c) == 1)
+ gwsetaddin (gwdata, -31);
+
+ /* Test several different ways to square a number */
+@@ -522,7 +522,7 @@ void test_it (
+
+ /* Square number (and do add-in) using giants code */
+ squaregi (&gwdata->gdata, g);
+- if ((i == 45 || i == 46) && abs (gwdata->c) == 1) {
++ if ((i == 45 || i == 46) && labs (gwdata->c) == 1) {
+ iaddg (-31, g);
+ gwsetaddin (gwdata, 0);
+ }
+@@ -600,12 +600,12 @@ void test_it (
+ /* Test square and mul carefully */
+
+ gwfree (gwdata, x3); gwfree (gwdata, x4);
+- if (abs (gwdata->c) == 1) gwsetaddin (gwdata, -42);
++ if (labs (gwdata->c) == 1) gwsetaddin (gwdata, -42);
+ gwsquare_carefully (gwdata, x);
+ diff = fabs (gwsuminp (gwdata, x) - gwsumout (gwdata, x));
+ if (diff > maxdiff) maxdiff = diff;
+ squaregi (&gwdata->gdata, g);
+- if (abs (gwdata->c) == 1) iaddg (-42, g);
++ if (labs (gwdata->c) == 1) iaddg (-42, g);
+ specialmodg (gwdata, g);
+ if (CHECK_OFTEN) compare (thread_num, gwdata, x, g);
+ gwmul_carefully (gwdata, x, x);
+@@ -613,7 +613,7 @@ void test_it (
+ diff = fabs (gwsuminp (gwdata, x) - gwsumout (gwdata, x));
+ if (diff > maxdiff) maxdiff = diff;
+ squaregi (&gwdata->gdata, g);
+- if (abs (gwdata->c) == 1) { iaddg (-42, g); gwsetaddin (gwdata, 0); }
++ if (labs (gwdata->c) == 1) { iaddg (-42, g); gwsetaddin (gwdata, 0); }
+ specialmodg (gwdata, g);
+ if (CHECK_OFTEN) compare (thread_num, gwdata, x, g);
+
Added: head/math/mprime/files/patch-linux64_makebsd
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/mprime/files/patch-linux64_makebsd Wed Nov 22 17:40:24 2017 (r454695)
@@ -0,0 +1,19 @@
+--- linux64/makebsd.orig 2016-10-30 18:42:16 UTC
++++ linux64/makebsd
+@@ -4,13 +4,13 @@
+ #
+
+ CC = cc
+-CFLAGS = -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2
++CFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -DX86_64 -O2
+
+ CPP = cc
+ CPPFLAGS = -I.. -I../gwnum -DX86_64 -O2
+
+-LFLAGS = -L/usr/local/lib -Wl,-M
+-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lcurl -lstdc++ -lcompat
++LFLAGS = -L%%LOCALBASE%%/lib -Wl,-M
++LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lcurl -lcompat
+
+ FACTOROBJ = factor64.o
+ OBJS = prime.o menu.o
Added: head/math/mprime/files/patch-linux_makebsd
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/mprime/files/patch-linux_makebsd Wed Nov 22 17:40:24 2017 (r454695)
@@ -0,0 +1,22 @@
+--- linux/makebsd.orig 2016-10-30 18:42:16 UTC
++++ linux/makebsd
+@@ -1,14 +1,14 @@
+ # Makefile for FreeBSD 32-bit mprime
+ #
+
+-CC = gcc
+-CFLAGS = -I.. -I../gwnum -I/usr/local/include -O2 -march=i486 -malign-double
++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
++CPPFLAGS = -I.. -I../gwnum -I%%LOCALBASE%%/include -O2 -march=i486
+
+-LFLAGS = -Wl,-M
+-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic /usr/local/lib/libcurl.a -lz -lcompat -lstdc++ -Wl,-Bdynamic -lssl
++LFLAGS = -L%%LOCALBASE%%/lib -Wl,-M
++LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-lcurl -lcompat -Wl,
+
+ FACTOROBJ = factor32.o
+ OBJS = prime.o menu.o
More information about the svn-ports-all
mailing list