]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/patches/sqlite.patch
Add SED to the 3rd party dependencies build script for Microsoft Visual Studio.
[bacula/bacula] / bacula / src / win32 / patches / sqlite.patch
1 Index: main.mk
2 --- ../orig/sqlite-3.3.6/main.mk        2006-06-06 03:52:26.000000000 -0700
3 +++ ./main.mk   2006-06-30 15:16:28.000000000 -0700
4 @@ -60,7 +60,7 @@
5           expr.o func.o hash.o insert.o \
6           main.o opcodes.o os.o os_os2.o os_unix.o os_win.o \
7           pager.o parse.o pragma.o prepare.o printf.o random.o \
8 -         select.o table.o tclsqlite.o tokenize.o trigger.o \
9 +         select.o table.o tokenize.o trigger.o \
10           update.o util.o vacuum.o \
11           vdbe.o vdbeapi.o vdbeaux.o vdbefifo.o vdbemem.o \
12           where.o utf.o legacy.o
13 @@ -174,7 +174,7 @@
14  # of the most recently modified source code file
15  #
16  last_change:   $(SRC)
17 -       cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
18 +       cat $(SRC) | grep '$$Id: ' | sort -k 5 | tail -1 \
19            | $(NAWK) '{print $$5,$$6}' >last_change
20  
21  libsqlite3.a:  $(LIBOBJ)
22 @@ -264,7 +264,7 @@
23         $(TCCX) -c opcodes.c
24  
25  opcodes.c:     opcodes.h $(TOP)/mkopcodec.awk
26 -       sort -n -b +2 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
27 +       sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
28  
29  opcodes.h:     parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
30         cat parse.h $(TOP)/src/vdbe.c | $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
31 @@ -360,8 +360,8 @@
32  
33  # Rules for building test programs and for running tests
34  #
35 -tclsqlite3:    $(TOP)/src/tclsqlite.c libsqlite3.a
36 -       $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
37 +tclsqlite3$(EXE):      $(TOP)/src/tclsqlite.c libsqlite3.a
38 +       $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3$(EXE) \
39                 $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
40  
41  testfixture$(EXE):     $(TOP)/src/tclsqlite.c libsqlite3.a $(TESTSRC)
42 @@ -563,8 +563,8 @@
43  
44  # Standard install and cleanup targets
45  #
46 -install:       sqlite3 libsqlite3.a sqlite3.h
47 -       mv sqlite3 /usr/bin
48 +install:       sqlite3$(EXE) libsqlite3.a sqlite3.h
49 +       mv sqlite3$(EXE) /usr/bin
50         mv libsqlite3.a /usr/lib
51         mv sqlite3.h /usr/include
52  
53 Index: Makefile.mingw32
54 --- ../orig/sqlite-3.3.6/Makefile.mingw32       1969-12-31 16:00:00.000000000 -0800
55 +++ ./Makefile.mingw32  2006-06-30 15:14:29.000000000 -0700
56 @@ -0,0 +1,124 @@
57 +#!/usr/make
58 +#
59 +# Makefile for SQLITE
60 +#
61 +# This is a template makefile for SQLite.  Most people prefer to
62 +# use the autoconf generated "configure" script to generate the
63 +# makefile automatically.  But that does not work for everybody
64 +# and in every situation.  If you are having problems with the
65 +# "configure" script, you might want to try this makefile as an
66 +# alternative.  Create a copy of this file, edit the parameters
67 +# below and type "make".
68 +#
69 +
70 +#### The toplevel directory of the source tree.  This is the directory
71 +#    that contains this "Makefile.in" and the "configure.in" script.
72 +#
73 +TOP = ..
74 +
75 +#### C Compiler and options for use in building executables that
76 +#    will run on the platform that is doing the build.
77 +#
78 +BCC = gcc -g -O2
79 +#BCC = /opt/ancic/bin/c89 -0
80 +
81 +#### If the target operating system supports the "usleep()" system
82 +#    call, then define the HAVE_USLEEP macro for all C modules.
83 +#
84 +#USLEEP = 
85 +USLEEP = -DHAVE_USLEEP=1
86 +
87 +#### If you want the SQLite library to be safe for use within a 
88 +#    multi-threaded program, then define the following macro
89 +#    appropriately:
90 +#
91 +THREADSAFE = -DTHREADSAFE=1
92 +#THREADSAFE = -DTHREADSAFE=0
93 +
94 +#### Specify any extra linker options needed to make the library
95 +#    thread safe
96 +#
97 +THREADLIB = -lpthreadGCE
98 +#THREADLIB = 
99 +
100 +#### Specify any extra libraries needed to access required functions.
101 +#
102 +#TLIBS = -lrt    # fdatasync on Solaris 8
103 +TLIBS = 
104 +
105 +#### Leave SQLITE_DEBUG undefined for maximum speed.  Use SQLITE_DEBUG=1
106 +#    to check for memory leaks.  Use SQLITE_DEBUG=2 to print a log of all
107 +#    malloc()s and free()s in order to track down memory leaks.
108 +#    
109 +#    SQLite uses some expensive assert() statements in the inner loop.
110 +#    You can make the library go almost twice as fast if you compile
111 +#    with -DNDEBUG=1
112 +#
113 +#OPTS = -DSQLITE_DEBUG=2
114 +#OPTS = -DSQLITE_DEBUG=1
115 +#OPTS = 
116 +OPTS = -DNDEBUG=1
117 +OPTS += -DHAVE_FDATASYNC=1
118 +
119 +#### The suffix to add to executable files.  ".exe" for windows.
120 +#    Nothing for unix.
121 +#
122 +EXE = .exe
123 +#EXE =
124 +
125 +#### C Compile and options for use in building executables that 
126 +#    will run on the target platform.  This is usually the same
127 +#    as BCC, unless you are cross-compiling.
128 +#
129 +#TCC = gcc -O6
130 +#TCC = gcc -g -O0 -Wall
131 +#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
132 +TCC = $(CROSSTOOLS)/mingw32-gcc -O6
133 +#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
134 +
135 +#### Tools used to build a static library.
136 +#
137 +#AR = ar cr
138 +AR = $(CROSSTOOLS)/mingw32-ar cr
139 +#RANLIB = ranlib
140 +RANLIB = $(CROSSTOOLS)/mingw32-ranlib
141 +
142 +#### Extra compiler options needed for programs that use the TCL library.
143 +#
144 +#TCL_FLAGS =
145 +#TCL_FLAGS = -DSTATIC_BUILD=1
146 +#TCL_FLAGS = -I/home/drh/tcltk/8.4linux
147 +#TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1
148 +#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
149 +
150 +#### Linker options needed to link against the TCL library.
151 +#
152 +#LIBTCL = -ltcl84
153 +#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl
154 +#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt
155 +#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
156 +
157 +#### Compiler options needed for programs that use the readline() library.
158 +#
159 +READLINE_FLAGS =
160 +#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
161 +
162 +#### Linker options needed by programs using readline() must link against.
163 +#
164 +LIBREADLINE =
165 +#LIBREADLINE = -static -lreadline -ltermcap
166 +
167 +#### Should the database engine assume text is coded as UTF-8 or iso8859?
168 +#
169 +# ENCODING  = UTF8
170 +ENCODING = ISO8859
171 +
172 +
173 +#### Which "awk" program provides nawk compatibilty
174 +#
175 +# NAWK = nawk
176 +NAWK = awk
177 +
178 +# You should not have to change anything below this line
179 +###############################################################################
180 +include $(TOP)/main.mk