mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
media-libs/libbluray: Update to 1.4.1
Switched to meson build system. Supports newer Java versions. Closes: https://bugs.gentoo.org/964010 Closes: https://bugs.gentoo.org/936538 Closes: https://bugs.gentoo.org/875551 Signed-off-by: Alan Swanson <reiver@improbability.net> Part-of: https://github.com/gentoo/gentoo/pull/46084 Closes: https://github.com/gentoo/gentoo/pull/46084 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST libbluray-1.3.4.tar.bz2 756323 BLAKE2B a53b10fca6f8c049b2771c137e8900c34127554e1ebdeeec825de470b751182163cb1ff79f6dae20d772ba15c9d6c70fe332080ab93f1a47cc5f863922d22723 SHA512 94dbf3b68d1c23fe4648c153cc2f0c251886fac0a6b6bbe3a77caabaa5322682f712afe4a7b6b16ca3f06744fbc0e1ca872209a32898dcf0ae182055d335aec1
|
||||
DIST libbluray-1.4.1.tar.xz 468052 BLAKE2B 232dfb9f6c6bcef4dc140eef692a6eda8496df44eb0bd80406674f0b854a80377cb655b837bc2cf8aee25ed0545e5eb61f399c23cc90b02e42e20f6bc0079777 SHA512 76d686260b7cceb9e9e0272e4b9c4a815511925240dc4b69107c0816131728912f5cf3d08d5eab769024e024377f6591d1bbd51a459039a521639d569473cec6
|
||||
|
||||
34
media-libs/libbluray/files/libbluray-1.4.1-jars.patch
Normal file
34
media-libs/libbluray/files/libbluray-1.4.1-jars.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
diff '--color=auto' -ur libbluray-1.4.1/src/libbluray/bdj/bdj.c libbluray-1.4.1-jars/src/libbluray/bdj/bdj.c
|
||||
--- libbluray-1.4.1/src/libbluray/bdj/bdj.c 2026-01-26 20:37:11.000000000 +0000
|
||||
+++ libbluray-1.4.1-jars/src/libbluray/bdj/bdj.c 2026-04-10 18:41:22.911125238 +0100
|
||||
@@ -22,6 +22,9 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
+#undef VERSION
|
||||
+#define VERSION "gentoo"
|
||||
+
|
||||
#include "bdj.h"
|
||||
|
||||
#include "native/register_native.h"
|
||||
diff '--color=auto' -ur libbluray-1.4.1/src/libbluray/bdj/meson.build libbluray-1.4.1-jars/src/libbluray/bdj/meson.build
|
||||
--- libbluray-1.4.1/src/libbluray/bdj/meson.build 2026-01-26 20:37:11.000000000 +0000
|
||||
+++ libbluray-1.4.1-jars/src/libbluray/bdj/meson.build 2026-04-10 18:14:37.889605089 +0100
|
||||
@@ -45,13 +45,13 @@
|
||||
'-Dsrc_awt=:' + awt_src,
|
||||
'-Djavac_path=' + javac_path,
|
||||
'-Djavac_arg=' + javac_arg,
|
||||
- f'-Dversion=@bdj_type@-@libbluray_version@',
|
||||
+ f'-Dversion=@bdj_type@-gentoo',
|
||||
f'-Djava_version_asm=@java_src_version_asm@',
|
||||
f'-Djava_version_bdj=@java_src_version@'],
|
||||
- output: [f'libbluray-@bdj_type@-@libbluray_version@.jar',
|
||||
- f'libbluray-awt-@bdj_type@-@libbluray_version@.jar'],
|
||||
+ output: [f'libbluray-@bdj_type@-gentoo.jar',
|
||||
+ f'libbluray-awt-@bdj_type@-gentoo.jar'],
|
||||
build_always_stale: true,
|
||||
install: true,
|
||||
install_tag: 'runtime',
|
||||
- install_dir: get_option('datadir') / 'java',
|
||||
+ install_dir: get_option('datadir') / 'libbluray/lib',
|
||||
)
|
||||
85
media-libs/libbluray/libbluray-1.4.1.ebuild
Normal file
85
media-libs/libbluray/libbluray-1.4.1.ebuild
Normal file
@@ -0,0 +1,85 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
if [[ ${PV#9999} != ${PV} ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://code.videolan.org/videolan/libbluray.git"
|
||||
else
|
||||
SRC_URI="https://downloads.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
fi
|
||||
|
||||
inherit meson-multilib java-pkg-opt-2
|
||||
|
||||
DESCRIPTION="Blu-ray playback libraries"
|
||||
HOMEPAGE="https://www.videolan.org/developers/libbluray.html"
|
||||
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0/3"
|
||||
IUSE="aacs bdplus +fontconfig static-libs +truetype utils +xml"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=dev-libs/libudfread-1.2.0:=[${MULTILIB_USEDEP}]
|
||||
aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
|
||||
bdplus? ( media-libs/libbdplus[${MULTILIB_USEDEP}] )
|
||||
fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
|
||||
truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
|
||||
xml? ( >=dev-libs/libxml2-2.9.1-r4:=[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
java? (
|
||||
>=dev-java/ant-1.10.15:0
|
||||
>=virtual/jdk-1.8:*
|
||||
)
|
||||
"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
java? ( >=virtual/jre-1.8:* )
|
||||
"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.4.1-jars.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if use java; then
|
||||
cat > src/libbluray/bdj/build.properties <<-EOF || die "build.properties"
|
||||
ant.build.javac.source=$(java-pkg_get-source)
|
||||
ant.build.javac.target=$(java-pkg_get-target)
|
||||
java_version_asm=1.8
|
||||
java_version_bdj=1.8
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local emesonargs=(
|
||||
-Ddefault_library=$(multilib_native_usex static-libs both shared)
|
||||
|
||||
-Denable_examples=false
|
||||
-Denable_devtools=false
|
||||
$(meson_native_use_bool utils enable_tools)
|
||||
$(meson_native_use_feature java bdj_jar)
|
||||
$(meson_feature fontconfig)
|
||||
$(meson_feature truetype freetype)
|
||||
$(meson_feature xml libxml2)
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
meson_src_install
|
||||
|
||||
multilib_is_native_abi || return
|
||||
|
||||
use java && java-pkg_regjar "${ED}"/usr/share/${PN}/lib/*.jar
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -7,21 +7,21 @@ if [[ ${PV#9999} != ${PV} ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://code.videolan.org/videolan/libbluray.git"
|
||||
else
|
||||
SRC_URI="https://downloads.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.bz2"
|
||||
SRC_URI="https://downloads.videolan.org/pub/videolan/libbluray/${PV}/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
fi
|
||||
|
||||
inherit autotools java-pkg-opt-2 multilib-minimal
|
||||
inherit meson-multilib java-pkg-opt-2
|
||||
|
||||
DESCRIPTION="Blu-ray playback libraries"
|
||||
HOMEPAGE="https://www.videolan.org/developers/libbluray.html"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0/2"
|
||||
IUSE="aacs bdplus +fontconfig java +truetype utils +xml"
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0/3"
|
||||
IUSE="aacs bdplus +fontconfig static-libs +truetype utils +xml"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=dev-libs/libudfread-1.1.0:=[${MULTILIB_USEDEP}]
|
||||
>=dev-libs/libudfread-1.2.0:=[${MULTILIB_USEDEP}]
|
||||
aacs? ( >=media-libs/libaacs-0.6.0[${MULTILIB_USEDEP}] )
|
||||
bdplus? ( media-libs/libbdplus[${MULTILIB_USEDEP}] )
|
||||
fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
|
||||
@@ -31,7 +31,7 @@ COMMON_DEPEND="
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
java? (
|
||||
>=dev-java/ant-1.10.14-r3:0
|
||||
>=dev-java/ant-1.10.15:0
|
||||
>=virtual/jdk-1.8:*
|
||||
)
|
||||
"
|
||||
@@ -44,49 +44,42 @@ BDEPEND="
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-jars.patch
|
||||
"${FILESDIR}"/${PN}-1.3.4-fix-libudfread-option.patch
|
||||
"${FILESDIR}"/${PN}-1.4.1-jars.patch
|
||||
)
|
||||
|
||||
DOCS=( ChangeLog README.md )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
if use java; then
|
||||
cat > src/libbluray/bdj/build.properties <<-EOF || die "build.properties"
|
||||
ant.build.javac.source=$(java-pkg_get-source)
|
||||
ant.build.javac.target=$(java-pkg_get-target)
|
||||
java_version_asm=1.8
|
||||
java_version_bdj=1.8
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# bug #621992
|
||||
use java || unset JDK_HOME
|
||||
local emesonargs=(
|
||||
-Ddefault_library=$(multilib_native_usex static-libs both shared)
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-optimizations
|
||||
--with-external-libudfread
|
||||
$(multilib_native_use_enable utils examples)
|
||||
$(multilib_native_use_enable java bdjava-jar)
|
||||
$(use_with fontconfig)
|
||||
$(use_with truetype freetype)
|
||||
$(use_with xml libxml2)
|
||||
-Denable_examples=false
|
||||
-Denable_devtools=false
|
||||
$(meson_native_use_bool utils enable_tools)
|
||||
$(meson_native_use_feature java bdj_jar)
|
||||
$(meson_feature fontconfig)
|
||||
$(meson_feature truetype freetype)
|
||||
$(meson_feature xml libxml2)
|
||||
)
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
meson_src_install
|
||||
|
||||
multilib_is_native_abi || return
|
||||
|
||||
use utils &&
|
||||
find .libs/ -type f -executable ! -name "${PN}.*" \
|
||||
$(use java || echo '! -name bdj_test') -exec dobin {} +
|
||||
|
||||
use java && java-pkg_regjar "${ED}"/usr/share/${PN}/lib/*.jar
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user