/[gentoo-x86]/dev-java/jdbc-jaybird/jdbc-jaybird-2.1.5-r1.ebuild
Gentoo

Contents of /dev-java/jdbc-jaybird/jdbc-jaybird-2.1.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Nov 10 14:34:30 2009 UTC (8 years, 2 months ago) by maekke
Branch: MAIN
Changes since 1.2: +2 -2 lines
amd64/x86 stable, bug #216412
(Portage version: 2.2_rc49/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-jaybird/jdbc-jaybird-2.1.5-r1.ebuild,v 1.2 2009/11/01 20:35:22 caster Exp $
4
5 JAVA_PKG_IUSE="doc source examples test"
6
7 inherit eutils java-pkg-2 java-ant-2
8
9 At="Jaybird-${PV/_/}-src"
10 DESCRIPTION="JDBC Type 2 and 4 drivers for Firebird SQL server"
11 HOMEPAGE="http://jaybirdwiki.firebirdsql.org/"
12 SRC_URI="mirror://sourceforge/firebird/${At}.zip"
13 LICENSE="LGPL-2"
14 SLOT="0"
15 KEYWORDS="amd64 ~ppc x86"
16 IUSE="java6"
17
18 RDEPEND="java6? ( >=virtual/jre-1.6 )
19 !java6? ( >=virtual/jre-1.5 )
20 dev-java/ant-core
21 dev-java/log4j"
22 DEPEND="java6? ( =virtual/jdk-1.6* )
23 !java6? ( =virtual/jdk-1.5* )
24 app-arch/unzip
25 dev-java/ant-core
26 dev-java/log4j
27 test? (
28 =dev-java/junit-3.8*
29 dev-java/ant-junit
30 )"
31
32 S="${WORKDIR}/client-java"
33
34 MY_PN="jaybird"
35
36 src_unpack() {
37 unpack ${A}
38 cd "${S}"
39
40 epatch "${FILESDIR}/archive-xml-2.1.0.patch"
41 epatch "${FILESDIR}/compile_xml-2.1.2.patch"
42
43 cd "${S}/lib/"
44 rm -v *.jar
45 use test && java-pkg_jar-from --build-only junit junit.jar
46
47 cd "${S}/src/lib/"
48 # the build.xml unpacks this and uses stuff
49 mv mini-j2ee.jar "${T}" || die "Failed to move mini-j2ee.jar to ${T}"
50 rm -v *.jar *.zip
51 mv "${T}"/mini-j2ee.jar . || die "Failed to move mini-j2ee.jar back from ${T}"
52
53 # Hack to add ant.jar to classpath without patch
54 java-pkg_jar-from ant-core ant.jar jaas.jar
55 java-pkg_jar-from log4j log4j.jar log4j-core.jar
56 }
57
58 src_compile() {
59 java-pkg_filter-compiler jikes
60 eant $(use test && echo "-Dtests=true") jars \
61 $(use_doc javadocs)
62 }
63
64 src_install() {
65 cd "${S}/output/lib/"
66 java-pkg_newjar ${MY_PN}-${PV}.jar ${PN}.jar
67
68 for jar in full pool; do
69 java-pkg_newjar ${MY_PN}-${jar}-${PV}.jar ${MY_PN}-${jar}.jar || die "java-pkg_newjar ${MY_PN}-${jar}.jar failed"
70 done
71 if use test; then
72 java-pkg_newjar ${MY_PN}-test-${PV}.jar ${MY_PN}-${jar}.jar || die "java-pkg_newjar ${MY_PN}-${jar}.jar failed"
73 fi
74
75 cd "${S}"
76
77 if use examples; then
78 insinto /usr/share/doc/${PF}/
79 doins -r examples || die "installing examples failed"
80 fi
81
82 use source && java-pkg_dosrc "${S}"/src/*/org
83
84 cd "${S}/output"
85 use doc && java-pkg_dohtml -r docs/
86 dodoc etc/{*.txt,default.mf}
87 dohtml etc/*.html
88 }
89
90 src_test() {
91 #
92 # Warning about timeouts without Firebird installed and running Locally
93 #
94 ewarn "You will experience long timeouts when running junit tests"
95 ewarn "without Firebird installed and running locally. The tests will"
96 ewarn "complete without Firebird, but network timeouts prolong the"
97 ewarn "testing phase considerably."
98 ANT_TASKS="ant-junit" eant all-tests-pure-java
99 }

  ViewVC Help
Powered by ViewVC 1.1.20