Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138753 - jdbc3-postgresql EBUILD fails with sun-jdk-1.5
Summary: jdbc3-postgresql EBUILD fails with sun-jdk-1.5
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Highest normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-01 11:50 UTC by Doreen Bordstedt
Modified: 2007-09-23 00:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
This diff fixes the problem for users who don`t want to install blackdown java (jdbc3.diff,738 bytes, patch)
2006-07-01 12:19 UTC, Doreen Bordstedt
Details | Diff
This fixes the problem for users who don`t want to install blackdown java (jdbc3.diff,738 bytes, patch)
2006-07-01 12:29 UTC, Doreen Bordstedt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doreen Bordstedt 2006-07-01 11:50:55 UTC
The jdbc3-postgresql ebuild fails on systems with sun-jdk installed. The reason is that the sun-jdk can only handle -target 1.5 and denies service to lower platform settings as the ebuild expects. In order to fix this problem, go to the postgresql website and read which target by which jdbc driver is supportet. in my case, i changed the ebuild to the following:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc3-postgresql/jdbc3-postgresql-8.1_p404-r1.ebuild,v 1.1 2006/07/01 15:31:11 nichoj Exp $

inherit java-ant-2 java-pkg-2

MY_PN="postgresql-jdbc"
MY_PV="${PV/_p/-}"
MY_P="${MY_PN}-${MY_PV}.src"

DESCRIPTION="JDBC Driver for PostgreSQL"
SRC_URI="http://jdbc.postgresql.org/download/${MY_P}.tar.gz"
HOMEPAGE="http://jdbc.postgresql.org/"

LICENSE="POSTGRESQL"
SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc ~amd64"
IUSE="doc examples source"

DEPEND=">=virtual/jdk-1.5
        >=dev-java/ant-core-1.6
        source? ( app-arch/zip )"
RDEPEND=">=virtual/jre-1.5"

# Apparently this has 1.5 specific features, which will need to handled
# somehow with use flags, and may need to patch build.xml to make sure the
# right -source / -target are used
JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"

S="${WORKDIR}/${MY_P}"

# There are 1.5 features, which jikes doesn't like
java-pkg_filter-compiler jikes

src_compile() {
        eant jar $(use_doc publicapi)
}

