summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flo@geekplace.eu>2021-06-17 17:54:16 +0200
committerGöktürk Yüksek <gokturk@gentoo.org>2021-06-21 10:26:38 -0400
commitcc57f9f25d40bff2e2b0e3179eac82e467f5952e (patch)
treef7687616fd1b627936563258367ad2bb613f2011
parentapp-misc/mc: keyword for ~riscv (diff)
downloadgentoo-cc57f9f25d40bff2e2b0e3179eac82e467f5952e.tar.gz
gentoo-cc57f9f25d40bff2e2b0e3179eac82e467f5952e.tar.bz2
gentoo-cc57f9f25d40bff2e2b0e3179eac82e467f5952e.zip
dev-lang/clojure: add 1.10.3
This is a "new kind" of clojure ebuilds, which does not longer depend on dev-java/spec-alpha and dev-java/core-specs-alpha, but instead is able to bootstrap itself. Major thanks to Göktürk Yüksek for coming up with a way to bootstrap clojure (see add-compile-spec-ant-build-target.patch). Closes: https://bugs.gentoo.org/661442 Closes: https://bugs.gentoo.org/737064 Closes: https://github.com/gentoo/gentoo/pull/21285 Signed-off-by: Florian Schmaus <flo@geekplace.eu> Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
-rw-r--r--dev-lang/clojure/Manifest9
-rw-r--r--dev-lang/clojure/clojure-1.10.3.ebuild97
-rw-r--r--dev-lang/clojure/files/add-compile-spec-ant-build-target.patch54
3 files changed, 160 insertions, 0 deletions
diff --git a/dev-lang/clojure/Manifest b/dev-lang/clojure/Manifest
index a3d34f05fbe..08a3e998447 100644
--- a/dev-lang/clojure/Manifest
+++ b/dev-lang/clojure/Manifest
@@ -1,3 +1,12 @@
DIST clojure-1.10.0.tar.gz 678715 BLAKE2B 8f69a327e94e173864b3d8b81e92ab716c70be9fa59bbd836889cb75a8d44518a3aa2a8fbec50a04f2e7d1afdb07ffef2f7069077e22ef91f321c5fb122d2bb9 SHA512 d53d2322662974d2eed97d7870f0f91822de8acb91e30b50b0dca4186ee667c46b2b5863e080d89e3bfe63d090c6ac2e25617f74d1434bae2ca1e73ae9a36012
+DIST clojure-1.10.3.tar.gz 683020 BLAKE2B ea57231375589d5c45b7e8a1fe87ea3f371e631733d5ae27d547e84a575cd7a54394fa401c920a7ec5e7218719f2ecd728a77e1d3e05c803f0620fcfeabd4199 SHA512 540c4c730a9f504f4e8a33e957fb150a70c3f1afa8e10205d23bb3c0528a46ca615b3a95dbedf367d4d0965d8eabc69b2d7f3bc144be9b4cb64fba085bfc6d9d
DIST clojure-1.8.0.tar.gz 627688 BLAKE2B 7dc3029e38e574cd32c74cce1f3ae03890869023d5fb2e8138f2fdc4461b3f9e119c4b6042e2b7caee9561b664b49cbaf79378ef1fdd0fd78c4d712c3b9d95de SHA512 fa5714397e679f77260db054bdc0891a311e7bd14bfceb2dd0494480fb9cf21fc74dd295e75070105ff0cdd50842390a748d8782397c549f51d85d18d54a1231
DIST clojure-1.9.0.tar.gz 641645 BLAKE2B 767241c7f252a2977511adf257b1805f81a96594cff2b1b9837c782cfaabd49ae8e6eef30398e7e277952124e843967ac635985da97e2e7c5cc98ec177f3d79c SHA512 8877c654f6aa8ad990593e69b611388659973e5d1d46cf8f6cfae59c4033424a3c7eebd477539784cbd7974f7ff30580f76d8a4117414491f38e18ac3b4efb27
+DIST core.specs.alpha-0.2.56.tar.gz 11780 BLAKE2B 088d0b32dea7ec49ddaf0f461703762a5a877ff4028b775eb35998e6a5a3436ad57b35d7d9431b6911ca2304403e95043d375bac80080ecaf6144a77b3ebcf4c SHA512 afbfc04b9708a21ae6c6b29b8653fc62b23efcb271b973534c4b8421a7d73df3ad24bd28d7115a2fe926954dc45571de86971637736f3a494799f6f1ba1765c8
+DIST data.generators-1.0.0.tar.gz 9940 BLAKE2B 981ac8f91ae05aecc7a9e7c85cbd59c5a50785bdc969309465374393234fd0a72d9803931acebbbbf369e812de33f0ac0c2ddc3009f8bb4237debd9e665301f3 SHA512 a8d5881c401b409e7e4192243e62288855b435d5979fd7950fcd3ee5291d16ce4aad913ea1dadf26db8a1297a21cab19e1e1e5d31e26db57a6fa4ed17bcefe0b
+DIST java.classpath-1.0.0.tar.gz 8955 BLAKE2B 1ab2d077d9f852ee72a1576b71d6aa8764f2fdb04eeed3f7710a7deb65942df8c0b1caff5847e329c191316c7218877b8b136b9dcefdb8f450f383beed5805ba SHA512 552f31f1f27fd80f262bbec4777626951bccef6689f4586fc327c3490669d25591c1a87907b15709dcb8d69f47ce33341d219694877b44481859b79fb38737fa
+DIST spec.alpha-0.2.194.tar.gz 39101 BLAKE2B 86de07fd83495b72d3b7d85b803ee9ecafba9a72d8541b5c62f22ad32d4e16b0c7be758ea8d30b743eba6fe994e09898e2f59b2b720913e7e1ab3732b496423f SHA512 3170883c1d62acf9af1435a5ca1ced34a318c53d1cd443d58a74afdcae4888553b9dba91fb81ccea8824c3a0c2396a0efbfaeb8ab408d8bbcf1aea0d3da9c82e
+DIST test.check-1.1.0.tar.gz 85177 BLAKE2B bb7690f276d6503a98befd4542899891d6388a24bd8ed739f20f69742cc274f3b8bf0ab7196eb3de787ff3efd3803f40d695129e1fc897b84bc4176ecb672be7 SHA512 7e896df721476b090f26c8ee417e30b59bc66708904cd30c3c663894f16e2ff3a0622f806ae4495fc6001d50e997b563ee955cc464547fecbbe6147b2b61ab17
+DIST test.generative-1.0.0.tar.gz 140414 BLAKE2B 8895fd2e86fe3ac54c826af10f914e43e3dcb0233e799102c6ec2024fb77fe8a47dfed1753a432ef4353ebbe0f790334f30a0b6d42195e869ecadb21d545578a SHA512 28aeed3dde40b1e02ee41219b698083e5ec7c63df0c779d1db75e07e5000faf0cd1415fe7418e241ebbea6979606db72696fb0090c4204d22ec1aea689b2ac34
+DIST tools.namespace-1.1.0.tar.gz 36182 BLAKE2B e93ef1151f3c1d4bdbda881712c008c50a4e40e2787c9de2708d918009bcbeaf2db143770fbe8d6d251688b1b1bb50d75a8fca1a684badae1634aa8f23b08c3c SHA512 9cdac4dc90192b621cfadb901bb9b2befb9684a6431e87938b6993b879bac2d9c946cdc0ec29226503b7c2406ef2db9be7d49a2398bcf27520d422b0dbfd0185
+DIST tools.reader-1.3.4.tar.gz 62300 BLAKE2B f8257166e62963f468987b6c926edfce852cfddc7b641e3af25aeee919f8b03f9e82c91bcd65f6b3110d3b042bb8b2d063468b7707db5965eb044546619ef711 SHA512 329e4afb9aa77231fe2d583ed6ac11089c2f7a9600db02109ad205bfdacb747a8af3af28202e545a4ffd71a77b4a04aab2a35a0e3a12f88085ef705060a15a74
diff --git a/dev-lang/clojure/clojure-1.10.3.ebuild b/dev-lang/clojure/clojure-1.10.3.ebuild
new file mode 100644
index 00000000000..49ac956f05c
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.10.3.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+JAVA_PKG_IUSE="test"
+
+inherit java-pkg-2 java-ant-2
+
+SPEC_ALPHA_VER="0.2.194"
+CORE_SPECS_ALPHA_VER="0.2.56"
+
+TOOLS_NAMESPACE_VER="1.1.0"
+JAVA_CLASSPATH_VER="1.0.0"
+TOOLS_READER_VER="1.3.4"
+TEST_GENERATIVE_VER="1.0.0"
+DATA_GENERATORS_VER="1.0.0"
+TEST_CHECK_VER="1.1.0"
+
+DESCRIPTION="General-purpose programming language with an emphasis on functional programming"
+HOMEPAGE="https://clojure.org/"
+SRC_URI="
+ https://github.com/${PN}/${PN}/archive/${P}.tar.gz
+ https://github.com/clojure/spec.alpha/archive/spec.alpha-${SPEC_ALPHA_VER}.tar.gz
+ https://github.com/clojure/core.specs.alpha/archive/core.specs.alpha-${CORE_SPECS_ALPHA_VER}.tar.gz
+ test? (
+ https://github.com/clojure/tools.namespace/archive/refs/tags/tools.namespace-${TOOLS_NAMESPACE_VER}.tar.gz
+ https://github.com/clojure/java.classpath/archive/refs/tags/java.classpath-${JAVA_CLASSPATH_VER}.tar.gz
+ https://github.com/clojure/tools.reader/archive/refs/tags/tools.reader-${TOOLS_READER_VER}.tar.gz
+ https://github.com/clojure/test.generative/archive/refs/tags/test.generative-${TEST_GENERATIVE_VER}.tar.gz
+ https://github.com/clojure/data.generators/archive/refs/tags/data.generators-${DATA_GENERATORS_VER}.tar.gz
+ https://github.com/clojure/test.check/archive/refs/tags/test.check-${TEST_CHECK_VER}.tar.gz
+ )
+"
+
+LICENSE="EPL-1.0 Apache-2.0 BSD"
+SLOT="$(ver_cut 1-2)"
+
+KEYWORDS="~amd64 ~x86 ~x86-linux"
+
+PATCHES=(
+ "${FILESDIR}/add-compile-spec-ant-build-target.patch"
+)
+
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=virtual/jre-1.8"
+DEPEND=">=virtual/jdk-1.8"
+
+S="${WORKDIR}/${PN}-${P}"
+
+DOCS=( changes.md CONTRIBUTING.md readme.txt )
+
+src_prepare() {
+ default
+ java-utils-2_src_prepare
+
+ ln -rs \
+ "../spec.alpha-spec.alpha-${SPEC_ALPHA_VER}/src/main/clojure/clojure/spec" \
+ "src/clj/clojure/spec" || die "Could not create symbolic link for spec-alpha"
+ ln -rs \
+ "../core.specs.alpha-core.specs.alpha-${CORE_SPECS_ALPHA_VER}/src/main/clojure/clojure/core/specs" \
+ "src/clj/clojure/core/specs" || die "Could not create symbolic link for core-specs-alpha"
+}
+
+src_compile() {
+ eant -f build.xml jar
+}
+
+src_test() {
+ ln -rs \
+ "../tools.namespace-tools.namespace-${TOOLS_NAMESPACE_VER}/src/main/clojure/clojure/tools" \
+ "src/clj/clojure/tools" || die "Could not create symbolic link for tools-namespace"
+ mv \
+ "../java.classpath-java.classpath-${JAVA_CLASSPATH_VER}/src/main/clojure/clojure/java/"* \
+ "src/clj/clojure/java" || die "Could not move java-classpath"
+ mv \
+ "../tools.reader-tools.reader-${TOOLS_READER_VER}/src/main/clojure/clojure/tools/"* \
+ "src/clj/clojure/tools" || die "Could not move tools-reader"
+ mv \
+ "../test.generative-test.generative-${TEST_GENERATIVE_VER}/src/main/clojure/clojure/test/"* \
+ "src/clj/clojure/test" || die "Could not move test-generative"
+ ln -rs \
+ "../data.generators-data.generators-${DATA_GENERATORS_VER}/src/main/clojure/clojure/data/" \
+ "src/clj/clojure/data" || die "Could not create symbolic link for data-generators"
+ mv \
+ "../test.check-test.check-${TEST_CHECK_VER}/src/main/clojure/clojure/test/"* \
+ "src/clj/clojure/test" || die "Could not move test-check"
+
+ eant -f build.xml test
+}
+
+src_install() {
+ java-pkg_newjar "${PN}.jar"
+ java-pkg_dolauncher ${PN}-${SLOT} --main clojure.main
+ einstalldocs
+}
diff --git a/dev-lang/clojure/files/add-compile-spec-ant-build-target.patch b/dev-lang/clojure/files/add-compile-spec-ant-build-target.patch
new file mode 100644
index 00000000000..5faea801312
--- /dev/null
+++ b/dev-lang/clojure/files/add-compile-spec-ant-build-target.patch
@@ -0,0 +1,54 @@
+From 3270c158d191f7e59540667c2dbe6c5dc7a19a59 Mon Sep 17 00:00:00 2001
+From: Florian Schmaus <flo@geekplace.eu>
+Date: Thu, 17 Jun 2021 14:52:01 +0200
+Subject: [PATCH] Add compile-spec ant build target
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Suggested-by: Göktürk Yüksek <gokturk@gentoo.org>
+---
+ build.xml | 20 +++++++++++++++++++-
+ 1 file changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/build.xml b/build.xml
+index 4d29bbf9a27e..dc742113938f 100644
+--- a/build.xml
++++ b/build.xml
+@@ -85,6 +85,24 @@
+ </java>
+ </target>
+
++ <target name="compile-spec"
++ description="Compile Clojure spec sources."
++ depends="compile-java">
++ <java classname="clojure.lang.Compile"
++ classpath="${build}:${cljsrc}"
++ failonerror="true"
++ fork="true">
++ <sysproperty key="clojure.compile.path" value="${build}"/>
++ <sysproperty key="clojure.compiler.direct-linking" value="true"/>
++ <sysproperty key="clojure.spec.skip-macros" value="true"/>
++ <sysproperty key="java.awt.headless" value="true"/>
++ <arg value="clojure.spec.alpha"/>
++ <arg value="clojure.spec.gen.alpha"/>
++ <arg value="clojure.spec.test.alpha"/>
++ <arg value="clojure.core.specs.alpha"/>
++ </java>
++ </target>
++
+ <target name="compile-tests"
+ description="Compile the subset of tests that require compilation."
+ unless="maven.test.skip">
+@@ -149,7 +167,7 @@
+
+ <target name="build"
+ description="Build Clojure (compilation only, no tests)."
+- depends="compile-java, compile-clojure"/>
++ depends="compile-java, compile-clojure, compile-spec"/>
+
+ <target name="jar" depends="build"
+ description="Create clojure jar file.">
+--
+2.31.1
+