Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:jberger/Alien-Base
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Mar 12, 2012
2 parents b6ab6ca + 6e1a057 commit c16d7fe
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
36 changes: 36 additions & 0 deletions examples/Alien-Nettle/Build.PL
@@ -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;


3 changes: 3 additions & 0 deletions examples/Alien-Nettle/MANIFEST
@@ -0,0 +1,3 @@
Build.PL
lib/Alien/Nettle.pm
MANIFEST This list of files
12 changes: 12 additions & 0 deletions examples/Alien-Nettle/lib/Alien/Nettle.pm
@@ -0,0 +1,12 @@
package Alien::Nettle;

use strict;
use warnings;

our $VERSION = 0.01;
$VERSION = eval $VERSION;

use parent 'Alien::Base';

1;

5 changes: 2 additions & 3 deletions lib/Alien/Base.pm
Expand Up @@ -15,9 +15,6 @@ $VERSION = eval $VERSION;
sub import { sub import {
my $class = shift; my $class = shift;


my $config = $class . '::ConfigData';
eval "require $config";

my $libs = $class->libs; my $libs = $class->libs;


my @L = $libs =~ /-L(\S+)/g; my @L = $libs =~ /-L(\S+)/g;
Expand Down Expand Up @@ -79,6 +76,8 @@ sub config {
$class = blessed $class || $class; $class = blessed $class || $class;


my $config = $class . '::ConfigData'; my $config = $class . '::ConfigData';
eval "require $config";

return $config->config(@_); return $config->config(@_);
} }


Expand Down

0 comments on commit c16d7fe

Please sign in to comment.