summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2011-01-10 19:17:46 +0000
committerJustin Lecher <jlec@gentoo.org>2011-01-10 19:17:46 +0000
commitc63c2361dca175a604eb68f9f215aa9aa43ea39c (patch)
tree4984a23202ce928a061ad7df8588af4bfb72ba74 /app-misc/cw
parentstable ppc, bug 348733 (diff)
downloadgentoo-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')
-rw-r--r--app-misc/cw/ChangeLog9
-rw-r--r--app-misc/cw/cw-1.0.15.ebuild8
-rw-r--r--app-misc/cw/cw-1.0.16-r1.ebuild5
-rw-r--r--app-misc/cw/cw-1.0.16-r2.ebuild62
-rw-r--r--app-misc/cw/files/1.0.16-collision.patch34
-rw-r--r--app-misc/cw/files/1.0.16-path.patch19
6 files changed, 131 insertions, 6 deletions
diff --git a/app-misc/cw/ChangeLog b/app-misc/cw/ChangeLog
index 02b6d7556aea..3ce50cbbe067 100644
--- a/app-misc/cw/ChangeLog
+++ b/app-misc/cw/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-misc/cw
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/cw/ChangeLog,v 1.26 2011/01/07 23:25:12 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/cw/ChangeLog,v 1.27 2011/01/10 19:17:46 jlec Exp $
+
+*cw-1.0.16-r2 (10 Jan 2011)
+
+ 10 Jan 2011; Justin Lecher <jlec@gentoo.org> +files/1.0.16-collision.patch,
+ cw-1.0.15.ebuild, cw-1.0.16-r1.ebuild, +cw-1.0.16-r2.ebuild,
+ +files/1.0.16-path.patch:
+ Fix collision with media-radio/unixcw, #351293; make cw work
07 Jan 2011; Brent Baude <ranger@gentoo.org> cw-1.0.16-r1.ebuild:
Marking cw-1.0.16-r1 ppc for bug 350564
diff --git a/app-misc/cw/cw-1.0.15.ebuild b/app-misc/cw/cw-1.0.15.ebuild
index d3fee4a89124..d2bf325ca96d 100644
--- a/app-misc/cw/cw-1.0.15.ebuild
+++ b/app-misc/cw/cw-1.0.15.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/cw/cw-1.0.15.ebuild,v 1.9 2010/01/01 18:29:41 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/cw/cw-1.0.15.ebuild,v 1.10 2011/01/10 19:17:46 jlec Exp $
inherit toolchain-funcs
@@ -14,7 +14,7 @@ KEYWORDS="~amd64 ppc ~sparc x86"
IUSE=""
DEPEND=">=sys-apps/sed-4"
-RDEPEND=""
+RDEPEND="!media-radio/unixcw"
src_unpack() {
unpack ${A}
@@ -25,7 +25,7 @@ src_unpack() {
src_compile() {
tc-export CC
- econf || die "econf failed"
+ econf
emake local || die "emake failed"
}
diff --git a/app-misc/cw/cw-1.0.16-r1.ebuild b/app-misc/cw/cw-1.0.16-r1.ebuild
index 227a5b1e8559..b7d29ba96b6e 100644
--- a/app-misc/cw/cw-1.0.16-r1.ebuild
+++ b/app-misc/cw/cw-1.0.16-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/cw/cw-1.0.16-r1.ebuild,v 1.4 2011/01/07 23:25:12 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/cw/cw-1.0.16-r1.ebuild,v 1.5 2011/01/10 19:17:46 jlec Exp $
EAPI="3"
@@ -15,6 +15,9 @@ SLOT="0"
KEYWORDS="amd64 ppc ~sparc ~x86"
IUSE=""
+DEPEND=">=sys-apps/sed-4"
+RDEPEND="!media-radio/unixcw"
+
src_prepare() {
epatch "${FILESDIR}"/${PV}-ldflags.patch
sed -i 's|\(CWLIB=\)/usr/local/lib/cw|\1/usr/libexec/cw|' bin/colorcfg || \
diff --git a/app-misc/cw/cw-1.0.16-r2.ebuild b/app-misc/cw/cw-1.0.16-r2.ebuild
new file mode 100644
index 000000000000..115d0188167e
--- /dev/null
+++ b/app-misc/cw/cw-1.0.16-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/cw/cw-1.0.16-r2.ebuild,v 1.1 2011/01/10 19:17:46 jlec Exp $
+
+EAPI="3"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A non-intrusive real-time ANSI color wrapper for common unix-based commands"
+HOMEPAGE="http://cwrapper.sourceforge.net/"
+SRC_URI="mirror://sourceforge/cwrapper/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-ldflags.patch \
+ "${FILESDIR}"/${PV}-path.patch \
+ "${FILESDIR}"/${PV}-collision.patch
+ tc-export CC
+}
+
+src_compile() {
+ emake local || die "emake failed"
+}
+
+src_install() {
+ insinto /usr/share/cw
+ doins etc/* || die
+
+ exeinto /usr/libexec/cw
+ doexe def/* || die
+
+ doman man/cwu* || die
+ newman man/cw.* color-wrapper || die
+ dodoc CHANGES CONTRIB INSTALL README PLATFORM doc/README* || die
+
+ dobin bin/{cwu,colorcfg} || die
+ # app-misc/color currently conflicts; hopefully 'colors' is safe
+ newbin bin/color colors || die
+ # media-radio/unixcw currently conflicts;
+ newbin bin/cw color-wrapper || die
+}
+
+pkg_postinst() {
+ ebegin "Updating definition files"
+ cwu /usr/libexec/cw /usr/bin/color-wrapper # >/dev/null
+ eend $?
+
+ elog "To enable color-wrapper, as your user, run:"
+ elog " colorcfg [1|2|3]"
+ elog "to add relevant environment variables to your ~/.bash_profile"
+ elog "Run colorcfg without options to see what [1|2|3] means."
+ elog
+ elog "After sourcing your ~/.bash_profile, commands for which definitions"
+ elog "are provided should have colored output."
+ elog
+ elog "To enable/disable colored output, run: 'colors [on|off]'."
+}
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 ]"