diff --git a/srcpkgs/OTPClient/patches/fix-cflags.patch b/srcpkgs/OTPClient/patches/fix-cflags.patch new file mode 100644 index 00000000000..ae70f441538 --- /dev/null +++ b/srcpkgs/OTPClient/patches/fix-cflags.patch @@ -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() diff --git a/srcpkgs/OTPClient/template b/srcpkgs/OTPClient/template index e8c0099850b..f5af76e655a 100644 --- a/srcpkgs/OTPClient/template +++ b/srcpkgs/OTPClient/template @@ -12,3 +12,4 @@ license="GPL-3.0-or-later" homepage="https://github.com/paolostivanin/OTPClient" distfiles="https://github.com/paolostivanin/OTPClient/archive/v${version}.tar.gz" checksum=74bc4312aa1cd336ca983434e3bed951c5ead327091e7708e3beb08508813495 +patch_args=-Np1