Skip to content

Commit

Permalink
Don't check the libgpgme version. rely on the api version only.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafl committed Aug 31, 2008
1 parent 7b15426 commit 90d08e9
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions ext/Module/Install/PRIVATE/Crypt/GpgME.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ sub gpgme {
my $config_exe = $self->find_config_exe;

my %gpgme_config = $self->get_config($config_exe);
printf "Found GpgME %s (api version %s)\n", @gpgme_config{qw/version api-version/};
printf "*** Found GpgME with api version %s\n", $gpgme_config{'api-version'};

$self->check_version($gpgme_config{ version });
$self->check_api_version($gpgme_config{ 'api-version' });

$self->makemaker_args(INC => '-Iperl_glue' );
Expand All @@ -47,7 +46,7 @@ sub get_config {

my %config = map {
($_ => $self->run_gpgme_config($exe, $_))
} qw/prefix exec-prefix version api-version libs cflags/;
} qw/prefix exec-prefix api-version libs cflags/;

return %config;
}
Expand All @@ -61,33 +60,6 @@ sub run_gpgme_config {
return $out;
}

sub check_version {
my ($self, $version) = @_;

if (!defined $version) {
warn <<EOM;
*** Could not find gpgme version.
Things might go awry.
EOM
return;
}

my ($major, $minor, $patch) = split /\./, $version, 3;
if (!defined $major || !defined $minor) {
warn <<EOM;
*** Could not parse gpgme version number.
EOM
return;
}

if ($major != 1 || $minor != 1) {
warn <<EOM;
*** This version of gpgme hasn't been tested with this module yet.
Please tell the author if things work.
EOM
}
}

sub check_api_version {
my ($self, $version) = @_;

Expand Down

0 comments on commit 90d08e9

Please sign in to comment.