OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   23-Jul-2004 12:06:56
  Branch: HEAD                             Handle: 2004072311065500

  Added files:
    openpkg-src/perl-dbi    perl-dbi.patch
  Modified files:
    openpkg-src/perl-dbi    perl-dbi.spec

  Log:
    force to use external SQLite v3

  Summary:
    Revision    Changes     Path
    1.8         +134 -0     openpkg-src/perl-dbi/perl-dbi.patch
    1.112       +15 -3      openpkg-src/perl-dbi/perl-dbi.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/perl-dbi/perl-dbi.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.8 perl-dbi.patch
  --- /dev/null 2004-07-23 12:06:56 +0200
  +++ perl-dbi.patch    2004-07-23 12:06:56 +0200
  @@ -0,0 +1,134 @@
  +Index: dbdimp.h
  +--- dbdimp.h.orig    2004-07-21 22:50:42 +0200
  ++++ dbdimp.h 2004-07-23 11:37:44 +0200
  +@@ -4,7 +4,7 @@
  + #define _DBDIMP_H   1
  + 
  + #include "SQLiteXS.h"
  +-#include "sqliteInt.h"
  ++#include "sqlite3.h"
  + 
  + /* 30 second timeout by default */
  + #define SQL_TIMEOUT 30000
  +Index: MANIFEST
  +--- MANIFEST.orig    2004-07-21 22:48:03 +0200
  ++++ MANIFEST 2004-07-23 11:42:58 +0200
  +@@ -1,52 +1,14 @@
  +-attach.c
  +-auth.c
  +-btree.c
  +-btree.h
  +-build.c
  + Changes
  +-date.c
  + dbdimp.c
  + dbdimp.h
  +-delete.c
  +-encode.c
  +-expr.c
  +-func.c
  +-getsqlite.pl
  +-hash.c
  +-hash.h
  +-insert.c
  +-legacy.c
  + lib/DBD/SQLite.pm
  +-main.c
  + Makefile.PL
  + MANIFEST
  + MANIFEST.SKIP
  + META.yml                    Module meta-data (added by MakeMaker)
  +-opcodes.c
  +-opcodes.h
  +-os.h
  +-os_common.h
  +-os_mac.c
  +-os_mac.h
  +-os_test.c
  +-os_test.h
  +-os_unix.c
  +-os_unix.h
  +-os_win.c
  +-os_win.h
  +-pager.c
  +-pager.h
  +-parse.c
  +-parse.h
  + ppport.h
  +-pragma.c
  +-printf.c
  +-random.c
  + README
  +-select.c
  + SQLite.xs
  +-sqlite3.h
  +-sqliteInt.h
  + SQLiteXS.h
  + t/00basic.t
  + t/01logon.t
  +@@ -74,17 +36,3 @@
  + t/dbdadmin.t
  + t/lib.pl
  + t/SQLite.dbtest
  +-table.c
  +-tokenize.c
  +-trigger.c
  +-update.c
  +-utf.c
  +-util.c
  +-vacuum.c
  +-vdbe.c
  +-vdbe.h
  +-vdbeapi.c
  +-vdbeaux.c
  +-vdbeInt.h
  +-vdbemem.c
  +-where.c
  +Index: Makefile.PL
  +--- Makefile.PL.orig 2004-07-21 22:44:54 +0200
  ++++ Makefile.PL      2004-07-23 11:49:59 +0200
  +@@ -5,29 +5,15 @@
  + use ExtUtils::MakeMaker;
  + use Config;
  + use strict;
  +-eval {
  +-    require DBD::SQLite;
  +-    if ($DBD::SQLite::VERSION < 1.0) {
  +-        print <<EOT;
  +-Your version of DBD::SQLite currently installed ($DBD::SQLite::VERSION) uses
  +-the old sqlite database format. This version of DBD::SQLite will *NOT*
  +-open these files, and installing this module may cause problems on your
  +-system. If this is a live environment you should upgrade with caution.
  +-EOT
  +-        if (prompt("Continue?", "N") !~ /^y/i) {
  +-            print "Exiting\n";
  +-            exit -1;
  +-        }
  +-    }
  +-};
  + 
  + WriteMakefile(
  +     'NAME'          => 'DBD::SQLite',
  +     'VERSION_FROM'  => 'lib/DBD/SQLite.pm', # finds $VERSION
  +     'PREREQ_PM'     => {DBI => 1.21}, # e.g., Module::Name => 1.1
  +     'OBJECT'        => '$(O_FILES)',
  +-    'INC'           => '-I$(DBI_INSTARCH_DIR)',
  +-    'OPTIMIZE'      => "-O2 -DNDEBUG=1 -DSQLITE_PTR_SZ=$Config{ptrsize}",
  ++    'INC'           => '[EMAIL PROTECTED]@/include -I$(DBI_INSTARCH_DIR)',
  ++    'LIBS'          => ['[EMAIL PROTECTED]@/lib -lsqlite3'],
  ++    'OPTIMIZE'      => "-O2",
  +     'clean'         => { FILES => 'SQLite.xsi config.h' },
  + );
  + 
  +Index: dbdimp.c
  +--- dbdimp.c.orig    2004-07-21 22:50:42 +0200
  ++++ dbdimp.c 2004-07-23 12:02:11 +0200
  +@@ -224,7 +224,7 @@
  +         return FALSE;
  +     }
  +     
  +-    DBIc_NUM_PARAMS(imp_sth) = sqlite3_bind_count(imp_sth->stmt);
  ++    DBIc_NUM_PARAMS(imp_sth) = sqlite3_bind_parameter_count(imp_sth->stmt);
  +     DBIc_NUM_FIELDS(imp_sth) = sqlite3_column_count(imp_sth->stmt);
  +     DBIc_IMPSET_on(imp_sth);
  +     
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/perl-dbi/perl-dbi.spec
  ============================================================================
  $ cvs diff -u -r1.111 -r1.112 perl-dbi.spec
  --- openpkg-src/perl-dbi/perl-dbi.spec        23 Jul 2004 09:22:47 -0000      1.111
  +++ openpkg-src/perl-dbi/perl-dbi.spec        23 Jul 2004 10:06:55 -0000      1.112
  @@ -49,7 +49,7 @@
   Release:      20040723
   
   #   package options
  -%option       with_dbd_sqlite  yes
  +%option       with_dbd_sqlite  no
   %option       with_dbd_mysql   no
   %option       with_dbd_pgsql   no
   %option       with_dbd_oracle  no
  @@ -65,6 +65,7 @@
   Source6:      http://www.cpan.org/modules/by-module/DBD/DBD-Pg-%{V_dbd_pgsql}.tar.gz
   Source7:      
