diff options
author | Krzysztof Pawlik <nelchael@gentoo.org> | 2006-05-21 21:30:53 +0000 |
---|---|---|
committer | Krzysztof Pawlik <nelchael@gentoo.org> | 2006-05-21 21:30:53 +0000 |
commit | c9969b53385590e37b3c1468d866bf69de2d6ea3 (patch) | |
tree | fd8cd72a095ab20c1e1222dbdb7372734ed3c8b9 /eclass | |
parent | Version bump (diff) | |
parent | Missed the license. (diff) | |
download | java-c9969b53385590e37b3c1468d866bf69de2d6ea3.tar.gz java-c9969b53385590e37b3c1468d866bf69de2d6ea3.tar.bz2 java-c9969b53385590e37b3c1468d866bf69de2d6ea3.zip |
Split generation 2 packages from gentoo-java-experimental to migration-packages. Any migrated package should be moved to migration-packages.
svn path=/migration-packages/; revision=2291
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/commons-jelly-tags.eclass | 131 | ||||
-rw-r--r-- | eclass/java-maven.eclass | 129 | ||||
-rw-r--r-- | eclass/maven-plugin.eclass | 104 | ||||
-rw-r--r-- | eclass/wagon.eclass | 43 |
4 files changed, 0 insertions, 407 deletions
diff --git a/eclass/commons-jelly-tags.eclass b/eclass/commons-jelly-tags.eclass deleted file mode 100644 index a872e5c8..00000000 --- a/eclass/commons-jelly-tags.eclass +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# -# Original Author: Joshua Nichols <nichoj@gentoo.org> -# Purpose: facilitate packaging commons-jellyt-tags-* -# - -# Procedure for packaging common-jelly-tags: -# * Go to the SVN repository located at: -# http://svn.apache.org/repos/asf/jakarta/commons/proper/jelly/ -# You'll probably want to use things that are tagged, so: -# http://svn.apache.org/repos/asf/jakarta/commons/proper/jelly/tags/ -# * For whatever set to package, from the repository, figure out where the -# source actually lives in the repository. -# ie for log, it'd be http://svn.apache.org/repos/asf/jakarta/commons/proper/jelly/tags/COMMONS-JELLY-LOG-1_0/jelly-tags/log/ -# * Make a checkout of the source to ${P} -# * Make a patch to the build.xml to remove deps: 'get-deps' from compile, and 'test' from -# TODO: maybe a generic patch can be used everywhere (since the build.xmls are -# so close)? -# * svn revert build.xml -# * Run 'ant get-deps', to figure out what it depends on. -# * For everything that isn't part of LDEPEND below, add it to RDEPEND of the -# ebuild -# * If there is anything isn't part of LDEPEND below, also declare a function -# commons-jelly-tags_src_unpack(), and make the appropriate java-pkg_jar-from -# calls -# * ant clean -# * Create a tarball of the checkout as ${P}.tar.bz2 - -inherit java-pkg eutils base - -ECLASS="commons-jelly-tags" -INHERITED="$INHERITED $ECLASS" - -DECRIPTION="An Executable XML Java Elements Framework" -HOMEPAGE="http://jakarta.apache.org/commons/jelly/" -SLOT=${SLOT:=${PV}} -JELLY_PATCH_VERSION=${JELLY_PATCH_VERSION:="1.0"} -SRC_URI="http://gentooexperimental.org/distfiles/${P}.tar.bz2 - http://gentooexperimental.org/distfiles/commons-jelly-tags-${JELLY_PATCH_VERSION}-gentoo.patch.bz2" - -COMMON_DEPS="dev-java/commons-jelly - =dev-java/commons-beanutils-1.6* - dev-java/commons-collections - =dev-java/commons-jexl-1.0* - dev-java/commons-logging - dev-java/commons-lang - =dev-java/dom4j-1* - =dev-java/jaxen-1.1* - =dev-java/xerces-2* - dev-java/junit" - -RDEPEND=">=virtual/jre-1.4 - ${COMMON_DEPS}" -DEPEND=">=virtual/jdk-1.4 - dev-java/ant-core - dev-java/ant-tasks - jikes? ( dev-java/jikes ) - source? ( app-arch/zip ) - ${COMMON_DEPS}" -IUSE="doc jikes source" -LICENSE="Apache-2.0" - -PATCHES="${PATCHES:=${WORKDIR}/commons-jelly-tags-1.0-gentoo.patch}" - -EXPORT_FUNCTIONS src_unpack src_compile src_install src_test - -commons-jelly-tags_fix-jars() { - # empty! implement for each ebuild - true; -} - -# Pull jars that will be used by all commons-jelly-tags packages -commons-jelly-tags_fix-common-jars() { - java-pkg_jar-from commons-jelly-1 - java-pkg_jar-from commons-beanutils-1.6 - java-pkg_jar-from commons-cli-1 - java-pkg_jar-from commons-collections - java-pkg_jar-from commons-logging - java-pkg_jar-from commons-lang - java-pkg_jar-from commons-jexl-1.0 - java-pkg_jar-from dom4j-1 - java-pkg_jar-from jaxen-1.1 - java-pkg_jar-from junit - java-pkg_jar-from xerces-2 -} - -commons-jelly-tags_src_unpack() { - unpack ${A} - cd ${S} - - # apply PATCHES - for patch in ${PATCHES}; do - epatch ${patch} - done - - mkdir -p ${S}/target/lib - cd ${S}/target/lib - - # populate the lib dir with dependencies - commons-jelly-tags_fix-common-jars - commons-jelly-tags_fix-jars -} - -commons-jelly-tags_src_compile() { - local antflags="jar -Dfinal.name=${PN}" - use jikes && antflags="${antflags} -Dbuild.compiler=jikes" - use doc && antflags="${antflags} javadoc" - - ant ${antflags} || die "compile failed" -} - -commons-jelly-tags_src_install() { -# java-pkg_newjar target/${PN}*.jar ${PN}.jar -# for jar in target/*.jar ; do -# # could there be a better way? -# # basically, don't want there to be SNAPSHOT in the jar name -# local jarname=$(basename ${jar}) -# jarname=${jarname%%-1*} # this is ugly... -# java-pkg_newjar ${jar} ${jarname}.jar -# done - java-pkg_dojar target/*.jar - use doc && java-pkg_dohtml -r dist/docs/api - use source && java-pkg_dosrc src/java/* -} - -commons-jelly-tags_src_test() { - ant test || die "Tests failed" -} diff --git a/eclass/java-maven.eclass b/eclass/java-maven.eclass deleted file mode 100644 index ed144bdb..00000000 --- a/eclass/java-maven.eclass +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# -# Original Author: nichoj -# Purpose: -# - -inherit java-pkg java-utils base - -ECLASS="java-maven" -INHERITED="$INHERITED $ECLASS" - -DEPEND="~dev-java/maven-gentoo-repo" - -JAVA_MAVEN_VERSION=${JAVA_MAVEN_VERSION:=1} - -# This is safe to do, right? -case "${JAVA_MAVEN_VERSION}" in - "1") - JAVA_MAVEN_SYSTEM_HOME="/usr/share/maven" - JAVA_MAVEN_EXEC="${JAVA_MAVEN_SYSTEM_HOME}/bin/maven" - ;; - "2") - JAVA_MAVEN_SYSTEM_HOME="/usr/share/maven-bin-2" - JAVA_MAVEN_EXEC="${JAVA_MAVEN_SYSTEM_HOME}/bin/mvn" - ;; -esac - -JAVA_MAVEN_SYSTEM_PLUGINS="${JAVA_MAVEN_SYSTEM_HOME}/plugins" -JAVA_MAVEN_SYSTEM_BIN="${JAVA_MAVEN_SYSTEM_HOME}/bin" -JAVA_MAVEN_SYSTEM_LIB="${JAVA_MAVEN_SYSTEM_HOME}/lib" - -JAVA_MAVEN_BUILD_HOME=${JAVA_MAVEN_BUILD_HOME:="${T}/.maven"} -JAVA_MAVEN_BUILD_REPO=${JAVA_MAVEN_BUILD_REPO:="${JAVA_MAVEN_BUILD_HOME}/repository"} -JAVA_MAVEN_BUILD_PLUGINS=${JAVA_MAVEN_BUILD_PLUGINS:="${JAVA_MAVEN_BUILD_HOME}/plugins"} - -JAVA_MAVEN_PLUGINS=${JAVA_MAVEN_PLUGINS:="jar pom java javadoc test license xdoc"} - -emaven() { - local maven_flags="-Dmaven.repo.local=${JAVA_MAVEN_BUILD_REPO}" - maven_flags="${maven_flags} -Dmaven.plugin.dir=${JAVA_MAVEN_BUILD_PLUGINS}" - maven_flags="${maven_flags} -Dmaven.repo.remote=file://usr/share/maven-gentoo-repo" - maven_flags="${maven_flags} -Dmaven.home.local=${JAVA_MAVEN_BUILD_HOME}" - maven_flags="${maven_flags} -Dmaven.compile.source=$(java-maven_get-source)" - maven_flags="${maven_flags} -Dmaven.compile.target=$(java-maven_get-target)" - /usr/share/maven/bin/maven ${maven_flags} "$@" || die "maven failed" -} - - -java-maven_use-plugin() { - JAVA_MAVEN_PLUGINS="${JAVA_MAVEN_PLUGINS} $@" -} - -java-maven_src_unpack() { - einfo "Populating ${JAVA_MAVEN_BUILD_PLUGINS}" - mkdir -p ${JAVA_MAVEN_BUILD_PLUGINS} || die "mkdir failed" - cd ${JAVA_MAVEN_BUILD_PLUGINS} - - for plugin in ${JAVA_MAVEN_PLUGINS}; do - java-pkg_jar-from maven-${plugin}-plugin-${JAVA_MAVEN_VERSION} - done - - cd - - - base_src_unpack -} - -java-maven_get-target() { -# if [[ -n "$(declare -f java-pkg_get-target)" ]]; then -# echo $(java-pkg_get-target) -# else - echo "1.4" -# fi -} - -java-maven_get-source() { -# if [[ -n "$(declare -f java-pkg_get-source)" ]]; then -# echo $(java-pkg_get-source) -# else - echo "1.4" -# fi -} - -EXPORT_FUNCTIONS src_unpack - -function java-maven_doplugin() { - # TODO check args - local plugin_jar=${1} - local plugin_basename=$(basename ${1}) - - java-pkg_dojar ${plugin_jar} - - local jardir - if [[ ${SLOT} != "0" ]]; then - jardir="/usr/share/${PN}-${SLOT}/lib" - else - jardir="/usr/share/${PN}/lib" - fi - local installed_jar="${jardir}/${plugin_basename}" - - dodir "${JAVA_MAVEN_SYSTEM_PLUGINS}" - dosym "${installed_jar}" \ - "${JAVA_MAVEN_SYSTEM_PLUGINS}/${plugin_basename}" -} - -# TODO reduce redunancy of doplugin/newplugin - -function java-maven_newplugin() { - # TODO check args - local plugin_jar=${1} - local plugin_basename=$(basename ${1}) - local plugin_newjar="${2}" - - java-pkg_newjar ${plugin_jar} ${plugin_newjar} - - local jardir - if [[ ${SLOT} != "0" ]]; then - jardir="/usr/share/${PN}-${SLOT}/lib" - else - jardir="/usr/share/${PN}/lib" - fi - local installed_jar="${jardir}/${plugin_newjar}" - - dodir "${JAVA_MAVEN_SYSTEM_PLUGINS}" - dosym "${installed_jar}" \ - "${JAVA_MAVEN_SYSTEM_PLUGINS}/${plugin_basename}" -} diff --git a/eclass/maven-plugin.eclass b/eclass/maven-plugin.eclass deleted file mode 100644 index 96908002..00000000 --- a/eclass/maven-plugin.eclass +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# -# Original Author: nichoj -# Purpose: To facilitate packaging maven plugins. -# - -inherit java-pkg base - -ECLASS="maven-plugin" -INHERITED="$INHERITED $ECLASS" - -HOMEPAGE="http://maven.apache.org" -SRC_URI="http://gentooexperimental.org/distfiles/${P}-gentoo.tar.bz2" -LICENSE="Apache-2.0" - -RDEPEND=">=virtual/jdk-1.4 - dev-java/ant-core" -DEPEND="${RDEPEND}" -IUSE="" - -EXPORT_FUNCTIONS src_unpack src_compile src_install - -maven-plugin_populate-jars() { - true -} - -maven-plugin_src_unpack() { - # Use base, so we get some patching magic - base_src_unpack - - cd ${S} - # This build.xml was generated by 'maven ant', and fixed slightly. - local build_xml - if [[ -f ${FILESDIR}/build-${PVR}.xml ]]; then - build_xml=${FILESDIR}/build-${PVR}.xml - elif [[ -f ${FILESDIR}/build-${PV}.xml ]]; then - build_xml=${FILESDIR}/build-${PV}.xml - else - die "Couldn't find a suitable build.xml" - fi - - cp ${build_xml} build.xml - - mkdir -p target/lib - cd target/lib - - maven-plugin_populate-jars -} - -maven-plugin_src_compile() { - local antflags="jar -Dnoget=true" - ant ${antflags} || die "ant failed" -} - -maven-plugin_src_install() { - maven_newplugin target/${P}.jar ${PN}.jar -} - - -function maven_doplugin() { - # TODO check args - local plugin_jar=${1} - local plugin_basename=$(basename ${1}) - - java-pkg_dojar ${plugin_jar} - - local jardir - if [[ ${SLOT} != "0" ]]; then - jardir="/usr/share/${PN}-${SLOT}/lib" - else - jardir="/usr/share/${PN}/lib" - fi - local installed_jar="${jardir}/${plugin_basename}" - - dodir "${JAVA_MAVEN_SYSTEM_PLUGINS}" - dosym "${installed_jar}" \ - "${JAVA_MAVEN_SYSTEM_PLUGINS}/${plugin_basename}" -} - -# TODO reduce redunancy of doplugin/newplugin - -function maven_newplugin() { - # TODO check args - local plugin_jar=${1} - local plugin_basename=$(basename ${1}) - local plugin_newjar="${2}" - - java-pkg_newjar ${plugin_jar} ${plugin_newjar} - - local jardir - if [[ ${SLOT} != "0" ]]; then - jardir="/usr/share/${PN}-${SLOT}/lib" - else - jardir="/usr/share/${PN}/lib" - fi - local installed_jar="${jardir}/${plugin_newjar}" - - dodir "${JAVA_MAVEN_SYSTEM_PLUGINS}" - dosym "${installed_jar}" \ - "${JAVA_MAVEN_SYSTEM_PLUGINS}/${plugin_basename}" -} diff --git a/eclass/wagon.eclass b/eclass/wagon.eclass deleted file mode 100644 index 8e8c71f6..00000000 --- a/eclass/wagon.eclass +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# -# Original Author: nichoj -# Purpose: -# -inherit java-pkg - -ECLASS="wagon" -INHERITED="$INHERITED $ECLASS" - -HOMEPAGE="" -MY_PV="${PV/_alpha/-alpha-}" -MY_P="${PN}-${MY_PV}" -S="${WORKDIR}/${MY_P}" -SRC_URI="http://gentooexperimental.org/distfiles/${MY_P}.tar.bz2 http://gentooexperimental.org/distfiles/build-wagon.xml.bz2" - -DEPEND=">=virtual/jdk-1.4 - dev-java/ant-core" -RDEPEND=">=virtual/jre-1.4" - - -wagon_src_unpack() { - unpack ${A} - cd ${S} - cp ${WORKDIR}/build-wagon.xml build.xml -} - -wagon_src_compile() { - local antflags="jar -Dproject.name=${PN}" - use doc && antflags="${antflags} javadoc" - use jikes && antflags="${antflags} -Dbuild.compiler=jikes" - ant ${antflags} || die "build failed!" -} - -wagon_src_install() { - java-pkg_dojar dist/${PN}.jar - use doc && java-pkg_dohtml -r dist/doc/api -} - -EXPORT_FUNCTIONS src_unpack src_compile src_install |