Description: Perl script use lib
  * Set paths to hhsuite components for Perl scripts.
Author: Laszlo Kajan <lkajan@rostlab.org>
--- hhsuite.orig/scripts/hhmakemodel.pl
+++ hhsuite/scripts/hhmakemodel.pl
@@ -28,7 +28,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 use Align;
--- hhsuite.orig/scripts/create_profile_from_hhm.pl
+++ hhsuite/scripts/create_profile_from_hhm.pl
@@ -27,7 +27,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 
--- hhsuite.orig/scripts/create_profile_from_hmmer.pl
+++ hhsuite/scripts/create_profile_from_hmmer.pl
@@ -27,7 +27,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 
--- hhsuite.orig/scripts/multithread.pl
+++ hhsuite/scripts/multithread.pl
@@ -29,7 +29,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 use POSIX;
--- hhsuite.orig/scripts/pdb2fasta.pl
+++ hhsuite/scripts/pdb2fasta.pl
@@ -26,7 +26,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 $|= 1; # Activate autoflushing on STDOUT
--- hhsuite.orig/scripts/pdbfilter.pl
+++ hhsuite/scripts/pdbfilter.pl
@@ -26,7 +26,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 
--- hhsuite.orig/scripts/renumberpdb.pl
+++ hhsuite/scripts/renumberpdb.pl
@@ -27,7 +27,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use Align;     # Needleman-Wunsch and Smith-Waterman alignment functions
 use File::Temp qw/ tempfile /;
--- hhsuite.orig/scripts/splitfasta.pl
+++ hhsuite/scripts/splitfasta.pl
@@ -26,7 +26,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 use warnings;
--- hhsuite.orig/scripts/addss.pl
+++ hhsuite/scripts/addss.pl
@@ -28,7 +28,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@mpibpc.mpg.de
 
-use lib $ENV{"HHLIB"} . "/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;    # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use Align;      # Needleman-Wunsch and Smith-Waterman alignment functions
 use File::Temp qw/ tempfile tempdir /;
