math/libtommath: small improvements
* remove built-in ccache detection (missing in my previous commit) * remove superfluous -DBUILD_TESTING:BOOL=ON in CMAKE_ARGS Suggested by: diizzy
This commit is contained in:
parent
5577bdee02
commit
c2466b5658
@ -19,8 +19,7 @@ OPTIONS_DEFAULT=OPTIMIZED_CFLAGS LTO
|
|||||||
OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops -fomit-frame-pointer
|
OPTIMIZED_CFLAGS_CFLAGS= -O3 -funroll-loops -fomit-frame-pointer
|
||||||
LTO_CMAKE_BOOL= COMPILE_LTO
|
LTO_CMAKE_BOOL= COMPILE_LTO
|
||||||
|
|
||||||
CMAKE_ARGS= -DBUILD_TESTING:BOOL=ON \
|
CMAKE_ARGS= -DCMAKE_INSTALL_PKGCONFIGDIR:STRING=libdata/pkgconfig
|
||||||
-DCMAKE_INSTALL_PKGCONFIGDIR:STRING=libdata/pkgconfig
|
|
||||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
|
||||||
|
|
||||||
USE_LDCONFIG= yes
|
USE_LDCONFIG= yes
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
--- CMakeLists.txt.orig 2024-03-27 13:30:15 UTC
|
--- CMakeLists.txt.orig 2024-03-27 13:30:15 UTC
|
||||||
+++ CMakeLists.txt
|
+++ CMakeLists.txt
|
||||||
@@ -29,11 +29,6 @@ include(sources.cmake)
|
@@ -29,25 +29,6 @@ include(sources.cmake)
|
||||||
include(sources.cmake)
|
include(sources.cmake)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
@ -9,10 +9,24 @@
|
|||||||
-option(BUILD_SHARED_LIBS "Build shared library and only the shared library if \"ON\", default is static" OFF)
|
-option(BUILD_SHARED_LIBS "Build shared library and only the shared library if \"ON\", default is static" OFF)
|
||||||
-
|
-
|
||||||
-#-----------------------------------------------------------------------------
|
-#-----------------------------------------------------------------------------
|
||||||
# Add support for ccache if desired
|
-# 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
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
find_program(CCACHE ccache)
|
|
||||||
@@ -68,10 +63,10 @@ else()
|
@@ -68,10 +49,10 @@ else()
|
||||||
set(LTM_C_FLAGS -Wall -Wsign-compare -Wextra -Wshadow
|
set(LTM_C_FLAGS -Wall -Wsign-compare -Wextra -Wshadow
|
||||||
-Wdeclaration-after-statement -Wbad-function-cast -Wcast-align
|
-Wdeclaration-after-statement -Wbad-function-cast -Wcast-align
|
||||||
-Wstrict-prototypes -Wpointer-arith -Wsystem-headers)
|
-Wstrict-prototypes -Wpointer-arith -Wsystem-headers)
|
||||||
@ -27,7 +41,7 @@
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# What compiler do we have and what are their...uhm... peculiarities
|
# What compiler do we have and what are their...uhm... peculiarities
|
||||||
@@ -103,6 +98,7 @@ add_library(${PROJECT_NAME}
|
@@ -103,6 +84,7 @@ add_library(${PROJECT_NAME}
|
||||||
# library target
|
# library target
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
add_library(${PROJECT_NAME}
|
add_library(${PROJECT_NAME}
|
||||||
@ -35,7 +49,7 @@
|
|||||||
${SOURCES}
|
${SOURCES}
|
||||||
${HEADERS}
|
${HEADERS}
|
||||||
)
|
)
|
||||||
@@ -125,12 +121,23 @@ endif()
|
@@ -125,12 +107,23 @@ endif()
|
||||||
list(APPEND PUBLIC_HEADERS tommath_c89.h)
|
list(APPEND PUBLIC_HEADERS tommath_c89.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -59,7 +73,7 @@
|
|||||||
|
|
||||||
option(COMPILE_LTO "Build with LTO enabled")
|
option(COMPILE_LTO "Build with LTO enabled")
|
||||||
if(COMPILE_LTO)
|
if(COMPILE_LTO)
|
||||||
@@ -159,7 +166,7 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
@@ -159,7 +152,7 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
||||||
set(PROJECT_CONFIG_FILE "${PROJECT_NAME}-config.cmake")
|
set(PROJECT_CONFIG_FILE "${PROJECT_NAME}-config.cmake")
|
||||||
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
||||||
|
|
||||||
@ -68,7 +82,7 @@
|
|||||||
EXPORT ${TARGETS_EXPORT_NAME}
|
EXPORT ${TARGETS_EXPORT_NAME}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
|
||||||
@@ -168,20 +175,18 @@ install(TARGETS ${PROJECT_NAME}
|
@@ -168,20 +161,18 @@ install(TARGETS ${PROJECT_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Install libtommath.pc for pkg-config if we build a shared library
|
# Install libtommath.pc for pkg-config if we build a shared library
|
||||||
@ -99,7 +113,7 @@
|
|||||||
|
|
||||||
# generate package version file
|
# generate package version file
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
@@ -262,18 +267,11 @@ endif()
|
@@ -262,18 +253,11 @@ endif()
|
||||||
list(APPEND CPACK_GENERATOR FREEBSD)
|
list(APPEND CPACK_GENERATOR FREEBSD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -120,7 +134,7 @@
|
|||||||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibTomMath")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibTomMath")
|
||||||
set(CPACK_PACKAGE_VENDOR "libtom projects")
|
set(CPACK_PACKAGE_VENDOR "libtom projects")
|
||||||
@@ -287,15 +285,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
@@ -287,15 +271,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||||
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
|
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
|
||||||
set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE_VERSION})
|
set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE_VERSION})
|
||||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user