diff options
Diffstat (limited to 'app-paludis/plop')
-rw-r--r-- | app-paludis/plop/Manifest | 8 | ||||
-rw-r--r-- | app-paludis/plop/files/plop-0.2.3_0.30.8.patch | 312 | ||||
-rw-r--r-- | app-paludis/plop/files/plop.bash-completion | 60 | ||||
-rw-r--r-- | app-paludis/plop/plop-0.2.3.ebuild | 51 |
4 files changed, 431 insertions, 0 deletions
diff --git a/app-paludis/plop/Manifest b/app-paludis/plop/Manifest new file mode 100644 index 00000000..9d6fd137 --- /dev/null +++ b/app-paludis/plop/Manifest @@ -0,0 +1,8 @@ +AUX plop-0.1_0.30.8.patch 11283 RMD160 83f81246c3cc0501e992dcef50e94455db8cd2fd SHA1 cc004895220c49fca44024f05aac671b01c47d2b SHA256 8aad9fed7a7bd8289ee0c8f55a9a5d9b14c03d80fac3bee7e47bd044bcf5ba6d +AUX plop-0.2.1_0.30.8.patch 13347 RMD160 d7bc7af7f880014fed6c65f09874dfff1421a88b SHA1 1edb27977e404f3d73985161f6cc1a621a929d6c SHA256 2ae46a27cd12162a6350805eb68cb77607a5d5f4fd0da0367251aa0541c264c5 +AUX plop-0.2.2_0.30.8.patch 13905 RMD160 50584d3a3cfa1351e104fb7ed33932e4c447aa1e SHA1 b7f68ffbb037b12eb0c0ecc8ea4d9059e94fdd49 SHA256 239dd8134b0363fce6f4d7400f7ed7f1e394142561297276c7598b61512a8707 +AUX plop-0.2.3_0.30.8.patch 14202 RMD160 5b45265a49a9dfea6c316de38182a1cc660385b9 SHA1 15d40a3533eeb451f05551b20e4b454ca7df3f3b SHA256 9238e3f2a3508705df8a1689418eabfe5fd99eff4276947c6f6da957ef7dffab +AUX plop-0.2_0.30.8.patch 13340 RMD160 eb21ef1e4e9872fd4609e07d184803a74a45a218 SHA1 c9572491dc9932b164362b29b5b94cece6dd5dc9 SHA256 04914d667a75d0bc0389a9b6b9cd73d49619bc14965be4f77e99585baa435bc2 +AUX plop.bash-completion 2255 RMD160 deb6e27bfb99fbca3cde5bd30b6d44567ac69a77 SHA1 fb7b9cddbe5b0358ed6cd4d9e5b0c269c1ed848a SHA256 08c96f4c2bc90bc40af08634d98fd5535986f5e935f90af9c252156906fcaeaf +DIST plop-0.2.3.tar.gz 21315 RMD160 11a1590f91e49d985a5109fe8ca3421855cd4c9e SHA1 dafd5ec96c4ddd6d189feb104c9cb7811d143728 SHA256 944cdfcb9d633dacc4a196039d509e6dc9a22e4ec1715255733a75ca6a36a9e4 +EBUILD plop-0.2.3.ebuild 1648 RMD160 aed89c8bfbf1a0792ba4fb7a2333e2b077594768 SHA1 fb155c6f283805b0a49de8eb56c1f6993af683dc SHA256 9ebecf6b8d58ccf0a2c904f4786eb8f989ef9092c29e38b1ebba92ff85a995fe diff --git a/app-paludis/plop/files/plop-0.2.3_0.30.8.patch b/app-paludis/plop/files/plop-0.2.3_0.30.8.patch new file mode 100644 index 00000000..98b6b3f0 --- /dev/null +++ b/app-paludis/plop/files/plop-0.2.3_0.30.8.patch @@ -0,0 +1,312 @@ +--- genlop-0.30.8/genlop 2007-10-04 10:15:07.000000000 +0200 ++++ plop-0.2.3/plop 2008-07-15 20:57:14.000000000 +0200 +@@ -17,16 +17,17 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + +-use strict; +-use warnings; ++#use strict; ++#use warnings; ++#use diagnostics; + use POSIX; + use Term::ANSIColor; + use Date::Manip; + use LWP::Simple; + use File::Basename; + +-my $version = "0.30.7"; +-my @logfiles = ("/var/log/emerge.log"); ++my $version = "0.2.3"; ++my @logfiles = ("/var/log/paludis.log"); + my %COLORS = ( + 'blue' => 'bold blue', + 'green' => 'bold green', +@@ -109,9 +110,9 @@ + sub open_file + { + my ($file, $fh) = @_; +- if ($file eq "/var/log/emerge.log" && !-r $file) ++ if ($file eq "/var/log/paludis.log" && !-r $file) + { +- print "$progname: cannot open " . $file . " for reading\n" . "maybe you are not a member of the portage group ?\n" . "try genlop -h for help\n"; ++ print "$progname: cannot open " . $file . " for reading\n" . "maybe you are not a member of the portage group ?\n" . "try plop -h for help\n"; + exit 1; + } + if (-T $file) +@@ -334,24 +335,24 @@ + # provides help information + sub help () + { +- print "Usage: ", colored("genlop ", $COLORS{'blue'}), "[", colored("options", $COLORS{'green'}), "] [", colored("-f ", $COLORS{'green'}), "logfile] [", ++ print "Usage: ", colored(basename($0)." ", $COLORS{'blue'}), "[", colored("options", $COLORS{'green'}), "] [", colored("-f ", $COLORS{'green'}), "logfile] [", + colored("category/package", $COLORS{'green'}), "]\n\n", colored("Options:\n", $COLORS{'green'}), colored(" -c ", $COLORS{'green'}), + "display the currently compiling packages (if any)\n", colored(" -e ", $COLORS{'green'}) . "display package history; default if any option is used.\n", +- colored(" -f ", $COLORS{'green'}), "read emerge log information from \"logfile\" instead of ", $logfiles[0], "\n", ++ colored(" -f ", $COLORS{'green'}), "read paludis log information from \"logfile\" instead of ", $logfiles[0], "\n", + colored(" -h ", $COLORS{'green'}), "print this help\n", colored(" -i ", $COLORS{'green'}), + "extra infos for the selected package (build specific USE ", "and CFLAGS\n variables, average build time, etc)\n", + colored(" -g ", $COLORS{'green'}), "display GMT/UTC, not localized time.\n", colored(" -l ", $COLORS{'green'}), "show full merge history.\n", + colored(" -n ", $COLORS{'green'}), "no color in output\n", colored(" -p ", $COLORS{'green'}), +- "estimate build time from a piped \"emerge -p\" output\n", colored(" -q ", $COLORS{'green'}), ++ "estimate build time from a piped \"paludis -p\" output\n", colored(" -q ", $COLORS{'green'}), + "query gentoo.linuxhowtos.org database if no local emerge was found\n", colored(" -r ", $COLORS{'green'}), + "search for portage tree sync/rsync history.\n", colored(" -s ", $COLORS{'green'}), + "use (case insensitive) regular expressions to match package names\n", colored(" -S ", $COLORS{'green'}), + "use case sensitive regular expressions to match package names\n", colored(" -t ", $COLORS{'green'}), + "calculate merge time for the specific package(s).\n", colored(" -u ", $COLORS{'green'}), "show when packages have been unmerged.\n", +- colored(" -v ", $COLORS{'green'}), "display genlop version and exit.\n\n", colored(" --date datestring1", $COLORS{'green'}), " [", ++ colored(" -v ", $COLORS{'green'}), "display plop version and exit.\n\n", colored(" --date datestring1", $COLORS{'green'}), " [", + colored(" --date datestring2", $COLORS{'green'}), "] only shows results between datestring1\n", +- " and datestring2. datestring2 dafaults to \"now\" if not", " explicitly set.\n", " (e.g. genlop --list --date 3 days ago)\n", +- "\nThis program is licensed under the GPL v2. See COPYING.\n", "For further info about genlop please read the man page.\n"; ++ " and datestring2. datestring2 dafaults to \"now\" if not", " explicitly set.\n", " (e.g. plop --list --date 3 days ago)\n", ++ "\nThis program is licensed under the GPL v2. See COPYING.\n", "For further info about plop please read the man page.\n"; + exit 0; + } + +@@ -432,7 +433,7 @@ + } + else + { +- $regexp = qr/(.*)(-[0-9]{1,7}.*?)/i; ++ $regexp = qr/(.*)(-(?:[0-9]{1,7}|scm).*?)/i; + } + return "$regexp"; + } +@@ -452,8 +453,8 @@ + { + $regexp = + $ssearch_found +- ? qr/(.*$arg.*?)(-[0-9]{1,7}.*?)/ +- : qr/(.*$arg.*?)(-[0-9]{1,7}.*?)/i; ++ ? qr/(.*$arg.*?)(-(?:[0-9]{1,7}|scm).*?)/ ++ : qr/(.*$arg.*?)(-(?:[0-9]{1,7}|scm).*?)/i; + } + return "$regexp"; + } +@@ -464,8 +465,8 @@ + $category = $arg; + $regexp = + $ssearch_found +- ? qr/($category.*?)(-[0-9]{1,7}.*?)/ +- : qr/($category.*?)(-[0-9]{1,7}.*?)/i; ++ ? qr/($category.*?)(-(?:[0-9]{1,7}|scm).*?)/ ++ : qr/($category.*?)(-(?:[0-9]{1,7}|scm).*?)/i; + return "$regexp"; + } + @list = split(/\//, $arg); +@@ -475,7 +476,7 @@ + $category = $list[0]; + $ebuild = $list[1]; + @list = (); +- @list = split(/(-[0-9]{1,7})/, $ebuild); ++ @list = split(/(-(?:[0-9]{1,7}|scm))/, $ebuild); + if ($list[1]) + { + $ebuild = $list[0]; +@@ -489,14 +490,14 @@ + } + $regexp = + $ssearch_found +- ? qr!($category\/$ebuild)(-[0-9]{1,7}.*?)! +- : qr!($category\/$ebuild)(-[0-9]{1,7}.*?)!i; ++ ? qr!($category\/$ebuild)(-(?:[0-9]{1,7}|scm).*?)! ++ : qr!($category\/$ebuild)(-(?:[0-9]{1,7}|scm).*?)!i; + return "$regexp"; + } + $regexp = + $ssearch_found +- ? qr!(.*?/$ebuild)(-[0-9]{1,7}.*?)! +- : qr!(.*?/$ebuild)(-[0-9]{1,7}.*?)!i; ++ ? qr!(.*?/$ebuild)(-(?:[0-9]{1,7}|scm).*?)! ++ : qr!(.*?/$ebuild)(-(?:[0-9]{1,7}|scm).*?)!i; + return "$regexp"; + } + +@@ -558,10 +559,10 @@ + print "These are the pretended packages:"; + print " (this may take a while; wait...)\n\n"; + +- # open STDIN; that's why emerge -p foo is piped to a genlop -p ++ # open STDIN; that's why emerge -p foo is piped to a plop -p + while (<STDIN>) + { +- if ($_ =~ m/^\[e.*\] (.*?)\/(.*?)(\-[0-9])/) ++ if ($_ =~ m/^\* (.*?)\/(.*?)(\-(?:[0-9]|scm))/) + { + push @targets, $2; + print; +@@ -580,11 +581,11 @@ + open_file($logfile, \$handle); + foreach (<$handle>) + { +- if (m/^(.*?)\: \>\>\> emerge.*?\/$ebuild_arg-[0-9].*/) ++ if (m/^(.*?)\: starting install of package .*?\/$ebuild_arg-(?:[0-9]|scm).*?::/) + { + $e_start = $1; + } +- if (m/^(.*?)\: ::: completed .*?\) .*\/$ebuild_arg-[0-9].* to \//) ++ if (m/^(.*?)\: finished install of package .*?\/$ebuild_arg-(?:[0-9]|scm).*?::/) + { + $e_end = $1; + $tm_secondi += ($e_end - $e_start); +@@ -666,11 +667,12 @@ + # not check for sanity and have users check their FEATURES instead. + my @targets = (); + my @sandbox_pids = (); +- my @sandbox_procs = qx{ps ax -o pid,args | tail -n +2 | sed -e's/^ *//' | grep ' sandbox ' | grep -v ' grep '}; +- my ($e_curmerge, $e_lastmerge); ++ my @sandbox_procs = qx{ps ax -w -o pid,args|grep '[s]andbox'}; # [s] so you don't need this ugly grep -v grep, also the use of tail and such are foobar ++ my $r_start = 0; ++ my ($r_curmerge, $r_lastmerge, $r_current); + foreach (@sandbox_procs) + { +- if (m/^(.*?) \[(.*?)\-[0-9].*?\]/) ++ if (m/^(.*?) sandbox .*? .*\/(.*?)\-(?:[0-9]|scm).*?\.(ebuild|kdebuild-1) .*/) + { + push @sandbox_pids, $1; + push @targets, $2; +@@ -692,7 +694,6 @@ + } + foreach my $ebuild_arg (@targets) + { +- my $e_current; + $ebuild_arg =~ s/(\+)/\\$1/g; + foreach my $logfile (@logfiles) + { +@@ -700,14 +701,17 @@ + open_file($logfile, \$handle); + foreach (<$handle>) + { +- if (m/^(.*?)\: \>\>\> emerge \((.*?) of (.*?)\)(.*?\/$ebuild_arg-[0-9].*?)to \//) ++ if (m/^(.*?)\: starting install of package (.*?\/$ebuild_arg-(?:[0-9]|scm).*?::.*?) \((.*?) of (.*?)\)/) + { ++ if ($1 > $r_start) { ++ $r_start = $1; ++ $r_curmerge = $3; ++ $r_lastmerge = $4; ++ $r_current = $2; ++ } + $e_start = $1; +- $e_curmerge = $2; +- $e_lastmerge = $3; +- $e_current = $4; + } +- if (m/^(.*?)\: ::: completed .*?\) .*\/$ebuild_arg-[0-9].* to \//) ++ if (m/^(.*?)\: finished install of package .*\/$ebuild_arg-(?:[0-9]|scm).*::.* \(.*\)/) + { + $e_end = $1; + $e_count++; +@@ -717,9 +721,9 @@ + } + } + $e_end = CORE::time(); +- >ime($e_end - $e_start); +- print "\n Currently merging $e_curmerge out of $e_lastmerge\n"; +- print colored("\n \*$e_current\n\n", $COLORS{'blue'}); ++ >ime($e_end - $r_start); ++ print "\n Currently merging $r_curmerge out of $r_lastmerge\n"; ++ print colored("\n \*$r_current\n\n", $COLORS{'blue'}); + print " current merge time: "; + $current_found = undef; + &print_gtime(); +@@ -735,10 +739,10 @@ + $e_count = 1; + } + +- if ($e_count && $e_start) ++ if ($e_count && $r_start) + { +- >ime(($tm_secondi / $e_count) - ($e_end - $e_start)); +- if (($e_end - $e_start) >= ($tm_secondi / $e_count)) ++ >ime(($tm_secondi / $e_count) - ($e_end - $r_start)); ++ if (($e_end - $r_start) >= ($tm_secondi / $e_count)) + { + print colored("any time now.\n", $COLORS{'green'}); + } +@@ -808,7 +812,7 @@ + #$package =~ s/(\+)/\\$1/g; + my $tmp_package = $package; + $tmp_package =~ s/\+/\\+/g; +- if ("$categoria/$package_dir" =~ m/$tmp_package\-[0-9].*/) ++ if ("$categoria/$package_dir" =~ m/$tmp_package\-(?:[0-9]|scm).*/) + { + $info_ok = 1; + print colored("\n * $categoria/$package_dir\n", $COLORS{'blue'}); +@@ -821,8 +825,8 @@ + open_file($logfile, \$handle); + foreach (<$handle>) + { +- my $pattern = gen_regexp("$categoria/$package_dir"); +- if (m/^([0-9]{10})\: ::: completed .*?\) $pattern to \//) ++ my $pattern = gen_regexp("$categoria/$package_dir"); ++ if (m/^([0-9]{10})\: finished install of package ${pattern}:.*::/) + { + if ($gmt_found) + { +@@ -851,13 +855,10 @@ + + # we search into the installed ebuild for USE flags available + # and store them in @potential_use. +- open(pkg_ebuild, "$db_pkg_dir/$1.ebuild") || return; ++ open(pkg_ebuild, "$db_pkg_dir/IUSE") || return; + while (<pkg_ebuild>) + { +- if ($_ =~ m/^IUSE=\"(\$\{IUSE\} )?(.*)"/g) +- { +- @potential_use = split(/\ /, $2); +- } ++ @potential_use = split(/\ /, $_); + } + } + +@@ -917,7 +918,7 @@ + my $handle; + open_file($_, \$handle); + while(<$handle>) { +- if ($_ =~ m/^(.*?)\: \=\=\= Sync completed with/) { ++ if ($_ =~ m/^(.*?)\: finished sync of repository gentoo/) { + if ($date_found) { + if (datecompare($1) <= 0) { + next; +@@ -952,7 +953,10 @@ + help() if ($help_found); + if ($version_found) + { +- print "genlop $version, maintained by Michael Cummings <mcummings\@gentoo.org>\n" ++ print "plop $version, patched genlop 0.30.8 for use with paludis\n" ++ . "patched by Tobias Hommel <software\@genoetigt.de>\n" ++ . "original genlop info:\n" ++ . "genlop, maintained by Michael Cummings <mcummings\@gentoo.org>\n" + . "original code by Giorgio Mandolfo and Antonio Dolcetta\n" + . "Please file any bugs found online at:\n" + . "https://bugs.gentoo.org\n" +@@ -1015,15 +1019,15 @@ + if ($current_found) { ¤t; } + if ($time_found or $info_found) + { +- if ($_ =~ m/^([0-9]{10})\: \>\>\> emerge .*?\) $pattern/) ++ if ($_ =~ m/^([0-9]{10})\: starting install of package ${pattern}::/) + { + $e_start = $1; + $info_target = $2; + } + } +- if ($_ =~ m/^([0-9]{10})\: ::: completed .*?\) $pattern to \//) ++ if ($_ =~ m/^([0-9]{10})\: finished install of package ${pattern}::/) + { +- my $e_date; ++ my $e_date; + if ($gmt_found) + { + $e_date = scalar gmtime "$1"; +@@ -1093,7 +1097,7 @@ + if ($unmerge_found or $info_found) + { + $pattern = gen_regexp($ebuild_arg); +- if (m/^([0-9]{10})\: \>\>\> unmerge success: ($pattern.*)/g) ++ if (m/^([0-9]{10})\: finished uninstall of package ($pattern)::/g) + { + my $u_date = scalar localtime "$1"; + if ($unmerge_found) diff --git a/app-paludis/plop/files/plop.bash-completion b/app-paludis/plop/files/plop.bash-completion new file mode 100644 index 00000000..ad03d86c --- /dev/null +++ b/app-paludis/plop/files/plop.bash-completion @@ -0,0 +1,60 @@ +# -*- shell-script -*- +# If you have bash completion installed and want plop to auto-complete +# packages, save this file as /etc/bash_completion.d/plop +# +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# +# Author: Geert Bevin <gbevin@theleaf.be> +# Author: Zach Forrest <zach@disinformation.ca> +# +# Adapted for genlop by Giorgio Mandolfo <giorgio@pollycoke.org> +# Adapted for plop by Tobias Hommel <software@genoetigt.de> +# +_plop() +{ + local cur grepcmd sedcmd systemactions setsma setbig portagedir origdir + + origdir="${PWD}" + COMPREPLY=() +# whoa, what a funny construction + portagedir="$( echo `eval echo $(grep '^location' /etc/paludis/repositories/gentoo.conf|sed 's/^location = \(.*\)/\1/')` )" + if [ -z "${portagedir}" ]; then + portagedir=/usr/portage + fi + cur="${COMP_WORDS[COMP_CWORD]}" + + cd "${portagedir}" + grepcmd="grep -E ^${cur}.*" + sedcmd="sed -e /^[^-]*$/d" + case "$cur" in + -*) + COMPREPLY=( $( compgen -W '--current --file --help \ + --info --gmt --list --nocolor --pretend --rsync \ + --search --time --unmerge --version' -- $cur ) ) + ;; + *) + if [ "${cur}" ]; then + if [ $(echo "${cur}" | grep '/') ]; then + setbig=$(compgen -G "${cur}*" | ${sedcmd})"${systemactions}" + COMPREPLY=($(echo "${setbig}" | $grepcmd)) + else + setsma=$(compgen -S '/' -G "${cur}*" | ${sedcmd})"${systemactions}" + if [ $(echo "${setsma}" | ${grepcmd} | grep '/' | wc -l) = 1 ]; then + setbig=$(compgen -G "*/*" | ${sedcmd})"${systemactions}" + COMPREPLY=($(echo "${setbig}" | ${grepcmd})) + else + COMPREPLY=($(echo "${setsma}" | ${grepcmd})) + fi + fi + else + setsma=$(compgen -S '/' -G "${cur}*" | ${sedcmd})"${systemactions}" + COMPREPLY=($(echo "${setsma}")) + fi + ;; + esac + + cd "${origdir}" + return 0 +} +complete -o default -F _plop plop diff --git a/app-paludis/plop/plop-0.2.3.ebuild b/app-paludis/plop/plop-0.2.3.ebuild new file mode 100644 index 00000000..a37e1dcb --- /dev/null +++ b/app-paludis/plop/plop-0.2.3.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2007 Gentoo Foundation +# Copyright 2009 Marc-Antoine Perennou +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils bash-completion + +DESCRIPTION="A nice paludis.log parser (patched genlop)" +HOMEPAGE="http://www.genoetigt.de/site/projects/plop" +# I copied the genlop-0.30.8.tar.gz and renamed it to plop-0.1.tar.gz +SRC_URI="http://www.genoetigt.de/plop/${P}.tar.gz" +RESTRICT="nomirror" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd" +IUSE="" + +DEPEND=">=dev-lang/perl-5.8.0-r12 + >=dev-perl/DateManip-5.40 + dev-perl/libwww-perl" + +src_unpack() { + unpack ${A} + mv ${WORKDIR}/genlop-0.30.8/ ${S} + cd "${S}" + mv genlop plop + mv genlop.1 plop.1 +# mv genlop.bash-completion plop.bash-completion + +epatch "${FILESDIR}/plop-${PV}_0.30.8.patch" +} + +src_install() { + dobin plop || die "failed to install plop (via dobin)" + dodoc README Changelog + doman plop.1 + dobashcompletion ${FILESDIR}/plop.bash-completion plop +} + +pkg_postinst() { + einfo "Note that plop is just a patched genlop-0.30.8. I only patched the" + einfo "main script. The manpage, README, etc. are all original genlop" + einfo "files, but since plop is expected to work like genlop this" + einfo "shouldn't be a problem. so if you find see genlop somewhere, simply" + einfo "substitute it with plop, as long as it hasn't to do anything with" + einfo "copyright or other credits" + + einfo "to convert old emerge.logfiles I've written a small perlscript that" + einfo "you can download on the plop homepage" +} |