Skip to content

Commit

Permalink
Add Graphite2 port
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Nov 1, 2023
1 parent c7db1a9 commit 590c584
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/graphite2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: graphite2
on:
workflow_dispatch:
push:
paths:
- 'buildSrc/**'
- 'graphite2/**'
- '.github/workflows/build.yml'
- '.github/workflows/graphite2.yml'

jobs:
build:
name: graphite2
uses: ./.github/workflows/build.yml
with:
package: graphite2
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,11 @@ Figure out proper way to deliver per ABI headers.
[![Maven Central](https://img.shields.io/maven-central/v/com.viliussutkus89.ndk.thirdparty/cairo-ndk25-shared.svg?label=Maven%20Central%20cairo-ndk25-shared)](https://search.maven.org/search?q=g:com.viliussutkus89.ndk.thirdparty%20AND%20a:cairo-ndk25-shared)
[![Maven Central](https://img.shields.io/maven-central/v/com.viliussutkus89.ndk.thirdparty/cairo-ndk26-static.svg?label=Maven%20Central%20cairo-ndk26-static)](https://search.maven.org/search?q=g:com.viliussutkus89.ndk.thirdparty%20AND%20a:cairo-ndk26-static)
[![Maven Central](https://img.shields.io/maven-central/v/com.viliussutkus89.ndk.thirdparty/cairo-ndk26-shared.svg?label=Maven%20Central%20cairo-ndk26-shared)](https://search.maven.org/search?q=g:com.viliussutkus89.ndk.thirdparty%20AND%20a:cairo-ndk26-shared)

#### [Graphite](https://graphite.sil.org)

[![graphite2](https://github.com/ViliusSutkus89/ndkports/actions/workflows/graphite2.yml/badge.svg)](https://github.com/ViliusSutkus89/ndkports/actions/workflows/graphite2.yml)
[![Maven Central](https://img.shields.io/maven-central/v/com.viliussutkus89.ndk.thirdparty/graphite2-ndk25-static.svg?label=Maven%20Central%20graphite2-ndk25-static)](https://search.maven.org/search?q=g:com.viliussutkus89.ndk.thirdparty%20AND%20a:graphite2-ndk25-static)
[![Maven Central](https://img.shields.io/maven-central/v/com.viliussutkus89.ndk.thirdparty/graphite2-ndk25-shared.svg?label=Maven%20Central%20graphite2-ndk25-shared)](https://search.maven.org/search?q=g:com.viliussutkus89.ndk.thirdparty%20AND%20a:graphite2-ndk25-shared)
[![Maven Central](https://img.shields.io/maven-central/v/com.viliussutkus89.ndk.thirdparty/graphite2-ndk26-static.svg?label=Maven%20Central%20graphite2-ndk26-static)](https://search.maven.org/search?q=g:com.viliussutkus89.ndk.thirdparty%20AND%20a:graphite2-ndk26-static)
[![Maven Central](https://img.shields.io/maven-central/v/com.viliussutkus89.ndk.thirdparty/graphite2-ndk26-shared.svg?label=Maven%20Central%20graphite2-ndk26-shared)](https://search.maven.org/search?q=g:com.viliussutkus89.ndk.thirdparty%20AND%20a:graphite2-ndk26-shared)
134 changes: 134 additions & 0 deletions graphite2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import com.android.ndkports.CMakePortTask
import com.android.ndkports.CMakeCompatibleVersion
import com.android.ndkports.PrefabSysrootPlugin
import org.gradle.jvm.tasks.Jar

val portVersion = "1.3.14"

group = rootProject.group
version = "${portVersion}-beta-1"

plugins {
id("maven-publish")
id("signing")
id("com.android.ndkports.NdkPorts")
}

ndkPorts {
ndkPath.set(File(project.findProperty("ndkPath") as String))
minSdkVersion.set(rootProject.extra.get("minSdkSupportedByNdk").toString().toInt())
source.set(project.file("${name}-${portVersion}.tgz"))
}

tasks.prefab {
generator.set(PrefabSysrootPlugin::class.java)
}

val buildTask = tasks.register<CMakePortTask>("buildPort") {
cmake { }
}

tasks.prefabPackage {
version.set(CMakeCompatibleVersion.parse(portVersion))

licensePath.set("LICENSE")

modules {
create("graphite2") {
static.set(project.findProperty("libraryType") == "static")
}
}
}

val packageSources = tasks.register<Jar>("packageSources") {
archiveClassifier.set("sources")
from(projectDir.resolve("build.gradle.kts"))
from(ndkPorts.source)
}

publishing {
publications {
create<MavenPublication>("release") {
from(components["prefab"])
artifactId += rootProject.extra.get("ndkVersionSuffix")
artifactId += rootProject.extra.get("libraryTypeSuffix")
artifact(packageSources)
pom {
name.set("Graphite engine")
description.set("Graphite is a system that can be used to create “smart fonts” capable of displaying writing systems with various complex behaviors. A smart font contains not only letter shapes but also additional instructions indicating how to combine and position the letters in complex ways.")
url.set("https://graphite.sil.org")
licenses {
license {
name.set("LGPLv2.1-or-later")
url.set("https://raw.githubusercontent.com/silnrsi/graphite/1.3.14/COPYING")
distribution.set("repo")
}
license {
name.set("MPL")
url.set("https://raw.githubusercontent.com/silnrsi/graphite/1.3.14/COPYING")
distribution.set("repo")
}
license {
name.set("GPLv2-or-later")
url.set("https://raw.githubusercontent.com/silnrsi/graphite/1.3.14/COPYING")
distribution.set("repo")
}
}
developers {
// Developer list obtained from:
// https://github.com/silnrsi/graphite/graphs/contributors
developer {
id.set("mhosken")
}
developer {
id.set("tim-eves")
}
developer {
id.set("sharoncorrell")
}
developer {
id.set("annie-o")
}
developer {
id.set("jfkthame")
}
developer {
id.set("jvgaultney")
}
developer {
id.set("bgermann")
}
developer {
id.set("simoncozens")
}
developer {
id.set("glandium")
}
developer {
id.set("mirabilos")
}
developer {
id.set("khorben")
}
developer {
id.set("n7s")
}
}
scm {
url.set("https://github.com/ViliusSutkus89/ndkports")
connection.set("scm:git:https://github.com/ViliusSutkus89/ndkports.git")
}
}
}
}
}

afterEvaluate {
System.getenv("SIGNING_KEY")?.let { signingKey ->
signing {
isRequired = true
useInMemoryPgpKeys(signingKey, System.getenv("SIGNING_PASS"))
sign(publishing.publications.findByName("release"))
}
}
}
Binary file added graphite2/graphite2-1.3.14.tgz
Binary file not shown.
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ include(":lcms2")
include(":openjpeg")
include(":libxml2")
include(":fribidi")
include(":graphite2")
include(":libtool")
include(":spiro")

0 comments on commit 590c584

Please sign in to comment.