--- deliantra/Deliantra-Client/Makefile.PL 2007/12/05 11:06:53 1.89 +++ deliantra/Deliantra-Client/Makefile.PL 2011/12/31 04:23:41 1.125 @@ -1,5 +1,8 @@ +use Config; use ExtUtils::MakeMaker; +my $lddlflags = $Config{lddlflags}; + sub manifest_resources { open my $manifest, "MANIFEST" or die "Couldn't open MANIFEST: $!"; map { chomp; $_ } grep /^resources\//, <$manifest> @@ -13,17 +16,15 @@ *** other dependencies: *** pango-1.12.3, glib-2.10 -*** libsdl, libSDL_mixer, libSDL_image - -*** Pod::POM, Compress::LZF, BerkeleyDB, Crossfire, EV, AnyEvent perl modules +*** libsdl-1.2.10, libSDL_mixer, libSDL_image -*** HINT: BerkeleyDB must be linked against version 4.3 or higher of libdb +*** Pod::POM, Compress::LZF, BDB, Deliantra, EV, AnyEvent perl modules *** HINT: Debian/Ubuntu users might have some luck with: *** apt-get install perl libpango1.0-dev libglib2.0-dev libsdl1.2-dev *** apt-get install libsdl-mixer1.2-dev libsdl-image1.2-dev -*** apt-get install libberkeleydb-perl libwww-perl libdb4.4-dev -*** apt-get install anyevent-perl +*** apt-get install libwww-perl libdb4.4-dev +*** apt-get install libanyevent-perl EOF @@ -36,10 +37,19 @@ $INC = "-I/gtk/include -I/gtk/include/pango-1.0 -I/gtk/include/glib-2.0 -I/gtk/lib/glib-2.0/include/ -I/gtk/include/freetype2"; $LIBS = "-L/gtk/lib -lSDL -lSDL_image -lSDL_mixer -lpango-1.0 -lpangoft2-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lfreetype -lfontconfig -lopengl32 -lwininet", } else { - $INC = join " ", qx, qx; - $LIBS = join " ", qx, "-lSDL_image -lSDL_mixer", qx, "-lGL"; + $INC = join " ", qx, qx; + $LIBS = join "", map " $_ ", + qx, + "-lSDL_image -lSDL_mixer", + qx, + "-L/usr/X11/lib"; + + $LIBS .= " -lGL" unless $^O =~ /darwin/i; # sigh... os x is so borked + + $_ =~ s/\n/ /g for $INC, $LIBS; - $INC =~ s/\n/ /g for $INC, $LIBS; + # for extra horrid macosx joys + $lddlflags .= " $1" while $LIBS =~ s/ (-Wl,\S+) / /; } WriteMakefile( @@ -48,46 +58,51 @@ COMPRESS => 'gzip -9v', SUFFIX => '.gz', }, - NAME => "CFPlus", + NAME => "Deliantra::Client", INC => $INC, LIBS => [$LIBS], + LDDLFLAGS => $lddlflags, EXE_FILES => [qw(bin/deliantra)], - VERSION_FROM => "CFPlus.pm", + VERSION_FROM => "DC.pm", PREREQ_PM => { - BerkeleyDB => 0.27, - Crossfire => 1.12, + common::sense => 3.1, + BDB => 1.83, + Deliantra => 1.31, Time::HiRes => 0, - EV => 0.9, - AnyEvent => 2.6, - Compress::LZF => 1.6, - Pod::POM => 0.15, + EV => 3.42, + Guard => 1, + AnyEvent => 4.331, + Compress::LZF => 3.41, + Pod::POM => 0.27, LWP => 0, - JSON::XS => 2.01, + JSON::XS => 2.2222, }, depend => { - "CFPlus.o" => 'glfunc.h pangoopengl.h pango-font.c pango-fontmap.c pango-render.c texcache.c rendercache.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/DB.pm' => '$(INST_LIBDIR)/CFPlus/DB.pm', - 'CFPlus/UI.pm' => '$(INST_LIBDIR)/CFPlus/UI.pm', - 'CFPlus/UI/Canvas.pm' => '$(INST_LIBDIR)/CFPlus/UI/Canvas.pm', - 'CFPlus/UI/Dockable.pm' => '$(INST_LIBDIR)/CFPlus/UI/Dockable.pm', - 'CFPlus/UI/Inventory.pm' => '$(INST_LIBDIR)/CFPlus/UI/Inventory.pm', - 'CFPlus/UI/SpellList.pm' => '$(INST_LIBDIR)/CFPlus/UI/SpellList.pm', - 'CFPlus/UI/Canvas.pm' => '$(INST_LIBDIR)/CFPlus/UI/Canvas.pm', - 'CFPlus/UI/ChatView.pm' => '$(INST_LIBDIR)/CFPlus/UI/ChatView.pm', - 'CFPlus/UI/MessageWindow.pm' => '$(INST_LIBDIR)/CFPlus/UI/MessageWindow.pm', - 'CFPlus/Item.pm' => '$(INST_LIBDIR)/CFPlus/Item.pm', - 'CFPlus/Pod.pm' => '$(INST_LIBDIR)/CFPlus/Pod.pm', - 'CFPlus/MapWidget.pm' => '$(INST_LIBDIR)/CFPlus/MapWidget.pm', - 'CFPlus/Macro.pm' => '$(INST_LIBDIR)/CFPlus/Macro.pm', - 'docwiki.pst' => '$(INST_LIBDIR)/CFPlus/resources/docwiki.pst', - (map +($_ => "\$(INST_LIBDIR)/CFPlus/$_"), manifest_resources), + 'DC.pm' => '$(INST_LIBDIR)/Client/private/DC.pm', + 'DC/Main.pm' => '$(INST_LIBDIR)/Client/private/DC/Main.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/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), } );