Skip to content

Commit

Permalink
[SkipCI][libwmf] remove GetPkgConfig helper, supply FREETYPE_CONFIG e…
Browse files Browse the repository at this point in the history
…nvvar to configure instead
  • Loading branch information
ViliusSutkus89 committed Jan 2, 2024
1 parent 8ad94a1 commit e74f5d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 58 deletions.
42 changes: 0 additions & 42 deletions buildSrc/src/main/kotlin/com/android/ndkports/GetPkgConfig.kt

This file was deleted.

23 changes: 7 additions & 16 deletions libwmf/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import com.android.ndkports.*
import com.android.ndkports.AutoconfPortTask
import com.android.ndkports.CMakeCompatibleVersion
import com.android.ndkports.PrefabSysrootPlugin
import org.gradle.jvm.tasks.Jar

val portVersion = "0.2.13"
Expand Down Expand Up @@ -33,17 +35,7 @@ tasks.prefab {

val buildTask = tasks.register<AutoconfPortTask>("buildPort") {
val generatedDependencies = prefabGenerated.get().asFile

// libwmf can't find freetype
lateinit var freetypePkgConfig: Map<String, PkgConfig>
doFirst {
freetypePkgConfig = getPkgConfig(
packageName = "freetype2",
generatedDependenciesDir = generatedDependencies,
isStatic = project.findProperty("libraryType") == "static"
)
}

val isStatic = project.findProperty("libraryType") == "static"
autoconf {
val generated = generatedDependencies.resolve(toolchain.abi.triple)
args(
Expand All @@ -52,10 +44,9 @@ val buildTask = tasks.register<AutoconfPortTask>("buildPort") {
"--with-png=$generated",
"--with-jpeg=$generated",
)
freetypePkgConfig[toolchain.abi.triple]?.let {
env["CFLAGS"] = it.cflags
env["LDFLAGS"] = it.libs
}
env["ac_cv_path_FREETYPE_CONFIG"] = "pkg-config freetype2"
if (isStatic)
env["ac_cv_path_FREETYPE_CONFIG"] += " --static"
}
}

Expand Down

0 comments on commit e74f5d2

Please sign in to comment.