/[gentoo-x86]/eclass/ant-tasks.eclass
Gentoo

Diff of /eclass/ant-tasks.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 Revision 1.6
1# Eclass for building dev-java/ant-* packages 1# Eclass for building dev-java/ant-* packages
2# 2#
3# Copyright 2007 Gentoo Foundation 3# Copyright 2007 Gentoo Foundation
4# Distributed under the terms of the GNU General Public License, v2 or later 4# Distributed under the terms of the GNU General Public License, v2 or later
5# Author Vlastimil Babka <caster@gentoo.org> 5# Author Vlastimil Babka <caster@gentoo.org>
6# $Header: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v 1.5 2008/07/07 16:48:45 betelgeuse Exp $ 6# $Header: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v 1.6 2008/07/14 21:38:14 caster Exp $
7 7
8# we set ant-core dep ourselves, restricted 8# we set ant-core dep ourselves, restricted
9JAVA_ANT_DISABLE_ANT_CORE_DEP=true 9JAVA_ANT_DISABLE_ANT_CORE_DEP=true
10# rewriting build.xml for are the testcases has no reason atm 10# rewriting build.xml for are the testcases has no reason atm
11JAVA_PKG_BSFIX_ALL=no 11JAVA_PKG_BSFIX_ALL=no
66# Version of ant-core this task is intended to register and thus load with. 66# Version of ant-core this task is intended to register and thus load with.
67# ----------------------------------------------------------------------------- 67# -----------------------------------------------------------------------------
68ANT_TASK_PV="${PV}" 68ANT_TASK_PV="${PV}"
69 69
70# special care for beta/RC releases 70# special care for beta/RC releases
71if [[ ${PV} == *beta* ]]; then 71if [[ ${PV} == *beta2* ]]; then
72 MY_PV=${PV/_beta/Beta} 72 MY_PV=${PV/_beta2/beta}
73 UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
73 SRC_URI_PREFIX="http://dev.gentoo.org/~caster/distfiles" 74 GENTOO_PREFIX="http://dev.gentoo.org/~caster/distfiles"
74 ANT_TASK_PV=$(get_version_component_range 1-3) 75 ANT_TASK_PV=$(get_version_component_range 1-3)
75elif [[ ${PV} == *_rc* ]]; then 76elif [[ ${PV} == *_rc* ]]; then
76 MY_PV=${PV/_rc/RC} 77 MY_PV=${PV/_rc/RC}
77 SRC_URI_PREFIX="http://dev.gentoo.org/~caster/distfiles" 78 UPSTREAM_PREFIX="http://dev.gentoo.org/~caster/distfiles"
79 GENTOO_PREFIX="http://dev.gentoo.org/~caster/distfiles"
78 ANT_TASK_PV=$(get_version_component_range 1-3) 80 ANT_TASK_PV=$(get_version_component_range 1-3)
79else 81else
80 # default for final releases 82 # default for final releases
81 MY_PV=${PV} 83 MY_PV=${PV}
82 SRC_URI_PREFIX="mirror://apache/ant/source" 84 UPSTREAM_PREFIX="mirror://apache/ant/source"
85 GENTOO_PREFIX="mirror://gentoo"
83fi 86fi
84 87
85# source/workdir name 88# source/workdir name
86MY_P="apache-ant-${MY_PV}" 89MY_P="apache-ant-${MY_PV}"
87 90
88# ----------------------------------------------------------------------------- 91# -----------------------------------------------------------------------------
89# Default values for standard ebuild variables, can be overriden from ebuild. 92# Default values for standard ebuild variables, can be overriden from ebuild.
90# ----------------------------------------------------------------------------- 93# -----------------------------------------------------------------------------
91DESCRIPTION="Apache Ant's optional tasks depending on ${ANT_TASK_DEPNAME}" 94DESCRIPTION="Apache Ant's optional tasks depending on ${ANT_TASK_DEPNAME}"
92HOMEPAGE="http://ant.apache.org/" 95HOMEPAGE="http://ant.apache.org/"
93SRC_URI="${SRC_URI_PREFIX}/${MY_P}-src.tar.bz2 96SRC_URI="${UPSTREAM_PREFIX}/${MY_P}-src.tar.bz2
94 mirror://gentoo/ant-${PV}-gentoo.tar.bz2" 97 ${GENTOO_PREFIX}/ant-${PV}-gentoo.tar.bz2"
95LICENSE="Apache-2.0" 98LICENSE="Apache-2.0"
96SLOT="0" 99SLOT="0"
97IUSE="" 100IUSE=""
98 101
99RDEPEND=">=virtual/jre-${ANT_TASK_JREVER} 102RDEPEND=">=virtual/jre-${ANT_TASK_JREVER}
100 ~dev-java/ant-core-${PV}" 103 ~dev-java/ant-core-${PV}"
101DEPEND=">=virtual/jdk-${ANT_TASK_JDKVER} 104DEPEND=">=virtual/jdk-${ANT_TASK_JDKVER}
102 ${RDEPEND}" 105 ${RDEPEND}"
103 106
104S="${WORKDIR}/${MY_P}"
105
106# Would run the full ant test suite for every ant task 107# Would run the full ant test suite for every ant task
107RESTRICT="test" 108RESTRICT="test"
109
110S="${WORKDIR}/${MY_P}"
108 111
109# ------------------------------------------------------------------------------ 112# ------------------------------------------------------------------------------
110# @eclass-src_unpack 113# @eclass-src_unpack
111# 114#
112# Is split into two parts, defaults to both of them ('all'). 115# Is split into two parts, defaults to both of them ('all').
132 135
133 # ant.jar to build against 136 # ant.jar to build against
134 java-pkg_jar-from --build-only ant-core ant.jar;; 137 java-pkg_jar-from --build-only ant-core ant.jar;;
135 jar-dep) 138 jar-dep)
136 # get jar from the dependency package 139 # get jar from the dependency package
140 if [[ -n "${ANT_TASK_DEPNAME}" ]]; then
137 java-pkg_jar-from ${ANT_TASK_DEPNAME};; 141 java-pkg_jar-from ${ANT_TASK_DEPNAME}
142 fi;;
138 all) 143 all)
139 ant-tasks_src_unpack base jar-dep;; 144 ant-tasks_src_unpack base jar-dep;;
140 esac 145 esac
141 shift 146 shift
142 done 147 done
160# updated to newer version. 165# updated to newer version.
161# ------------------------------------------------------------------------------ 166# ------------------------------------------------------------------------------
162ant-tasks_src_install() { 167ant-tasks_src_install() {
163 java-pkg_dojar build/lib/${PN}.jar 168 java-pkg_dojar build/lib/${PN}.jar
164 java-pkg_register-ant-task --version "${ANT_TASK_PV}" 169 java-pkg_register-ant-task --version "${ANT_TASK_PV}"
170
171 # create the compatibility symlink
172 if version_is_at_least 1.7.1_beta2; then
173 dodir /usr/share/ant/lib
174 dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
175 fi
165} 176}

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20