summaryrefslogtreecommitdiff
blob: e7d595b92e3204beb574e422ccb5c51efe4e473d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

JAVA_PKG_IUSE="doc source"

inherit eutils java-pkg-2 java-ant-2

DESCRIPTION="jTDS - SQL Server and Sybase JDBC driver"
SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
HOMEPAGE="http://jtds.sourceforge.net"

LICENSE="LGPL-2.1"
SLOT="1.2"
KEYWORDS="amd64 x86"
IUSE=""

# Would need a running server
RESTRICT="test"

COMMON_DEPEND="
	dev-java/jcifs:1.1"
RDEPEND="${COMMON_DEPEND}
	virtual/jre:1.6"
DEPEND="${COMMON_DEPEND}
	virtual/jdk:1.6
	app-arch/unzip"

S=${WORKDIR}

java_prepare() {
	find -name '*.jar' -exec rm -v {} + || die

	epatch "${FILESDIR}"/${P}-build.xml.patch

	rm -vr ./src/test/net/sourceforge/jtds/test || die
}

JAVA_ANT_REWRITE_CLASSPATH="yes"
JAVA_ANT_CLASSPATH_TAGS+=" javadoc"

EANT_GENTOO_CLASSPATH="jcifs-1.1"

src_install() {
	java-pkg_dojar build/${PN}.jar

	dodoc CHANGELOG README*
	use doc && java-pkg_dojavadoc build/doc
	use source && java-pkg_dosrc "${S}"/src/main/*
}