Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlean: update the patch for legacy systems so that it works again #25583

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions databases/sqlean/files/patch-no-time-ext.diff
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
--- Makefile.orig 2024-08-29 07:13:00.000000000 +0800
+++ Makefile 2024-08-29 07:13:53.000000000 +0800
@@ -125,7 +125,6 @@
--- Makefile
+++ Makefile 2024-09-03 13:28:26.000000000 +0800
@@ -142,11 +142,10 @@
$(CC) -O3 $(MACOS_FLAGS) -include src/regexp/constants.h src/sqlite3-regexp.c src/regexp/*.c src/regexp/pcre2/*.c -o dist/regexp.dylib
$(CC) -O3 $(MACOS_FLAGS) src/sqlite3-stats.c src/stats/*.c -o dist/stats.dylib -lm
$(CC) -O3 $(MACOS_FLAGS) src/sqlite3-text.c src/text/*.c src/text/*/*.c -o dist/text.dylib
- $(CC) -O3 $(MACOS_FLAGS) src/sqlite3-time.c src/time/*.c -o dist/time.dylib
$(CC) -O3 $(MACOS_FLAGS) src/sqlite3-unicode.c src/unicode/*.c -o dist/unicode.dylib
$(CC) -O3 $(MACOS_FLAGS) src/sqlite3-uuid.c src/uuid/*.c -o dist/uuid.dylib
$(CC) -O3 $(MACOS_FLAGS) src/sqlite3-vsv.c src/vsv/*.c -o dist/vsv.dylib -lm
@@ -178,7 +177,6 @@
- $(CC) -O1 $(MACOS_FLAGS) -include src/regexp/constants.h src/sqlite3-sqlean.c src/crypto/*.c src/define/*.c src/fileio/*.c src/fuzzy/*.c src/ipaddr/*.c src/math/*.c src/regexp/*.c src/regexp/pcre2/*.c src/stats/*.c src/text/*.c src/text/*/*.c src/time/*.c src/unicode/*.c src/uuid/*.c src/vsv/*.c -o dist/sqlean.dylib -lm
+ $(CC) -O1 $(MACOS_FLAGS) -include src/regexp/constants.h src/sqlite3-sqlean.c src/crypto/*.c src/define/*.c src/fileio/*.c src/fuzzy/*.c src/ipaddr/*.c src/math/*.c src/regexp/*.c src/regexp/pcre2/*.c src/stats/*.c src/text/*.c src/text/*/*.c src/unicode/*.c src/uuid/*.c src/vsv/*.c -o dist/sqlean.dylib -lm

compile-macos-x86:
mkdir -p dist/x86
@@ -195,7 +194,6 @@
make test suite=math
make test suite=regexp
make test suite=stats
- make test suite=time
make test suite=text
make test suite=unicode
make test suite=uuid
@@ -198,10 +196,6 @@
@@ -215,10 +213,6 @@
make ctest package=text module=rstring
gcc $(CTEST_FLAGS) test/text/utf8.test.c src/text/utf8/*.c -o text.utf8
make ctest package=text module=utf8
Expand All @@ -27,3 +32,25 @@

ctest:
@chmod +x $(package).$(module)

--- src/sqlite3-sqlean.c
+++ src/sqlite3-sqlean.c 2024-09-03 13:23:38.000000000 +0800
@@ -18,7 +18,9 @@
#include "regexp/extension.h"
#include "stats/extension.h"
#include "text/extension.h"
+#ifndef __APPLE__
#include "time/extension.h"
+#endif
#include "unicode/extension.h"
#include "uuid/extension.h"
#include "vsv/extension.h"
@@ -49,7 +51,7 @@
regexp_init(db);
stats_init(db);
text_init(db);
-#if !defined(_WIN32) || defined(_WIN64)
+#if (!defined(_WIN32) || defined(_WIN64)) && !defined(__APPLE__)
time_init(db);
#endif
unicode_init(db);