2021-03-27 08:13:24 +00:00
|
|
|
Index: CMakeLists.txt
|
|
|
|
===================================================================
|
srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
for p in ${template%/template}/patches/*; do
sed -i '
\,^[+-][+-][+-] /dev/null,b
/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
s,^[*][*][*] ,&a/,
/^--- /{
s,\(^--- \)\(./\)*,\1a/,
s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1,
s/[.-][Oo][Rr][Ii][Gg]$//
s/[.]patched[.]\([^.]\)/.\1/
h
}
/^+++ -/{
g
s/^--- a/+++ b/
b
}
s,\(^+++ \)\(./\)*,\1b/,
' "$p"
done
sed -i '/^patch_args=/d' $template
done
```
2021-06-19 03:03:21 +00:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2021-03-27 08:13:24 +00:00
|
|
|
@@ -296,18 +296,7 @@ IF(SUPPORT_STD_FLAG)
|
|
|
|
ENDIF(SUPPORT_STD_FLAG)
|
|
|
|
|
|
|
|
# Optimization flags
|
|
|
|
-IF(NOT CMAKE_C_OPT_FLAGS)
|
|
|
|
- IF(ENABLE_OPTIMIZATION MATCHES "ON")
|
|
|
|
- SET(CMAKE_C_OPT_FLAGS "-O3 -fstrict-aliasing")
|
|
|
|
- ELSE(ENABLE_OPTIMIZATION MATCHES "ON")
|
|
|
|
- SET(CMAKE_C_OPT_FLAGS "-g -O2 -fstrict-aliasing")
|
|
|
|
- ENDIF(ENABLE_OPTIMIZATION MATCHES "ON")
|
|
|
|
-ENDIF(NOT CMAKE_C_OPT_FLAGS)
|
|
|
|
-
|
|
|
|
-IF(ENABLE_DEBUG MATCHES "ON")
|
|
|
|
- SET(CMAKE_BUILD_TYPE "Debug")
|
|
|
|
- SET(WITH_DEBUG 1)
|
|
|
|
-ENDIF(ENABLE_DEBUG MATCHES "ON")
|
|
|
|
+SET(CMAKE_C_OPT_FLAGS "-fstrict-aliasing")
|
|
|
|
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_OPT_FLAGS} ${CMAKE_C_FLAGS} ${CMAKE_C_WARN_FLAGS}")
|
|
|
|
|