Permalink
Browse files

+bundled nettle, beginning of Build.PL, filled out pod

  • Loading branch information...
1 parent 811a29b commit cc48af1653a9c97757eaaee111bd95195db07af0 Richard Simões committed Mar 9, 2012
Showing 342 changed files with 91,189 additions and 24 deletions.
View
@@ -0,0 +1,22 @@
+use strict;
+use warnings FATAL => "all";
+use utf8;
+use Module::Build;
+use PkgConfig;
+
+
+my $output = PkgConfig->find("nettle-dev");
+print $output->errmsg, "\n";
+exit;
+
+my $builder = Module::Build->new(
+ dist_name => "Alien-Nettle",
+ license => "LGPL_3_0",
+ dist_abstract => "Build and install the Nettle cryptographic library",
+ dist_author => "Richard Simões <rsimoes AT cpan DOT org>",
+ dist_version_from => "lib/Alien/Nettle.pm",
+ # Prerequisites inserted by DistZilla:
+ ##{ $plugin->get_prereqs ##}
+ );
+
+$builder->create_build_script;
View
@@ -0,0 +1,25 @@
+use strict;
+use warnings FATAL => "all";
+use utf8;
+use ExtUtils::CChecker;
+use Module::Build;
+
+my $cc = ExtUtils::CChecker->new;
+$cc->assert_compile_run(
+ diag => "no PF_MOONLASER",
+ source => <<'EOF' );
+#include <nettle/ripemd160.h>
+int main(int argc, char *argv[]) { return 0; }
+EOF
+
+my $builder = Module::Build->new(
+ dist_name => "Alien-Nettle",
+ license => "LGPL_3_0",
+ dist_abstract => "Build and install the Nettle cryptographic library",
+ dist_author => "Richard Simões <rsimoes AT cpan DOT org>",
+ dist_version_from => "lib/Alien/Nettle.pm",
+ # Prerequisites inserted by DistZilla:
+ ##{ $plugin->get_prereqs ##}
+ );
+
+$builder->create_build_script;
View
@@ -2,34 +2,19 @@ package Alien::Nettle;
use strict;
use warnings FATAL => "all";
-use utf8;
+use File::ShareDir ();
+use File::Spec::Functions ();
# VERSION
-# ABSTRACT:
+# ABSTRACT: Build and install the Nettle cryptographic library
-1;
-
-__END__
-
-=pod
-
-=encoding utf8
-
-=head1 NAME
+my $dist_dir = File::ShareDir::dist_dir("Alien-Nettle");
-Alien::Nettle -
+sub inc_dir () {
+ return File::Spec::catdir( $dist_dir, "include" ) }
-=head1 SYNOPSIS
+sub lib_dir () {
+ return File::Spec::catdir( $dist_dir, "lib" ) }
-=head1 DESCRIPTION
-=head1 AUTHOR
-
-Richard Simões C<< <rsimoes AT cpan DOT org> >>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright © 2012 Richard Simões. This module is released under the terms of the
-L<GNU Lesser General Public License v. 3.0|http://gnu.org/licenses/lgpl.html>
-and may be modified and/or redistributed under the same or any compatible
-license.
+1;
View
@@ -0,0 +1,34 @@
+=encoding utf8
+
+=head1 NAME
+
+Alien::Nettle - Build and install the Nettle cryptographic library
+
+=head1 SYNOPSIS
+
+ my $inc_dir = Alien::Nettle::inc_dir();
+ my $lib_dir = Alien::Nettle::lib_dir();
+
+=head1 DESCRIPTION
+
+This module looks for version 2.4 or greater of the Nettle cryptographic
+library. If not found, it compiles and installs it to the Alien-Nettle
+distribution's shared directory.
+
+Version 2.4 of the Nettle library source is bundled with this distribution.
+It was retrieved from official Nettle website,
+L<http://www.lysator.liu.se/~nisse/nettle>.
+
+=head1 AUTHOR
+
+Richard Simões C<< <rsimoes AT cpan DOT org> >>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright © 2012 Richard Simões. This module is released under the terms of the
+L<GNU Lesser General Public License v. 3.0|http://gnu.org/licenses/lgpl.html>
+and may be modified and/or redistributed under the same or any compatible
+license.
+
+Nettle itself is distributed under the GNU Lesser General Public License, as
+well, and is copyrighted by Niels Möller.
View
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+autoconf && autoheader
View
@@ -0,0 +1 @@
+Please see the Nettle manual.
Oops, something went wrong.

0 comments on commit cc48af1

Please sign in to comment.