Skip to content

Commit

Permalink
Add Little CMS color engine port
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Oct 31, 2023
1 parent 80d6813 commit 06867c8
Show file tree
Hide file tree
Showing 4 changed files with 263 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/lcms2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: lcms2
on:
workflow_dispatch:
push:
paths:
- 'buildSrc/**'
- 'lcms2/**'
- '.github/workflows/build.yml'
- '.github/workflows/lcms2.yml'

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

#### [Little CMS color engine](https://www.littlecms.com/color-engine/)

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

val portVersion = "2.15"

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

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

dependencies {
val ndkVersionSuffix = rootProject.extra.get("ndkVersionSuffix")
implementation("com.viliussutkus89.ndk.thirdparty:libjpeg-turbo${ndkVersionSuffix}-static:3.0.1-beta-1")
implementation("com.viliussutkus89.ndk.thirdparty:libtiff${ndkVersionSuffix}-static:4.6.0-beta-1")
}

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

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

tasks.register<MesonPortTask>("buildPort") {
meson { }
}

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

licensePath.set("COPYING")

modules {
create("lcms2") {
static.set(project.findProperty("libraryType") == "static")
dependencies.set(listOf("m"))
}
}
}

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("Little CMS color engine")
description.set("Little CMS or LCMS is an open-source color management system, released as a software library for use in other programs which will allow the use of International Color Consortium profiles.")
url.set("https://www.littlecms.com/color-engine/")
licenses {
license {
name.set("MIT")
url.set("https://github.com/mm2/Little-CMS/blob/lcms2.15/COPYING")
distribution.set("repo")
}
}
developers {
// Developer list obtained from:
// https://raw.githubusercontent.com/mm2/Little-CMS/lcms2.15/AUTHORS
developer {
name.set("Marti Maria")
}
developer {
name.set("Bob Friesenhahn")
}
developer {
name.set("Kai-Uwe Behrmann")
}
developer {
name.set("Stuart Nixon")
}
developer {
name.set("Jordi Vilar")
}
developer {
name.set("Richard Hughes")
}
developer {
name.set("Auke Nauta")
}
developer {
name.set("Chris Evans")
}
developer {
name.set("Lorenzo Ridolfi")
}
developer {
name.set("Robin Watts")
}
developer {
name.set("Shawn Pedersen")
}
developer {
name.set("Andrew Brygin")
}
developer {
name.set("Samuli Suominen")
}
developer {
name.set("Florian Höch")
}
developer {
name.set("Aurelien Jarno")
}
developer {
name.set("Claudiu Cebuc")
}
developer {
name.set("Michael Vhrel")
}
developer {
name.set("Michal Cihar")
}
developer {
name.set("Daniel Kaneider")
}
developer {
name.set("Mateusz Jurczyk")
}
developer {
name.set("Paul Miller")
}
developer {
name.set("Sébastien Léon")
}
developer {
name.set("Christian Schmitz")
}
developer {
name.set("XhmikosR")
}
developer {
name.set("Stanislav Brabec")
}
developer {
name.set("Leonhard Gruenschloss")
}
developer {
name.set("Patrick Noffke")
}
developer {
name.set("Christopher James Halse Rogers")
}
developer {
name.set("John Hein")
}
developer {
name.set("Thomas Weber")
}
developer {
name.set("Mark Allen")
}
developer {
name.set("Noel Carboni")
}
developer {
name.set("Sergei Trofimovic")
}
developer {
name.set("Philipp Knechtges")
}
developer {
name.set("Amyspark")
}
developer {
name.set("Lovell Fuller")
}
developer {
name.set("Eli Schwartz")
}
developer {
name.set("Artifex software")
}
developer {
name.set("AlienSkin software")
}
developer {
name.set("libVIPS")
}
developer {
name.set("Jan Morovic")
}
developer {
name.set("Jos Vernon")
}
developer {
name.set("Harald Schneider")
}
developer {
name.set("Christian Albrecht")
}
developer {
name.set("Dimitrios Anastassakis")
}
developer {
name.set("Lemke Software")
}
developer {
name.set("Tim Zaman")
}
}
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"))
}
}
}
3 changes: 3 additions & 0 deletions lcms2/lcms2-2.15.tar.gz
Git LFS file not shown

0 comments on commit 06867c8

Please sign in to comment.