Skip to content

Commit

Permalink
Update skiko build for ICU renamed symbols (#881)
Browse files Browse the repository at this point in the history
Now we build skia/icu with _skiko suffix to avoid clashes with Apple SDK

Corresponding skia change: JetBrains/skia#3

Corresponding skia commit:
JetBrains/skia@47d3027
  • Loading branch information
eymar authored Mar 1, 2024
1 parent 0f1775d commit 2f711b7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion skiko/build-with-local-skia.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
####### Variables you can edit to change build config, or set same environment variables before script execution #######
SKIA_VERSION="${SKIA_VERSION:="m116-b54492e-3"}" # Version of Skia m###-commit-sha-#. This commit sha will be cloned from repository https://github.com/JetBrains/skia
SKIA_VERSION="${SKIA_VERSION:="m116-47d3027-1"}" # Version of Skia m###-commit-sha-#. This commit sha will be cloned from repository https://github.com/JetBrains/skia
SKIA_DEBUG_MODE="${SKIA_DEBUG_MODE:="false"}" # in debug mode Skiko will be published with postix "+debug", for example "0.0.0-SNAPSHOT+debug"
SKIA_TARGET="${SKIA_TARGET:="iosSim"}" # possible values: "ios", "iosSim", "macos", "windows", "linux", "wasm", "android", "tvos", "tvosSim"
# For M1 Mac use "iosSim" to build for simulator, and ios to build for device.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ fun skiaPreprocessorFlags(os: OS, buildType: SkiaBuildType): Array<String> {
"-DSK_UNICODE_AVAILABLE",
"-DU_DISABLE_RENAMING",
"-DSK_USING_THIRD_PARTY_ICU",
// For ICU symbols renaming:
"-DU_DISABLE_RENAMING=0",
"-DU_DISABLE_VERSION_SUFFIX=1",
"-DU_HAVE_LIB_SUFFIX=1",
"-DU_LIB_SUFFIX_C_NAME=_skiko",
*buildType.flags
)

Expand Down
26 changes: 13 additions & 13 deletions skiko/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
kotlin.code.style=official
deploy.version=0.0.0

dependencies.skia.windows-x64=m116-b54492e-3
dependencies.skia.linux-x64=m116-b54492e-3
dependencies.skia.macos-x64=m116-b54492e-3
dependencies.skia.windows-arm64=m116-b54492e-3
dependencies.skia.linux-arm64=m116-b54492e-3
dependencies.skia.macos-arm64=m116-b54492e-3
dependencies.skia.wasm-wasm=m116-b54492e-3
dependencies.skia.ios-x64=m116-b54492e-3
dependencies.skia.ios-arm64=m116-b54492e-3
dependencies.skia.iosSim-arm64=m116-b54492e-3
dependencies.skia.iosSim-x64=m116-b54492e-3
dependencies.skia.android-x64=m116-b54492e-3
dependencies.skia.android-arm64=m116-b54492e-3
dependencies.skia.windows-x64=m116-47d3027-1
dependencies.skia.linux-x64=m116-47d3027-1
dependencies.skia.macos-x64=m116-47d3027-1
dependencies.skia.windows-arm64=m116-47d3027-1
dependencies.skia.linux-arm64=m116-47d3027-1
dependencies.skia.macos-arm64=m116-47d3027-1
dependencies.skia.wasm-wasm=m116-47d3027-1
dependencies.skia.ios-x64=m116-47d3027-1
dependencies.skia.ios-arm64=m116-47d3027-1
dependencies.skia.iosSim-arm64=m116-47d3027-1
dependencies.skia.iosSim-x64=m116-47d3027-1
dependencies.skia.android-x64=m116-47d3027-1
dependencies.skia.android-arm64=m116-47d3027-1

org.gradle.jvmargs=-Xmx3G -XX:MaxMetaspaceSize=512m

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ internal actual fun compilePattern(regex: String): Pattern = Pattern(regex)

actual typealias ExternalSymbolName = kotlin.native.SymbolName

@SymbolName("uloc_getDefault")
@SymbolName("uloc_getDefault_skiko")
private external fun uloc_getDefault(): CPointer<ByteVar>
@SymbolName("uloc_toLanguageTag")
@SymbolName("uloc_toLanguageTag_skiko")
private external fun uloc_toLanguageTag(localeId: CPointer<ByteVar>, buffer: InteropPointer, size: Int, strict: Boolean, err: InteropPointer): Int

0 comments on commit 2f711b7

Please sign in to comment.