diff options
| author | Ingar <ingar@telenet.be> | 2025-12-13 10:53:59 +0000 |
|---|---|---|
| committer | Ingar <ingar@telenet.be> | 2025-12-13 10:53:59 +0000 |
| commit | aef08780d582a7dd0aef42bec93705618c5b4855 (patch) | |
| tree | cecced92c52f43b295c1c80373fcf70d8b258353 | |
| parent | b0daecfb780c9a9d7f8b2daf76344f71e315af76 (diff) | |
Updated to v2.1.7.
| -rw-r--r-- | CMakeCommon.cmake | 204 | ||||
| -rw-r--r-- | PKGBUILD | 8 |
2 files changed, 2 insertions, 210 deletions
diff --git a/CMakeCommon.cmake b/CMakeCommon.cmake deleted file mode 100644 index 1ffe6c6..0000000 --- a/CMakeCommon.cmake +++ /dev/null @@ -1,204 +0,0 @@ -include(CheckCCompilerFlag) - -# C++17 Support -if(NOT ANDROID) - set(CMAKE_CXX_STANDARD 17) - set(CMAKE_CXX_STANDARD_REQUIRED ON) -endif() - -# Position Independent Code -set(CMAKE_POSITION_INDEPENDENT_CODE ON) - -# Ccache support -if(ANDROID OR UNIX OR APPLE) - find_program(CCACHE_FOUND ccache) - set(CCACHE_SUPPORT OFF CACHE BOOL "Enable ccache support") - if((CCACHE_FOUND OR ANDROID) AND CCACHE_SUPPORT MATCHES ON) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) - endif() -endif() - -# Add security (hardening flags) -if(UNIX OR APPLE OR ANDROID) - # Older compilers are predefining _FORTIFY_SOURCE, so defining it causes a - # warning, which is then considered an error. Second issue is that for - # these compilers, _FORTIFY_SOURCE must be used while optimizing, else - # causes a warning, which also results in an error. And finally, CMake is - # not using optimization when testing for libraries, hence breaking the build. - check_c_compiler_flag("-Werror -D_FORTIFY_SOURCE=2" COMPATIBLE_FORTIFY_SOURCE) - if( - COMPATIBLE_FORTIFY_SOURCE - AND NOT CMAKE_BUILD_TYPE MATCHES "Debug" - ) - set(SEC_COMP_FLAGS "-D_FORTIFY_SOURCE=2") - endif() - set(SEC_COMP_FLAGS "${SEC_COMP_FLAGS} -fstack-protector-all -fPIE") - # Make sure to add optimization flag. Some systems require this for _FORTIFY_SOURCE. - if( - NOT CMAKE_BUILD_TYPE MATCHES "MinSizeRel" - AND NOT CMAKE_BUILD_TYPE MATCHES "Release" - AND NOT CMAKE_BUILD_TYPE MATCHES "Debug" - ) - set(SEC_COMP_FLAGS "${SEC_COMP_FLAGS} -O1") - endif() - if( - NOT ANDROID - AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" - AND NOT APPLE - AND NOT CYGWIN - ) - set(SEC_COMP_FLAGS "${SEC_COMP_FLAGS} -Wa,--noexecstack") - endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SEC_COMP_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEC_COMP_FLAGS}") - set(SEC_LINK_FLAGS "") - if(NOT APPLE AND NOT CYGWIN) - set( - SEC_LINK_FLAGS - "${SEC_LINK_FLAGS} -Wl,-z,nodump -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now" - ) - endif() - if(NOT ANDROID AND NOT APPLE) - set(SEC_LINK_FLAGS "${SEC_LINK_FLAGS} -pie") - endif() - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SEC_LINK_FLAGS}") - set( - CMAKE_SHARED_LINKER_FLAGS - "${CMAKE_SHARED_LINKER_FLAGS} ${SEC_LINK_FLAGS} " - ) -endif() - -# Warning, debug and linker flags -set( - FIX_WARNINGS - OFF - CACHE BOOL - "Enable strict compilation mode to turn compiler warnings to errors" -) -if(UNIX OR APPLE) - set(COMP_FLAGS "") - set(LINKER_FLAGS "") - # Verbose warnings and turns all to errors - set(COMP_FLAGS "${COMP_FLAGS} -Wall -Wextra") - if(FIX_WARNINGS) - set(COMP_FLAGS "${COMP_FLAGS} -Werror") - endif() - # Omit problematic warnings - if( - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" - AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.9.9 - ) - set(COMP_FLAGS "${COMP_FLAGS} -Wno-format-truncation") - endif() - check_c_compiler_flag( - "-Werror=stringop-truncation" - COMPATIBLE_STRINGOP_TRUNCATION - ) - if(${COMPATIBLE_STRINGOP_TRUNCATION}) - set(COMP_FLAGS "${COMP_FLAGS} -Werror=stringop-truncation") - endif() - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - set(COMP_FLAGS "${COMP_FLAGS} -Wno-nonnull -Wno-deprecated-declarations") - endif() - - check_c_compiler_flag("-Werror=unused-parameter" COMPATIBLE_UNUSED_PARAMETER) - if(${COMPATIBLE_UNUSED_PARAMETER}) - set(COMP_FLAGS "${COMP_FLAGS} -Werror=unused-parameter") - endif() - - check_c_compiler_flag( - "-Werror=unused-but-set-variable" - COMPATIBLE_UNUSED_BUT_SET_VARIABLE - ) - if(${COMPATIBLE_UNUSED_BUT_SET_VARIABLE}) - set(COMP_FLAGS "${COMP_FLAGS} -Werror=unused-but-set-variable") - endif() - - # Minimal debug info with Clang - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(COMP_FLAGS "${COMP_FLAGS} -gline-tables-only") - else() - set(COMP_FLAGS "${COMP_FLAGS} -g") - endif() - - # Note: The following flags are problematic on older systems with gcc 4.8 - if( - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" - OR - ( - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" - AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9.9 - ) - ) - if( - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" - OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" - ) - set(COMP_FLAGS "${COMP_FLAGS} -Wno-unused-command-line-argument") - endif() - find_program(LDGOLD_FOUND ld.gold) - set(LDGOLD_SUPPORT OFF CACHE BOOL "Enable ld.gold support") - # Optional ld.gold is 2x faster than normal ld - if( - LDGOLD_FOUND - AND LDGOLD_SUPPORT MATCHES ON - AND NOT APPLE - AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES arm - ) - set(LINKER_FLAGS "${LINKER_FLAGS} -fuse-ld=gold") - # Use Identical Code Folding - set(COMP_FLAGS "${COMP_FLAGS} -ffunction-sections") - set(LINKER_FLAGS "${LINKER_FLAGS} -Wl,--icf=safe") - # Compress the debug sections - # Note: Before valgrind 3.12.0, patch should be applied for valgrind (https://bugs.kde.org/show_bug.cgi?id=303877) - if( - NOT APPLE - AND NOT ANDROID - AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES arm - AND NOT CMAKE_CXX_CLANG_TIDY - ) - set(COMP_FLAGS "${COMP_FLAGS} -Wa,--compress-debug-sections") - set(LINKER_FLAGS "${LINKER_FLAGS} -Wl,--compress-debug-sections=zlib") - endif() - endif() - endif() - - # Apply the flags - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMP_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMP_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LINKER_FLAGS}") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS} -shared") -endif() - -# Sanitizer support -set(CLANG_SANITIZERS OFF CACHE BOOL "Clang's sanitizer support") -if( - CLANG_SANITIZERS - AND - ( - (UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - OR - (APPLE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - ) -) - set( - CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} -fsanitize=address,undefined -fno-omit-frame-pointer" - ) - set( - CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -fsanitize=address,undefined -fno-omit-frame-pointer" - ) - set( - CMAKE_EXE_LINKER_FLAGS - "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address,undefined -fno-omit-frame-pointer" - ) - set( - CMAKE_SHARED_LINKER_FLAGS - "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address,undefined -fno-omit-frame-pointer" - ) -endif() - -# Unity Build support -include(UnityBuild) @@ -3,7 +3,7 @@ # Contributor: Peter Strapp <peter@strapp.co.uk> pkgname=libindi_3rdparty_libs -pkgver=2.1.5.1 +pkgver=2.1.7 pkgrel=1 pkgdesc="dependencies for INDI 3rd party drivers" url="http://www.indilib.org/index.php?title=Main_Page" @@ -14,16 +14,13 @@ makedepends=(cmake boost) conflicts=() source=( "https://github.com/indilib/indi-3rdparty/archive/v${pkgver}.tar.gz" - "CMakeCommon.cmake" ) sha256sums=( - "9a85e6cf928dd095f019adf1919c79f9a3ac55294bedb8c9f65cc8bf3f9152d8" - "a7c0c7d933a5bbdba24c360c56e8dd100a622641e6b13dd7481d5268ea44f332" + "4d1e3ee713af1bac2e86627d5fed3c542187f2246168f195b3ec802607c71e8b" ) prepare() { mkdir -p build - cp CMakeCommon.cmake indi-3rdparty-${pkgver}/cmake_modules/ } build() { @@ -37,7 +34,6 @@ build() { -DFIRMWARE_INSTALL_DIR=/usr/lib/firmware \ -DQHY_FIRMWARE_INSTALL_DIR=/usr/lib/firmware \ -DBUILD_LIBS=On \ - -DWITH_TOUPBASE=On \ ../indi-3rdparty-${pkgver} make -j$(nproc) } |
