Skip to content

Commit 5793f5b

Browse files
authored
Updated to use ICU_jll (#25)
1 parent efa214f commit 5793f5b

File tree

7 files changed

+11
-70
lines changed

7 files changed

+11
-70
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
exclude:
2424
- os: macOS-latest
2525
arch: x86
26+
- os: windows-latest
27+
arch: x86
2628
steps:
2729
- uses: actions/checkout@v2
2830
- uses: julia-actions/setup-julia@v1

Project.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ uuid = "124badd8-7747-5df6-9c35-5cbf8cd52816"
77
version = "1.1.0"
88

99
[deps]
10-
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
11-
12-
BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
10+
ICU_jll = "a51ab1cf-af8e-5615-a023-bc2c838bba6b"
1311

1412
ModuleInterfaceTools = "5cb8414e-7aab-5a03-a681-351269c074bf"
1513
StrBase = "e79e7a6a-7bb1-5a4d-9d64-da657b06f53a" # 2v12uwlr0ueale6n
1614

17-
WinRPM = "c17dfb99-b4f7-5aad-8812-456da1ad7187"
18-
1915
[extras]
2016
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2117

deps/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/build.jl

Lines changed: 0 additions & 35 deletions
This file was deleted.

deps/versions.jl

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/StrICU.jl

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ module StrICU
1010

1111
using ModuleInterfaceTools
1212

13+
using ICU_jll
14+
15+
# for now, just leave this hardcoded, until I can see how to get the version from ICU_jll
16+
const suffix = "_68"
17+
const iculib = ICU_jll.libicuuc
18+
const iculibi18n = ICU_jll.libicui18n
19+
1320
@api extend! StrBase
1421

1522
finalizer(o, f::Function) = Base.finalizer(f, o)
@@ -30,36 +37,10 @@ const WordStrings = Str{<:WordStringCSE}
3037

3138
export set_locale!
3239

33-
include("../deps/deps.jl")
34-
include("../deps/versions.jl")
35-
36-
@static if Sys.iswindows()
37-
# make sure versions match
38-
v1 = last(matchall(r"\d{2}", iculib))
39-
v2 = last(matchall(r"\d{2}", iculibi18n))
40-
v1 == v2 ||
41-
error("ICU library version mismatch $v1 != $v2 -- please correct $(realpath("../deps/deps.jl"))")
42-
end
43-
4440
function __init__()
4541
set_locale!("")
4642
end
4743

48-
global version
49-
global suffix
50-
51-
dliculib = Libdl.dlopen(iculib)
52-
53-
for (suf,ver) in [("",0);
54-
[("_$i",i) for i in versions];
55-
[("_$(string(i)[1])_$(string(i)[2])",i) for i in versions]]
56-
if Libdl.dlsym_e(dliculib, "u_strToUpper"*suf) != C_NULL
57-
@eval const version = $ver
58-
@eval const suffix = $suf
59-
break
60-
end
61-
end
62-
6344
_libicu(s, lib, p) = ( Symbol(string(p, s, suffix)), lib )
6445

6546
const UBool = Int8

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using StrICU
22

3-
@static ICU.V6_COMPAT ? (using Base.Test) : (using Test)
3+
using Test
44

55
# Tests for not overrunning buffer
66
let str = "\u3b0",

0 commit comments

Comments
 (0)