diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | fix-user-group-align.patch | 148 | ||||
-rw-r--r-- | make-destdir.patch | 31 |
4 files changed, 4 insertions, 197 deletions
@@ -1,6 +1,6 @@ pkgbase = ls++-git pkgdesc = Colorized LS on steroids - pkgver = 0.348.75.47c63f3 + pkgver = 0.36.87.e17221c pkgrel = 1 epoch = 1 url = https://github.com/trapd00r/ls--/ @@ -13,11 +13,7 @@ pkgbase = ls++-git options = !emptydirs backup = etc/ls++.conf source = ls++-git::git+https://github.com/trapd00r/ls--.git - source = fix-user-group-align.patch - source = make-destdir.patch sha512sums = SKIP - sha512sums = 80123d9e11e55643c96ac5e2866cca75ae4197023a16719671d55251ed74cca95f4970c0b07ca0f049edbd96aec6c1c8a6bdbff4b44b4697ee8afb79d8777e28 - sha512sums = b4fff9fff1233130dca795ec9a0d7abf1bddb8cc94b2e5ed2b6784e6379ae15d12094a9cfe2b21e8d98f68278903f7726f98d0b3d9861c9e75224de631ea049f pkgname = ls++-git @@ -2,7 +2,7 @@ # Contributor: JokerBoy <jokerboy at punctweb dot ro> pkgname=ls++-git -pkgver=0.348.75.47c63f3 +pkgver=0.36.87.e17221c pkgrel=1 epoch=1 pkgdesc='Colorized LS on steroids' @@ -15,12 +15,8 @@ backup=('etc/ls++.conf') options=('!emptydirs') provides=('ls++') conflicts=('ls++') -source=(${pkgname}::git+https://github.com/trapd00r/ls--.git - fix-user-group-align.patch - make-destdir.patch) -sha512sums=('SKIP' - '80123d9e11e55643c96ac5e2866cca75ae4197023a16719671d55251ed74cca95f4970c0b07ca0f049edbd96aec6c1c8a6bdbff4b44b4697ee8afb79d8777e28' - 'b4fff9fff1233130dca795ec9a0d7abf1bddb8cc94b2e5ed2b6784e6379ae15d12094a9cfe2b21e8d98f68278903f7726f98d0b3d9861c9e75224de631ea049f') +source=(${pkgname}::git+https://github.com/trapd00r/ls--.git) +sha512sums=('SKIP') pkgver() { cd ${pkgname} @@ -28,12 +24,6 @@ pkgver() { echo "${_lsver}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" } -prepare() { - cd ${pkgname} - patch -p1 < "${srcdir}/fix-user-group-align.patch" - patch -p1 < "${srcdir}/make-destdir.patch" -} - build() { cd ${pkgname} PERL_MM_USE_DEFAULT=1 \ diff --git a/fix-user-group-align.patch b/fix-user-group-align.patch deleted file mode 100644 index 0fcf56abd6a6..000000000000 --- a/fix-user-group-align.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 9409b8c338da096088c97e5658a3aeab8b167a56 Mon Sep 17 00:00:00 2001 -From: anthraxx <levente@leventepolyak.net> -Date: Sat, 12 Nov 2016 23:44:20 +0100 -Subject: [PATCH] properly align user and group when listing mixed directories - -- this also fixes other small issues listed in the issues section ---- - ls++ | 64 ++++++++++++++++++++++++++++++++++++++++++---------------------- - 1 file changed, 42 insertions(+), 22 deletions(-) - -diff --git a/ls++ b/ls++ -index 7a8c91c..d80e20e 100755 ---- a/ls++ -+++ b/ls++ -@@ -118,30 +118,36 @@ ls(); - sub ls { - my $view = shift // 'perm_size_file'; - my($perm, $hlink, $user, $group, $size, $seconds, $file, $rel); -+ my($userpad, $grouppad, $sizelen); - my($second, $minute, $hour, $time, $month, $day, $year, %mon2num); #for Mac OS - - open(my $ls, '-|', "$ls @ls_opts @ls_where") - or die("Cant popen $ls: $!"); - -- while(my $line = <$ls>) { -- #total 1.7M -- next if $line =~ /^total/; -- -- -+ local $/=undef; -+ foreach my $sub (split(/\n\n/, <$ls>)) { -+ $sizelen = get_max_size_len($sub); -+ foreach my $line (split(/^/, $sub . "\n")) { -+ if ($line =~ /^\n$/) { -+ print(); -+ next; -+ } - # Assume GNU coreutils - if($^O eq 'linux') { -- ($perm, $hlink, $user, $group, $size, $seconds) = split(/\s+/, $line) -+ ($perm, $hlink, $user, $group, $size, $seconds, $file) = split(/\s+/, $line, 7) - unless $line =~ /^\s/; -+ chop($file); - -- ($file) = $line =~ m/.* \d{6,}? (.+)/; -+ ($userpad, $grouppad) = $line =~ m/\d+\s+\S+\s(\s*)\S+(\s*)\s.{$sizelen}\s/; - } - elsif( ($^O eq 'darwin') or ($^O =~ /.+bsd$/) ) { -- ($perm, $hlink, $user, $group, $size, $month, $day, $time, $year) = split(/\s+/, $line); -+ ($perm, $hlink, $user, $group, $size, $month, $day, $time, $year, $file) = split(/\s+/, $line, 10); -+ chop($file); - if( (!$day) ) { - printf("%s", $line); - next; - } -- ($file) = $line =~ m/.*\d{2,}? (.*)/; -+ $file = uncolor($file); - - $perm =~ s/(?:\+|\@)$//g; # MacOS 'special extended attributes' - -@@ -158,11 +164,13 @@ sub ls { - - - if( (!$file) ) { -- if ($line =~ /(.*):/){ -- printf("Dir: %s/\n", $1); -- } else { -- next; -+ if( $line =~ /(.*):/ ) { -+ printf("\n%s:\n", fg($c[9], fg('bold', $1))); -+ } -+ elsif( $line =~ /^total (.*)/ ) { -+ printf("%s %s\n", fg($c[1], 'total'), ($size = size($1)) =~ s/\s+//gr); - } -+ next; - } - $file = add_ls_color($file) unless(!$ENV{DISPLAY}); - -@@ -206,7 +214,7 @@ sub ls { - $size =~ s/^\s{3}(.+)/$1 /; - } - -- my $user = owner($user, $group); -+ my $user = owner($userpad . $user, $group . $grouppad); - - if($opt->{perm_file}) { - perm_file($perm, $file); -@@ -229,6 +237,19 @@ sub ls { - next; - } - } -+ } -+} -+ -+sub get_max_size_len { -+ my($out) = @_; -+ my($perm, $hlink, $user, $group, $size, $max, $cur); -+ $max = 0; -+ foreach my $line (split(/^/, $out)) { -+ ($perm, $hlink, $user, $group, $size) = split(/\s+/, $line); -+ $cur = length($size); -+ $max = ($max, $cur)[$max < $cur]; -+ } -+ return $max; - } - - sub add_ls_color { -@@ -366,30 +387,29 @@ sub owner { - - sub size { - my ($size) = @_; -- - #FIXME - if($colors > 16) { - #$size =~ s/(\S+)(K)/$c[2]$1\e[0m$c[4]$2\e[0m/gi;# and print "AA\n"; - if($size =~ m/^(\S+)(K)/) { -- $size = sprintf("% 27s", -- fg($c[7], sprintf("% 4g", $1)) -+ $size = sprintf("%27s", -+ fg($c[7], sprintf("%4g", $1)) - . fg($c[2], fg('bold', $2)) - ); - } - elsif($size =~ m/^(\S+)(M)/) { -- $size = sprintf("% 29s", -- fg($c[7], sprintf("% 4g", $1)) -+ $size = sprintf("%29s", -+ fg($c[7], sprintf("%4g", $1)) - . fg($c[4], fg('bold', $2)) - ); - } - elsif($size =~ m/^(\S+)(G)/) { -- $size = sprintf("% 27s", -- fg($c[7], sprintf("% 4g", $1)) -+ $size = sprintf("%27s", -+ fg($c[7], sprintf("%4g", $1)) - . fg($c[3], fg('bold', $2)) - ); - } - elsif($size =~ m/^(\d+)/) { -- $size = sprintf("% 27s", -+ $size = sprintf("%27s", - fg($c[7], sprintf("%4d", $1)) - . fg($c[14], fg('bold', 'B')) - ); --- -2.10.2 - diff --git a/make-destdir.patch b/make-destdir.patch deleted file mode 100644 index d7e35ecb2240..000000000000 --- a/make-destdir.patch +++ /dev/null @@ -1,31 +0,0 @@ -From e0f396148123d3babf22f91ff18e1db1903b6a24 Mon Sep 17 00:00:00 2001 -From: anthraxx <levente@leventepolyak.net> -Date: Sat, 12 Nov 2016 23:48:54 +0100 -Subject: [PATCH] support standard DESTDIR for packaging into a subdirectory - -This is required for creating a package for a distribution as they -distribute the files in a sourcedir to create the tarball. -However the DESTDIR should not influence the runtime itself, therefor -PREFIX is the only variable considered in the $(sysconfdir_scripts) ---- - Makefile.PL | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile.PL b/Makefile.PL -index 9b2651c..6affbbf 100644 ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -70,8 +70,8 @@ sysconfdir: - $(PERL) -pi -e "s|\"/etc/ls\+\+\.conf|\"$(PREFIX)/etc/ls++.conf|g" $(sysconfdir_scripts) - - install_vendor :: ls++.conf -- [ ! -d $(PREFIX)/etc ] && mkdir -p $(PREFIX)/etc -- [ ! -f $(PREFIX)/etc/ls++.conf ] && cp ls++.conf $(PREFIX)/etc/ls++.conf -+ [ ! -d $(DESTDIR)/$(PREFIX)/etc ] && mkdir -p $(DESTDIR)/$(PREFIX)/etc -+ [ ! -f $(DESTDIR)/$(PREFIX)/etc/ls++.conf ] && cp ls++.conf $(DESTDIR)/$(PREFIX)/etc/ls++.conf - - install :: install_vendor - } --- -2.10.2 - |