--- deliantra/Deliantra-Client/Makefile.PL 2006/07/30 13:14:15 1.56 +++ deliantra/Deliantra-Client/Makefile.PL 2008/08/01 13:54:29 1.109 @@ -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,48 +42,71 @@ WriteMakefile( dist => { - PREOP => 'pod2text CFPlus.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', + PREOP => 'pod2text bin/deliantra | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', COMPRESS => 'gzip -9v', SUFFIX => '.gz', }, - NAME => "CFPlus", + NAME => "Deliantra::Client", INC => $INC, LIBS => [$LIBS], - EXE_FILES => [qw(bin/cfplus)], - VERSION_FROM => "CFPlus.pm", + EXE_FILES => [qw(bin/deliantra)], + VERSION_FROM => "DC.pm", PREREQ_PM => { - BerkeleyDB => 0.27, - Crossfire => 0.1, + BDB => 1.7, + Deliantra => 1.21, Time::HiRes => 0, - Event => 1.01, - AnyEvent => 0, + EV => 3.42, + AnyEvent => 4.22, Compress::LZF => 1.6, Pod::POM => 0.15, - JSON::PC => 0.01, + LWP => 0, + JSON::XS => 2.01, }, depend => { - "CFPlus.o" => 'glfunc.h pangoopengl.h pango-font.c pango-fontmap.c pango-render.c texcache.c', + "Client.o" => 'glfunc.h pangoopengl.h pango-font.c pango-fontmap.c pango-render.c texcache.c rendercache.c', }, + clean => { FILES => 'docwiki.pst' }, PM => { - 'CFPlus.pm' => '$(INST_LIBDIR)/CFPlus.pm', - 'CFPlus/Protocol.pm' => '$(INST_LIBDIR)/CFPlus/Protocol.pm', - 'CFPlus/OpenGL.pm' => '$(INST_LIBDIR)/CFPlus/OpenGL.pm', - 'CFPlus/Texture.pm' => '$(INST_LIBDIR)/CFPlus/Texture.pm', - 'CFPlus/UI.pm' => '$(INST_LIBDIR)/CFPlus/UI.pm', - '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/$_"), - , - , - , - , - , - , - , - , - , - , - ), + 'DC.pm' => '$(INST_LIBDIR)/Client/private/DC.pm', + 'DC/Protocol.pm' => '$(INST_LIBDIR)/Client/private/DC/Protocol.pm', + 'DC/OpenGL.pm' => '$(INST_LIBDIR)/Client/private/DC/OpenGL.pm', + 'DC/Texture.pm' => '$(INST_LIBDIR)/Client/private/DC/Texture.pm', + 'DC/DB.pm' => '$(INST_LIBDIR)/Client/private/DC/DB.pm', + 'DC/UI.pm' => '$(INST_LIBDIR)/Client/private/DC/UI.pm', + 'DC/MessageDistributor.pm' => '$(INST_LIBDIR)/Client/private/DC/MessageDistributor.pm', + 'DC/UI/Canvas.pm' => '$(INST_LIBDIR)/Client/private/DC/UI/Canvas.pm', + 'DC/UI/Dockable.pm' => '$(INST_LIBDIR)/Client/private/DC/UI/Dockable.pm', + 'DC/UI/Dockbar.pm' => '$(INST_LIBDIR)/Client/private/DC/UI/Dockbar.pm', + 'DC/UI/Inventory.pm' => '$(INST_LIBDIR)/Client/private/DC/UI/Inventory.pm', + 'DC/UI/SpellList.pm' => '$(INST_LIBDIR)/Client/private/DC/UI/SpellList.pm', + 'DC/UI/Canvas.pm' => '$(INST_LIBDIR)/Client/private/DC/UI/Canvas.pm', + 'DC/UI/ChatView.pm' => '$(INST_LIBDIR)/Client/private/DC/UI/ChatView.pm', + 'DC/UI/MessageWindow.pm' => '$(INST_LIBDIR)/Client/private/DC/UI/MessageWindow.pm', + 'DC/Item.pm' => '$(INST_LIBDIR)/Client/private/DC/Item.pm', + 'DC/Pod.pm' => '$(INST_LIBDIR)/Client/private/DC/Pod.pm', + 'DC/MapWidget.pm' => '$(INST_LIBDIR)/Client/private/DC/MapWidget.pm', + 'DC/Macro.pm' => '$(INST_LIBDIR)/Client/private/DC/Macro.pm', + 'docwiki.pst' => '$(INST_LIBDIR)/Client/private/resources/docwiki.pst', + (map +($_ => "\$(INST_LIBDIR)/Client/private/$_"), 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 " ", ; + + <