From 13574d6f0b7f8b726c939b89a9786854070cf58fcd212110fa2a6360a7f956ce Mon Sep 17 00:00:00 2001 From: Dave Plater Date: Mon, 30 Oct 2023 11:06:47 +0000 Subject: [PATCH] Accepting request 1121148 from home:fstrba:branches:multimedia:libs Fix build with JDK21 + please, forward to factory ASAP OBS-URL: https://build.opensuse.org/request/show/1121148 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libbluray?expand=0&rev=96 --- libbluray-java18plus.patch | 45 ++++++++++++++++++++++++++++++++++++++ libbluray.changes | 9 ++++++++ libbluray.spec | 6 ++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 libbluray-java18plus.patch diff --git a/libbluray-java18plus.patch b/libbluray-java18plus.patch new file mode 100644 index 0000000..a769e08 --- /dev/null +++ b/libbluray-java18plus.patch @@ -0,0 +1,45 @@ +--- libbluray-1.3.4/configure.ac 2023-10-30 11:31:24.385633069 +0100 ++++ libbluray-1.3.4/configure.ac 2023-10-30 11:39:34.545384400 +0100 +@@ -292,11 +292,13 @@ + dnl check for Java 9+ + javac_version=`"$JAVAC" -version 2>&1 | head -n 1` + [with_java9=`echo "$javac_version" | grep -E -q '^javac\ (9|1[0-1])' && echo yes`] +- [with_java12=`echo "$javac_version" | grep -E -q '^javac\ (1[2-9])' && echo yes`] ++ [with_java12=`echo "$javac_version" | grep -E -q '^javac\ (1[2-7])' && echo yes`] ++ [with_java18=`echo "$javac_version" | grep -E -q '^javac\ (1[8-9]|21)' && echo yes`] + ]) + + AS_IF([test "x$with_java9" = "xyes" -a "$BDJ_TYPE" != "j2me"], [java_code_version=1.6], [java_code_version=1.4]) + AS_IF([test "x$with_java12" = "xyes" -a "$BDJ_TYPE" != "j2me"], [java_code_version=1.7]) ++ AS_IF([test "x$with_java18" = "xyes" -a "$BDJ_TYPE" != "j2me"], [java_code_version=1.8]) + ]) + + AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$java_arch"], ["Defines the architecture of the java vm."]) +@@ -304,6 +306,7 @@ + AM_CONDITIONAL([USING_BDJAVA_BUILD_JAR], [ test $use_bdjava_jar = "yes" ]) + AM_CONDITIONAL([USING_JAVAC_9], [ test x"$with_java9" = x"yes" ]) + AM_CONDITIONAL([USING_JAVAC_12], [ test x"$with_java12" = x"yes" ]) ++AM_CONDITIONAL([USING_JAVAC_18], [ test x"$with_java18" = x"yes" ]) + + dnl BD-J type + if test "$BDJ_TYPE" = "j2me"; then +--- libbluray-1.3.4/Makefile.am 2023-10-30 11:31:24.385633069 +0100 ++++ libbluray-1.3.4/Makefile.am 2023-10-30 11:41:25.962753380 +0100 +@@ -241,6 +241,9 @@ + + if USING_BDJAVA_BUILD_JAR + ++if USING_JAVAC_18 ++java_versions = -Djava_version_asm=1.8 -Djava_version_bdj=1.8 ++else + if USING_JAVAC_12 + java_versions = -Djava_version_asm=1.7 -Djava_version_bdj=1.7 + else +@@ -250,6 +253,7 @@ + java_versions = -Djava_version_asm=1.5 -Djava_version_bdj=1.4 + endif + endif ++endif + + if BDJ_J2SE + awt_src = java-$(BDJ_TYPE):java-build-support diff --git a/libbluray.changes b/libbluray.changes index 2c62618..92a39f0 100644 --- a/libbluray.changes +++ b/libbluray.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Oct 30 10:50:48 UTC 2023 - Fridrich Strba + +- Added patch: + * libbluray-java18plus.patch + + allow building with JDK 18 and newer (using source/target + levels 8) + + fixes build with the new OpenJDK 21 LTSS + ------------------------------------------------------------------- Fri Dec 2 21:13:38 UTC 2022 - Dirk Müller diff --git a/libbluray.spec b/libbluray.spec index 0d784c8..6a3f7d9 100644 --- a/libbluray.spec +++ b/libbluray.spec @@ -1,7 +1,7 @@ # # spec file for package libbluray # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2011 Dominique Leuenberger, Amsterdam, The Netherlands # # All modifications and additions to the file contributed by third parties @@ -28,7 +28,10 @@ URL: https://www.videolan.org/developers/libbluray.html Source0: https://download.videolan.org/pub/videolan/%{name}/%{version}/%{name}-%{version}.tar.bz2 Source99: baselibs.conf Patch0: libbluray-pkgconfig.patch +Patch1: libbluray-java18plus.patch BuildRequires: ant +BuildRequires: autoconf +BuildRequires: automake BuildRequires: java-devel >= 1.8 BuildRequires: libtool BuildRequires: pkgconfig @@ -91,6 +94,7 @@ MPlayer). We, the authors of this library, do not condone nor endorse piracy. %autosetup -p1 %build +autoreconf -fi %configure \ --disable-static \ --enable-bdjava \