From 06867c89c226508ab5175f8153fd01b1e166da3a Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Tue, 31 Oct 2023 02:57:18 +0200 Subject: [PATCH] Add Little CMS color engine port --- .github/workflows/lcms2.yml | 16 +++ README.md | 8 ++ lcms2/build.gradle.kts | 236 ++++++++++++++++++++++++++++++++++++ lcms2/lcms2-2.15.tar.gz | 3 + 4 files changed, 263 insertions(+) create mode 100644 .github/workflows/lcms2.yml create mode 100644 lcms2/build.gradle.kts create mode 100644 lcms2/lcms2-2.15.tar.gz diff --git a/.github/workflows/lcms2.yml b/.github/workflows/lcms2.yml new file mode 100644 index 0000000..621b7df --- /dev/null +++ b/.github/workflows/lcms2.yml @@ -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 diff --git a/README.md b/README.md index de001f2..dbaecb3 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/lcms2/build.gradle.kts b/lcms2/build.gradle.kts new file mode 100644 index 0000000..f360b76 --- /dev/null +++ b/lcms2/build.gradle.kts @@ -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("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("packageSources") { + archiveClassifier.set("sources") + from(projectDir.resolve("build.gradle.kts")) + from(ndkPorts.source) +} + +publishing { + publications { + create("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")) + } + } +} diff --git a/lcms2/lcms2-2.15.tar.gz b/lcms2/lcms2-2.15.tar.gz new file mode 100644 index 0000000..e5b6387 --- /dev/null +++ b/lcms2/lcms2-2.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b20cbcbd0f503433be2a4e81462106fa61050a35074dc24a4e356792d971ab39 +size 7548405