From b359a8fd43d7d49eafb2533e61417a1241719134 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 17 Mar 2024 03:59:17 +0000 Subject: media-video/vlc: fix another modern C issue Closes: https://bugs.gentoo.org/926261 Signed-off-by: Sam James --- media-video/vlc/files/vlc-3.0.20-c99-2.patch | 23 ++ media-video/vlc/vlc-3.0.20-r4.ebuild | 519 +++++++++++++++++++++++++++ 2 files changed, 542 insertions(+) create mode 100644 media-video/vlc/files/vlc-3.0.20-c99-2.patch create mode 100644 media-video/vlc/vlc-3.0.20-r4.ebuild (limited to 'media-video/vlc') diff --git a/media-video/vlc/files/vlc-3.0.20-c99-2.patch b/media-video/vlc/files/vlc-3.0.20-c99-2.patch new file mode 100644 index 000000000000..56397d913d8e --- /dev/null +++ b/media-video/vlc/files/vlc-3.0.20-c99-2.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/926261 +https://code.videolan.org/videolan/vlc/-/commit/770789f265761fc7ab2de69ca105fec4ad93d9e2 + +From 770789f265761fc7ab2de69ca105fec4ad93d9e2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= +Date: Mon, 26 Feb 2018 20:36:29 +0200 +Subject: [PATCH] chromaprint: missing cast + +(cherry picked from commit 7bd5bab3e43ae187f7219db61ed85d06d2ba0547) +Signed-off-by: Steve Lhomme +--- a/modules/stream_out/chromaprint.c ++++ b/modules/stream_out/chromaprint.c +@@ -231,7 +231,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, + if ( !p_sys->b_finished && id->i_samples > 0 && p_buf->i_buffer ) + { + if(! chromaprint_feed( p_sys->p_chromaprint_ctx, +- p_buf->p_buffer, ++ (int16_t *)p_buf->p_buffer, + p_buf->i_buffer / BYTESPERSAMPLE ) ) + msg_Warn( p_stream, "feed error" ); + id->i_samples -= i_samples; +-- +GitLab diff --git a/media-video/vlc/vlc-3.0.20-r4.ebuild b/media-video/vlc/vlc-3.0.20-r4.ebuild new file mode 100644 index 000000000000..d6d49549dc8b --- /dev/null +++ b/media-video/vlc/vlc-3.0.20-r4.ebuild @@ -0,0 +1,519 @@ +# Copyright 2000-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..2} ) + +MY_PV="${PV/_/-}" +MY_PV="${MY_PV/-beta/-test}" +MY_P="${PN}-${MY_PV}" +if [[ ${PV} = *9999 ]] ; then + if [[ ${PV%.9999} != ${PV} ]] ; then + EGIT_BRANCH="3.0.x" + fi + EGIT_REPO_URI="https://code.videolan.org/videolan/vlc.git" + inherit git-r3 +else + if [[ ${MY_P} = ${P} ]] ; then + SRC_URI="https://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz" + else + SRC_URI="https://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz" + fi + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv -sparc ~x86" +fi +inherit autotools flag-o-matic lua-single toolchain-funcs virtualx xdg + +DESCRIPTION="Media player and framework with support for most multimedia files and streaming" +HOMEPAGE="https://www.videolan.org/vlc/" + +LICENSE="LGPL-2.1 GPL-2" +SLOT="0/5-9" # vlc - vlccore + +IUSE="a52 alsa aom archive aribsub bidi bluray cddb chromaprint chromecast dav1d dbus + dc1394 debug directx dts +dvbpsi dvd +encode faad fdk +ffmpeg flac fluidsynth + fontconfig +gcrypt gme keyring gstreamer +gui ieee1394 jack jpeg kate + libass libcaca libnotify +libsamplerate libtar libtiger linsys lirc live lua + macosx-notifications mad matroska modplug mp3 mpeg mtp musepack ncurses nfs ogg + omxil optimisememory opus png projectm pulseaudio rdp run-as-root samba sdl-image + sftp shout sid skins soxr speex srt ssl svg taglib theora tremor truetype twolame + udev upnp vaapi v4l vdpau vnc vpx wayland +X x264 x265 xml zeroconf zvbi + cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse +" +REQUIRED_USE=" + chromecast? ( encode ) + directx? ( ffmpeg ) + fontconfig? ( truetype ) + libcaca? ( X ) + libtar? ( skins ) + libtiger? ( kate ) + lua? ( ${LUA_REQUIRED_USE} ) + skins? ( archive gui truetype X xml ) + ssl? ( gcrypt ) + vaapi? ( ffmpeg X ) + vdpau? ( ffmpeg X ) +" +BDEPEND=" + >=sys-devel/gettext-0.19.8 + virtual/pkgconfig + lua? ( ${LUA_DEPS} ) + amd64? ( dev-lang/yasm ) + wayland? ( dev-util/wayland-scanner ) + x86? ( dev-lang/yasm ) +" +# =gcc 4.8.0. bug #499996 + append-cflags $(test-flags-CC -fno-stack-check) + # Bug 569774 + replace-flags -Os -O2 + fi + + # FIXME: Needs libresid-builder from libsidplay:2 which is in another directory... + append-ldflags "-L${ESYSROOT}/usr/$(get_libdir)/sidplay/builders/" + + if use riscv; then + # bug #803473 + append-libs -latomic + fi + + if use truetype || use bidi; then + myeconfargs+=( --enable-freetype ) + else + myeconfargs+=( --disable-freetype ) + fi + + if use truetype || use projectm; then + local dejavu="${EPREFIX}/usr/share/fonts/dejavu/" + myeconfargs+=( + --with-default-font=${dejavu}/DejaVuSans.ttf + --with-default-font-family=Sans + --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf + --with-default-monospace-font-family=Monospace + ) + fi + + econf "${myeconfargs[@]}" + + # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo. + # Other values may break the build (bug 523144), so definition should not be removed. + # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the start of config.h + sed -i '1i#undef _FORTIFY_SOURCE' config.h || die +} + +src_test() { + virtx emake check-TESTS +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + if [[ -z "${ROOT}" ]] && [[ -x "${EROOT}/usr/$(get_libdir)/vlc/vlc-cache-gen" ]] ; then + einfo "Running ${EPREFIX}/usr/$(get_libdir)/vlc/vlc-cache-gen on ${EROOT}/usr/$(get_libdir)/vlc/plugins/" + "${EPREFIX}/usr/$(get_libdir)/vlc/vlc-cache-gen" "${EROOT}/usr/$(get_libdir)/vlc/plugins/" + else + ewarn "We cannot run vlc-cache-gen (most likely ROOT != /)" + ewarn "Please run ${EPREFIX}/usr/$(get_libdir)/vlc/vlc-cache-gen manually" + ewarn "If you do not do it, vlc will take a long time to load." + fi + + xdg_pkg_postinst +} + +pkg_postrm() { + if [[ -e "${EROOT}"/usr/$(get_libdir)/vlc/plugins/plugins.dat ]]; then + rm "${EROOT}"/usr/$(get_libdir)/vlc/plugins/plugins.dat || die "Failed to rm plugins.dat" + fi + + xdg_pkg_postrm +} -- cgit v1.2.3-65-gdbad