diff options
author | 2011-01-10 19:17:46 +0000 | |
---|---|---|
committer | 2011-01-10 19:17:46 +0000 | |
commit | c63c2361dca175a604eb68f9f215aa9aa43ea39c (patch) | |
tree | 4984a23202ce928a061ad7df8588af4bfb72ba74 /app-misc/cw/files | |
parent | stable ppc, bug 348733 (diff) | |
download | gentoo-2-c63c2361dca175a604eb68f9f215aa9aa43ea39c.tar.gz gentoo-2-c63c2361dca175a604eb68f9f215aa9aa43ea39c.tar.bz2 gentoo-2-c63c2361dca175a604eb68f9f215aa9aa43ea39c.zip |
Fix collision with media-radio/unixcw, #351293; make cw work
(Portage version: 2.2.0_alpha14/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/cw/files')
-rw-r--r-- | app-misc/cw/files/1.0.16-collision.patch | 34 | ||||
-rw-r--r-- | app-misc/cw/files/1.0.16-path.patch | 19 |
2 files changed, 53 insertions, 0 deletions
diff --git a/app-misc/cw/files/1.0.16-collision.patch b/app-misc/cw/files/1.0.16-collision.patch new file mode 100644 index 000000000000..52bb8cab8f3b --- /dev/null +++ b/app-misc/cw/files/1.0.16-collision.patch @@ -0,0 +1,34 @@ +diff --git a/src/cw.c b/src/cw.c +index d7b4875..a7811d8 100644 +--- a/src/cw.c ++++ b/src/cw.c +@@ -1336,7 +1336,7 @@ unsigned char is_cwfile(char *file){ + s=strlen(buf); + if(buf[s]=='\n')s--; + if(buf[s]=='\r')s--; +- if(s>4&&!strncmp(buf,"#!",2)&&!strncmp(buf+(s-4),"/cw",3))return(1); ++ if(s>15&&!strncmp(buf,"#!",2)&&!strncmp(buf+(s-15),"/color-wrapper",14))return(1); + return(0); + } + /* sets left and right borders. */ +diff --git a/src/cwu.c b/src/cwu.c +index 823618d..63f566b 100644 +--- a/src/cwu.c ++++ b/src/cwu.c +@@ -37,12 +37,12 @@ signed int main(signed int argc,char **argv){ + if(argc>1&&!strcmp(argv[1],"-v")) + cwuexit(1,"cwu (color wrapper directive updater) v"VERSION); + if(argc<2) +- cwuexit(1,"syntax: cwu <definitions directory> <cw binary path>"); ++ cwuexit(1,"syntax: cwu <definitions directory> <color-wrapper binary path>"); + if(argc<3)cwuexit(1,"no path provided to update with."); +- if(strncmp(argv[2]+(strlen(argv[2])-3),"/cw",3)) +- cwuexit(1,"cw binary path doesn't end with `/cw'."); ++ if(strncmp(argv[2]+(strlen(argv[2])-14),"/color-wrapper",14)) ++ cwuexit(1,"cw binary path doesn't end with `/color-wrapper'."); + if(access(argv[2],X_OK)) +- cwuexit(1,"cw binary does not exist or is not executable."); ++ cwuexit(1,"color-wrapper binary does not exist or is not executable."); + globcw(argv[1],argv[2]); + cwuexit(0,0); + exit(0); diff --git a/app-misc/cw/files/1.0.16-path.patch b/app-misc/cw/files/1.0.16-path.patch new file mode 100644 index 000000000000..f62b5bd994d4 --- /dev/null +++ b/app-misc/cw/files/1.0.16-path.patch @@ -0,0 +1,19 @@ +diff --git a/bin/colorcfg b/bin/colorcfg +index cf73b50..3e78c73 100755 +--- a/bin/colorcfg ++++ b/bin/colorcfg +@@ -10,13 +10,7 @@ echo "[ cw/color wrapper: user setup script. ]" + if test -x "${HOME}/.cw/bin/colorcfg";then + CWLIB="${HOME}/.cw/def" + else +- SED="`which sed 2>/dev/null`" +- if test -z "$SED";then +- CWLIB="/usr/local/lib/cw" +- echo "(NOTE: using static cw library path, this could be invalid)" +- else +- CWLIB="`echo \"$0/lib/cw\"|sed \"s/\/bin\/colorcfg//g\"`" +- fi ++ CWLIB="/usr/libexec/cw" + fi + + echo "[ cw library path: $CWLIB ]" |