src_install() {
        java-pkg_newjar jars/postgresql.jar ${PN}.jar

        use doc && java-pkg_dohtml -r ${S}/build/publicapi/*
        if use examples; then
                dodir /usr/share/doc/${PF}/examples
                cp -r ${S}/example/* ${D}/usr/share/doc/${PF}/examples
                java-pkg_dojar jars/postgresql-examples.jar
        fi
        use source && java-pkg_dosrc ${S}/org
}

After this fix ( change 1.4 to 1.5 ), enter "ebuild /usr/portage/dev-java/jdbc3-postgresql/jdbc3-postgresql-8.1_p404-r1.ebuild  digest" and emerge your jdbc3 driver. Stay tuned, the next sync is in the near future. Please fix it permanently. Best regards, Doreen.
Comment 1 Doreen Bordstedt 2006-07-01 12:19:48 UTC
Created attachment 90635 [details, diff]
This diff fixes the problem for users who don`t want to install blackdown java
Comment 2 Doreen Bordstedt 2006-07-01 12:24:41 UTC
Comment on attachment 90635 [details, diff]
This diff fixes the problem for users who don`t want to install blackdown java

>--- /usr/portage/dev-java/jdbc3-postgresql/jdbc3-postgresql-8.1_p404-r1.ebuild	2006-07-01 20:30:19.000000000 +0200
>+++ jdbc3-postgresql-8.1_p404-r1.ebuild	2006-07-01 21:14:23.000000000 +0200
>@@ -17,15 +17,15 @@
> KEYWORDS="~x86 ~ppc ~sparc ~amd64"
> IUSE="doc examples source"
> 
>-DEPEND=">=virtual/jdk-1.4
>+DEPEND=">=virtual/jdk-1.5
> 	>=dev-java/ant-core-1.6
> 	source? ( app-arch/zip )"
>-RDEPEND=">=virtual/jre-1.4"
>+RDEPEND=">=virtual/jre-1.5"
> 
> # Apparently this has 1.5 specific features, which will need to handled
> # somehow with use flags, and may need to patch build.xml to make sure the
> # right -source / -target are used
>-JAVA_PKG_NV_DEPEND="=virtual/jdk-1.4*"
>+JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"
> 
> S="${WORKDIR}/${MY_P}"
>
Comment 3 Doreen Bordstedt 2006-07-01 12:25:47 UTC
Comment on attachment 90635 [details, diff]
This diff fixes the problem for users who don`t want to install blackdown java

>--- /usr/portage/dev-java/jdbc3-postgresql/jdbc3-postgresql-8.1_p404-r1.ebuild	2006-07-01 20:30:19.000000000 +0200
>+++ jdbc3-postgresql-8.1_p404-r1.ebuild	2006-07-01 21:14:23.000000000 +0200
>@@ -17,15 +17,15 @@
> KEYWORDS="~x86 ~ppc ~sparc ~amd64"
> IUSE="doc examples source"
> 
>-DEPEND=">=virtual/jdk-1.4
>+DEPEND=">=virtual/jdk-1.5
> 	>=dev-java/ant-core-1.6
> 	source? ( app-arch/zip )"
>-RDEPEND=">=virtual/jre-1.4"
>+RDEPEND=">=virtual/jre-1.5"
> 
> # Apparently this has 1.5 specific features, which will need to handled
> # somehow with use flags, and may need to patch build.xml to make sure the
> # right -source / -target are used
>-JAVA_PKG_NV_DEPEND="=virtual/jdk-1.4*"
>+JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"
> 
> S="${WORKDIR}/${MY_P}"
>
Comment 4 Doreen Bordstedt 2006-07-01 12:27:24 UTC
Comment on attachment 90635 [details, diff]
This diff fixes the problem for users who don`t want to install blackdown java

>--- /usr/portage/dev-java/jdbc3-postgresql/jdbc3-postgresql-8.1_p404-r1.ebuild	2006-07-01 20:30:19.000000000 +0200
>+++ jdbc3-postgresql-8.1_p404-r1.ebuild	2006-07-01 21:14:23.000000000 +0200
>@@ -17,15 +17,15 @@
> KEYWORDS="~x86 ~ppc ~sparc ~amd64"
> IUSE="doc examples source"
> 
>-DEPEND=">=virtual/jdk-1.4
>+DEPEND=">=virtual/jdk-1.5
> 	>=dev-java/ant-core-1.6
> 	source? ( app-arch/zip )"
>-RDEPEND=">=virtual/jre-1.4"
>+RDEPEND=">=virtual/jre-1.5"
> 
> # Apparently this has 1.5 specific features, which will need to handled
> # somehow with use flags, and may need to patch build.xml to make sure the
> # right -source / -target are used
>-JAVA_PKG_NV_DEPEND="=virtual/jdk-1.4*"
>+JAVA_PKG_NV_DEPEND="=virtual/jdk-1.5*"
> 
> S="${WORKDIR}/${MY_P}"
>
Comment 5 Doreen Bordstedt 2006-07-01 12:29:50 UTC
Created attachment 90636 [details, diff]
This fixes the problem for users who don`t want to install blackdown java
Comment 6 Josh Nichols (RETIRED) gentoo-dev 2006-07-01 12:37:55 UTC
For future reference, it really is only necessary to attach the patch, no need to post comments with it inline.
Comment 7 wbrana 2006-10-21 06:11:26 UTC
Could anybody update ebuild in portage?
Comment 8 Doreen Bordstedt 2006-10-21 08:55:56 UTC
This "bug" is closed as the new java-policy works fine on all platforms. 
Blackdown and Sun Java coexist bravely on the harddisk and the gentoo-specific config tools are working fine. No need to worry about. 

Everything is fine, nothing is ruined.
Comment 9 Doreen Bordstedt 2006-10-21 08:59:22 UTC
The "BUG" is closed. The Gentoo specific java policy works fine and there is no need to worry about it any more. 

The following VMs are available for generation-2:
1)      Blackdown JDK 1.4.2.03 [blackdown-jdk-1.4.2]
*)      Sun JDK 1.5.0.08 [sun-jdk-1.5]