diff --git a/math/cln/Makefile b/math/cln/Makefile index c6d28c62fd19..d66381a41000 100644 --- a/math/cln/Makefile +++ b/math/cln/Makefile @@ -1,31 +1,32 @@ # Created by: Ying-Chieh Liao PORTNAME= cln PORTVERSION= 1.3.6 CATEGORIES= math devel MASTER_SITES= http://www.ginac.de/CLN/ \ http://www.mirrors.wiretapped.net/security/cryptography/libraries/math/cln/ \ ftp://ftpthep.physik.uni-mainz.de/pub/gnu/ MAINTAINER= wen@FreeBSD.org COMMENT= Class Library for Numbers LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libgmp.so:math/gmp GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-gmp=${LOCALBASE} INSTALL_TARGET= install-strip +TEST_TARGET= check USES= compiler:c11 gmake libtool pathfix pkgconfig tar:bzip2 USE_LDCONFIG= yes INFO= cln CPPFLAGS+= ${CPPFLAGS_${ARCH}} CPPFLAGS_aarch64= -DNO_ASM CPPFLAGS_armv6= -DNO_ASM CPPFLAGS_armv7= -DNO_ASM .include diff --git a/math/cln/files/patch-src_base_low_cl__low__div.cc b/math/cln/files/patch-src_base_low_cl__low__div.cc index 15124551e323..a759e811a95b 100644 --- a/math/cln/files/patch-src_base_low_cl__low__div.cc +++ b/math/cln/files/patch-src_base_low_cl__low__div.cc @@ -1,11 +1,39 @@ --- src/base/low/cl_low_div.cc.orig 2011-04-08 21:07:28 UTC +++ src/base/low/cl_low_div.cc +@@ -10,11 +10,11 @@ + // Implementation. + + #ifdef NEED_VAR_divu_16_rest +-uint16 divu_16_rest; ++extern "C" uint16 divu_16_rest; + #endif + + #ifdef NEED_FUNCTION_divu_3216_1616_ +-uint16 divu_16_rest; ++extern "C" uint16 divu_16_rest = 0; + namespace cln { + #if 1 + // Most processors have a good 32 by 32 bit division, use that. +@@ -101,11 +101,11 @@ uint32 divu_3232_3232_(uint32 x, uint32 y) + #endif + + #ifdef NEED_VAR_divu_32_rest +-uint32 divu_32_rest; ++extern "C" uint32 divu_32_rest; + #endif + + #ifdef NEED_FUNCTION_divu_6432_3232_ +-uint32 divu_32_rest; ++extern "C" uint32 divu_32_rest = 0; + namespace cln { + uint32 divu_6432_3232_(uint32 xhi, uint32 xlo, uint32 y) + // Methode: @@ -207,7 +207,7 @@ uint32 divu_6432_3232_(uint32 xhi, uint32 xlo, uint32 #endif #ifdef NEED_VAR_divu_64_rest -uint64 divu_64_rest; +extern "C" uint64 divu_64_rest = 0; #endif #ifdef NEED_FUNCTION_divu_6464_6464_ diff --git a/math/cln/files/patch-src_base_low_cl__low__mul.cc b/math/cln/files/patch-src_base_low_cl__low__mul.cc index 8e8c48c4de2e..4b53103cb060 100644 --- a/math/cln/files/patch-src_base_low_cl__low__mul.cc +++ b/math/cln/files/patch-src_base_low_cl__low__mul.cc @@ -1,16 +1,30 @@ --- src/base/low/cl_low_mul.cc.orig 2011-04-08 21:06:30 UTC +++ src/base/low/cl_low_mul.cc +@@ -10,11 +10,11 @@ + // Implementation. + + #ifdef NEED_VAR_mulu32_high +-uint32 mulu32_high; ++extern "C" uint32 mulu32_high; + #endif + + #ifdef NEED_FUNCTION_mulu32_ +-uint32 mulu32_high; ++extern "C" uint32 mulu32_high = 0; + namespace cln { + uint32 mulu32_ (uint32 x, uint32 y) + { @@ -50,11 +50,11 @@ uint64 mulu32_w (uint32 arg1, uint32 arg2) #ifdef NEED_VAR_mulu64_high -uint64 mulu64_high; +extern "C" uint64 mulu64_high; #endif #ifdef NEED_FUNCTION_mulu64_ -uint64 mulu64_high; +extern "C" uint64 mulu64_high = 0; namespace cln { extern "C" uint64 mulu64_ (uint64 x, uint64 y); uint64 mulu64_ (uint64 x, uint64 y)