IreneKnapp / IreneKnapp/direct-sqlite
ICU extension flag
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 41
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
Hey,
I wanted to use SQLite with ICU enabled, so here's a patch to enable it. Perhaps useful to add to Direct-SQLite-proper, too.
diff --git a/direct-sqlite.cabal b/direct-sqlite.cabal
index deb5d30..67bcc4e 100644
--- a/direct-sqlite.cabal
+++ b/direct-sqlite.cabal
@@ -48,6 +48,10 @@ flag json1
description: Enable json1 extension.
default: True
+flag icu
+ description: Enable the ICU extension.
+ default: False
+
Library
exposed-modules:
Database.SQLite3
@@ -86,6 +90,11 @@ Library
if flag(json1) {
cc-options: -DSQLITE_ENABLE_JSON1
}
+
+ if flag(icu) {
+ cc-options: -DSQLITE_ENABLE_ICU
+ extra-libraries: icui18n icuuc icudata
+ }
}
include-dirs: .
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in direct-sqlite.cabal near the existing json1 flag and its conditional compiler options. Check how the library declares build flags and external libraries; done means an optional icu flag enables the ICU compiler definition and ICU libraries without changing the default build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, sqlite
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100