Sfoglia il codice sorgente

fix building of DBD::SQLite under Solaris as SQLite 3.3 now uses fdatasync from Solaris librt

Ralf S. Engelschall 19 anni fa
parent
commit
bcb5c0fe66
2 ha cambiato i file con 23 aggiunte e 10 eliminazioni
  1. 22 9
      perl-dbi/perl-dbi.patch
  2. 1 1
      perl-dbi/perl-dbi.spec

+ 22 - 9
perl-dbi/perl-dbi.patch

@@ -1,6 +1,6 @@
 Index: DBD-SQLite-1.13/Makefile.PL
---- DBD-SQLite-1.13/Makefile.PL.orig	2006-09-08 05:45:13 +0200
-+++ DBD-SQLite-1.13/Makefile.PL	2006-09-08 17:28:16 +0200
+--- DBD-SQLite-1.13/Makefile.PL.orig	2006-09-08 05:45:13.000000000 +0200
++++ DBD-SQLite-1.13/Makefile.PL	2006-09-19 20:05:27.104172279 +0200
 @@ -10,34 +10,6 @@
  }
  use Config;
@@ -36,21 +36,34 @@ Index: DBD-SQLite-1.13/Makefile.PL
  
  # 2005/6/19, by rjray@blackperl.com
  #
-@@ -120,9 +92,9 @@
+@@ -111,18 +83,19 @@
+ 
+ my $nlid = $DBI::VERSION > 1.42 ? '' : '-Dno_last_insert_id';
+ 
+-my $libs = '';
+-$libs .= "-L$sqlite_lib " if ($sqlite_lib); 
+-$libs .= "-lsqlite3 " unless ($force_local);
++my $inc = `pkg-config sqlite3 --cflags-only-I`;
++$inc =~ s/\r?\n$//s;
++my $libs = `pkg-config sqlite3 --libs`;
++$libs =~ s/\r?\n$//s;
+ 
+ WriteMakefile(
+     'NAME'          => 'DBD::SQLite',
      'VERSION_FROM'  => 'lib/DBD/SQLite.pm', # finds $VERSION
      'PREREQ_PM'     => {DBI => 1.21}, # e.g., Module::Name => 1.1
      'OBJECT'        => ($force_local) ? '$(O_FILES)' : 'SQLite.o dbdimp.o',
 -    'INC'           => '-I. -I$(DBI_INSTARCH_DIR)' .
-+    'INC'           => '-I@l_prefix@/include -I. -I$(DBI_INSTARCH_DIR)' .
++    'INC'           => $inc . ' -I. -I$(DBI_INSTARCH_DIR)' .
                         (($sqlite_inc) ? " -I$sqlite_inc" : ''),
 -    $libs ? ('LIBS' => $libs) : (),
-+    'LIBS'          => ['-L@l_prefix@/lib -lsqlite3'],
++    'LIBS'          => [ $libs ],
      'OPTIMIZE'      => "-O2",
      'DEFINE'        => "-DNDEBUG=1 -DSQLITE_PTR_SZ=$Config{ptrsize}" .
                         ( ($Config{d_usleep} ||
 Index: DBD-SQLite-1.13/dbdimp.c
---- DBD-SQLite-1.13/dbdimp.c.orig	2006-09-08 06:50:50 +0200
-+++ DBD-SQLite-1.13/dbdimp.c	2006-09-08 17:27:14 +0200
+--- DBD-SQLite-1.13/dbdimp.c.orig	2006-09-08 06:50:50.000000000 +0200
++++ DBD-SQLite-1.13/dbdimp.c	2006-09-19 20:03:45.164447005 +0200
 @@ -394,14 +394,17 @@
      
      sqlite_trace(3, "Execute returned %d cols\n", DBIc_NUM_FIELDS(imp_sth));
@@ -71,8 +84,8 @@ Index: DBD-SQLite-1.13/dbdimp.c
          sqlite3_reset(imp_sth->stmt);
          imp_sth->nrow = sqlite3_changes(imp_dbh->db);
 Index: DBD-SQLite-1.13/dbdimp.h
---- DBD-SQLite-1.13/dbdimp.h.orig	2006-09-08 06:50:50 +0200
-+++ DBD-SQLite-1.13/dbdimp.h	2006-09-08 17:27:14 +0200
+--- DBD-SQLite-1.13/dbdimp.h.orig	2006-09-08 06:50:50.000000000 +0200
++++ DBD-SQLite-1.13/dbdimp.h	2006-09-19 20:03:45.164783426 +0200
 @@ -4,7 +4,7 @@
  #define _DBDIMP_H   1
  

+ 1 - 1
perl-dbi/perl-dbi.spec

@@ -52,7 +52,7 @@ Class:        BASE
 Group:        Language
 License:      GPL/Artistic
 Version:      %{V_perl}
-Release:      20060909
+Release:      20060919
 
 #   package options
 %option       with_dbd_sqlite  yes