From b527f1720c3f487664e98cb996c86abb6277663f Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 21 Aug 2022 16:31:25 +0200 Subject: [PATCH] dokka 1.7.10 --- .SRCINFO | 22 ++++++++++++++ 0001-enable-application-plugin.patch | 14 +++++++++ 0002-embed-plugin-dependencies.patch | 14 +++++++++ PKGBUILD | 43 ++++++++++++++++++++++++++++ dokka | 11 +++++++ 5 files changed, 104 insertions(+) create mode 100644 .SRCINFO create mode 100644 0001-enable-application-plugin.patch create mode 100644 0002-embed-plugin-dependencies.patch create mode 100644 PKGBUILD create mode 100755 dokka diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..adf3907 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = dokka + pkgdesc = Documentation Engine for Kotlin + pkgver = 1.7.10 + pkgrel = 1 + url = https://kotlin.github.io/dokka/1.7.10/ + arch = any + license = Apache + makedepends = gradle>=7.3 + makedepends = gradle<8 + makedepends = npm + depends = freemarker + depends = java-environment + source = https://github.com/Kotlin/dokka/archive/refs/tags/v1.7.10.tar.gz + source = 0001-enable-application-plugin.patch + source = 0002-embed-plugin-dependencies.patch + source = dokka + sha256sums = 873e26b3c046e9217f70a126736308bc0c11e45b8a7a9b0991c15b71b0f1876f + sha256sums = 78d2f4fd30508c9b634e22655da275b0db4c5317d71bb3cd746f851702a31d93 + sha256sums = b5f139af1e11ba823865f01383eb5eae873af86fcd86107e6e179076ce1145f4 + sha256sums = 9c7aa9721fe0b2c3cf3831a4d0b1720f13b070734d7be2702f820267ca11e277 + +pkgname = dokka diff --git a/0001-enable-application-plugin.patch b/0001-enable-application-plugin.patch new file mode 100644 index 0000000..bfceb14 --- /dev/null +++ b/0001-enable-application-plugin.patch @@ -0,0 +1,14 @@ +--- runners/cli/build.gradle.kts 2022-08-21 15:44:14.274863135 +0200 ++++ runners/cli/build.gradle.kts 2022-08-21 15:44:53.244731374 +0200 +@@ -3,6 +3,11 @@ + + plugins { + id("com.github.johnrengelman.shadow") ++ id("application") ++} ++ ++application { ++ mainClass.set("org.jetbrains.dokka.MainKt") + } + + dependencies { diff --git a/0002-embed-plugin-dependencies.patch b/0002-embed-plugin-dependencies.patch new file mode 100644 index 0000000..3421eb4 --- /dev/null +++ b/0002-embed-plugin-dependencies.patch @@ -0,0 +1,14 @@ +--- runners/cli/build.gradle.kts 2022-08-21 15:44:14.274863135 +0200 ++++ runners/cli/build.gradle.kts 2022-08-21 15:58:28.329169409 +0200 +@@ -10,6 +15,11 @@ + implementation(project(":core")) + implementation(kotlin("stdlib")) + testImplementation(kotlin("test-junit")) ++ ++ val kotlinx_html_version: String by project ++ implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version") ++ ++ implementation(project(":kotlin-analysis")) + } + + tasks { diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..031cb8e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# -*- mode: Shell-script; eval: (setq indent-tabs-mode 't); eval: (setq tab-width 4) -*- +# Maintainer: Dominic Meiser [git at msrd0 dot de] + +pkgname='dokka' +pkgver=1.7.10 +pkgrel=1 +pkgdesc='Documentation Engine for Kotlin' +url="https://kotlin.github.io/dokka/$pkgver/" +license=('Apache') +arch=('any') + +depends=('freemarker' 'java-environment') +makedepends=('gradle>=7.3' 'gradle<8' 'npm') + +source=("https://github.com/Kotlin/dokka/archive/refs/tags/v$pkgver.tar.gz" + '0001-enable-application-plugin.patch' + '0002-embed-plugin-dependencies.patch' + 'dokka') +sha256sums=('873e26b3c046e9217f70a126736308bc0c11e45b8a7a9b0991c15b71b0f1876f' + '78d2f4fd30508c9b634e22655da275b0db4c5317d71bb3cd746f851702a31d93' + 'b5f139af1e11ba823865f01383eb5eae873af86fcd86107e6e179076ce1145f4' + '9c7aa9721fe0b2c3cf3831a4d0b1720f13b070734d7be2702f820267ca11e277') + +prepare() { + cd "$srcdir/dokka-$pkgver" + patch -N -p0 -i ../0001-enable-application-plugin.patch + patch -N -p0 -i ../0002-embed-plugin-dependencies.patch +} + +build() { + cd "$srcdir/dokka-$pkgver" + gradle :runners:cli:distTar + gradle :plugins:base:jar +} + +package() { + cd "$srcdir/dokka-$pkgver" + mkdir -p "$pkgdir/usr/lib/dokka" + tar xf "runners/cli/build/distributions/cli-$pkgver.tar" --strip-components=1 -C "$pkgdir/usr/lib/dokka/" + rm "$pkgdir/usr/lib/dokka/bin/cli.bat" + install -Dm644 "plugins/base/build/libs/base-$pkgver.jar" "$pkgdir/usr/lib/dokka/plugins/base.jar" + install -Dm755 ../dokka -t "$pkgdir/usr/bin/" +} diff --git a/dokka b/dokka new file mode 100755 index 0000000..4737cd8 --- /dev/null +++ b/dokka @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +libdir="/usr/lib/dokka" +plugins="" +for file in $(find "$libdir/plugins" -name "*.jar"); do + [ x"$plugins" == x ] || plugins="$plugins;" + plugins="$plugins$file" +done +plugins="$plugins;/usr/share/java/freemarker/freemarker.jar" +$libdir/bin/cli -pluginsClasspath "$plugins" "${@}"