Skip to content

Commit

Permalink
Extracted native lib dir conforms to the hierarchy naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Dec 20, 2024
1 parent fc325f2 commit 3cdad6e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions project/StdBits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ object StdBits {
)
.value
val extractPrefix = "nu/pattern/opencv"

// Make sure that the native libs in the `lib` directory complies with
// `org.enso.interpreter.runtime.NativeLibraryFinder`
def renameFunc(entryName: String): Option[String] = {
val strippedEntryName = entryName.substring(extractPrefix.length + 1)
if (
Expand All @@ -135,11 +138,15 @@ object StdBits {
} else {
Some(
strippedEntryName
.replace("osx", "macos")
.replace("x86_64", "amd64")
.replace("linux/x86_64", "amd64/linux")
.replace("windows/x86_64", "amd64/windows")
.replace("windows/x86_32", "x86_32/windows")
.replace("osx/ARMv8", "ARMv8/macos")
.replace("osx/x86_64", "amd64/macos")
)
}
}

val logger = streams.value.log
val openCvJar = JPMSUtils
.filterModulesFromUpdate(
Expand Down

0 comments on commit 3cdad6e

Please sign in to comment.