Description: adjust use lib and similar invocations for Debian package
Origin: vendor
--- movabletype-opensource-4.3.5+dfsg.orig/mt.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::CMS';
--- movabletype-opensource-4.3.5+dfsg.orig/mt-feed.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-feed.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::ActivityFeeds';
--- movabletype-opensource-4.3.5+dfsg.orig/mt-comments.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-comments.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Comments';
--- movabletype-opensource-4.3.5+dfsg.orig/mt-ftsearch.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-ftsearch.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Search::FreeText';
--- movabletype-opensource-4.3.5+dfsg.orig/mt-search.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-search.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Search';
--- movabletype-opensource-4.3.5+dfsg.orig/mt-upgrade.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-upgrade.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Upgrader';
--- movabletype-opensource-4.3.5+dfsg.orig/mt-tb.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-tb.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Trackback';
--- movabletype-opensource-4.3.5+dfsg.orig/mt-xmlrpc.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-xmlrpc.cgi
@@ -7,9 +7,9 @@
 # $Id$

 use strict;
+use lib '/usr/share/movabletype/extlib';
 my $MT_DIR;
 sub BEGIN {
-    require File::Spec;
     if (!($MT_DIR = $ENV{MT_HOME})) {
         if ($0 =~ m!(.*[/\\])!) {
             $MT_DIR = $1;
@@ -18,8 +18,6 @@ sub BEGIN {
         }
         $ENV{MT_HOME} = $MT_DIR;
     }
-    unshift @INC, File::Spec->catdir($MT_DIR, 'lib');
-    unshift @INC, File::Spec->catdir($MT_DIR, 'extlib');
 }

 use XMLRPC::Transport::HTTP;
--- movabletype-opensource-4.3.5+dfsg.orig/mt-wizard.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-wizard.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Wizard';
--- movabletype-opensource-4.3.5+dfsg.orig/mt-atom.cgi
+++ movabletype-opensource-4.3.5+dfsg/mt-atom.cgi
@@ -7,5 +7,5 @@
 # $Id$

 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::AtomServer';
--- movabletype-opensource-4.3.5+dfsg.orig/tools/upgrade
+++ movabletype-opensource-4.3.5+dfsg/tools/upgrade
@@ -8,8 +8,8 @@

 package MT::Tool::Upgrade;
 use strict;
+use lib '/usr/share/movabletype/extlib';

-use lib  qw( extlib lib );
 use base qw( MT::Tool );

 use Carp qw(confess);
--- movabletype-opensource-4.3.5+dfsg.orig/tools/mt-tmpl-preview
+++ movabletype-opensource-4.3.5+dfsg/tools/mt-tmpl-preview
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w

 use strict;
+use lib '/usr/share/movabletype/extlib';

 # establish blog id for cases where we process
 # a template from a file...
@@ -9,7 +10,6 @@ if (!$blog_id) {
     die "Please specify a MT_BLOG shell parameter.";
 }

-use lib 'lib';
 use MT::Bootstrap;
 use MT;
 use MT::Template::Context;
--- movabletype-opensource-4.3.5+dfsg.orig/tools/list-objects
+++ movabletype-opensource-4.3.5+dfsg/tools/list-objects
@@ -1,7 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-
-use lib 'extlib', 'lib', '../lib';
+use lib '/usr/share/movabletype/extlib';

 my %opts;
 use Getopt::Long;
--- movabletype-opensource-4.3.5+dfsg.orig/tools/plugin-config
+++ movabletype-opensource-4.3.5+dfsg/tools/plugin-config
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
+use lib '/usr/share/movabletype/extlib';

-use lib 'lib', '../lib';
 use MT::Bootstrap;
 use MT;
 use MT::PluginData;
--- movabletype-opensource-4.3.5+dfsg.orig/tools/sig-validate
+++ movabletype-opensource-4.3.5+dfsg/tools/sig-validate
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w

-use lib 'lib';
+use lib '/usr/share/movabletype/extlib';

 use MT::App::Comments;

--- movabletype-opensource-4.3.5+dfsg.orig/tools/remove-object
+++ movabletype-opensource-4.3.5+dfsg/tools/remove-object
@@ -1,7 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-
-use lib 'lib';
+use lib '/usr/share/movabletype/extlib';

 use MT;
 my $mt = MT->new or die MT->errstr;
--- movabletype-opensource-4.3.5+dfsg.orig/tools/convert-db
+++ movabletype-opensource-4.3.5+dfsg/tools/convert-db
@@ -7,14 +7,12 @@
 # $Id$

 use strict;
+use lib '/usr/share/movabletype/extlib';

 use Getopt::Long;
 GetOptions( "old:s" => \my($old_config),
             "new:s" => \my($new_config));

-use lib 'extlib';
-use lib 'lib';
-
 unless ($new_config) {
     print "Need configuration file location. cf: convert-db --new==mt-config.cgi.new";
     exit;
--- movabletype-opensource-4.3.5+dfsg.orig/tools/run-periodic-tasks
+++ movabletype-opensource-4.3.5+dfsg/tools/run-periodic-tasks
@@ -7,8 +7,7 @@
 # $Id$

 use strict;
-
-use lib 'lib', '../lib', 'extlib', '../extlib';
+use lib '/usr/share/movabletype/extlib';

 my $daemonize = 0;
 my $sleep     = 5;

