crex: hardening

This commit is contained in:
Đoàn Trần Công Danh 2021-03-25 08:30:31 +07:00
parent 63f75ca54c
commit 106c7888e8
2 changed files with 22 additions and 5 deletions

View File

@ -0,0 +1,20 @@
Index: crex-0.2.5/CMakeLists.txt
===================================================================
--- crex-0.2.5.orig/CMakeLists.txt
+++ crex-0.2.5/CMakeLists.txt
@@ -13,9 +13,6 @@ endif(CCACHE_FOUND)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
-set (CMAKE_CXX_FLAGS "-fdiagnostics-color=auto")
-set (CMAKE_C_FLAGS "-fdiagnostics-color=auto")
-
set (DEBUG_FLAGS "-Wpedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -std=c++14 -g")
set (DEBUG_LINK_FLAGS "-fprofile-arcs -ftest-coverage -flto")
@@ -56,4 +53,4 @@ target_link_libraries (
${TARGET}
)
-install (TARGETS ${TARGET} DESTINATION "/usr/local/bin")
+install (TARGETS ${TARGET} DESTINATION "/usr/bin")

View File

@ -1,7 +1,7 @@
# Template file for 'crex' # Template file for 'crex'
pkgname=crex pkgname=crex
version=0.2.5 version=0.2.5
revision=1 revision=2
build_style=cmake build_style=cmake
short_desc="Explore, test, and check regular expressions in the terminal" short_desc="Explore, test, and check regular expressions in the terminal"
maintainer="Piotr Wójcik <chocimier@tlen.pl>" maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@ -9,10 +9,7 @@ license="MIT"
homepage="https://github.com/octobanana/crex" homepage="https://github.com/octobanana/crex"
distfiles="https://github.com/octobanana/crex/archive/${version}.tar.gz" distfiles="https://github.com/octobanana/crex/archive/${version}.tar.gz"
checksum=c6a166b7a1e696a7babeaf7c5728eece1624704a18357f827129fc95ef2ecc56 checksum=c6a166b7a1e696a7babeaf7c5728eece1624704a18357f827129fc95ef2ecc56
patch_args=-Np1
pre_configure() {
sed -e 's|/local/|/|' -i CMakeLists.txt
}
post_install() { post_install() {
vlicense LICENSE vlicense LICENSE