aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2024-04-07 07:39:05 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2024-04-07 07:53:52 +0000
commit5577bdee02af093f91c245e062200ab10f351536 (patch)
tree60d1aa76a677ea73673c0cc256f35d501c9502c4
parent5bf0d42cf369cb276f1cf285438f97fd981de05d (diff)
downloadports-5577bdee02af093f91c245e062200ab10f351536.tar.gz
ports-5577bdee02af093f91c245e062200ab10f351536.zip
math/libtommath: revert: Fix previous commit 8509bb6"
This reverts commit 073a0a9e92f1f235c770c20f8e5c83bb893dcf9c.
-rw-r--r--math/libtommath/Makefile21
-rw-r--r--math/libtommath/files/patch-CMakeLists.txt42
2 files changed, 19 insertions, 44 deletions
diff --git a/math/libtommath/Makefile b/math/libtommath/Makefile
index 15711072a63e..fbe85a92e75d 100644
--- a/math/libtommath/Makefile
+++ b/math/libtommath/Makefile
@@ -2,7 +2,7 @@ PORTNAME= libtommath
DISTVERSION= 1.3.0
PORTREVISION= 2
CATEGORIES= math
-MASTER_SITES= https://github.com/libtom/${PORTNAME}/releases/download/v${DISTVERSION}/
+MASTER_SITES= https://github.com/libtom/libtommath/releases/download/v${DISTVERSION}/
DISTNAME= ltm-${DISTVERSION}
MAINTAINER= gahr@FreeBSD.org
@@ -13,19 +13,16 @@ LICENSE= UNLICENSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cmake:testing tar:xz
-USE_LDCONFIG= yes
-
-WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
-
-CMAKE_ON= BUILD_SHARED_LIBS
-# Remove this in next release and use USES= pathfix instead
-CMAKE_ARGS= -DCMAKE_INSTALL_PKGCONFIGDIR:STRING=libdata/pkgconfig
-
-OPTIONS_DEFINE= LTO OPTIMIZED_CFLAGS
-OPTIONS_DEFAULT= LTO OPTIMIZED_CFLAGS
+OPTIONS_DEFINE= OPTIMIZED_CFLAGS LTO
+OPTIONS_DEFAULT=OPTIMIZED_CFLAGS LTO
+OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops -fomit-frame-pointer
LTO_CMAKE_BOOL= COMPILE_LTO
-OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops -fomit-frame-pointer
+CMAKE_ARGS= -DBUILD_TESTING:BOOL=ON \
+ -DCMAKE_INSTALL_PKGCONFIGDIR:STRING=libdata/pkgconfig
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
+
+USE_LDCONFIG= yes
.include <bsd.port.mk>
diff --git a/math/libtommath/files/patch-CMakeLists.txt b/math/libtommath/files/patch-CMakeLists.txt
index d4514a1a4e68..5a6bef8dcf3a 100644
--- a/math/libtommath/files/patch-CMakeLists.txt
+++ b/math/libtommath/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
--- CMakeLists.txt.orig 2024-03-27 13:30:15 UTC
+++ CMakeLists.txt
-@@ -29,25 +29,6 @@ include(sources.cmake)
+@@ -29,11 +29,6 @@ include(sources.cmake)
include(sources.cmake)
#-----------------------------------------------------------------------------
@@ -9,24 +9,10 @@
-option(BUILD_SHARED_LIBS "Build shared library and only the shared library if \"ON\", default is static" OFF)
-
-#-----------------------------------------------------------------------------
--# Add support for ccache if desired
--#-----------------------------------------------------------------------------
--find_program(CCACHE ccache)
--
--if(CCACHE)
-- option(ENABLE_CCACHE "Enable ccache." ON)
--endif()
--
--# use ccache if installed
--if(CCACHE AND ENABLE_CCACHE)
-- set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
--endif()
--
--#-----------------------------------------------------------------------------
- # Compose CFLAGS
+ # Add support for ccache if desired
#-----------------------------------------------------------------------------
-
-@@ -68,17 +49,17 @@ else()
+ find_program(CCACHE ccache)
+@@ -68,10 +63,10 @@ else()
set(LTM_C_FLAGS -Wall -Wsign-compare -Wextra -Wshadow
-Wdeclaration-after-statement -Wbad-function-cast -Wcast-align
-Wstrict-prototypes -Wpointer-arith -Wsystem-headers)
@@ -41,15 +27,7 @@
endif()
# What compiler do we have and what are their...uhm... peculiarities
- if(CMAKE_C_COMPILER_ID MATCHES "(C|c?)lang")
- list(APPEND LTM_C_FLAGS -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header)
- # Clang requires at least '-O1' for dead code elimination
-- set(CMAKE_C_FLAGS_DEBUG "-O1 ${CMAKE_C_FLAGS_DEBUG}")
-+# set(CMAKE_C_FLAGS_DEBUG "-O1 ${CMAKE_C_FLAGS_DEBUG}")
- endif()
- if(CMAKE_C_COMPILER MATCHES "mingw")
- list(APPEND LTM_C_FLAGS -Wno-shadow -Wno-expansion-to-defined -Wno-declaration-after-statement -Wno-bad-function-cast)
-@@ -103,6 +84,7 @@ add_library(${PROJECT_NAME}
+@@ -103,6 +98,7 @@ add_library(${PROJECT_NAME}
# library target
#-----------------------------------------------------------------------------
add_library(${PROJECT_NAME}
@@ -57,7 +35,7 @@
${SOURCES}
${HEADERS}
)
-@@ -125,12 +107,23 @@ endif()
+@@ -125,12 +121,23 @@ endif()
list(APPEND PUBLIC_HEADERS tommath_c89.h)
endif()
@@ -81,7 +59,7 @@
option(COMPILE_LTO "Build with LTO enabled")
if(COMPILE_LTO)
-@@ -159,7 +152,7 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
+@@ -159,7 +166,7 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(PROJECT_CONFIG_FILE "${PROJECT_NAME}-config.cmake")
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
@@ -90,7 +68,7 @@
EXPORT ${TARGETS_EXPORT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
-@@ -168,20 +161,18 @@ install(TARGETS ${PROJECT_NAME}
+@@ -168,20 +175,18 @@ install(TARGETS ${PROJECT_NAME}
)
# Install libtommath.pc for pkg-config if we build a shared library
@@ -121,7 +99,7 @@
# generate package version file
write_basic_package_version_file(
-@@ -262,18 +253,11 @@ endif()
+@@ -262,18 +267,11 @@ endif()
list(APPEND CPACK_GENERATOR FREEBSD)
endif()
@@ -142,7 +120,7 @@
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibTomMath")
set(CPACK_PACKAGE_VENDOR "libtom projects")
-@@ -287,15 +271,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+@@ -287,15 +285,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE_VERSION})
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)