aboutsummaryrefslogtreecommitdiff
path: root/system/stow
diff options
context:
space:
mode:
authorPedro R.M. Júnior <pedrormjunior@gmail.com>2019-07-22 22:59:58 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-07-27 08:06:16 +0700
commita01fabd94fa8de4990dc92bfb911f69fb988210a (patch)
tree7adc10df906ea93bb2bbb08d6d7273c80899724f /system/stow
parente1e07626c9c0a1a8211e7de5b4b2001a9249abdd (diff)
system/stow: Updated for version 2.3.0.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/stow')
-rw-r--r--system/stow/merge.diff73
-rw-r--r--system/stow/stow.SlackBuild11
-rw-r--r--system/stow/stow.info6
3 files changed, 84 insertions, 6 deletions
diff --git a/system/stow/merge.diff b/system/stow/merge.diff
new file mode 100644
index 000000000000..1ee166872ddb
--- /dev/null
+++ b/system/stow/merge.diff
@@ -0,0 +1,73 @@
+Avoid using Hash::Merge.
+
+stow 2.3.0 added external dependencies on Hash::Merge and Clone::Choose, which
+makes bootstrapping awkward. It's not actually using most of Hash::Merge's
+features, so replace it with a specialised merge routine.
+
+diff -x config.guess -x config.log -x config.status -x config.sub -ru tmp/stow-2.3.0/Build.PL work/stow-2.3.0/Build.PL
+--- tmp/stow-2.3.0/Build.PL 2019-06-28 23:51:12.000000000 +0100
++++ work/stow-2.3.0/Build.PL 2019-06-29 12:05:59.195616482 +0100
+@@ -60,8 +60,6 @@
+ 'perl' => '5.006',
+ 'Carp' => 0,
+ 'IO::File' => 0,
+- 'Hash::Merge' => 0,
+- 'Clone' => 0,
+ },
+ script_files => [ 'bin/stow', 'bin/chkstow' ],
+ all_from => 'lib/Stow.pm.in',
+diff -x config.guess -x config.log -x config.status -x config.sub -ru tmp/stow-2.3.0/bin/stow.in work/stow-2.3.0/bin/stow.in
+--- tmp/stow-2.3.0/bin/stow.in 2019-06-28 23:33:58.000000000 +0100
++++ work/stow-2.3.0/bin/stow.in 2019-06-29 12:25:50.098558041 +0100
+@@ -457,16 +457,12 @@
+
+ use POSIX qw(getcwd);
+ use Getopt::Long qw(GetOptionsFromArray);
++use Scalar::Util qw(reftype);
+
+ @USE_LIB_PMDIR@
+ use Stow;
+ use Stow::Util qw(parent error);
+
+-# Need to avoid Storable backend, since it can't deal with regexps:
+-# https://rt.perl.org/Public/Bug/Display.html?id=50608
+-use Clone::Choose qw(:Clone);
+-use Hash::Merge qw(merge);
+-
+ my $ProgramName = $0;
+ $ProgramName =~ s{.*/}{};
+
+@@ -530,17 +526,27 @@
+
+ # Merge .stowrc and command line options.
+ # Preference is given to cli options.
+- # rc options come first in merged arrays.
+- # cli options overwrite conflicting rc options.
+- Hash::Merge::set_behavior('RIGHT_PRECEDENT');
+- my $options = merge($rc_options, $cli_options);
++ my %options = %$rc_options;
++ foreach my $option (keys %$cli_options) {
++ my $rc_value = $rc_options->{$option};
++ my $cli_value = $cli_options->{$option};
++ my $type = reftype($cli_value);
++
++ if (defined $type && $type eq 'ARRAY' && defined $rc_value) {
++ # rc options come first in merged arrays.
++ $options{$option} = [@{$rc_value}, @{$cli_value}];
++ } else {
++ # cli options overwrite conflicting rc options.
++ $options{$option} = $cli_value;
++ }
++ }
+
+ # Run checks on the merged options.
+- sanitize_path_options($options);
++ sanitize_path_options(\%options);
+ check_packages($pkgs_to_unstow, $pkgs_to_stow);
+
+ # Return merged and processed options.
+- return ($options, $pkgs_to_unstow, $pkgs_to_stow);
++ return (\%options, $pkgs_to_unstow, $pkgs_to_stow);
+ }
+
+ #===== SUBROUTINE ===========================================================
diff --git a/system/stow/stow.SlackBuild b/system/stow/stow.SlackBuild
index 331021e003b1..e13df6936230 100644
--- a/system/stow/stow.SlackBuild
+++ b/system/stow/stow.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for stow
-# Copyright 2018 Pedro R.M. Júnior, Campinas, SP, Brazil
+# Copyright 2018, 2019 Pedro R.M. Júnior, Campinas, SP, Brazil
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=stow
-VERSION=${VERSION:-2.2.2}
+VERSION=${VERSION:-2.3.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -62,6 +62,11 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
+
+# Apply patch. For more information, see notes "Changes in version
+# 2.3.1" in http://git.savannah.gnu.org/cgit/stow.git/tree/NEWS.
+patch -p2 < $CWD/merge.diff
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -87,7 +92,7 @@ rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*
cp -a \
- AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
+ AUTHORS COPYING ChangeLog INSTALL.md NEWS README.md THANKS TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/system/stow/stow.info b/system/stow/stow.info
index 89bd7d82f058..7d4273b49a27 100644
--- a/system/stow/stow.info
+++ b/system/stow/stow.info
@@ -1,8 +1,8 @@
PRGNAM="stow"
-VERSION="2.2.2"
+VERSION="2.3.0"
HOMEPAGE="https://www.gnu.org/software/stow"
-DOWNLOAD="https://ftp.gnu.org/gnu/stow/stow-2.2.2.tar.bz2"
-MD5SUM="af1e1de9d973c835bee80c745b5ee849"
+DOWNLOAD="https://ftp.gnu.org/gnu/stow/stow-2.3.0.tar.bz2"
+MD5SUM="09ee110a2ee12f8bbfdb1068506f4b2f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""