git: 9a7bab09e58e - main - math/openlibm: Update to 0.8.4
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 16 Nov 2024 18:30:45 UTC
The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=9a7bab09e58ed1ec6b404705b222833bc1263005 commit 9a7bab09e58ed1ec6b404705b222833bc1263005 Author: Daniel Engberg <diizzy@FreeBSD.org> AuthorDate: 2024-11-16 18:25:55 +0000 Commit: Daniel Engberg <diizzy@FreeBSD.org> CommitDate: 2024-11-16 18:29:09 +0000 math/openlibm: Update to 0.8.4 Changelog: https://github.com/JuliaMath/openlibm/releases/tag/v0.8.4 --- math/openlibm/Makefile | 41 +++++++++------------ math/openlibm/distinfo | 6 +-- math/openlibm/files/patch-CMakeLists.txt | 63 ++++++++++++++++++++++++++++++++ math/openlibm/files/patch-Makefile | 32 ---------------- math/openlibm/pkg-plist | 7 +++- 5 files changed, 88 insertions(+), 61 deletions(-) diff --git a/math/openlibm/Makefile b/math/openlibm/Makefile index f837894ade05..5544fbfc579e 100644 --- a/math/openlibm/Makefile +++ b/math/openlibm/Makefile @@ -1,6 +1,6 @@ PORTNAME= openlibm DISTVERSIONPREFIX= v -DISTVERSION= 0.8.0 +DISTVERSION= 0.8.4 CATEGORIES= math MAINTAINER= ports@FreeBSD.org @@ -13,35 +13,28 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.md BROKEN_armv6= fails to compile: a parameter list without types is only allowed in a function definition BROKEN_armv7= fails to compile: a parameter list without types is only allowed in a function definition -BROKEN_mips= fails to compile: No rule to make target mips/Make.files -BROKEN_mips64= fails to compile: No rule to make target mips64/Make.files -BROKEN_riscv64= fails to compile: No rule to make target riscv64/Make.files -USES= gmake +USES= cmake +USE_LDCONFIG= yes + USE_GITHUB= yes GH_ACCOUNT= JuliaMath -USE_LDCONFIG= yes .include <bsd.port.options.mk> -.if ${ARCH:Mpowerpc*} -USES+= compiler:gcc-c++11-lib -.else -USES+= compiler:c11 -.endif - -.include <bsd.port.pre.mk> - -MAKE_ENV+= prefix=${PREFIX} ${MAKE_ENV_${CHOSEN_COMPILER_TYPE}} -MAKE_ENV_gcc= USEGCC=1 USECLANG=0 -MAKE_ENV_clang= USEGCC=0 USECLANG=1 +# Arch specific headers -TEST_TARGET= check +.if ${ARCH} == amd64 +PLIST_FILES= include/openlibm/bsd_asm.h \ + include/openlibm/bsd_fpu.h \ + include/openlibm/bsd_ieeefp.h +.endif -post-patch: - ${REINPLACE_CMD} -e 's/USEGCC =/USEGCC ?=/g' \ - -e 's/USECLANG =/USECLANG ?=/g' \ - -e '/TOOLPREFIX)gcc/s/$$/${GCC_DEFAULT}/g' \ - ${WRKSRC}/Make.inc +.if ${ARCH} == i386 +PLIST_FILES= include/openlibm/bsd_asm.h \ + include/openlibm/bsd_ieeefp.h \ + include/openlibm/bsd_npx.h \ + include/openlibm/osx_asm.h +.endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/math/openlibm/distinfo b/math/openlibm/distinfo index 3e2a18129a1c..cb40536beaf6 100644 --- a/math/openlibm/distinfo +++ b/math/openlibm/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1640769232 -SHA256 (JuliaMath-openlibm-v0.8.0_GH0.tar.gz) = 03620768df4ca526a63dd675c6de95a5c9d167ff59555ce57a61c6bf49e400ee -SIZE (JuliaMath-openlibm-v0.8.0_GH0.tar.gz) = 367130 +TIMESTAMP = 1731740290 +SHA256 (JuliaMath-openlibm-v0.8.4_GH0.tar.gz) = c0bac12a6596f2315341790a7f386f9162a5b1f98db9ec40d883fce64e231942 +SIZE (JuliaMath-openlibm-v0.8.4_GH0.tar.gz) = 373409 diff --git a/math/openlibm/files/patch-CMakeLists.txt b/math/openlibm/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..be7faf25e30a --- /dev/null +++ b/math/openlibm/files/patch-CMakeLists.txt @@ -0,0 +1,63 @@ +--- CMakeLists.txt.orig 2024-11-09 13:40:26 UTC ++++ CMakeLists.txt +@@ -11,6 +11,7 @@ add_library("${PROJECT_NAME}") + option(BUILD_SHARED_LIBS "Build using shared libraries" ON) + + add_library("${PROJECT_NAME}") ++set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 0.8.4 SOVERSION 4) + + # Find the relevant folder depending on the architecture + set(OPENLIBM_ARCH_FOLDER ${CMAKE_SYSTEM_PROCESSOR}) +@@ -22,7 +23,7 @@ elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "armv7-a") + set(OPENLIBM_ARCH_FOLDER "aarch64") + elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "armv7-a") + set(OPENLIBM_ARCH_FOLDER "arm") +-elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "x86" OR ${OPENLIBM_ARCH_FOLDER} STREQUAL "i686") ++elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "x86" OR ${OPENLIBM_ARCH_FOLDER} STREQUAL "i686" OR ${OPENLIBM_ARCH_FOLDER} STREQUAL "i386") + set(OPENLIBM_ARCH_FOLDER "i387") + elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "powerpc") + set(OPENLIBM_ARCH_FOLDER "powerpc") +@@ -37,7 +38,7 @@ list(APPEND C_ASM_COMPILE_FLAGS "-Wall" "-Wno-implicit + list(APPEND C_ASM_COMPILE_FLAGS "-ffp-contract=off" "-fno-fast-math" "-fno-rounding-math" "-fno-math-errno") + list(APPEND C_ASM_COMPILE_FLAGS "-fPIC" "-std=c99" "-fno-builtin") + list(APPEND C_ASM_COMPILE_FLAGS "-Wall" "-Wno-implicit-function-declaration") +-list(APPEND C_ASM_COMPILE_FLAGS "-DASSEMBLER" "-D__BSD_VISIBLE" "-O3") ++list(APPEND C_ASM_COMPILE_FLAGS "-DASSEMBLER" "-D__BSD_VISIBLE") + + # Compiler-specific compile flags + if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") +@@ -50,9 +51,9 @@ if(${OPENLIBM_ARCH_FOLDER} STREQUAL "i387") + + # Architecture-specific compile flags - take advantage of sse on x86 + if(${OPENLIBM_ARCH_FOLDER} STREQUAL "i387") +- list(APPEND C_ASM_COMPILE_FLAGS "-march=i686" "-m32" "-msse2" "-mfpmath=sse") +-elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "amd64") +- list(APPEND C_ASM_COMPILE_FLAGS "-m64" "-msse2" "-mfpmath=sse") ++# list(APPEND C_ASM_COMPILE_FLAGS "-march=i686" "-m32" "-msse2" "-mfpmath=sse") ++#elseif(${OPENLIBM_ARCH_FOLDER} STREQUAL "amd64") ++# list(APPEND C_ASM_COMPILE_FLAGS "-m64" "-msse2" "-mfpmath=sse") + endif() + + # Suppress warnings if requested +@@ -560,7 +561,7 @@ set_target_properties("${PROJECT_NAME}" PROPERTIES PUB + + file(GLOB PUBLIC_HEADERS "*.h" "include/*.h" "${OPENLIBM_ARCH_FOLDER}/*.h" "src/*.h") + set_target_properties("${PROJECT_NAME}" PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") +-install (TARGETS "${PROJECT_NAME}") ++install (TARGETS "${PROJECT_NAME}" PUBLIC_HEADER DESTINATION include/openlibm) + + # Can't use configure_file because openlibm.pc.in uses $var instead of CMake configure @var's + # Would rather string replace variables here instead of editing .pc.in, because editing .pc.in +@@ -568,9 +569,9 @@ string(PREPEND PC_FILE "prefix=${CMAKE_INSTALL_PREFIX} + file(READ "${PROJECT_SRC}/openlibm.pc.in" PC_FILE) + string(REPLACE "\${version}" ${CMAKE_PROJECT_VERSION} PC_FILE ${PC_FILE}) + string(PREPEND PC_FILE "prefix=${CMAKE_INSTALL_PREFIX} +-includedir=\${prefix}/${CMAKE_INSTALL_INCLUDEDIR} +-libdir=\${prefix}/${CMAKE_INSTALL_LIBDIR}\n ++includedir=\${prefix}/include/openlibm ++libdir=\${prefix}/lib\n + ") + file(WRITE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" ${PC_FILE}) + install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig") diff --git a/math/openlibm/files/patch-Makefile b/math/openlibm/files/patch-Makefile deleted file mode 100644 index 67a52650033d..000000000000 --- a/math/openlibm/files/patch-Makefile +++ /dev/null @@ -1,32 +0,0 @@ ---- Makefile.orig 2021-09-14 16:35:03 UTC -+++ Makefile -@@ -92,7 +92,7 @@ openlibm.pc: openlibm.pc.in Make.inc Makefile - - install-static: libopenlibm.a - mkdir -p $(DESTDIR)$(libdir) -- cp -RpP -f libopenlibm.a $(DESTDIR)$(libdir)/ -+ $(BSD_INSTALL_DATA) libopenlibm.a $(DESTDIR)$(libdir)/ - - install-shared: libopenlibm.$(OLM_MAJOR_MINOR_SHLIB_EXT) - mkdir -p $(DESTDIR)$(shlibdir) -@@ -101,16 +101,16 @@ ifeq ($(OS), WINNT) - cp -RpP -f libopenlibm.*$(SHLIB_EXT) $(DESTDIR)$(shlibdir)/ - cp -RpP -f libopenlibm.*$(SHLIB_EXT).a $(DESTDIR)$(libdir)/ - else -- cp -RpP -f libopenlibm.*$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/ -+ $(BSD_INSTALL_LIB) libopenlibm.*$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/ - endif - - install-pkgconfig: openlibm.pc - mkdir -p $(DESTDIR)$(pkgconfigdir) -- cp -RpP -f openlibm.pc $(DESTDIR)$(pkgconfigdir)/ -+ $(BSD_INSTALL_DATA) openlibm.pc $(DESTDIR)$(pkgconfigdir)/ - - install-headers: - mkdir -p $(DESTDIR)$(includedir)/openlibm -- cp -RpP -f include/*.h $(DESTDIR)$(includedir)/openlibm -- cp -RpP -f src/*.h $(DESTDIR)$(includedir)/openlibm -+ $(BSD_INSTALL_DATA) include/*.h $(DESTDIR)$(includedir)/openlibm -+ $(BSD_INSTALL_DATA) src/*.h $(DESTDIR)$(includedir)/openlibm - - install: install-static install-shared install-pkgconfig install-headers diff --git a/math/openlibm/pkg-plist b/math/openlibm/pkg-plist index 18cc48fea40f..a7d6e7ab9484 100644 --- a/math/openlibm/pkg-plist +++ b/math/openlibm/pkg-plist @@ -6,6 +6,7 @@ include/openlibm/fpmath.h include/openlibm/i386_fpmath.h include/openlibm/k_log.h include/openlibm/k_logf.h +include/openlibm/loongarch64_fpmath.h include/openlibm/math_private.h include/openlibm/math_private_openbsd.h include/openlibm/mips_fpmath.h @@ -16,15 +17,17 @@ include/openlibm/openlibm_fenv.h include/openlibm/openlibm_fenv_amd64.h include/openlibm/openlibm_fenv_arm.h include/openlibm/openlibm_fenv_i387.h +include/openlibm/openlibm_fenv_loongarch64.h include/openlibm/openlibm_fenv_mips.h include/openlibm/openlibm_fenv_powerpc.h +include/openlibm/openlibm_fenv_riscv.h include/openlibm/openlibm_fenv_s390.h include/openlibm/openlibm_math.h include/openlibm/powerpc_fpmath.h +include/openlibm/riscv_fpmath.h include/openlibm/s390_fpmath.h include/openlibm/types-compat.h -lib/libopenlibm.a lib/libopenlibm.so +lib/libopenlibm.so.0.8.4 lib/libopenlibm.so.4 -lib/libopenlibm.so.4.0 libdata/pkgconfig/openlibm.pc