c987560802
```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 ```
24 lines
1,001 B
Diff
24 lines
1,001 B
Diff
Avoid a recursion when using ccache and/or distcc:
|
|
Set the ccache prefix by means of RULE_LAUNCH_COMPILE and
|
|
RULE_LAUNCH_LINK only, if the environment's variable CXX is
|
|
not already a symbolic link to ccache.
|
|
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -137,8 +137,14 @@
|
|
find_program(CCACHE_FOUND ccache)
|
|
if(CCACHE_FOUND)
|
|
set(ENV(CCACHE_CPP2) "yes")
|
|
- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
|
- set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
|
+ get_filename_component(CXX_SYMLINK $ENV{CXX} REALPATH)
|
|
+ if(CXX_SYMLINK MATCHES ".*/ccache")
|
|
+ message(STATUS "Found ccache symlinks method (CXX_SYMLINK is ${CXX_SYMLINK})")
|
|
+ else(CXX_SYMLINK MATCHES ".*/ccache")
|
|
+ message(STATUS "Enabling ccache (${CCACHE_FOUND})")
|
|
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
|
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
|
+ endif(CXX_SYMLINK MATCHES ".*/ccache")
|
|
endif(CCACHE_FOUND)
|
|
|
|
if (GLEW_FOUND OR EPOXY_FOUND)
|