diff -uNr DBD-Sybase-1.08/CHANGES DBD-Sybase-1.08.1.binck/CHANGES
--- DBD-Sybase-1.08/CHANGES 2007-04-19 20:31:18.000000000 +0200
+++ DBD-Sybase-1.08.1.binck/CHANGES 2007-05-23 08:19:29.000000000 +0200
@@ -1,5 +1,10 @@
$Id: CHANGES,v 1.80 2007/04/19 18:31:18 mpeppler Exp $
+Release 1.08.1.binck
+
+ 23/05/2007 Simon J Mudd <smudd@binck.nl>
+ Changes to make this work on RHEL4 x86_64 with freetds.
+
Release 1.08
Detect missing libblk.a library, and disable the BLK api calls
diff -uNr DBD-Sybase-1.08/MANIFEST DBD-Sybase-1.08.1.binck/MANIFEST
--- DBD-Sybase-1.08/MANIFEST 2004-11-26 10:45:53.000000000 +0100
+++ DBD-Sybase-1.08.1.binck/MANIFEST 2007-05-23 08:18:25.000000000 +0200
@@ -10,6 +10,7 @@
Sybase.pm
Sybase.xs
Makefile.PL
+Makefile.PL.orig
dbdimp.c
dbdimp.h
dbd-sybase.pod
diff -uNr DBD-Sybase-1.08/META.yml DBD-Sybase-1.08.1.binck/META.yml
--- DBD-Sybase-1.08/META.yml 2007-04-21 17:44:26.000000000 +0200
+++ DBD-Sybase-1.08.1.binck/META.yml 2007-05-23 08:19:46.000000000 +0200
@@ -1,7 +1,7 @@
#
http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: DBD-Sybase
-version: 1.08
+version: 1.08.1.binck
version_from: Sybase.pm
installdirs: site
requires:
diff -uNr DBD-Sybase-1.08/Makefile.PL DBD-Sybase-1.08.1.binck/Makefile.PL
--- DBD-Sybase-1.08/Makefile.PL 2007-04-10 17:42:21.000000000 +0200
+++ DBD-Sybase-1.08.1.binck/Makefile.PL 2007-05-23 08:16:49.000000000 +0200
@@ -23,6 +23,7 @@
my $chained;
my $threaded_libs;
my $accept_test_defaults;
+my $libdir;
GetOptions('--file' => \$file, '--chained:s' => \$chained,
'--threaded_libs:s' => \$threaded_libs,
'--accept_test_defaults' => \$accept_test_defaults);
@@ -34,9 +35,9 @@
configPwd();
my $lddlflags = $Config{lddlflags};
-$lddlflags = "-L$SYBASE/lib $lddlflags" unless $^O eq 'VMS';
+$lddlflags = "-L$SYBASE/$libdir $lddlflags" unless $^O eq 'VMS';
my $ldflags = $Config{ldflags};
-$ldflags = "-L$SYBASE/lib $ldflags" unless $^O eq 'VMS';
+$ldflags = "-L$SYBASE/$libdir $ldflags" unless $^O eq 'VMS';
WriteMakefile('NAME' => 'DBD::Sybase',
@@ -78,6 +79,18 @@
};
}
+ # Determine the correct lib directory to use.
+ # On Linux x86_64 (RHEL at least) we must use the 64-bit libraries.
+ # - these are located in /usr/lib64, /lib64...
+ # if ( $Config{archname} =~ /^x86_64-/ ) { OLD CHECK - LESS GENERIC
+ if ( $Config{use64bitall} and -d '/lib64' ) {
+ print "Setting libdir to lib64 [for 64-bit libraries]\n";
+ $libdir = 'lib64';
+ } else {
+ print "Setting libdir to lib\n";
+ $libdir = 'lib';
+ }
+
open(IN, "CONFIG") || die "Can't open CONFIG: $!";
while(<IN>) {
chomp;
@@ -114,11 +127,11 @@
$SYBASE .= "/$ENV{SYBASE_OCS}";
}
- if(! -d "$SYBASE/lib") {
+ if(! -d "$SYBASE/$libdir") {
die "Can't find the lib directory under $SYBASE!";
}
- die "Can't find any Sybase libraries in $SYBASE/lib" unless checkLib($SYBASE);
+ die "Can't find any Sybase libraries in $SYBASE/$libdir" unless checkLib($SYBASE);
my $inc_found = 0;
if(-d "$SYBASE/include" && -f "$SYBASE/include/cspublic.h") {
@@ -144,11 +157,11 @@
# print "OS = $^O\n";
if($^O eq 'MSWin32') {
- $lib_string = "-L$SYBASE/lib -llibct.lib -llibcs.lib -llibtcl.lib -llibcomn.lib -llibintl.lib -llibblk.lib $attr{EXTRA_LIBS} -lm";
+ $lib_string = "-L$SYBASE/$libdir -llibct.lib -llibcs.lib -llibtcl.lib -llibcomn.lib -llibintl.lib -llibblk.lib $attr{EXTRA_LIBS} -lm";
} elsif($^O eq 'VMS') {
- $lib_string = "-L$SYBASE/lib -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}";
+ $lib_string = "-L$SYBASE/$libdir -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}";
} elsif($^O =~ /cygwin/) {
- $lib_string = "-L$SYBASE/lib -lct -lcs -lblk";
+ $lib_string = "-L$SYBASE/$libdir -lct -lcs -lblk";
$inc_string .= " -D_MSC_VER=800";
} else {
# Supplied by Erick Calder. I'm not sure why libsybsrv is needed...
@@ -156,9 +169,9 @@
my $extra = getExtraLibs($SYBASE, $attr{EXTRA_LIBS}, $version);
if($file) {
- $lib_string = "-L$SYBASE/lib -lct -lcs -ltcl -lcomn -lintl -lblk $attr{EXTRA_LIBS} -ldl -lm";
+ $lib_string = "-L$SYBASE/$libdir -lct -lcs -ltcl -lcomn -lintl -lblk $attr{EXTRA_LIBS} -ldl -lm";
} else {
- $lib_string = "-L$SYBASE/lib -lct -lcs -ltcl -lcomn -lintl -lblk $extra -ldl -lm";
+ $lib_string = "-L$SYBASE/$libdir -lct -lcs -ltcl -lcomn -lintl -lblk $extra -ldl -lm";
}
if($newlibnames) {
foreach (qw(ct cs tcl comn intl blk)) {
@@ -170,7 +183,7 @@
my %libname;
- %libname = loadSybLibs("$SYBASE/lib");
+ %libname = loadSybLibs("$SYBASE/$libdir");
my $libtype = '';
@@ -193,7 +206,7 @@
}
if(!$found) {
print "No thread-safe Sybase libraries found\n";
- $inc_string .= ' -DNO_THREADS ';
+ $inc_string .= ' -DNO_THREADS';
} else {
$libtype .= '_r';
}
@@ -282,7 +295,7 @@
sub getLibVersion {
my $dir = shift;
- my $lib = "$dir/lib";
+ my $lib = "$dir/$libdir";
opendir(DIR, $lib);
# reverse to pick up libsybct before libct...
my @files = reverse(grep(/lib(syb)?ct(64)?\./, readdir(DIR)));
@@ -317,8 +330,8 @@
my $cfg = shift;
my $version = shift;
- opendir(DIR, "$dir/lib") || die "Can't access $dir/lib: $!";
- my %files = map { $_ =~ s/lib([^\.]+)\..*/$1/; $_ => 1 } grep(/lib/ && -f "$dir/lib/$_", readdir(DIR));
+ opendir(DIR, "$dir/$libdir") || die "Can't access $dir/$libdir: $!";
+ my %files = map { $_ =~ s/lib([^\.]+)\..*/$1/; $_ => 1 } grep(/$libdir/ && -f "$dir/$libdir/$_", readdir(DIR));
closedir(DIR);
my %x = map {$_ => 1} split(' ', $cfg);
@@ -331,7 +344,7 @@
}
foreach my $f (qw(insck tli sdna dnet_stub tds skrb gss)) {
- $x{"-l$f"} = 1 if exists $files{$f} && -f "$dir/lib/lib$f.$dlext";
+ $x{"-l$f"} = 1 if exists $files{$f} && -f "$dir/$libdir/lib$f.$dlext";
}
if($version gt '11') {
delete($x{-linsck});
@@ -348,7 +361,7 @@
sub checkLib {
my $dir = shift;
- opendir(DIR, "$dir/lib") || die "Can't access $dir/lib: $!";
+ opendir(DIR, "$dir/$libdir") || die "Can't access $dir/$libdir: $!";
my @files = grep(/libct|libsybct/i, readdir(DIR));
closedir(DIR);
if(grep(/libsybct/, @files)) {
diff -uNr DBD-Sybase-1.08/Sybase.pm DBD-Sybase-1.08.1.binck/Sybase.pm
--- DBD-Sybase-1.08/Sybase.pm 2007-04-21 17:43:55.000000000 +0200
+++ DBD-Sybase-1.08.1.binck/Sybase.pm 2007-05-23 08:23:05.000000000 +0200
@@ -25,7 +25,7 @@
$hostname = Sys::Hostname::hostname();
$init_done = 0;
- $VERSION = '1.08';
+ $VERSION = '1.08.1.binck';
my $Revision = substr(q$Revision: 1.105 $, 10);
require_version DBI 1.30;