View | Details | Raw Unified | Return to bug 278155 | Differences between
and this patch

Collapse All | Expand All

(-)b/math/libtommath/Makefile (-4 / +14 lines)
Lines 1-7 Link Here
1
PORTNAME=	libtommath
1
PORTNAME=	libtommath
2
DISTVERSION=	1.3.0
2
DISTVERSION=	1.3.0
3
PORTREVISION=	1
3
CATEGORIES=	math
4
CATEGORIES=	math
4
MASTER_SITES=	https://github.com/libtom/libtommath/releases/download/v${DISTVERSION}/
5
MASTER_SITES=	https://github.com/libtom/${PORTNAME}/releases/download/v${DISTVERSION}/
5
DISTNAME=	ltm-${DISTVERSION}
6
DISTNAME=	ltm-${DISTVERSION}
6
7
7
MAINTAINER=	gahr@FreeBSD.org
8
MAINTAINER=	gahr@FreeBSD.org
Lines 12-21 LICENSE= UNLICENSE Link Here
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
LICENSE_FILE=	${WRKSRC}/LICENSE
13
14
14
USES=		cmake:testing tar:xz
15
USES=		cmake:testing tar:xz
15
CMAKE_ARGS=	-DBUILD_TESTING:BOOL=ON \
16
USE_LDCONFIG=	yes
16
		-DCMAKE_INSTALL_PKGCONFIGDIR:STRING=libdata/pkgconfig
17
17
WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}
18
WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}
18
19
19
USE_LDCONFIG=	yes
20
CMAKE_ON=	BUILD_SHARED_LIBS
21
# Remove this in next release and use USES= pathfix instead
22
CMAKE_ARGS=	-DCMAKE_INSTALL_PKGCONFIGDIR:STRING=libdata/pkgconfig
23
24
OPTIONS_DEFINE=		LTO OPTIMIZED_CFLAGS
25
OPTIONS_DEFUALT=	LTO
26
27
LTO_CMAKE_BOOL=	COMPILE_LTO
28
29
OPTIMIZED_CFLAGS_CFLAGS=	-O3 -funroll-loops -fomit-frame-pointer
20
30
21
.include <bsd.port.mk>
31
.include <bsd.port.mk>
(-)b/math/libtommath/files/patch-CMakeLists.txt (-9 / +43 lines)
Lines 1-6 Link Here
1
--- CMakeLists.txt.orig	2024-03-27 13:30:15 UTC
1
--- CMakeLists.txt.orig	2024-03-27 13:30:15 UTC
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt
3
@@ -29,11 +29,6 @@ include(sources.cmake)
3
@@ -29,25 +29,6 @@ include(sources.cmake)
4
 include(sources.cmake)
4
 include(sources.cmake)
5
 
5
 
6
 #-----------------------------------------------------------------------------
6
 #-----------------------------------------------------------------------------
Lines 9-18 Link Here
9
-option(BUILD_SHARED_LIBS "Build shared library and only the shared library if \"ON\", default is static" OFF)
9
-option(BUILD_SHARED_LIBS "Build shared library and only the shared library if \"ON\", default is static" OFF)
10
-
10
-
11
-#-----------------------------------------------------------------------------
11
-#-----------------------------------------------------------------------------
12
 # Add support for ccache if desired
12
-# Add support for ccache if desired
13
-#-----------------------------------------------------------------------------
14
-find_program(CCACHE ccache)
15
-
16
-if(CCACHE)
17
-    option(ENABLE_CCACHE "Enable ccache." ON)
18
-endif()
19
-
20
-# use ccache if installed
21
-if(CCACHE AND ENABLE_CCACHE)
22
-    set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
23
-endif()
24
-
25
-#-----------------------------------------------------------------------------
26
 # Compose CFLAGS
13
 #-----------------------------------------------------------------------------
27
 #-----------------------------------------------------------------------------
14
 find_program(CCACHE ccache)
28
 
