Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 545004 | Differences between
and this patch

Collapse All | Expand All

(-)jdbc-postgresql-9.3_p1100.ebuild (-6 / +27 lines)
Lines 1-6 Link Here
1
# Copyright 1999-2014 Gentoo Foundation
1
# Copyright 1999-2015 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/jdbc-postgresql-9.3_p1100.ebuild,v 1.3 2014/12/28 15:24:21 titanofold Exp $
3
# $Header: $
4
4
5
EAPI="5"
5
EAPI="5"
6
6
Lines 29-35 Link Here
29
	)
29
	)
30
	test? (
30
	test? (
31
		dev-java/ant-junit
31
		dev-java/ant-junit
32
		dev-db/postgresql[server]
32
		dev-java/junit:4
33
		>=dev-db/postgresql-9.3[server]
33
	)"
34
	)"
34
RDEPEND=">=virtual/jre-1.6"
35
RDEPEND=">=virtual/jre-1.6"
35
36
Lines 37-48 Link Here
37
38
38
java_prepare() {
39
java_prepare() {
39
	find -name "*.class" -type f -exec rm -v {} + || die
40
	find -name "*.class" -type f -exec rm -v {} + || die
41
42
	# Strip build.xml of maven deps
43
	sed -i -e '/<classpath.*dependency\.compile\.classpath/c\' build.xml || die
44
	sed -i -e '/<classpath.*dependency\.runtime\.classpath/c\' build.xml || die
45
	sed -i -e '/<classpath.*dependency\.test\.classpath/c\' build.xml || die
46
	sed -i -e '/<target name="artifact-version"/,/<[/]target>/{s/depends="maven-dependencies"//}' build.xml || die
47
	sed -i -e '/<target name="compile"/ s/,maven-dependencies//' build.xml || die
48
49
	# Remove SSPI, it pulls in Waffle-JNA and is only used on Windows
50
	sed -i -e '/<include.*sspi/c\' build.xml || die
51
	rm -vrf org/postgresql/sspi || die "Error removing sspi"
52
	epatch "${FILESDIR}"/${P}-remove-sspi.patch
53
54
	# FIXME @someone who cares: enable through osgi flag?
55
	sed -i -e '/<include.*osgi/c\' build.xml || die
56
	sed -i -e '/<test.*osgi/c\' build.xml || die
57
	rm -vrf org/postgresql/osgi || die "Error removing osgi"
58
	rm -vrf org/postgresql/test/osgi || die "Error removing osgi tests"
59
	epatch "${FILESDIR}"/${P}-remove-osgi.patch
40
}
60
}
41
61
42
JAVA_ANT_REWRITE_CLASSPATH="yes"
62
JAVA_ANT_REWRITE_CLASSPATH="yes"
43
EANT_DOC_TARGET="publicapi"
63
EANT_DOC_TARGET="publicapi"
44
64
45
src_compile() {
65
src_compile() {
66
	EANT_BUILD_TARGET="release-version jar"
46
	java-pkg-2_src_compile
67
	java-pkg-2_src_compile
47
68
48
	# There is a task that creates this doc but I didn't find a way how to use system catalog
69
	# There is a task that creates this doc but I didn't find a way how to use system catalog
Lines 57-74 Link Here
57
src_test() {
78
src_test() {
58
	einfo "In order to run the tests successfully, you have to have:"
79
	einfo "In order to run the tests successfully, you have to have:"
59
	einfo "1) PostgreSQL server running"
80
	einfo "1) PostgreSQL server running"
60
	einfo "2) database 'test' defined with user 'test' with password 'password'"
81
	einfo "2) database 'test' defined with user 'test' with password 'test'"
61
	einfo "   as owner of the database"
82
	einfo "   as owner of the database"
62
	einfo "3) plpgsql support in the 'test' database"
83
	einfo "3) plpgsql support in the 'test' database"
63
	einfo
84
	einfo
64
	einfo "You can find a general info on how to perform these steps at"
85
	einfo "You can find a general info on how to perform these steps at"
65
	einfo "https://wiki.gentoo.org/wiki/PostgreSQL"
86
	einfo "https://wiki.gentoo.org/wiki/PostgreSQL"
66
87
67
	ANT_TASKS="ant-junit" eant test -Dgentoo.classpath=$(java-pkg_getjars --build-only junit)
88
	ANT_TASKS="ant-junit" eant test -Dgentoo.classpath=$(java-pkg_getjars --build-only junit-4)
68
}
89
}
69
90
70
src_install() {
91
src_install() {
71
	java-pkg_newjar jars/postgresql.jar jdbc-postgresql.jar
92
	java-pkg_newjar build/jars/postgresql*.jar jdbc-postgresql.jar
72
93
73
	if use doc ; then
94
	if use doc ; then
74
		java-pkg_dojavadoc build/publicapi
95
		java-pkg_dojavadoc build/publicapi

Return to bug 545004