diff options
author | Ralph Sennhauser <sera@gentoo.org> | 2014-08-03 09:27:58 +0000 |
---|---|---|
committer | Ralph Sennhauser <sera@gentoo.org> | 2014-08-03 09:27:58 +0000 |
commit | 3d9ab88422b83333790a579b1049312297a2c8fd (patch) | |
tree | 3b61be346b9db40a97f53aab7715fc82ca239e99 /dev-java/aspectwerkz | |
parent | Default lisp on arm is now gcl (diff) | |
download | gentoo-2-3d9ab88422b83333790a579b1049312297a2c8fd.tar.gz gentoo-2-3d9ab88422b83333790a579b1049312297a2c8fd.tar.bz2 gentoo-2-3d9ab88422b83333790a579b1049312297a2c8fd.zip |
Don't bundle qdox
Relies on com.sun classes for JDWP support, drop ppc ppc64 amd64-fbsd keywords
Use final java.util.concurrent API so it can be built against >=1.5 without additional dependencies by Andrew John Hughes <gnu_andrew@member.fsf.org>
EAPI bump and modernize ebuild
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 3C5CF75A)
Diffstat (limited to 'dev-java/aspectwerkz')
-rw-r--r-- | dev-java/aspectwerkz/ChangeLog | 16 | ||||
-rw-r--r-- | dev-java/aspectwerkz/aspectwerkz-2.0-r1.ebuild | 60 | ||||
-rw-r--r-- | dev-java/aspectwerkz/files/aspectwerkz-2.0-gentoo.patch | 2 | ||||
-rw-r--r-- | dev-java/aspectwerkz/files/aspectwerkz-2.0-modernise_api.patch | 82 |
4 files changed, 157 insertions, 3 deletions
diff --git a/dev-java/aspectwerkz/ChangeLog b/dev-java/aspectwerkz/ChangeLog index 901e76f396fb..c335966c68f2 100644 --- a/dev-java/aspectwerkz/ChangeLog +++ b/dev-java/aspectwerkz/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for dev-java/aspectwerkz -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/aspectwerkz/ChangeLog,v 1.34 2013/09/01 11:42:11 grobian Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/aspectwerkz/ChangeLog,v 1.35 2014/08/03 09:27:57 sera Exp $ + +*aspectwerkz-2.0-r1 (03 Aug 2014) + + 03 Aug 2014; Ralph Sennhauser <sera@gentoo.org> +aspectwerkz-2.0-r1.ebuild, + files/aspectwerkz-2.0-gentoo.patch, + +files/aspectwerkz-2.0-modernise_api.patch: + Don't bundle qdox + Relies on com.sun classes for JDWP support, drop ppc ppc64 amd64-fbsd + keywords + Use final java.util.concurrent API so it can be built against >=1.5 without + additional dependencies by Andrew John Hughes <gnu_andrew@member.fsf.org> + EAPI bump and modernize ebuild 01 Sep 2013; Fabian Groffen <grobian@gentoo.org> aspectwerkz-2.0.ebuild: Marked *-macos diff --git a/dev-java/aspectwerkz/aspectwerkz-2.0-r1.ebuild b/dev-java/aspectwerkz/aspectwerkz-2.0-r1.ebuild new file mode 100644 index 000000000000..ebc42e70569b --- /dev/null +++ b/dev-java/aspectwerkz/aspectwerkz-2.0-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/aspectwerkz/aspectwerkz-2.0-r1.ebuild,v 1.1 2014/08/03 09:27:57 sera Exp $ + +EAPI=5 + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-ant-2 eutils + +DESCRIPTION="AspectWerkz is a dynamic, lightweight and high-performant AOP/AOSD framework for Java." +SRC_URI="http://dist.codehaus.org/${PN}/distributions/${P}.zip" +HOMEPAGE="http://aspectwerkz.codehaus.org" +LICENSE="LGPL-2.1" +SLOT="2" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="" +# bug 203268 +RESTRICT="test" + +COMMON_DEP=" + dev-java/asm:1.5 + dev-java/dom4j:1 + dev-java/jrexx:0 + dev-java/trove:0 + dev-java/qdox:1.6 + dev-java/junit:0 + java-virtuals/jdk-with-com-sun" +RDEPEND=" + >=virtual/jre-1.5 + ${COMMON_DEP}" +DEPEND=" + >=virtual/jdk-1.5 + ${COMMON_DEP} + app-arch/unzip" + +java_prepare() { + # unit tests need this + chmod +x "bin/${PN}" || die + epatch "${FILESDIR}"/${P}-gentoo.patch + epatch "${FILESDIR}"/${P}-modernise_api.patch + + find . -name '*.jar' -delete || die +} + +JAVA_ANT_REWRITE_CLASSPATH="yes" + +EANT_BUILD_TARGET="dist" +EANT_GENTOO_CLASSPATH="asm-1.5,dom4j-1,jrexx,junit,trove,qdox-1.6" + +src_install() { + use source && java-pkg_dosrc src/* + # other stuff besides javadoc here too + use doc && java-pkg_dohtml -r docs/* + + cd lib || die + for jar in ${PN}*.jar; do + java-pkg_newjar ${jar} ${jar/-${PV}} + done +} diff --git a/dev-java/aspectwerkz/files/aspectwerkz-2.0-gentoo.patch b/dev-java/aspectwerkz/files/aspectwerkz-2.0-gentoo.patch index 0c7e99a33817..eb745c3afde2 100644 --- a/dev-java/aspectwerkz/files/aspectwerkz-2.0-gentoo.patch +++ b/dev-java/aspectwerkz/files/aspectwerkz-2.0-gentoo.patch @@ -97,7 +97,7 @@ <include name="*.jar"/> <!-- add qdox manually to remove its META-INF/LICENSE.txt that is not the one of AW --> - <zipfileset src="${lib.dir}/qdox-1.4.jar" excludes="META-INF/*"/> -+ <zipfileset src="${lib.dir}/qdox.jar" excludes="META-INF/*"/> ++ <!-- <zipfileset src="${lib.dir}/qdox.jar" excludes="META-INF/*"/> --> </jar> <!-- nodeps --> - <jar destfile="${build.dir}/aspectwerkz-nodeps-jdk14-${version}.jar"> diff --git a/dev-java/aspectwerkz/files/aspectwerkz-2.0-modernise_api.patch b/dev-java/aspectwerkz/files/aspectwerkz-2.0-modernise_api.patch new file mode 100644 index 000000000000..8d930e8520cd --- /dev/null +++ b/dev-java/aspectwerkz/files/aspectwerkz-2.0-modernise_api.patch @@ -0,0 +1,82 @@ +--- src/main/org/codehaus/aspectwerkz/connectivity/RemoteProxyServer.java.old 2013-09-30 02:03:20.703138370 +0100 ++++ src/main/org/codehaus/aspectwerkz/connectivity/RemoteProxyServer.java 2013-09-30 05:49:54.768369910 +0100 +@@ -7,9 +7,13 @@ + **************************************************************************************/ + package org.codehaus.aspectwerkz.connectivity; + +-import EDU.oswego.cs.dl.util.concurrent.BoundedBuffer; +-import EDU.oswego.cs.dl.util.concurrent.LinkedQueue; +-import EDU.oswego.cs.dl.util.concurrent.PooledExecutor; ++import java.util.concurrent.ArrayBlockingQueue; ++import java.util.concurrent.BlockingQueue; ++import java.util.concurrent.LinkedBlockingQueue; ++import java.util.concurrent.RejectedExecutionHandler; ++import java.util.concurrent.ThreadPoolExecutor; ++import java.util.concurrent.TimeUnit; ++ + import org.codehaus.aspectwerkz.exception.WrappedRuntimeException; + + import java.io.FileInputStream; +@@ -152,7 +156,7 @@ + /** + * The thread pool. + */ +- private PooledExecutor m_threadPool = null; ++ private ThreadPoolExecutor m_threadPool = null; + + /** + * The class loader to use. +@@ -262,13 +266,30 @@ + final int threadPoolInitSize, + final int keepAliveTime, + final boolean waitWhenBlocked) { +- m_threadPool = new PooledExecutor(new BoundedBuffer(threadPoolInitSize), threadPoolMaxSize); +- m_threadPool.setKeepAliveTime(keepAliveTime); +- m_threadPool.createThreads(threadPoolInitSize); +- m_threadPool.setMinimumPoolSize(threadPoolMinSize); ++ m_threadPool = new ThreadPoolExecutor(threadPoolInitSize, threadPoolMaxSize, ++ keepAliveTime, TimeUnit.MILLISECONDS, ++ new ArrayBlockingQueue(threadPoolInitSize) { ++ protected void afterExecute(Runnable r, ThreadPoolExecutor e) { ++ if (waitWhenBlocked) e.notifyAll(); ++ } ++ }); ++ m_threadPool.prestartAllCoreThreads(); ++ m_threadPool.setCorePoolSize(threadPoolMinSize); + if (waitWhenBlocked) { +- m_threadPool.waitWhenBlocked(); +- } ++ m_threadPool.setRejectedExecutionHandler(new RejectedExecutionHandler() { ++ public void rejectedExecution(Runnable r, ThreadPoolExecutor e) { ++ if (e.isTerminating() || e.isTerminated()) ++ return; ++ BlockingQueue<Runnable> tasks = e.getQueue(); ++ int maxSize = e.getMaximumPoolSize(); ++ while (tasks.remainingCapacity() == 0 || e.getPoolSize() == maxSize) ++ try { e.wait(); } catch (InterruptedException ex) {} ++ e.execute(r); ++ } ++ }); ++ } else { ++ m_threadPool.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); ++ } + } + + /** +@@ -281,9 +302,10 @@ + private void createDynamicThreadPool(final int threadPoolMinSize, + final int threadPoolInitSize, + final int keepAliveTime) { +- m_threadPool = new PooledExecutor(new LinkedQueue()); +- m_threadPool.setKeepAliveTime(keepAliveTime); +- m_threadPool.createThreads(threadPoolInitSize); +- m_threadPool.setMinimumPoolSize(threadPoolMinSize); ++ m_threadPool = new ThreadPoolExecutor(threadPoolInitSize, Integer.MAX_VALUE, ++ keepAliveTime, TimeUnit.MILLISECONDS, ++ new LinkedBlockingQueue()); ++ m_threadPool.prestartAllCoreThreads(); ++ m_threadPool.setCorePoolSize(threadPoolMinSize); + } +-} +\ No newline at end of file ++} |