dev-lang/clojure: >=1.9.0 fix sandbox violations
authorTom Gillespie <tgbugs@gmail.com>
Fri, 3 Jan 2020 07:41:15 +0000 (02:41 -0500)
committerKent Fredric <kentnl@gentoo.org>
Thu, 23 Apr 2020 05:03:07 +0000 (17:03 +1200)
This commit updates the clojure ebuilds to use the latest ebuild
conventions and updates the dependencies to include two new packages.

This is the last in a series of 3 commits that make it possible to build
>=clojure-1.9.0 on gentoo without pulling in any maven dependencies which
trigger network-sandbox violations.

To accomplish this two new packages dev-java/spec-alpha and
dev-java/core-specs-alpha have been added to the tree. They are
dependencies written in clojure that are required to build clojure but
that do not themselves depend on clojure.

Closes: https://bugs.gentoo.org/670680
Closes: https://bugs.gentoo.org/684536
Closes: https://github.com/gentoo/gentoo/pull/14224

Signed-off-by: Tom Gillespie <tgbugs@gmail.com>
Signed-off-by: Kent Fredric <kentnl@gentoo.org>
dev-lang/clojure/clojure-1.10.0.ebuild
dev-lang/clojure/clojure-1.9.0-r1.ebuild

index 1df71774d54e47959151d4d358f1c2b9c2968943..60aef391a05035201a56df183b45d98ef98e2285 100644 (file)
@@ -1,24 +1,27 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 JAVA_PKG_IUSE="test"
 
 inherit java-pkg-2 java-ant-2
 
+EGIT_REF="76b87a6"
+
 DESCRIPTION="General-purpose programming language with an emphasis on functional programming"
 HOMEPAGE="https://clojure.org/"
-SRC_URI="https://github.com/clojure/clojure/tarball/${P} -> ${P}.tar.gz"
+SRC_URI="https://github.com/clojure/${PN}/archive/${P}.tar.gz"
 
 LICENSE="EPL-1.0 Apache-2.0 BSD"
 SLOT="1.10"
 KEYWORDS="~amd64 ~x86 ~x86-linux"
-RESTRICT="test" # patches welcome to fix the test
+RESTRICT="!test? ( test )" # broken due to file not found issue and more
 
 CDEPEND="
-       dev-java/ant-core:0
-       dev-java/maven-bin:3.6"
+       dev-java/spec-alpha:0.2
+       dev-java/core-specs-alpha:0.2
+       dev-java/ant-core:0"
 
 RDEPEND="
        ${CDEPEND}
@@ -28,13 +31,12 @@ DEPEND="
        ${CDEPEND}
        >=virtual/jdk-1.8"
 
-S="${WORKDIR}/clojure-clojure-76b87a6"
+S="${WORKDIR}/clojure-${PN}-${EGIT_REF}"
 
 DOCS=( changes.md CONTRIBUTING.md readme.txt )
 
 src_compile() {
-       ./antsetup.sh || die "antsetup.sh failed"
-       eant -f build.xml jar
+       eant -Dmaven.compile.classpath=$(java-pkg_getjars core-specs-alpha-0.2,spec-alpha-0.2) -f build.xml jar
 }
 
 src_test() {
index 5abaab94b142db45e810f28d9b49ff574c271fdc..25c5659590a72dd7ba9b3de7ef6ed54b0c82ab7a 100644 (file)
@@ -1,49 +1,50 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-JAVA_PKG_IUSE="source test"
+JAVA_PKG_IUSE="test"
 
 inherit java-pkg-2 java-ant-2
 
+EGIT_REF="e5a8cfa"
+
 DESCRIPTION="General-purpose programming language with an emphasis on functional programming"
 HOMEPAGE="https://clojure.org/"
-SRC_URI="https://github.com/clojure/clojure/tarball/${P} -> ${P}.tar.gz"
+SRC_URI="https://github.com/clojure/${PN}/archive/${P}.tar.gz"
 
 LICENSE="EPL-1.0 Apache-2.0 BSD"
 SLOT="1.9"
 KEYWORDS="~amd64 ~x86 ~x86-linux"
-RESTRICT="test" # patches welcome to fix the test
+RESTRICT="!test? ( test )" # broken due to file not found issue and more
+
+CDEPEND="
+       dev-java/spec-alpha:0.1
+       dev-java/core-specs-alpha:0.1
+       dev-java/ant-core:0"
 
 RDEPEND="
+       ${CDEPEND}
        >=virtual/jre-1.8"
 
 DEPEND="
-       >=virtual/jdk-1.8
-       dev-java/ant-core
-       dev-java/maven-bin:3.6"
+       ${CDEPEND}
+       >=virtual/jdk-1.8"
 
-S="${WORKDIR}/clojure-clojure-e5a8cfa"
+S="${WORKDIR}/clojure-${PN}-${EGIT_REF}"
 
 DOCS=( changes.md CONTRIBUTING.md readme.txt )
 
 src_compile() {
-       ./antsetup.sh || die "antsetup.sh failed"
-       eant local
+       eant -Dmaven.compile.classpath=$(java-pkg_getjars core-specs-alpha-0.1,spec-alpha-0.1) -f build.xml jar
 }
 
 src_test() {
-       java-pkg-2_src_test
+       eant -f build.xml test
 }
 
 src_install() {
        java-pkg_newjar "${PN}.jar"
        java-pkg_dolauncher  ${PN}-${SLOT} --main clojure.main
-       if use source; then
-               mv target/${P}-sources.jar ${PN}-sources.jar
-               insinto /usr/share/${PN}-${SLOT}/sources
-               doins ${PN}-sources.jar
-       fi
        einstalldocs
 }