summaryrefslogtreecommitdiff
path: root/perllib
diff options
context:
space:
mode:
authorMaximiliano Curia <maxy@debian.org>2015-09-11 16:00:15 +0200
committerMaximiliano Curia <maxy@debian.org>2015-09-11 16:00:15 +0200
commitb84ca01945059fbb0086dd50a9a260e3664fd97a (patch)
treec272dad5e7a703ef466b88c4343e6ae91875a991 /perllib
parentc0d9709a200caa4f472ee8a7acf1735712633768 (diff)
downloadpkg-kde-tools-b84ca01945059fbb0086dd50a9a260e3664fd97a.tar.gz
Drop stale copy of Dpkg/Shlibs (2010-02-21).
Diffstat (limited to 'perllib')
-rw-r--r--perllib/Debian/PkgKde.pm47
1 files changed, 1 insertions, 46 deletions
diff --git a/perllib/Debian/PkgKde.pm b/perllib/Debian/PkgKde.pm
index 41f31ff..2c9aef3 100644
--- a/perllib/Debian/PkgKde.pm
+++ b/perllib/Debian/PkgKde.pm
@@ -21,52 +21,7 @@ use Cwd qw(realpath);
use base qw(Exporter);
our @EXPORT = qw(get_program_name
printmsg info warning errormsg error syserr usageerr);
-our @EXPORT_OK = qw(find_datalibdir setup_datalibdir find_exe_in_path DATALIBDIR);
-
-# Determine datalib for current script. It depends on the context the script
-# was executed from.
-use constant DATALIBDIR => '/usr/share/pkg-kde-tools/lib';
-
-sub find_datalibdir {
- my @hintfiles = @_;
- my @dirs;
- if ($0 =~ m@^(.+)/[^/]+$@) {
- push @dirs, "$1/datalib";
- }
- push @dirs, DATALIBDIR;
-
- # Verify if the dir and hint files exist
- my $founddir;
- foreach my $dir (@dirs) {
- my $ok;
- if ($dir && -d $dir) {
- $ok = 1;
- foreach my $hint (@hintfiles) {
- unless (-e "$dir/$hint") {
- $ok = 0;
- last;
- }
- }
- }
- if ($ok) {
- $founddir = $dir;
- last;
- }
- }
-
- return $founddir;
-}
-
-# Add DATALIBDIR to @INC if the script is NOT being run from the source tree.
-sub setup_datalibdir {
- my $dir = find_datalibdir(@_);
- if ($dir) {
- unshift @INC, DATALIBDIR if $dir eq DATALIBDIR;
- } else {
- error("unable to locate pkg-kde-tools library directory");
- }
- return $dir;
-}
+our @EXPORT_OK = qw(find_exe_in_path);
sub find_exe_in_path {
my ($exe, @exclude) = @_;