From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF8C015800A for ; Thu, 20 Jul 2023 22:32:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DF80BE0897; Thu, 20 Jul 2023 22:32:56 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C260EE0896 for ; Thu, 20 Jul 2023 22:32:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8327334067D for ; Thu, 20 Jul 2023 22:32:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9DC2FBE0 for ; Thu, 20 Jul 2023 22:32:53 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1689892318.4726fafc27371a5c8b627274f8e9ab8768286483.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/zxing-javase/, dev-java/zxing-javase/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/zxing-javase/files/3.5.1-test-available-formats.patch dev-java/zxing-javase/zxing-javase-3.5.1.ebuild X-VCS-Directories: dev-java/zxing-javase/ dev-java/zxing-javase/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 4726fafc27371a5c8b627274f8e9ab8768286483 X-VCS-Branch: master Date: Thu, 20 Jul 2023 22:32:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 15852783-5caf-4c03-97d9-05d15afe23de X-Archives-Hash: a20ad9cb3247a78787cdb6e105bcea94 commit: 4726fafc27371a5c8b627274f8e9ab8768286483 Author: Valérian Rousset users noreply github com> AuthorDate: Thu Jul 20 21:46:18 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jul 20 22:31:58 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4726fafc dev-java/zxing-javase: fix tests on openjdk:8 Closes: https://bugs.gentoo.org/910497 Signed-off-by: Valérian Rousset users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/31979 Signed-off-by: Sam James gentoo.org> .../files/3.5.1-test-available-formats.patch | 29 ++++++++++++++++++++++ dev-java/zxing-javase/zxing-javase-3.5.1.ebuild | 11 +++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/dev-java/zxing-javase/files/3.5.1-test-available-formats.patch b/dev-java/zxing-javase/files/3.5.1-test-available-formats.patch new file mode 100644 index 000000000000..aa4101749419 --- /dev/null +++ b/dev-java/zxing-javase/files/3.5.1-test-available-formats.patch @@ -0,0 +1,29 @@ +--- a/src/test/java/com/google/zxing/client/j2se/MatrixToImageWriterTestCase.java ++++ b/src/test/java/com/google/zxing/client/j2se/MatrixToImageWriterTestCase.java +@@ -17,7 +17,9 @@ + package com.google.zxing.client.j2se; + + import com.google.zxing.common.BitMatrix; ++import static org.hamcrest.CoreMatchers.hasItem; + import org.junit.Assert; ++import static org.junit.Assume.assumeThat; + import org.junit.Test; + + import javax.imageio.ImageIO; +@@ -25,6 +27,7 @@ + import java.io.IOException; + import java.nio.file.Files; + import java.nio.file.Path; ++import java.util.Arrays; + + /** + * Tests {@link MatrixToImageWriter}. +@@ -52,6 +55,8 @@ private static void doTest(MatrixToImageConfig config) throws IOException { + } + + private static void doTestFormat(String format, MatrixToImageConfig config) throws IOException { ++ assumeThat(Arrays.asList(ImageIO.getWriterFormatNames()), hasItem(format)); ++ + int width = 2; + int height = 3; + BitMatrix matrix = new BitMatrix(width, height); diff --git a/dev-java/zxing-javase/zxing-javase-3.5.1.ebuild b/dev-java/zxing-javase/zxing-javase-3.5.1.ebuild index 6666b3db9dc2..ef015da75c4b 100644 --- a/dev-java/zxing-javase/zxing-javase-3.5.1.ebuild +++ b/dev-java/zxing-javase/zxing-javase-3.5.1.ebuild @@ -10,7 +10,7 @@ JAVA_TESTING_FRAMEWORKS="junit-4" inherit java-pkg-2 java-pkg-simple DESCRIPTION="Core barcode encoding/decoding library" -HOMEPAGE="https://github.com/zxing/zxing/core" +HOMEPAGE="https://github.com/zxing/zxing" SRC_URI="https://github.com/zxing/zxing/archive/zxing-${PV}.tar.gz" LICENSE="Apache-2.0" SLOT="3" @@ -31,7 +31,16 @@ RDEPEND=" S="${WORKDIR}/zxing-zxing-${PV}/javase" +PATCHES=( + "${FILESDIR}/${PV}-test-available-formats.patch" +) + JAVA_AUTOMATIC_MODULE_NAME="com.google.zxing.javase" JAVA_SRC_DIR="src/main/java" JAVA_TEST_GENTOO_CLASSPATH="junit-4" JAVA_TEST_SRC_DIR="src/test/java" + +src_prepare() { + default # apply PATCHES + java-pkg-2_src_prepare +}