http://www.cpan.org/modules/by-module/DBD/DBD-Oracle-%{V_dbd_oracle}.tar.gz
   Source8:      
http://www.cpan.org/modules/by-module/DBD/DBD-ODBC-%{V_dbd_odbc}.tar.gz
  +Patch0:       perl-dbi.patch
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -73,6 +74,10 @@
   PreReq:       OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
   BuildPreReq:  perl-net
   PreReq:       perl-net
  +%if "%{with_dbd_sqlite}" == "yes"
  +BuildPreReq:  sqlite, sqlite::with_v3 = yes
  +PreReq:       sqlite, sqlite::with_v3 = yes
  +%endif
   %if "%{with_dbd_mysql}" == "yes"
   BuildPreReq:  mysql
   PreReq:       mysql
  @@ -161,6 +166,7 @@
       %setup -q -T -D -a 6
       %setup -q -T -D -a 7
       %setup -q -T -D -a 8
  +    %patch -p0 -d DBD-SQLite-%{V_dbd_sqlite}
   
   %build
   
  @@ -177,8 +183,14 @@
   %if "%{with_dbd_sqlite}" == "yes"
       #   build DBD::SQLite
       ( cd DBD-SQLite-%{V_dbd_sqlite}
  -      #   allow it to build with older versions of perl-dbi installed
  -      %{l_shtool} subst -s -e '/^eval/,/^}/d' Makefile.PL
  +      #   remove local SQLite sources (we use external one)
  +      #   in order to not confuse ExtUtils::MakeMaker
  +      mv ppport.h dbdimp.[ch] SQLiteXS.h ..
  +      rm -f *.[ch] getsqlite.pl
  +      mv ../ppport.h ../dbdimp.[ch] ../SQLiteXS.h .
  +      #   substitute paths in patched Makefile.PL
  +      %{l_shtool} subst %{l_value -s -a} Makefile.PL
  +      #   perform regular build and install
         %{l_prefix}/bin/perl-openpkg configure build install
       ) || exit $?
   %endif
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to