From: Dagfinn Ilmari Mannsåker Date: Mon, 3 Apr 2017 15:16:06 +0000 (+0100) Subject: Port to Distar X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5f5aae4e50bb681f8af6a4fc4ff095d1f816b2e;p=scpubgit%2FQ-Branch.git Port to Distar --- diff --git a/.gitignore b/.gitignore index 548e970..f9e2b8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,13 @@ -Build MANIFEST MANIFEST.bak +MANIFEST.SKIP META.* MYMETA.* Makefile Makefile.old README -_build/ blib/ -inc/ +Distar/ pm_to_blib .#* \#*# diff --git a/Changes b/Changes index 9494b21..28bd1ec 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ Revision history for SQL::Abstract - Support for DELETE ... RETURNING (GH#9) + - Port to Distar revision 1.82 2017-03-20 ------------------------- diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP deleted file mode 100644 index 099f160..0000000 --- a/MANIFEST.SKIP +++ /dev/null @@ -1,55 +0,0 @@ -^(?!script/|examples/|lib/|inc/|t/|Makefile.PL$|README$|MANIFEST$|Changes$|META.yml$) - - -# Avoid version control files. -\bRCS\b -\bCVS\b -,v$ -\B\.svn\b -\B\.git\b -\B\.gitignore\b -\b_darcs\b - -# Avoid Makemaker generated and utility files. -\bMakefile$ -\bblib -\bMakeMaker-\d -\bpm_to_blib$ -\bblibdirs$ -^MANIFEST\.SKIP$ - -# for developers only :) -^TODO$ -^Features_09$ - -# Avoid Module::Build generated and utility files. -\bBuild$ -\b_build - -# Avoid temp and backup files. -~$ -\.tmp$ -\.old$ -\.bak$ -\..*?\.sw[po]$ -\#$ -\b\.# - -# avoid OS X finder files -\.DS_Store$ - -# Don't ship the test db -^t/var - -# Don't ship the last dist we built :) -\.tar\.gz$ - -# Skip maint stuff -^maint/ - -# Avoid patch remnants -\.orig$ -\.rej$ - -# Dont use Module::Build anymore -^Build.PL$ diff --git a/Makefile.PL b/Makefile.PL index 9947cc1..935f584 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,41 +1,106 @@ -use inc::Module::Install 1.06; use strict; -use warnings; - +use warnings FATAL => 'all'; use 5.006; -perl_version '5.006'; -name 'SQL-Abstract'; -author 'Nathan Wiger '; -resources 'license' => 'http://dev.perl.org/licenses/'; -resources 'repository' => 'https://github.com/dbsrgits/sql-abstract/'; -resources 'bugtracker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=SQL-Abstract'; -resources 'IRC' => 'irc://irc.perl.org/#dbix-class'; +my %META = ( + name => 'SQL-Abstract', + license => 'perl_5', + prereqs => { + configure => { + requires => { + 'ExtUtils::MakeMaker' => 0, + } + }, + build => { + requires => {} + }, + test => { + requires => { + "Test::More" => '0.88', + "Test::Exception" => '0.31', + "Test::Warn" => '0', + "Test::Deep" => '0.101', + "Storable" => '0', # for cloning in tests + }, + }, + runtime => { + requires => { + 'List::Util' => '0', + 'Scalar::Util' => '0', + 'Exporter' => '5.57', + 'MRO::Compat' => '0.12', + 'Moo' => '2.000001', + 'Sub::Quote' => '2.000001', + 'Hash::Merge' => '0.12', + 'Text::Balanced' => '2.00', + }, + }, + develop => { + requires => {}, + }, + }, + resources => { + repository => { + url => 'https://github.com/dbsrgits/sql-abstract.git', + web => 'https://github.com/dbsrgits/sql-abstract', + type => 'git', + }, + x_IRC => 'irc://irc.perl.org/#dbix-class', + bugtracker => { + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=SQL-Abstract', + mailto => 'bug-SQL-Abstract@rt.cpan.org', + }, + license => [ 'http://dev.perl.org/licenses/' ], + }, + no_index => { + package => 'DBIx::Class::Storage::Debug::PrettyPrint', + directory => [ 't', 'xt', 'examples' ], + }, +); -all_from 'lib/SQL/Abstract.pm'; +my %MM_ARGS = ( + test => { TESTS => 't/*.t t/*/*.t' }, +); -dynamic_config 0; +## BOILERPLATE ############################################################### +require ExtUtils::MakeMaker; +(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; -requires 'List::Util' => '0'; -requires 'Scalar::Util' => '0'; -requires 'Exporter' => '5.57'; -requires 'MRO::Compat' => '0.12'; -requires 'Moo' => '2.000001'; -requires 'Sub::Quote' => '2.000001'; -requires 'Hash::Merge' => '0.12'; -requires 'Text::Balanced' => '2.00'; +# have to do this since old EUMM dev releases miss the eval $VERSION line +my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; +my $mymeta = $eumm_version >= 6.57_02; +my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; -test_requires "Test::More" => '0.88'; -test_requires "Test::Exception" => '0.31'; -test_requires "Test::Warn" => '0'; -test_requires "Test::Deep" => '0.101'; -test_requires "Storable" => '0'; # for cloning in tests +($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; +($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; +$META{license} = [ $META{license} ] + if $META{license} && !ref $META{license}; +$MM_ARGS{LICENSE} = $META{license}[0] + if $META{license} && $eumm_version >= 6.30; +$MM_ARGS{NO_MYMETA} = 1 + if $mymeta_broken; +$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } + unless -f 'META.yml'; -no_index package => 'DBIx::Class::Storage::Debug::PrettyPrint'; -no_index directory => 'examples'; +for (qw(configure build test runtime)) { + my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; + my $r = $MM_ARGS{$key} = { + %{$META{prereqs}{$_}{requires} || {}}, + %{delete $MM_ARGS{$key} || {}}, + }; + defined $r->{$_} or delete $r->{$_} for keys %$r; +} -tests_recursive 't'; +$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; -auto_install(); +delete $MM_ARGS{MIN_PERL_VERSION} + if $eumm_version < 6.47_01; +$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} + if $eumm_version < 6.63_03; +$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} + if $eumm_version < 6.55_01; +delete $MM_ARGS{CONFIGURE_REQUIRES} + if $eumm_version < 6.51_03; -WriteAll(); +ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); +## END BOILERPLATE ########################################################### diff --git a/maint/Makefile.PL.include b/maint/Makefile.PL.include new file mode 100644 index 0000000..70dfeab --- /dev/null +++ b/maint/Makefile.PL.include @@ -0,0 +1,10 @@ +BEGIN { -e 'Distar' or system("git clone git://git.shadowcat.co.uk/p5sagit/Distar.git") } +use lib 'Distar/lib'; +use Distar 0.001; + +use ExtUtils::MakeMaker 6.57_10 (); + +author 'Nathan Wiger '; + +manifest_include examples => qr/sqla-format|.*\.pl/; +1;