Skip to content

Commit a6b9e68

Browse files
committed
sqlite2: provide patch and use old c standard
1 parent f5441fe commit a6b9e68

File tree

2 files changed

+85
-2
lines changed

2 files changed

+85
-2
lines changed

packages/sqlite2/Makefile.in.patch

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
--- src/sqlite-2.8.17/Makefile.in 2005-04-24 00:43:23.000000000 +0200
2+
+++ Makefile.in 2025-06-11 17:59:40.330232545 +0200
3+
@@ -22,7 +22,7 @@
4+
#
5+
BCC = @BUILD_CC@ @BUILD_CFLAGS@
6+
7+
-# C Compile and options for use in building executables that
8+
+# C Compile and options for use in building executables that
9+
# will run on the target platform. (BCC and TCC are usually the
10+
# same unless your are cross-compiling.)
11+
#
12+
@@ -205,7 +205,7 @@
13+
# files are automatically generated. This target takes care of
14+
# all that automatic generation.
15+
#
16+
-target_source: $(SRC) $(VDBEHDR)
17+
+target_source: $(SRC) $(VDBEHDR)
18+
rm -rf tsrc
19+
mkdir tsrc
20+
cp $(SRC) $(VDBEHDR) tsrc
21+
@@ -267,8 +267,9 @@
22+
# to a target with a different pointer size, you'll need to manually
23+
# configure the config.h file.
24+
#
25+
-config.h:
26+
+config.h:
27+
echo '#include <stdio.h>' >temp.c
28+
+ echo '#include <stdlib.h>' >> temp.c
29+
echo 'int main(){printf(' >>temp.c
30+
echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
31+
echo 'exit(0);}' >>temp.c
32+
@@ -277,7 +278,7 @@
33+
echo >>config.h
34+
rm -f temp.c temp
35+
36+
-sqlite.h: $(TOP)/src/sqlite.h.in
37+
+sqlite.h: $(TOP)/src/sqlite.h.in
38+
sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
39+
-e s/--ENCODING--/$(ENCODING)/ \
40+
$(TOP)/src/sqlite.h.in >sqlite.h
41+
@@ -471,12 +472,12 @@
42+
$(LTINSTALL) sqlite $(DESTDIR)$(exec_prefix)/bin
43+
$(INSTALL) -d $(DESTDIR)$(prefix)/include
44+
$(INSTALL) -m 0644 sqlite.h $(DESTDIR)$(prefix)/include
45+
- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
46+
- $(INSTALL) -m 0644 sqlite.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
47+
+ $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
48+
+ $(INSTALL) -m 0644 sqlite.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
49+
50+
-clean:
51+
+clean:
52+
rm -f *.lo *.la *.o sqlite@TARGET_EXEEXT@ libsqlite.la sqlite.h opcodes.*
53+
- rm -rf .libs .deps
54+
+ rm -rf .libs .deps
55+
rm -f lemon@BUILD_EXEEXT@ lempar.c parse.* sqlite*.tar.gz
56+
rm -f $(PUBLISH)
57+
rm -f *.da *.bb *.bbg gmon.out
58+
@@ -496,13 +497,13 @@
59+
strip sqlite.dll
60+
61+
#target for dll import libraries
62+
-implib: sqlite.lib
63+
+implib: sqlite.lib
64+
65+
#make Borland C++ and/or Microsoft VC import library for the dll
66+
# ignore any errors (usually due to missing programs)
67+
sqlite.lib: sqlite.dll
68+
-implib -a sqlite.lib sqlite.dll
69+
- -lib /machine:i386 /def:$(TOP)/sqlite.def
70+
+ -lib /machine:i386 /def:$(TOP)/sqlite.def
71+
72+
distclean: clean
73+
rm -f config.log config.status libtool Makefile config.h

packages/sqlite2/PKGBUILD

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,24 @@ arch=('x86_64' 'aarch64')
1010
url='http://www.sqlite.org/'
1111
depends=('readline>=6.0.00')
1212
source=("http://www.sqlite.org/sqlite-$pkgver.tar.gz"
13-
'LICENSE')
13+
'LICENSE'
14+
'Makefile.in.patch')
1415
license=('custom:unknown')
1516
sha512sums=('966e0b7f7ebbaaa9e1899864475040946fd7b66363be778d29fadd5184623b1e62644f3c8d4c4ecd001b88044befa7c34d9de9f68590329a1a8301d854b73e3f'
16-
'a2e3294c5a8188a0c81d0cde13b6bc33a69b525cb101fb08e5d14ad7dce8342ddd170ef14306ae2adc5107f8b8774f0b20816e69294b6bed1d26473975b8a780')
17+
'a2e3294c5a8188a0c81d0cde13b6bc33a69b525cb101fb08e5d14ad7dce8342ddd170ef14306ae2adc5107f8b8774f0b20816e69294b6bed1d26473975b8a780'
18+
'4ab360d78a338f9e9d0bb3da4c0798ef1a54da7362ead552232f43f5223f525471fde0d053b900a918831857bdead0e0e01805952ced45ad07cd58bc24cbf77b')
19+
20+
prepare() {
21+
cd "$_pkgname-$pkgver"
22+
23+
patch -Np2 -i "$srcdir/Makefile.in.patch"
24+
}
1725

1826
build() {
1927
cd "$_pkgname-$pkgver"
2028

29+
export CFLAGS="-O2 -Wall -Wno-error -Wno-implicit-function-declaration -std=gnu89"
30+
2131
if [[ $CARCH == "aarch64" ]]; then
2232
./configure --prefix=/usr --host=arm --build=arm
2333
else

0 commit comments

Comments
 (0)