15
@@ -103,6 +98,7 @@ add_library(${PROJECT_NAME}
29
@@ -68,8 +49,8 @@ else()
30
     set(LTM_C_FLAGS -Wall -Wsign-compare -Wextra -Wshadow
31
                     -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align
32
                     -Wstrict-prototypes -Wpointer-arith -Wsystem-headers)
33
-    set(CMAKE_C_FLAGS_DEBUG "-g3")
34
-    set(CMAKE_C_FLAGS_RELEASE "-O3 -funroll-loops -fomit-frame-pointer")
35
+#    set(CMAKE_C_FLAGS_DEBUG "-g3")
36
+#    set(CMAKE_C_FLAGS_RELEASE "-O3 -funroll-loops -fomit-frame-pointer")
37
     set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g3 -O2")
38
     set(CMAKE_C_FLAGS_MINSIZEREL "-Os")
39
 endif()
40
@@ -78,7 +59,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "(C|c?)lang")
41
 if(CMAKE_C_COMPILER_ID MATCHES "(C|c?)lang")
42
     list(APPEND LTM_C_FLAGS -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header)
43
     # Clang requires at least '-O1' for dead code elimination
44
-    set(CMAKE_C_FLAGS_DEBUG "-O1 ${CMAKE_C_FLAGS_DEBUG}")
45
+#    set(CMAKE_C_FLAGS_DEBUG "-O1 ${CMAKE_C_FLAGS_DEBUG}")
46
 endif()
47
 if(CMAKE_C_COMPILER MATCHES "mingw")
48
     list(APPEND LTM_C_FLAGS -Wno-shadow -Wno-expansion-to-defined -Wno-declaration-after-statement -Wno-bad-function-cast)
49
@@ -103,6 +84,7 @@ add_library(${PROJECT_NAME}
16
 # library target
50
 # library target
17
 #-----------------------------------------------------------------------------
51
 #-----------------------------------------------------------------------------
18
 add_library(${PROJECT_NAME}
52
 add_library(${PROJECT_NAME}
Lines 20-26 Link Here
20
     ${SOURCES}
54
     ${SOURCES}
21
     ${HEADERS}
55
     ${HEADERS}
22
 )
56
 )
23
@@ -125,12 +121,23 @@ endif()
57
@@ -125,12 +107,23 @@ endif()
24
     list(APPEND PUBLIC_HEADERS tommath_c89.h)
58
     list(APPEND PUBLIC_HEADERS tommath_c89.h)
25
 endif()
59
 endif()
26
 
60
 
Lines 44-50 Link Here
44
 
78
 
45
 option(COMPILE_LTO "Build with LTO enabled")
79
 option(COMPILE_LTO "Build with LTO enabled")
46
 if(COMPILE_LTO)
80
 if(COMPILE_LTO)
47
@@ -159,7 +166,7 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
81
@@ -159,7 +152,7 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
48
 set(PROJECT_CONFIG_FILE "${PROJECT_NAME}-config.cmake")
82
 set(PROJECT_CONFIG_FILE "${PROJECT_NAME}-config.cmake")
49
 set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
83
 set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
50
 
84
 
Lines 53-59 Link Here
53
     EXPORT ${TARGETS_EXPORT_NAME}
87
     EXPORT ${TARGETS_EXPORT_NAME}
54
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
88
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
55
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
89
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
56
@@ -168,20 +175,18 @@ install(TARGETS ${PROJECT_NAME}
90
@@ -168,20 +161,18 @@ install(TARGETS ${PROJECT_NAME}
57
 )
91
 )
58
 
92
 
59
 # Install libtommath.pc for pkg-config if we build a shared library
93
 # Install libtommath.pc for pkg-config if we build a shared library
Lines 84-90 Link Here
84
 
118
 
85
 # generate package version file
119
 # generate package version file
86
 write_basic_package_version_file(
120
 write_basic_package_version_file(
87
@@ -262,18 +267,11 @@ endif()
121
@@ -262,18 +253,11 @@ endif()
88
     list(APPEND CPACK_GENERATOR FREEBSD)
122
     list(APPEND CPACK_GENERATOR FREEBSD)
89
 endif()
123
 endif()
90
 
124
 
Lines 105-111 Link Here
105
 set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
139
 set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
106
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibTomMath")
140
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibTomMath")
107
 set(CPACK_PACKAGE_VENDOR "libtom projects")
141
 set(CPACK_PACKAGE_VENDOR "libtom projects")
108
@@ -287,15 +285,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
142
@@ -287,15 +271,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
109
 set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
143
 set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
110
 set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE_VERSION})
144
 set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE_VERSION})
111
 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
145
 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)

Return to bug 278155