New port: math/flexfloat: C library for the emulation of reduced-precision floating point types
This commit is contained in:
parent
1b59ee4e02
commit
2da7c5a8f6
@ -261,6 +261,7 @@
|
|||||||
SUBDIR += fftw3-long
|
SUBDIR += fftw3-long
|
||||||
SUBDIR += fftw3-quad
|
SUBDIR += fftw3-quad
|
||||||
SUBDIR += flann
|
SUBDIR += flann
|
||||||
|
SUBDIR += flexfloat
|
||||||
SUBDIR += flint2
|
SUBDIR += flint2
|
||||||
SUBDIR += flintqs
|
SUBDIR += flintqs
|
||||||
SUBDIR += form
|
SUBDIR += form
|
||||||
|
|||||||
38
math/flexfloat/Makefile
Normal file
38
math/flexfloat/Makefile
Normal file
@ -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>
|
||||||
3
math/flexfloat/distinfo
Normal file
3
math/flexfloat/distinfo
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
TIMESTAMP = 1588634273
|
||||||
|
SHA256 (oprecomp-flexfloat-g20190814-6db869087a12d763a94d53e9b0a9d52def270865_GH0.tar.gz) = 889f1c31d0053f561cc8bfdf8f9c458bf1a8491d8ab9b3fe1b857c671359ba52
|
||||||
|
SIZE (oprecomp-flexfloat-g20190814-6db869087a12d763a94d53e9b0a9d52def270865_GH0.tar.gz) = 28313
|
||||||
11
math/flexfloat/files/patch-CMakeLists.txt
Normal file
11
math/flexfloat/files/patch-CMakeLists.txt
Normal file
@ -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)
|
||||||
|
|
||||||
16
math/flexfloat/files/patch-include_flexfloat.h
Normal file
16
math/flexfloat/files/patch-include_flexfloat.h
Normal file
@ -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))
|
||||||
4
math/flexfloat/pkg-descr
Normal file
4
math/flexfloat/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
FlexFloat is a C library for the emulation of reduced-precision floating point
|
||||||
|
types.
|
||||||
|
|
||||||
|
WWW: https://github.com/oprecomp/flexfloat
|
||||||
Loading…
x
Reference in New Issue
Block a user