#!/usr/bin/perl -w # Copyright 1998-2005, Paul Johnson (pjcj@cpan.org) # This software is free. It is licensed under the same terms as Perl itself. # The latest version of this software should be available from my homepage: # http://www.pjcj.net use strict; require 5.005; use ExtUtils::MakeMaker; use ExtUtils::Manifest "maniread"; eval q{ use Apache::TestMM qw(test clean); Apache::TestMM::filter_args(); Apache::TestMM::generate_script("t/TEST"); }; $| = 1; my $Version = "1.1502"; my $Date = "20th December 2005"; my $Author = 'pjcj@cpan.org'; my @perlbug = ("perlbug", "-a", $Author, "-s", "Installation of Gedcom $Version"); my $Perlbug = join " ", map { / / ? "'$_'" : $_ } @perlbug; my @files = sort keys %{maniread()}; my @versions = grep { $_ ne "README" && $_ ne "Makefile.PL" } @files; $ExtUtils::MakeMaker::Verbose = 0; WriteMakefile ( NAME => "Gedcom", VERSION => $Version, AUTHOR => 'Paul Johnson (pjcj@cpan.org)', ABSTRACT => "Interface to genealogy GEDCOM files", DIR => [], EXE_FILES => [ "cgi-bin/gedcom.cgi" ], dist => { COMPRESS => "gzip --best --force" }, clean => { FILES => join " ", map { "$_.version" } @versions }, depend => { distdir => "@files" }, ); print "\n"; print "checking for Date::Manip.pm........ "; eval "use Date::Manip"; if (my $m = $INC{"Date/Manip.pm"}) { print "$m\n"; } else { print <new("Makefile.PL"); $fh->getline; $fh->input_line_number; EOE if ($@) { print <<'EOM'; broken You have a broken IO::Handle module. In particular, the input_line_number method causes an error. Gedcom.pm will work around the problem, but if you experience other problems with this function, or your use of $., you may wish to solve the problem. Perl 5.005_03 and (I believe) some developer releases have this problem, as does IO.pm version 1.20. The problem is fixed as from 5.005_57. If you would like to patch your Perl, my patch is available at http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-04/msg02366.html or send me mail. EOM } else { print "working\n"; } print < README ppm : ppd pure_all \t tar cf Gedcom.tar blib \t gzip --best --force Gedcom.tar \t \$(PERL) -pi.bak \\ -e 's/(OS NAME=")[^"]*/\$\$1MSWin32/;' \\ -e 's/(ARCHITECTURE NAME=")[^"]*/\$\$1MSWin32-x86-multi-thread/;' \\ -e 's/(CODEBASE HREF=")[^"]*/\$\$1Gedcom.tar.gz/;' \\ Gedcom.ppd tst :: pure_all test_clean run_tests COVERDIR = /home/pjcj/g/perl/dev/Devel-Cover cover : \t \$(PERL) -Mblib=\$(COVERDIR) \$(COVERDIR)/cover -delete && \\ HARNESS_PERL_SWITCHES=-Mblib=\$(COVERDIR)\\ -MDevel::Cover=-ignore,Cover \$(MAKE) test && \\ \$(PERL) -Mblib=\$(COVERDIR) \$(COVERDIR)/cover -report html restart : all \t t/TEST -stop && rm -f t/logs/*log && t/TEST -start \$(TEST_OPTIONS) restart_cover : all \t t/TEST -stop && cover && rm -f t/logs/*log && \\ t/TEST -defines COVER -one-process -start \$(TEST_OPTIONS) stop : all \t t/TEST -stop runtestcover : all \t rm -f t/logs/*log && \\ DEVEL_COVER=1 t/TEST -defines COVER -one-process -verbose \$(TEST_OPTIONS) && \\ cover -report html_basic mytestcover : all \t cover -delete && \\ rm -f t/logs/*log && \\ DEVEL_COVER=1 t/TEST -defines COVER -one-process \$(TEST_OPTIONS) && \\ cover -report html_basic # cover : mytestcover cgi : all install \t cp `dirname \$(PERL)`/gedcom.cgi cgi-bin && \\ rm *.ged && \\ ln -s ../ged/* . ok : \t \@$Perlbug -okay || echo "Please send your report manually to $Author" nok : \t \@$Perlbug -nokay || echo "Please send your report manually to $Author" ] }