From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-misc/cw/Manifest | 9 ++++ app-misc/cw/cw-1.0.16-r3.ebuild | 62 ++++++++++++++++++++++++++ app-misc/cw/files/1.0.16-collision.patch | 34 ++++++++++++++ app-misc/cw/files/1.0.16-format-security.patch | 16 +++++++ app-misc/cw/files/1.0.16-ldflags.patch | 18 ++++++++ app-misc/cw/files/1.0.16-path.patch | 19 ++++++++ app-misc/cw/metadata.xml | 11 +++++ 7 files changed, 169 insertions(+) create mode 100644 app-misc/cw/Manifest create mode 100644 app-misc/cw/cw-1.0.16-r3.ebuild create mode 100644 app-misc/cw/files/1.0.16-collision.patch create mode 100644 app-misc/cw/files/1.0.16-format-security.patch create mode 100644 app-misc/cw/files/1.0.16-ldflags.patch create mode 100644 app-misc/cw/files/1.0.16-path.patch create mode 100644 app-misc/cw/metadata.xml (limited to 'app-misc/cw') diff --git a/app-misc/cw/Manifest b/app-misc/cw/Manifest new file mode 100644 index 000000000000..268f9b769877 --- /dev/null +++ b/app-misc/cw/Manifest @@ -0,0 +1,9 @@ +AUX 1.0.16-collision.patch 1367 SHA256 27a60b8495990c8207e402649cb4cfd4f9b93d40c5762e7f310c00717d3ff6c6 SHA512 2f5e2dc0eb6af383207cd514a5e42bd1cd03f8748a8c1c66d0d83b7a5abd2fafc108a2207ff96bef5b74b9044c21fbe185e3b47a090d11387c7d1bb8f7684e76 WHIRLPOOL 27127aa75c7af200d1b3db147d73e7e48dc14ac0fa386474a30dfa308ac976827deb676223f174bafdbb7c07b0c7b09e902c743418071183baabe8bd905b3d98 +AUX 1.0.16-format-security.patch 412 SHA256 6057fe46108f3842bbfa2b403abd251574bae3d1a010cab09a94e5d5842fb815 SHA512 604a22a47e36933d4b2788c1acfe1930e2935dac14dbad5a717ce69b26463bdffcc54aa74bf5dfc22631b3a587ca56bda359d86cebf9fa1ad7c7a235fb71a5db WHIRLPOOL 1861eb8e82b14972e365092da4cc62b1ff16f0287d76809a9c73fe20d7a965ceba37caed919dba8e06c5884d0673b122a08ad9ab38e8ad074b2ec52116a5b155 +AUX 1.0.16-ldflags.patch 486 SHA256 b825a9da47e5a06434f23ac092ede9b1e89956f966f342dd50bd6e463230c1a5 SHA512 75883411ef18c739e6f86ba53a5b515e8081ac10d1b3e894de9bee4dd0040620f0fe09786085acd325669475d0d1e99b4d46554a68ebffcad18e50cb281cabfe WHIRLPOOL c60879612503e49c5f0801903dad41194189597b774b35918fc414d013466b5282317bd9ed9021ebd289f108d32262446a098ad820c9073a25a891c8f764c99a +AUX 1.0.16-path.patch 550 SHA256 f423c7f4464be0bc248230bfdec7ca9a5a18a4c0fc03e7755372e1265e54f513 SHA512 2d8c1cf55e0d2d725aae4c3bd4f8300402b036e934218135ac840f9f891424458a79a9c2432bd4fa47255c30f096c3752a1a5897854f82da438398d5c671af23 WHIRLPOOL bf672bb810c6cee5c02fe88ae9cfb2e4a67c565cd9b337fcd8b2651b68b54f00b29e7e19fb32a89929c6b5e2446efef9810b5c1f604c3b97ad33edb547de6a0d +DIST cw-1.0.16.tar.bz2 76035 SHA256 a12738f13f3ee90b0bd0c875b4d0bd345d51dced6efd5a14dd82a4705c78fbe4 SHA512 6a5da4e4dbb4d042d8b4e1e0727039f3103f9d7124a6f7c37ac094d7fee0ae10d9bacc6739fc133ca9fb682501bcafecd39a660abfe19fbf1fd9bf7ec06cfa32 WHIRLPOOL 1e5188ac6a9c5985c0169a6a932e1fd7dec242a1e9dcf2409c0bf54161733feb26fb500ec0308d062dbffe595946d7adffe74a19a849420733931f092143cd1c +EBUILD cw-1.0.16-r3.ebuild 1552 SHA256 8b2e2cdb7cfdeee9a9965b4618059418b23255c3f1f064f7bb0e3ae8d56dce9e SHA512 d298a475374013aad061c6555c14ec9b819ca34f24f2eb511951ea5ac4baf14a248e8235bcf5ee7904244f8fa6ef5b5211da16aaca0a305d8644ea51f0a87378 WHIRLPOOL 7f206556ff0d00b1c4faa80fbfb207a21dabf642bf837ba601bce2c31cdad50917ea9fe36f8098dc89c8c56683c57e9fed89daad5ba4f26de1ce2ee5a5f82fed +MISC ChangeLog 2545 SHA256 eeee4f95c8fc534bddd3eb62ed076620ad3265cad5b4589e5fc17e3decaaba48 SHA512 7ba06537a0712d2a88d9e4d70d0bc18c98d616133502751607f5d90b5c4144c18a0dd6ffb43c93d444a5773c71b742eccf5398fac82d6e7ab002cc4d19c3c715 WHIRLPOOL 7df0c7cd55f80ca92e19b81195046eee358f11ad8bbf735432957f44211c54be2671526efa2b95ec3a10681daa783e1ea0be6e2685386233d64a5cbe7468368f +MISC ChangeLog-2015 4680 SHA256 0a021ef0a9c9a6b6b88d4c107a87ff7b0f809bf6ca542c13a41f2fa50d39f7dd SHA512 b74dbe149ab2791d2b06b1a080995e4e98cf334d1c8852fc98eb4d5f0c41b595f02fbbbfe5afe015ec56fee3c6c2a5ef7f12153a6f6a3560ad8ad35e1d8c34dc WHIRLPOOL d698f9a1bd4a489eb56e53e6cb9cbd043f480d48538c6fa19c8b3bbf315da9d25d74cb7ca36111c7837a4e06beb8a551317d402e447f83a8acf36911c765b96b +MISC metadata.xml 343 SHA256 63b59ce2b4fe39a3f1714649772fe2bd11c62cd0fad24e4bd05f00f67981956c SHA512 d0aa39ed1e7fe08244130357fe59579405e1f2d08675bf3979fc1d3944033da32f58926a5857e3a526417709af1351fb443f91657ce4e7b3da0aa8405a60b3a1 WHIRLPOOL cca860f4b724a3b550a600910334a3ec90e4c875f016164170288b47de99ed234267559cfd58764f748edd5a4e39eb080362c98e8a6cc829981d2582b091270e diff --git a/app-misc/cw/cw-1.0.16-r3.ebuild b/app-misc/cw/cw-1.0.16-r3.ebuild new file mode 100644 index 000000000000..5a667b143f95 --- /dev/null +++ b/app-misc/cw/cw-1.0.16-r3.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +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 x86" +IUSE="" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PV}-ldflags.patch \ + "${FILESDIR}"/${PV}-path.patch \ + "${FILESDIR}"/${PV}-collision.patch \ + "${FILESDIR}"/${PV}-format-security.patch + tc-export CC +} + +src_compile() { + emake local +} + +src_install() { + insinto /usr/share/cw + doins etc/* + + exeinto /usr/libexec/cw + doexe def/* + + doman man/cwu* + newman man/cw.* color-wrapper + dodoc CHANGES CONTRIB INSTALL README PLATFORM doc/README* + + dobin bin/{cwu,colorcfg} + # app-misc/color currently conflicts; hopefully 'colors' is safe + newbin bin/color colors + # media-radio/unixcw currently conflicts; + newbin bin/cw color-wrapper +} + +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 "); ++ cwuexit(1,"syntax: cwu "); + 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-format-security.patch b/app-misc/cw/files/1.0.16-format-security.patch new file mode 100644 index 000000000000..20f0b1d06b1e --- /dev/null +++ b/app-misc/cw/files/1.0.16-format-security.patch @@ -0,0 +1,16 @@ + src/cw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cw.c b/src/cw.c +index d7b4875..3ec1ac1 100644 +--- a/src/cw.c ++++ b/src/cw.c +@@ -643,7 +643,7 @@ void sighandler(signed int sig){ + else if(sig==SIGUSR1)ext=1; + else if(sig==SIGALRM)ext=2; + else if(sig==SIGPIPE||sig==SIGINT){ +- fprintf(stderr,pal2[16]); ++ fprintf(stderr,"%s", pal2[16]); + fflush(stderr); + cwexit(0,0); + } diff --git a/app-misc/cw/files/1.0.16-ldflags.patch b/app-misc/cw/files/1.0.16-ldflags.patch new file mode 100644 index 000000000000..46037312c6c3 --- /dev/null +++ b/app-misc/cw/files/1.0.16-ldflags.patch @@ -0,0 +1,18 @@ +diff --git a/Makefile.in b/Makefile.in +index 9a6e4ec..e510493 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -19,11 +19,11 @@ all: + + cw: + @$(ECHO) "* Compiling cw(color wrapper)..." +- @$(CC) src/cw.c -o bin/cw @CFLAGS@ @LIBS@ @DEFS@ ++ $(CC) $(CFLAGS) $(LDFLAGS) src/cw.c -o bin/cw @CFLAGS@ @LIBS@ @DEFS@ + + cwu: + @$(ECHO) "* Compiling cwu(color wrapper directive updater)..." +- @$(CC) src/cwu.c -o bin/cwu @CFLAGS@ ++ $(CC) $(CFLAGS) $(LDFLAGS) src/cwu.c -o bin/cwu + + local: cw cwu + 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 ]" diff --git a/app-misc/cw/metadata.xml b/app-misc/cw/metadata.xml new file mode 100644 index 000000000000..e5ef85998d9b --- /dev/null +++ b/app-misc/cw/metadata.xml @@ -0,0 +1,11 @@ + + + + + shell-tools@gentoo.org + Gentoo Shell Tools Project + + + cwrapper + + -- cgit v1.2.3