/usr/sbin/globus-build-doxygen-dependencies is in globus-core 8.5-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | #! /usr/bin/perl
#
# Copyright 1999-2006 University of Chicago
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
my ($prefix, $exec_prefix, $libdir, $perlmoduledir);
my ($sbindir, $bindir, $includedir, $datarootdir,
$datadir, $libexecdir, $sysconfdir, $sharedstatedir,
$localstatedir, $aclocaldir);
BEGIN
{
if (exists $ENV{GLOBUS_LOCATION})
{
$prefix = $ENV{GLOBUS_LOCATION};
}
else
{
$prefix = "/usr";
}
$exec_prefix = "${prefix}";
$libdir = "${exec_prefix}/lib";
$sbindir = "${exec_prefix}/sbin";
$bindir = "${exec_prefix}/bin";
$includedir = "${prefix}/include/globus";
$datarootdir = "${prefix}/share";
$datadir = "${datarootdir}";
$perlmoduledir = "/usr/share/perl5";
$libexecdir = "${datadir}/globus";
$sysconfdir = "/etc";
$sharedstatedir = "/var/lib";
$localstatedir = "/var";
$aclocaldir = "${datadir}/globus/aclocal";
if (exists $ENV{GPT_LOCATION})
{
unshift(@INC, "$ENV{GPT_LOCATION}/lib/perl");
}
unshift(@INC, "${perlmoduledir}");
}
=head1 NAME
B<globus_build_doxygen_dependencies> - Returns a list of documentation
packages which the specified package depends upon.
=cut
use strict;
use Getopt::Long;
use Carp;
require Grid::GPT::V1::Package;
require Grid::GPT::DepIndexes;
use Cwd;
my $srcfile;
my $help;
my $debug = 0;
my @deps;
sub pod2usage
{
if($_[0])
{
print "ERROR: $_[0]\n";
}
print "Usage: globus_build_doxygen_dependencies -src=src_metadata_file ".
"[-debug]\n";
exit($_[0] == 0);
}
GetOptions('src=s'=> \$srcfile,
'debug' => \$debug) or pod2usage(1);
pod2usage(0) if $help;
pod2usage('Must specify src_metadata_file') if !defined($srcfile);
@deps = process_package($srcfile);
foreach (@deps) {
my $dir = "lib$_-dev";
$dir =~ s/_/-/g;
$_ = "$datadir/doc/$dir/html/$_.tag";
}
print join(' ', @deps) . "\n";
sub process_package($)
{
my $pkgfile = shift;
my $pkgname = shift;
my $deptype = $pkgname ? 'Binary_Dependencies' : 'Source_Dependencies';
my $pkg;
my $new_pkgfile;
my %doc_dependencies;
my %dependencies;
my $dep = $deptype eq 'Source_Dependencies' ? 'doc_runtime' : 'Runtime';
if(! -e $pkgfile)
{
croak("Failed dependency check for $pkgname");
}
$pkg = new Grid::GPT::V1::Package;
$pkg->read_metadata_file($pkgfile);
# oop?
if(defined($pkg->{$deptype}))
{
my $depidx = $pkg->{$deptype};
my $query_res = $depidx->query(deptype => $dep);
foreach (@{$query_res})
{
my $name;
if (($name = $_->{pkgname}) ne '')
{
print STDERR "Found dependency $name\n" if $debug;
$dependencies{$name} = 1;
$new_pkgfile =
"$datadir/globus/packages/$name/pkg_data_noflavor_doc.gpt";
foreach(process_package($new_pkgfile, $name))
{
$dependencies{$_} = 1;
}
}
}
}
keys %dependencies;
}
|