Permalink
Browse files

Merge branch 'master' of github.com:jberger/Alien-Base

  • Loading branch information...
2 parents b6ab6ca + 6e1a057 commit c16d7fe5c73ca877324f1069d78bc1d5fab648a7 @jberger jberger committed Mar 12, 2012
Showing with 53 additions and 3 deletions.
  1. +36 −0 examples/Alien-Nettle/Build.PL
  2. +3 −0 examples/Alien-Nettle/MANIFEST
  3. +12 −0 examples/Alien-Nettle/lib/Alien/Nettle.pm
  4. +2 −3 lib/Alien/Base.pm
@@ -0,0 +1,36 @@
+use strict;
+use warnings;
+
+use lib '../../lib';
+
+use utf8;
+use Alien::Base::ModuleBuild;
+
+my $builder = Alien::Base::ModuleBuild->new(
+ module_name => 'Alien::Nettle',
+ dist_abstract => 'Build and install the Nettle cryptographic library',
+ license => 'perl',
+ configure_requires => {
+ 'Alien::Base' => 0,
+ },
+ requires => {
+ 'perl' => '5.8.1',
+ 'Alien::Base' => 0,
+ },
+ dist_author => 'Richard Simões <rsimoes AT cpan DOT org>',
+ alien_name => 'nettle',
+ alien_repository => {
+ protocol => 'ftp',
+ host => 'ftp.lysator.liu.se',
+ location => '/pub/security/lsh',
+ pattern => qr/^nettle-([\d\.]+)\.tar\.gz$/,
+ },
+ alien_build_commands => [
+ '%pconfigure --prefix=%s --enable-shared',
+ 'make',
+ 'make install'
+ ],
+);
+$builder->create_build_script;
+
+
@@ -0,0 +1,3 @@
+Build.PL
+lib/Alien/Nettle.pm
+MANIFEST This list of files
@@ -0,0 +1,12 @@
+package Alien::Nettle;
+
+use strict;
+use warnings;
+
+our $VERSION = 0.01;
+$VERSION = eval $VERSION;
+
+use parent 'Alien::Base';
+
+1;
+
View
@@ -15,9 +15,6 @@ $VERSION = eval $VERSION;
sub import {
my $class = shift;
- my $config = $class . '::ConfigData';
- eval "require $config";
-
my $libs = $class->libs;
my @L = $libs =~ /-L(\S+)/g;
@@ -79,6 +76,8 @@ sub config {
$class = blessed $class || $class;
my $config = $class . '::ConfigData';
+ eval "require $config";
+
return $config->config(@_);
}

0 comments on commit c16d7fe

Please sign in to comment.