OTPClient: respect CFLAGS
This commit is contained in:
parent
a159d94798
commit
63f75ca54c
2 changed files with 18 additions and 0 deletions
17
srcpkgs/OTPClient/patches/fix-cflags.patch
Normal file
17
srcpkgs/OTPClient/patches/fix-cflags.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
Index: OTPClient-2.4.2/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- OTPClient-2.4.2.orig/CMakeLists.txt
|
||||||
|
+++ OTPClient-2.4.2/CMakeLists.txt
|
||||||
|
@@ -11,11 +11,10 @@ option(BUILD_GUI "Build the GUI" ON)
|
||||||
|
option(BUILD_CLI "Build the CLI" ON)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
-set(CMAKE_C_FLAGS "-Wall -Wextra -O3 -Wformat=2 -Wmissing-format-attribute -fstack-protector-strong -Wundef -Wmissing-format-attribute")
|
||||||
|
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -fstack-protector-strong -Wundef -Wmissing-format-attribute")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always -Wstrict-prototypes -Wunreachable-code")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wchar-subscripts -Wwrite-strings -Wpointer-arith -Wbad-function-cast -Wcast-align")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=format-security -Werror=implicit-function-declaration -Wno-sign-compare")
|
||||||
|
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3")
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pie -fPIE")
|
||||||
|
endif()
|
|
@ -12,3 +12,4 @@ license="GPL-3.0-or-later"
|
||||||
homepage="https://github.com/paolostivanin/OTPClient"
|
homepage="https://github.com/paolostivanin/OTPClient"
|
||||||
distfiles="https://github.com/paolostivanin/OTPClient/archive/v${version}.tar.gz"
|
distfiles="https://github.com/paolostivanin/OTPClient/archive/v${version}.tar.gz"
|
||||||
checksum=74bc4312aa1cd336ca983434e3bed951c5ead327091e7708e3beb08508813495
|
checksum=74bc4312aa1cd336ca983434e3bed951c5ead327091e7708e3beb08508813495
|
||||||
|
patch_args=-Np1
|
||||||
|
|
Loading…
Add table
Reference in a new issue