From 366c26b208f4c3625116ff3cf36fbb7bcb7248a9 Mon Sep 17 00:00:00 2001 From: Ingar Date: Sat, 13 Dec 2025 11:08:00 +0000 Subject: Updated to v2.1.7. --- CMakeCommon.cmake | 204 ------------------------------------------------------ PKGBUILD | 9 +-- 2 files changed, 3 insertions(+), 210 deletions(-) delete mode 100644 CMakeCommon.cmake 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) diff --git a/PKGBUILD b/PKGBUILD index f7b1e59..8e1f44f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,10 +3,10 @@ # Contributor: Peter Strapp # TODO -# create indi user and home directory +# create indiserver user and /var/lib/indiserver directory pkgname=libindi_3rdparty -pkgver=2.1.5.1 +pkgver=2.1.7 pkgrel=1 pkgdesc="3rd party drivers for INDI, a distributed control protocol designed to operate astronomical instrumentation" provides=("libindi_3rdparty") @@ -21,20 +21,17 @@ source=( "indiserver.conf" "indiserver.service" "indiserver_systemd" - "CMakeCommon.cmake" ) sha256sums=( - "9a85e6cf928dd095f019adf1919c79f9a3ac55294bedb8c9f65cc8bf3f9152d8" + "4d1e3ee713af1bac2e86627d5fed3c542187f2246168f195b3ec802607c71e8b" "6784118f7826c563058711bc3336d877ca44e79cf8b7e5205ab00901b1892924" "3f909377d938217e545f1a4538738bbdbdbebf66ecc2a38a2194c46255bf5518" "64b0197fd6296c201516e5f81e1edc4b4415e3d80663c3533c9ed249ab844d6a" - "a7c0c7d933a5bbdba24c360c56e8dd100a622641e6b13dd7481d5268ea44f332" ) backup=(etc/indiserver.conf) prepare() { mkdir -p build - cp CMakeCommon.cmake indi-3rdparty-${pkgver}/cmake_modules/ } build() { -- cgit v1.2.3