diff options
-rw-r--r-- | math/Makefile | 1 | ||||
-rw-r--r-- | math/flexfloat/Makefile | 38 | ||||
-rw-r--r-- | math/flexfloat/distinfo | 3 | ||||
-rw-r--r-- | math/flexfloat/files/patch-CMakeLists.txt | 11 | ||||
-rw-r--r-- | math/flexfloat/files/patch-include_flexfloat.h | 16 | ||||
-rw-r--r-- | math/flexfloat/pkg-descr | 4 |
6 files changed, 73 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile index 5e24e9b55717..def86bec4cb7 100644 --- a/math/Makefile +++ b/math/Makefile @@ -261,6 +261,7 @@ SUBDIR += fftw3-long SUBDIR += fftw3-quad SUBDIR += flann + SUBDIR += flexfloat SUBDIR += flint2 SUBDIR += flintqs SUBDIR += form diff --git a/math/flexfloat/Makefile b/math/flexfloat/Makefile new file mode 100644 index 000000000000..98ed2e6cae14 --- /dev/null +++ b/math/flexfloat/Makefile @@ -0,0 +1,38 @@ +# $FreeBSD$ + +PORTNAME= flexfloat +DISTVERSION= g20190814 +CATEGORIES= math + +MAINTAINER= yuri@FreeBSD.org +COMMENT= C library for the emulation of reduced-precision floating point types + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= cmake +USE_GITHUB= yes +GH_ACCOUNT= oprecomp +GH_TAGNAME= 6db869087a12d763a94d53e9b0a9d52def270865 +USE_LDCONFIG= yes +USE_GCC= any # clang doesn't support __float128 + +CMAKE_OFF= BUILD_TESTS BUILD_EXAMPLES + +PLIST_FILES= include/flexfloat/flexfloat.h \ + include/flexfloat/flexfloat.hpp \ + include/flexfloat/flexfloat_config.h \ + lib/libflexfloat.so + +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/include/flexfloat + ${INSTALL_DATA} ${WRKSRC}/include/*.h ${WRKSRC}/include/*.hpp ${STAGEDIR}${PREFIX}/include/flexfloat + ${INSTALL_LIB} ${BUILD_WRKSRC}/libflexfloat.so ${STAGEDIR}${PREFIX}/lib + +do-test: # one test, value_representation_half, fails: https://github.com/oprecomp/flexfloat/issues/9 + @cd ${BUILD_WRKSRC} && \ + ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DBUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test + +.include <bsd.port.mk> diff --git a/math/flexfloat/distinfo b/math/flexfloat/distinfo new file mode 100644 index 000000000000..2c949f5fb03c --- /dev/null +++ b/math/flexfloat/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1588634273 +SHA256 (oprecomp-flexfloat-g20190814-6db869087a12d763a94d53e9b0a9d52def270865_GH0.tar.gz) = 889f1c31d0053f561cc8bfdf8f9c458bf1a8491d8ab9b3fe1b857c671359ba52 +SIZE (oprecomp-flexfloat-g20190814-6db869087a12d763a94d53e9b0a9d52def270865_GH0.tar.gz) = 28313 diff --git a/math/flexfloat/files/patch-CMakeLists.txt b/math/flexfloat/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..6abb8483323d --- /dev/null +++ b/math/flexfloat/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2020-05-04 23:28:52 UTC ++++ CMakeLists.txt +@@ -29,7 +29,7 @@ set(library_SOURCES + src/flexfloat.c + ) + +-add_library(flexfloat STATIC ${library_SOURCES}) ++add_library(flexfloat SHARED ${library_SOURCES}) + + target_include_directories(flexfloat PUBLIC ${PROJECT_SOURCE_DIR}/include) + diff --git a/math/flexfloat/files/patch-include_flexfloat.h b/math/flexfloat/files/patch-include_flexfloat.h new file mode 100644 index 000000000000..849c5452902c --- /dev/null +++ b/math/flexfloat/files/patch-include_flexfloat.h @@ -0,0 +1,16 @@ +--- include/flexfloat.h.orig 2020-05-04 23:21:19 UTC ++++ include/flexfloat.h +@@ -40,9 +40,10 @@ extern "C" { + #pragma STDC FENV_ACCESS ON + #endif + +-#ifndef __STDC_IEC_559__ +-#error "Implementation not IEEE compliant" +-#endif ++// not clear why this should/shouldn't ++//#ifndef __STDC_IEC_559__ ++//#error "Implementation not IEEE compliant" ++//#endif + + // GCC versions before 8.2 (for sure not on 7.2, don't know when it was fixed) don't raise flags on comparisons correctly + #if !defined(__GNUC__) || (defined(__GNUC__) && (__GNUC__ >= 8) && (__GNUC_MINOR__ >= 2)) diff --git a/math/flexfloat/pkg-descr b/math/flexfloat/pkg-descr new file mode 100644 index 000000000000..eb7ffe25f82d --- /dev/null +++ b/math/flexfloat/pkg-descr @@ -0,0 +1,4 @@ +FlexFloat is a C library for the emulation of reduced-precision floating point +types. + +WWW: https://github.com/oprecomp/flexfloat |