summaryrefslogtreecommitdiff
path: root/Ports/sqlite
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2021-03-27 12:38:07 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-27 19:43:14 +0100
commit9c141d0a876b5dc7660346d216e74b773e1656f6 (patch)
tree4fec059f2581b12ade4803130d7bfd72a937a844 /Ports/sqlite
parent2fb3c984292ad28651d3ff4c07a4a089debc4df8 (diff)
downloadserenity-9c141d0a876b5dc7660346d216e74b773e1656f6.zip
Ports: Add SQLite
Diffstat (limited to 'Ports/sqlite')
-rwxr-xr-xPorts/sqlite/package.sh7
-rw-r--r--Ports/sqlite/patches/config.sub.patch11
-rw-r--r--Ports/sqlite/patches/shell.c.patch13
-rw-r--r--Ports/sqlite/patches/sqlite3.c.patch18
4 files changed, 49 insertions, 0 deletions
diff --git a/Ports/sqlite/package.sh b/Ports/sqlite/package.sh
new file mode 100755
index 0000000000..ee58c75633
--- /dev/null
+++ b/Ports/sqlite/package.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port=sqlite
+useconfigure="true"
+version="3350300"
+files="https://www.sqlite.org/2021/sqlite-autoconf-${version}.tar.gz sqlite-autoconf-${version}.tar.gz"
+workdir="sqlite-autoconf-${version}"
+configopts="CFLAGS=-DHAVE_UTIME"
diff --git a/Ports/sqlite/patches/config.sub.patch b/Ports/sqlite/patches/config.sub.patch
new file mode 100644
index 0000000000..9695dc6180
--- /dev/null
+++ b/Ports/sqlite/patches/config.sub.patch
@@ -0,0 +1,11 @@
+--- sqlite-autoconf-3350300/config.sub 2021-03-26 15:25:02.000000000 +0100
++++ sqlite-autoconf-port/config.sub 2021-03-26 23:31:42.457629453 +0100
+@@ -1366,7 +1366,7 @@
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+- | -sym* | -kopensolaris* | -plan9* \
++ | -sym* | -kopensolaris* | -plan9* | -serenity* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
diff --git a/Ports/sqlite/patches/shell.c.patch b/Ports/sqlite/patches/shell.c.patch
new file mode 100644
index 0000000000..776f182abe
--- /dev/null
+++ b/Ports/sqlite/patches/shell.c.patch
@@ -0,0 +1,13 @@
+--- sqlite-autoconf-3350300/shell.c 2021-03-26 15:24:58.000000000 +0100
++++ sqlite-autoconf-port/shell.c 2021-03-27 12:05:40.289547647 +0100
+@@ -2554,6 +2554,10 @@
+ if( utimensat(AT_FDCWD, zFile, times, AT_SYMLINK_NOFOLLOW) ){
+ return 1;
+ }
++#elif defined(HAVE_UTIME)
++ int rc = utime(zFile, NULL);
++ if (rc < 0)
++ return 1;
+ #else
+ /* Legacy unix */
+ struct timeval times[2];
diff --git a/Ports/sqlite/patches/sqlite3.c.patch b/Ports/sqlite/patches/sqlite3.c.patch
new file mode 100644
index 0000000000..d938013bb3
--- /dev/null
+++ b/Ports/sqlite/patches/sqlite3.c.patch
@@ -0,0 +1,18 @@
+--- sqlite-autoconf-3350300/sqlite3.c 2021-03-26 15:24:58.000000000 +0100
++++ sqlite-autoconf-port/sqlite3.c 2021-03-27 12:30:47.197494792 +0100
+@@ -41852,6 +41852,7 @@
+ ** array cannot be const.
+ */
+ static sqlite3_vfs aVfs[] = {
++ UNIXVFS("unix-none", nolockIoFinder ),
+ #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
+ UNIXVFS("unix", autolockIoFinder ),
+ #elif OS_VXWORKS
+@@ -41859,7 +41860,6 @@
+ #else
+ UNIXVFS("unix", posixIoFinder ),
+ #endif
+- UNIXVFS("unix-none", nolockIoFinder ),
+ UNIXVFS("unix-dotfile", dotlockIoFinder ),
+ UNIXVFS("unix-excl", posixIoFinder ),
+ #if OS_VXWORKS