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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   03-Jun-2007 11:41:59
  Branch: HEAD                             Handle: 2007060310415800

  Modified files:
    openpkg-src/sqlite      sqlite.patch sqlite.spec

  Log:
    finally remove all ancient SQLite 2.x support and this way greatly
    simplify packaging of SQLite again; fix with_readline support; fix GNU
    awk usage

  Summary:
    Revision    Changes     Path
    1.30        +27 -59     openpkg-src/sqlite/sqlite.patch
    1.139       +49 -103    openpkg-src/sqlite/sqlite.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/sqlite/sqlite.patch
  ============================================================================
  $ cvs diff -u -r1.29 -r1.30 sqlite.patch
  --- openpkg-src/sqlite/sqlite.patch   25 Apr 2007 15:22:11 -0000      1.29
  +++ openpkg-src/sqlite/sqlite.patch   3 Jun 2007 09:41:58 -0000       1.30
  @@ -1,34 +1,7 @@
  -Index: sqlite-2.8.17/configure
  ---- sqlite-2.8.17/configure.orig     2005-04-24 00:43:23 +0200
  -+++ sqlite-2.8.17/configure  2006-12-18 09:51:03 +0100
  -@@ -20450,7 +20450,10 @@
  -   TARGET_HAVE_READLINE=0
  - fi
  - 
  --
  -+if [ "$ac_cv_lib_readline_readline" = "no" ]
  -+then
  -+    TARGET_HAVE_READLINE=0
  -+fi
  - 
  - #########
  - # Figure out whether or not we have a "usleep()" function.
  -Index: sqlite-2.8.17/src/encode.c
  ---- sqlite-2.8.17/src/encode.c.orig  2005-04-24 00:43:22 +0200
  -+++ sqlite-2.8.17/src/encode.c       2007-02-23 15:28:03 +0100
  -@@ -176,6 +176,8 @@
  -   int i, e;
  -   unsigned char c;
  -   e = *(in++);
  -+  if (e == 0)
  -+    return 0;
  -   i = 0;
  -   while( (c = *(in++))!=0 ){
  -     if( c==1 ){
  -Index: sqlite-3.3.17/Makefile.in
  ---- sqlite-3.3.17/Makefile.in.orig   2006-10-03 14:40:42 +0200
  -+++ sqlite-3.3.17/Makefile.in        2006-12-18 09:51:03 +0100
  -@@ -132,6 +132,12 @@
  +Index: Makefile.in
  +--- Makefile.in.orig 2007-04-06 14:44:37 +0200
  ++++ Makefile.in      2007-06-03 11:35:12 +0200
  +@@ -130,6 +130,12 @@
             vdbe.lo vdbeapi.lo vdbeaux.lo vdbefifo.lo vdbemem.lo \
             where.lo utf.lo legacy.lo vtab.lo
    
  @@ -41,7 +14,16 @@
    # All of the source code files.
    #
    SRC = \
  -@@ -481,6 +487,14 @@
  +@@ -399,7 +405,7 @@
  +     cp $(TOP)/src/parse.y .
  +     ./lemon$(BEXE) $(OPTS) parse.y
  +     mv parse.h parse.h.temp
  +-    awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
  ++    $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
  + 
  + pragma.lo:  $(TOP)/src/pragma.c $(HDR)
  +     $(LTCOMPILE) -c $(TOP)/src/pragma.c
  +@@ -485,6 +491,14 @@
                -o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \
                libsqlite3.la $(LIBTCL)
    
  @@ -56,23 +38,9 @@
    
    fulltest:   testfixture$(TEXE) sqlite3$(TEXE)
        ./testfixture $(TOP)/test/all.test
  -Index: sqlite-3.3.17/configure
  ---- sqlite-3.3.17/configure.orig     2006-10-03 14:42:27 +0200
  -+++ sqlite-3.3.17/configure  2006-12-18 09:51:03 +0100
  -@@ -20472,6 +20472,10 @@
  -   TARGET_HAVE_READLINE=0
  - fi
  - 
  -+if [ "$ac_cv_lib_readline_readline" = "no" ]
  -+then
  -+    TARGET_HAVE_READLINE=0
  -+fi
  - 
  - 
  - #########
  -Index: sqlite-3.3.17/ext/fts1/fts1.c
  ---- sqlite-3.3.17/ext/fts1/fts1.c.orig       2006-10-08 13:16:32 +0200
  -+++ sqlite-3.3.17/ext/fts1/fts1.c    2006-12-18 09:51:03 +0100
  +Index: ext/fts1/fts1.c
  +--- ext/fts1/fts1.c.orig     2007-04-12 23:24:09 +0200
  ++++ ext/fts1/fts1.c  2007-06-03 11:34:54 +0200
   @@ -19,11 +19,7 @@
    #endif
    
  @@ -85,9 +53,9 @@
    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
  -Index: sqlite-3.3.17/ext/fts1/fts1_porter.c
  ---- sqlite-3.3.17/ext/fts1/fts1_porter.c.orig        2006-10-01 20:01:13 
+0200
  -+++ sqlite-3.3.17/ext/fts1/fts1_porter.c     2006-12-18 09:51:03 +0100
  +Index: ext/fts1/fts1_porter.c
  +--- ext/fts1/fts1_porter.c.orig      2007-03-16 19:30:54 +0100
  ++++ ext/fts1/fts1_porter.c   2007-06-03 11:34:54 +0200
   @@ -26,11 +26,7 @@
    
    
  @@ -100,9 +68,9 @@
    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
  -Index: sqlite-3.3.17/ext/fts1/fts1_tokenizer1.c
  ---- sqlite-3.3.17/ext/fts1/fts1_tokenizer1.c.orig    2006-09-30 15:57:33 
+0200
  -+++ sqlite-3.3.17/ext/fts1/fts1_tokenizer1.c 2006-12-18 09:51:03 +0100
  +Index: ext/fts1/fts1_tokenizer1.c
  +--- ext/fts1/fts1_tokenizer1.c.orig  2007-03-16 19:30:54 +0100
  ++++ ext/fts1/fts1_tokenizer1.c       2007-06-03 11:34:54 +0200
   @@ -18,11 +18,7 @@
    
    
  @@ -115,9 +83,9 @@
    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
  -Index: sqlite-3.3.17/sqlite3.pc.in
  ---- sqlite-3.3.17/sqlite3.pc.in.orig 2004-07-19 06:25:47 +0200
  -+++ sqlite-3.3.17/sqlite3.pc.in      2006-12-18 09:51:03 +0100
  +Index: sqlite3.pc.in
  +--- sqlite3.pc.in.orig       2004-07-19 06:25:47 +0200
  ++++ sqlite3.pc.in    2007-06-03 11:34:54 +0200
   @@ -8,5 +8,5 @@
    Name: SQLite
    Description: SQL database engine
  @@ -127,7 +95,7 @@
    Cflags: -I${includedir}
   Index: sqliteodbc-0.74/Makefile.in
   --- sqliteodbc-0.74/Makefile.in.orig 2007-02-04 12:23:36 +0100
  -+++ sqliteodbc-0.74/Makefile.in      2007-02-11 11:43:15 +0100
  ++++ sqliteodbc-0.74/Makefile.in      2007-06-03 11:34:54 +0200
   @@ -6,7 +6,7 @@
    CC =                @CC@
    INSTALL =   @INSTALL@
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/sqlite/sqlite.spec
  ============================================================================
  $ cvs diff -u -r1.138 -r1.139 sqlite.spec
  --- openpkg-src/sqlite/sqlite.spec    25 Apr 2007 15:22:11 -0000      1.138
  +++ openpkg-src/sqlite/sqlite.spec    3 Jun 2007 09:41:58 -0000       1.139
  @@ -23,9 +23,8 @@
   ##
   
   #   package version
  -%define       V_v3   3.3.17
  -%define       V_v2   2.8.17
  -%define       V_odbc 0.74
  +%define       V_sqlite   3.3.17
  +%define       V_odbc     0.74
   
   #   package information
   Name:         sqlite
  @@ -37,11 +36,10 @@
   Class:        BASE
   Group:        Database
   License:      PD
  -Version:      %{V_v3}
  -Release:      20070425
  +Version:      %{V_sqlite}
  +Release:      20070603
   
   #   package options
  -%option       with_v2              no
   %option       with_utf8            no
   %option       with_assert          no
   %option       with_readline        no
  @@ -50,9 +48,8 @@
   %option       with_odbc            no
   
   #   list of sources
  -Source0:      http://www.sqlite.org/sqlite-%{V_v3}.tar.gz
  -Source1:      http://www.sqlite.org/sqlite-%{V_v2}.tar.gz
  -Source2:      http://www.ch-werner.de/sqliteodbc/sqliteodbc-%{V_odbc}.tar.gz
  +Source0:      http://www.sqlite.org/sqlite-%{V_sqlite}.tar.gz
  +Source1:      http://www.ch-werner.de/sqliteodbc/sqliteodbc-%{V_odbc}.tar.gz
   Patch0:       sqlite.patch
   
   #   build information
  @@ -82,24 +79,12 @@
       the server. The SQLite library reads and writes directly to and from
       the database files on disk.
   
  -    This package contains both SQLite 3 (%{V_v3}) and optionally the old
  -    SQLite 2 (%{V_v2}). Notice that the two are API and database format
  -    incompatible but can be used in parallel (on different databases).
  -    Additionally, this package optionally provides the SQLite ODBC driver.
  -
   %track
       prog sqlite = {
  -        version   = %{V_v3}
  +        version   = %{V_sqlite}
           url       = http://www.sqlite.org/download.html
           regex     = sqlite-(\d+\.\d+\.\d+)\.tar\.gz
       }
  -    prog sqlite:v2 = {
  -        disabled
  -        comment   = "rse: SQLite 2.x no longer available for download"
  -        version   = %{V_v2}
  -        url       = http://www.sqlite.org/download.html
  -        regex     = sqlite-(2\.\d+\.\d+)\.tar\.gz
  -    }
       prog sqlite:odbc = {
           version   = %{V_odbc}
           url       = http://www.ch-werner.de/sqliteodbc/
  @@ -107,67 +92,60 @@
       }
   
   %prep
  -    %setup -q -c
  +    %setup -q
       %setup -q -D -T -a 1
  -    %setup -q -D -T -a 2
       %patch -p0
   
       #   post-adjust sources
  -    chmod a+x sqlite-%{V_v2}/install-sh
       %{l_shtool} subst \
           -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  -        sqlite-%{V_v3}/configure sqlite-%{V_v2}/configure
  +        configure
   
   %build
  -    #   configure and build SQLite 3 and optionally SQLite 2
  -    for v in %{V_v3} \
  -%if "%{with_v2}" == "yes"
  -        %{V_v2} \
  -%endif
  -    ; do
  -        ( cd sqlite-$v
  -          CC="%{l_cc}"
  -          export CC
  -          CPPFLAGS="%{l_cppflags}"
  -          export CPPFLAGS
  -          CFLAGS="%{l_cflags -O}"
  -          export CFLAGS
  -          LDFLAGS="%{l_ldflags}"
  -          export LDFLAGS
  -          LIBS=""
  -          export LIBS
  +    #   configure and build SQLite
  +    CC="%{l_cc}"
  +    CFLAGS="%{l_cflags -O}"
   %if "%{with_assert}" == "no"
  -          CFLAGS="$CFLAGS -DNDEBUG=1"
  -%endif
  -%if "%{with_readline}" == "yes"
  -          config_TARGET_READLINE_INC="%{l_cppflags readline} 
`%{l_prefix}/bin/pkg-config --cflags readline`"
  -          export config_TARGET_READLINE_INC
  -          config_TARGET_READLINE_LIBS="%{l_ldflags} 
`%{l_prefix}/bin/pkg-config --libs readline`"
  -          export config_TARGET_READLINE_LIBS
  +    CFLAGS="$CFLAGS -DNDEBUG=1"
   %endif
  -          ./configure \
  -              --prefix=%{l_prefix} \
  +    CPPFLAGS="%{l_cppflags}"
  +    LDFLAGS="%{l_ldflags}"
  +    LIBS=""
  +    export CC
  +    export CPPFLAGS
  +    export CFLAGS
  +    export LDFLAGS
  +    export LIBS
  +    ./configure \
  +        --prefix=%{l_prefix} \
   %if "%{with_utf8}" == "yes"
  -              --enable-utf8 \
  +        --enable-utf8 \
  +%else
  +        --disable-utf8 \
   %endif
   %if "%{with_threads}" == "yes"
  -              --enable-threadsafe \
  +        --enable-threadsafe \
  +%else
  +        --disable-threadsafe \
   %endif
  -              --disable-shared
  +%if "%{with_readline}" == "yes"
  +        --enable-readline \
  +        --with-readline-lib="`%{l_prefix}/bin/pkg-config --libs readline`" \
  +        --with-readline-inc="`%{l_prefix}/bin/pkg-config --cflags readline`" 
\
  +%else
  +        --disable-readline \
  +%endif
  +        --disable-shared
   %if "%{with_assert}" == "yes"
  -          %{l_shtool} subst \
  -              -e 's;-DNDEBUG;;' \
  -              Makefile
  +    %{l_shtool} subst \
  +        -e 's;-DNDEBUG;;' \
  +        Makefile
   %endif
  -          MFLAGS=""
  +    MFLAGS=""
   %if "%{with_fts1}" == "yes"
  -          case $v in
  -              3.* ) MFLAGS="$MFLAGS FTS1=1" ;;
  -          esac
  -%endif
  -          %{l_make} %{l_mflags -O} $MFLAGS
  -        ) || exit $?
  -    done
  +    MFLAGS="$MFLAGS FTS1=1"
  +%endif
  +    %{l_make} %{l_mflags -O} $MFLAGS
   
       #   optionally build ODBC driver
   %if "%{with_odbc}" == "yes"
  @@ -176,18 +154,11 @@
         export CFLAGS="%{l_cflags -O}"
         export CPPFLAGS=""
         export LDFLAGS=""
  -      CPPFLAGS="$CPPFLAGS -I../sqlite-%{V_v3}"
  -      LDFLAGS="$LDFLAGS -L../sqlite-%{V_v3}/.libs"
  -%if "%{with_v2}" == "yes"
  -      CPPFLAGS="$CPPFLAGS -I../sqlite-%{V_v2}"
  -      LDFLAGS="$LDFLAGS -L../sqlite-%{V_v2}/.libs"
  -%endif
  +      CPPFLAGS="$CPPFLAGS -I.."
  +      LDFLAGS="$LDFLAGS -L../.libs"
         ./configure \
             --prefix=%{l_prefix} \
  -          --with-sqlite3=../sqlite-%{V_v3} \
  -%if "%{with_v2}" == "yes"
  -          --with-sqlite=../sqlite-%{V_v2} \
  -%endif
  +          --with-sqlite3=.. \
             --with-odbc=%{l_prefix} \
             --disable-static \
             --enable-shared
  @@ -204,24 +175,14 @@
           $RPM_BUILD_ROOT%{l_prefix}/include \
           $RPM_BUILD_ROOT%{l_prefix}/man/man1
   
  -    #   install SQLite 3
  -    ( cd sqlite-%{V_v3}
  +    #   install SQLite
  +    ( cd sqlite-%{V_sqlite}
         %{l_make} %{l_mflags} install \
             prefix=$RPM_BUILD_ROOT%{l_prefix}
         %{l_shtool} install -c -m 644 \
             sqlite3.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/sqlite3.1
       ) || exit $?
   
  -    #   install SQLite 2 (optional)
  -%if "%{with_v2}" == "yes"
  -    ( cd sqlite-%{V_v2}
  -      %{l_make} %{l_mflags} install \
  -          prefix=$RPM_BUILD_ROOT%{l_prefix}
  -      %{l_shtool} install -c -m 644 \
  -          sqlite.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/sqlite.1
  -    ) || exit $?
  -%endif
  -
       #   install SQLite ODBC driver (optional)
   %if "%{with_odbc}" == "yes"
       ( cd sqliteodbc-%{V_odbc}
  @@ -256,17 +217,6 @@
           ( echo "[SQLite3 DataSource]"
             echo "Driver          = SQLite3"
           ) | $RPM_INSTALL_PREFIX/bin/odbcinst -i -s -l -n "SQLite3 
DataSource" -r >/dev/null 2>&1 || true
  -%if "%{with_v2}" == "yes"
  -        ( echo "[SQLite]"
  -          echo "Description     = SQLite 2 ODBC Driver"
  -          echo "Driver          = $RPM_INSTALL_PREFIX/lib/libsqliteodbc.so"
  -          echo "Setup           = $RPM_INSTALL_PREFIX/lib/libsqliteodbc.so"
  -          echo "FileUsage       = 1"
  -        ) | $RPM_INSTALL_PREFIX/bin/odbcinst -i -d -n "SQLite" -r >/dev/null 
2>&1 || true
  -        ( echo "[SQLite DataSource]"
  -          echo "Driver          = SQLite"
  -        ) | $RPM_INSTALL_PREFIX/bin/odbcinst -i -s -l -n "SQLite DataSource" 
-r >/dev/null 2>&1 || true
  -%endif
   %endif
       fi
   
  @@ -276,10 +226,6 @@
   %if "%{with_odbc}" == "yes"
           $RPM_INSTALL_PREFIX/bin/odbcinst -u -s -l -n "SQLite3 DataSource" 
>/dev/null 2>&1 || true
           $RPM_INSTALL_PREFIX/bin/odbcinst -u -d    -n "SQLite3"            
>/dev/null 2>&1 || true
  -%if "%{with_v2}" == "yes"
  -        $RPM_INSTALL_PREFIX/bin/odbcinst -u -s -l -n "SQLite DataSource"  
>/dev/null 2>&1 || true
  -        $RPM_INSTALL_PREFIX/bin/odbcinst -u -d    -n "SQLite"             
>/dev/null 2>&1 || true
  -%endif
   %endif
       fi
   
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to