From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- dev-java/jdbc-mysql/Manifest | 6 ++ .../files/5.0.5-dist-target-depends.patch | 11 +++ .../5.0.5-remove-jboss-dependency-from-tests.patch | 39 ++++++++++ dev-java/jdbc-mysql/files/5.1.14-java6.patch | 34 +++++++++ dev-java/jdbc-mysql/jdbc-mysql-5.1.26.ebuild | 83 ++++++++++++++++++++++ dev-java/jdbc-mysql/metadata.xml | 12 ++++ 6 files changed, 185 insertions(+) create mode 100644 dev-java/jdbc-mysql/Manifest create mode 100644 dev-java/jdbc-mysql/files/5.0.5-dist-target-depends.patch create mode 100644 dev-java/jdbc-mysql/files/5.0.5-remove-jboss-dependency-from-tests.patch create mode 100644 dev-java/jdbc-mysql/files/5.1.14-java6.patch create mode 100644 dev-java/jdbc-mysql/jdbc-mysql-5.1.26.ebuild create mode 100644 dev-java/jdbc-mysql/metadata.xml (limited to 'dev-java/jdbc-mysql') diff --git a/dev-java/jdbc-mysql/Manifest b/dev-java/jdbc-mysql/Manifest new file mode 100644 index 000000000000..4a845e440ea2 --- /dev/null +++ b/dev-java/jdbc-mysql/Manifest @@ -0,0 +1,6 @@ +AUX 5.0.5-dist-target-depends.patch 380 BLAKE2B 2e4d8a025c986dd6bbd1e97b629875614ea9be28c0fc51bc24dca85244fc089798c09f3fdb125bbc94ba19355b133b2119e5e4e1573990616d1dc960fd2dacfa SHA512 407ba02b1e2b3a514a9e270356a15f97eaa19197117a9f2752ee6b78fba0dd7cab150f7eaac02f8d6cb9d3bfe6d0edd3e68f38457310d69123c97b9231d621c4 +AUX 5.0.5-remove-jboss-dependency-from-tests.patch 1541 BLAKE2B 17c84606f144c3aedc6b61986f9f7d215ac539b044d2745682e9f98b22bd6a86996cdb693762b375fd57de21bbe09afeef4ed8a5e91d124a28ecd157a2761a3a SHA512 43e91aa4ff599cb958cb6c098cbc1a28511b2fe12ea44dcee20fffe0efbfd1ce31bb29dfc9330a30d99174ed80abbb8512a0cdf3b4155fbf3d78ef776a5ebcb5 +AUX 5.1.14-java6.patch 1301 BLAKE2B 605199c02b040a07306a26f1701ce3fb317ae7af41480329ae79491f0896847c143ae0e2c04358e291b9288c29a0eeebc613bee9d6b150a6993f6282fc8e7713 SHA512 1b630781201478dee6da3d2322755ff87b2e2c9c1cd49a127bbcd56a0cc25e7bed06ed5f0758709c2e120fc85273755ee28c7ba21ac7b75e97ac6043216413a1 +DIST mysql-connector-java-5.1.26.tar.gz 3724076 BLAKE2B b5477e0f86a04b2135a47e3551cc89fa5f63f46faaccbf1e4473eb59e6d266d22d76a5c256d125feeeccd4625c22bcedaa9e21e613bf9759459e106b7d30db5f SHA512 93b882f5262dc991aa885ed9ae7fead02b9d28431022c86c6724272b508e78eee3df7310e9964e60f68953ed56f4fcdf9159a90f463eb39aea65af2453371879 +EBUILD jdbc-mysql-5.1.26.ebuild 1883 BLAKE2B 3794714e2120f69740b16a9c32ec19cbfe349caed449582cfe92e9a36192fd3aa5c80767bc5df822781f570b12f67c193060d542c6e65df7b0078555981cb906 SHA512 0e3f1135e8f19888853a76f5fab00c2fca122707affabbf2b08569b71aa03bdf0a15b25288c5d550a8c0b6b13cff11b1c64bccf1f173a3eeb53bc28b1a053638 +MISC metadata.xml 358 BLAKE2B 634f9354e5f680e4313debca5f05fc117b44f1a43b018b3d71d92430cb8253a9da018f74e888bf535e0dbc64e79d240d4f5748d945a5caa14eba874b9e38dca9 SHA512 4db9ea2f30ecc92b4b97e5159d4338b73c59e3f8640336764d2766a1ca33760b7c0fa6caaac90125102555a5128fff3b2d95e20d92df22e705623f0e2b7914e9 diff --git a/dev-java/jdbc-mysql/files/5.0.5-dist-target-depends.patch b/dev-java/jdbc-mysql/files/5.0.5-dist-target-depends.patch new file mode 100644 index 000000000000..28ffc7ad0dab --- /dev/null +++ b/dev-java/jdbc-mysql/files/5.0.5-dist-target-depends.patch @@ -0,0 +1,11 @@ +--- build.xml.orig 2007-05-07 19:59:49.000000000 +0300 ++++ build.xml 2007-05-07 20:01:21.000000000 +0300 +@@ -291,7 +291,7 @@ + + + +- ++ + + + diff --git a/dev-java/jdbc-mysql/files/5.0.5-remove-jboss-dependency-from-tests.patch b/dev-java/jdbc-mysql/files/5.0.5-remove-jboss-dependency-from-tests.patch new file mode 100644 index 000000000000..394830701fee --- /dev/null +++ b/dev-java/jdbc-mysql/files/5.0.5-remove-jboss-dependency-from-tests.patch @@ -0,0 +1,39 @@ +--- mysql-connector-java-5.0.5/src/testsuite/regression/DataSourceRegressionTest.java 2007-03-01 17:48:47.000000000 +0100 ++++ mysql-connector-java-5.0.5-no-jboss-test/src/testsuite/regression/DataSourceRegressionTest.java 2007-04-12 09:53:05.000000000 +0200 +@@ -52,7 +52,6 @@ + import testsuite.simple.DataSourceTest; + + import com.mysql.jdbc.NonRegisteringDriver; +-import com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker; + import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource; + import com.mysql.jdbc.jdbc2.optional.MysqlDataSource; + import com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory; +@@ -315,28 +314,6 @@ + assertEquals(testIntFlag, thawedDs.getBlobSendChunkSize()); + } + +- /** +- * Tests fix for BUG#20242 - MysqlValidConnectionChecker for JBoss doesn't +- * work with MySQLXADataSources. +- * +- * @throws Exception if the test fails. +- */ +- public void testBug20242() throws Exception { +- if (versionMeetsMinimum(5, 0)) { +- try { +- Class.forName("org.jboss.resource.adapter.jdbc.ValidConnectionChecker"); +- } catch (Exception ex) { +- return; // class not available for testing +- } +- +- MysqlXADataSource xaDs = new MysqlXADataSource(); +- xaDs.setUrl(dbUrl); +- +- MysqlValidConnectionChecker checker = new MysqlValidConnectionChecker(); +- assertNull(checker.isValidConnection(xaDs.getXAConnection().getConnection())); +- } +- } +- + private void bindDataSource(String name, DataSource ds) throws Exception { + this.ctx.bind(this.tempDir.getAbsolutePath() + name, ds); + } diff --git a/dev-java/jdbc-mysql/files/5.1.14-java6.patch b/dev-java/jdbc-mysql/files/5.1.14-java6.patch new file mode 100644 index 000000000000..49343706ad80 --- /dev/null +++ b/dev-java/jdbc-mysql/files/5.1.14-java6.patch @@ -0,0 +1,34 @@ +--- build.xml.orig 2010-01-20 19:45:30.000000000 +0100 ++++ build.xml 2010-02-13 00:34:30.000000000 +0100 +@@ -131,7 +131,7 @@ + + + +- ++ + +@@ -746,7 +746,8 @@ + ++ debug="${debug.enable}" ++ bootclasspath="${gentoo.bootclasspath}"> + + + +@@ -763,11 +764,7 @@ + ++ sourcepath="" srcdir="${buildDir}/${fullProdName}"> + + + diff --git a/dev-java/jdbc-mysql/jdbc-mysql-5.1.26.ebuild b/dev-java/jdbc-mysql/jdbc-mysql-5.1.26.ebuild new file mode 100644 index 000000000000..dde4a01e1dc4 --- /dev/null +++ b/dev-java/jdbc-mysql/jdbc-mysql-5.1.26.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +JAVA_PKG_IUSE="source" +JAVA_PKG_WANT_BOOTCLASSPATH="1.5" +WANT_ANT_TASKS="ant-contrib" + +inherit eutils java-pkg-2 java-ant-2 + +MY_PN="mysql-connector-java" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="MySQL JDBC driver" +HOMEPAGE="http://www.mysql.com/products/connector/j/" +SRC_URI="https://dev.mysql.com/get/Downloads/Connector-J/${MY_P}.tar.gz" + +LICENSE="GPL-2-with-MySQL-FLOSS-exception" +SLOT="0" +KEYWORDS="amd64 ppc64 x86" + +IUSE="c3p0 log4j" + +COMMON_DEP=" + dev-java/slf4j-api:0 + log4j? ( dev-java/log4j:0 ) + c3p0? ( dev-java/c3p0:0 )" + +RDEPEND=">=virtual/jre-1.6 + ${COMMON_DEP}" + +DEPEND=">=virtual/jdk-1.6 + ${COMMON_DEP}" + +S="${WORKDIR}/${MY_P}" + +java_prepare() { + epatch "${FILESDIR}/5.0.5-remove-jboss-dependency-from-tests.patch" + + # http://bugs.mysql.com/bug.php?id=28286 + epatch "${FILESDIR}/5.0.5-dist-target-depends.patch" + + # Use java6 for everything except jdbc3 - #283848 + epatch "${FILESDIR}/5.1.14-java6.patch" + + find . -name '*.jar' -print -delete || die + + cd src/lib + java-pkg_jar-from slf4j-api + use log4j && java-pkg_jar-from log4j + use c3p0 && java-pkg_jar-from c3p0 +} + +JAVA_ANT_IGNORE_SYSTEM_CLASSES="true" +EANT_BUILD_TARGET="dist" + +src_compile() { + # Cannot use rewrite-bootclasspath because of the jdbc4 part. + java-pkg-2_src_compile \ + -Dgentoo.bootclasspath="$(java-pkg_get-bootclasspath 1.5)" +} + +# Tests need a mysql DB to exist. +RESTRICT="test" + +src_test() { + cd src/lib + java-pkg_jar-from junit + + cd "${S}" + ANT_TASKS="ant-junit" eant test -Dcom.mysql.jdbc.noCleanBetweenCompiles=true +} + +src_install() { + # Skip bytecode check because we want two versions there + JAVA_PKG_STRICT= java-pkg_newjar build/${MY_P}-SNAPSHOT/${MY_P}-SNAPSHOT-bin.jar ${PN}.jar + + dodoc README CHANGES + dohtml docs/*.html + + use source && java-pkg_dosrc src/com src/org +} diff --git a/dev-java/jdbc-mysql/metadata.xml b/dev-java/jdbc-mysql/metadata.xml new file mode 100644 index 000000000000..a285c6ded942 --- /dev/null +++ b/dev-java/jdbc-mysql/metadata.xml @@ -0,0 +1,12 @@ + + + + + java@gentoo.org + Java + + + Enable c3p0 support + Enable log4 support + + -- cgit v1.2.3