Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
perl-DBD-ODBC
perl-DBD-ODBC-1.29-Makefile.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-DBD-ODBC-1.29-Makefile.diff of Package perl-DBD-ODBC
Index: Makefile.PL =================================================================== --- Makefile.PL.orig 2011-07-28 12:31:31.000000000 +0200 +++ Makefile.PL 2011-12-02 13:28:15.406463804 +0100 @@ -212,6 +213,7 @@ } print "Overriding ODBC Directory with command line option: $opt_o\n" if $opt_o ; +my $lib=$ENV{LIB}; if ($opt_g) { print "Setting debug options!\n"; if ($OSNAME eq 'MSWin32') { @@ -348,7 +350,7 @@ #$tmp_odbchome =~ s/\\/\//g; #$odbchome = $tmp_odbchome if (-e "$tmp_odbchome/odbc.ini") chomp($odbchome = `cygpath \$WINDIR`); - } elsif (-f '/opt/sapdb/interfaces/odbc/lib/libsqlod.a') { + } elsif (-f '/opt/sapdb/interfaces/odbc/lib/libsqlod.a' || -f '/opt/sapdb/interfaces/odbc/lib/lib64/libsqlod.a') { $odbchome = '/opt/sapdb/interfaces/odbc/'; } } @@ -447,7 +449,7 @@ $opts{INC} .= " -I/usr/include/w32api" if $OSNAME eq 'cygwin'; # TO_DO all this needs to move until later - my $lib_d1 = "$odbchome/lib"; + my $lib_d1 = "$odbchome/$lib"; my $lib_d2 = "$odbchome/dlls"; my $libs = "odbc"; $opts{LIBS} = " -L$lib_d1 -R$lib_d1 -L$lib_d2 -R$lib_d2 -l$libs"; @@ -487,32 +489,32 @@ -e "$odbchome/odbc32.dll")); $myodbc = 'empress' - if !$myodbc && glob "$odbchome/lib/libempodbc.*"; + if !$myodbc && glob "$odbchome/$lib/libempodbc.*"; $myodbc = 'intersolve' if !$myodbc && -f "$odbchome/include/qeodbc.h"; $myodbc = 'sapdb' - if !$myodbc && -f "$odbchome/lib/libsqlod.$arext"; + if !$myodbc && -f "$odbchome/$lib/libsqlod.$arext"; $myodbc = 'adabas' if (!$myodbc && $ENV{DBROOT} && ($odbchome eq $ENV{DBROOT}) && - -f "$odbchome/lib/odbclib.$arext"); + -f "$odbchome/$lib/odbclib.$arext"); $myodbc = 'udbc' - if !$myodbc && -f "$odbchome/lib/libudbc.$arext"; + if !$myodbc && -f "$odbchome/$lib/libudbc.$arext"; $myodbc = 'solid' - if !$myodbc && -f "$odbchome/lib/libsolcli.$dlext"; + if !$myodbc && -f "$odbchome/$lib/libsolcli.$dlext"; # JL 2002-12-16: This test is accurate on Unix (Solaris 7) with IBM # Informix ClientSDK 2.80.UC1, which includes IBM Informix CLI # v3.81.000, an ODBC 3.x driver. # NB: The correct value for $ODBCHOME is $INFORMIXDIR. $myodbc = 'informix' - if !$myodbc && -f "$odbchome/lib/cli/libifcli.$dlext"; + if !$myodbc && -f "$odbchome/$lib/cli/libifcli.$dlext"; if (!$myodbc) { local($LIST_SEPARATOR) = ", "; @@ -540,7 +542,7 @@ if ($myodbc eq 'Microsoft ODBC') { print "\nBuilding for Microsoft under Cygwin\n"; - $opts{LIBS} = "-L/usr/lib/w32api -lodbc32"; + $opts{LIBS} = "-L/usr/$lib/w32api -lodbc32"; print {$sqlhfh} "#include <windows.h>\n"; print {$sqlhfh} "#include <sql.h>\n"; print {$sqlhfh} "#include <sqltypes.h>\n"; @@ -573,7 +575,7 @@ # remove lib prefix and .so suffix so "-l" style link can be used $ilibname =~ s/^lib(iodbc.*?)\.\w+$/$1/; $opts{LIBS} = "-L$odbclibdir -l$ilibname"; - warn "Warning: LD_LIBRARY_PATH doesn't include $odbchome/lib\n" + warn "Warning: LD_LIBRARY_PATH doesn't include $odbchome/$lib\n" if (!defined($ENV{LD_LIBRARY_PATH})) || ($ENV{LD_LIBRARY_PATH} =~ /\Q$odbclibdir/); } @@ -687,7 +689,11 @@ print {$sqlhfh} qq{#define DBD_ODBC_NO_DATASOURCES\n}; $opts{INC} .= " -I$odbchome/incl"; - $opts{LDFROM} = "\$(OBJECT) $odbchome/lib/libsqlod.a"; + if (-f "$odbchome/$lib/libsqlod.a" ) { + $opts{LDFROM} = "\$(OBJECT) $odbchome/$lib/libsqlod.a"; + } else { + $opts{LDFROM} = "\$(OBJECT) $odbchome/$lib/lib64/libsqlod.a"; + } } elsif ($myodbc eq 'adabas') { print {$sqlhfh} "#define FAR \n#define EXPORT \n#define CALLBACK \n"; @@ -746,7 +752,7 @@ # SQLGetPrivateProfileString is in libiodbcinst.a my $osver = `uname -r`; if ($osver && ($osver =~ /^8/)) { - $opts{LIBS} .= ' -L/usr/lib -liodbcinst'; + $opts{LIBS} .= ' -L/usr/$lib -liodbcinst'; } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor