--- deliantra/Deliantra-Client/Makefile.PL 2006/07/30 13:14:15 1.56 +++ deliantra/Deliantra-Client/Makefile.PL 2006/10/13 12:47:45 1.66 @@ -1,5 +1,10 @@ use ExtUtils::MakeMaker; +sub manifest_resources { + open my $manifest, "MANIFEST" or die "Couldn't open MANIFEST: $!"; + map { chomp; $_ } grep /^resources\//, <$manifest> +} + print <, qx; $LIBS = join " ", qx, "-lSDL_image -lSDL_mixer", qx, "-lGL"; @@ -33,7 +38,7 @@ WriteMakefile( dist => { - PREOP => 'pod2text CFPlus.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', + PREOP => 'pod2text bin/cfplus | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', COMPRESS => 'gzip -9v', SUFFIX => '.gz', }, @@ -44,17 +49,17 @@ VERSION_FROM => "CFPlus.pm", PREREQ_PM => { BerkeleyDB => 0.27, - Crossfire => 0.1, + Crossfire => 0.91, Time::HiRes => 0, - Event => 1.01, + Event => 1.07, AnyEvent => 0, Compress::LZF => 1.6, Pod::POM => 0.15, - JSON::PC => 0.01, }, depend => { "CFPlus.o" => 'glfunc.h pangoopengl.h pango-font.c pango-fontmap.c pango-render.c texcache.c', }, + clean => { FILES => 'docwiki.pst' }, PM => { 'CFPlus.pm' => '$(INST_LIBDIR)/CFPlus.pm', 'CFPlus/Protocol.pm' => '$(INST_LIBDIR)/CFPlus/Protocol.pm', @@ -64,17 +69,27 @@ 'CFPlus/Pod.pm' => '$(INST_LIBDIR)/CFPlus/Pod.pm', 'CFPlus/MapWidget.pm' => '$(INST_LIBDIR)/CFPlus/MapWidget.pm', 'CFPlus/BindingEditor.pm' => '$(INST_LIBDIR)/CFPlus/BindingEditor.pm', - (map +($_ => "\$(INST_LIBDIR)/CFPlus/$_"), - , - , - , - , - , - , - , - , - , - , - ), + 'docwiki.pst' => '$(INST_LIBDIR)/CFPlus/resources/docwiki.pst', + (map +($_ => "\$(INST_LIBDIR)/CFPlus/$_"), manifest_resources), } ); + +sub MY::postamble { + my $self = shift; + + # try to add MANIFEST to CONFIGDEP + s/^CONFIGDEP = /CONFIGDEP = MANIFEST /m + for @{ $self->{RESULT} }; + + my $pods = join " ", ; + + <