diff --git a/multimedia/libxine/Makefile b/multimedia/libxine/Makefile index 28a1a7c7d10b..e3f6a2d82ad7 100644 --- a/multimedia/libxine/Makefile +++ b/multimedia/libxine/Makefile @@ -1,191 +1,194 @@ PORTNAME= xine DISTVERSION= 1.2.13 PORTREVISION= 15 CATEGORIES= multimedia MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-lib/${DISTVERSION} PKGNAMEPREFIX= lib DISTNAME= ${PORTNAME}-lib-${DISTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Libraries for xine multimedia player WWW= https://xine.sourceforge.net/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libFLAC.so:audio/flac \ liba52.so:audio/liba52 \ libvorbis.so:audio/libvorbis \ libmng.so:graphics/libmng \ libpng.so:graphics/png \ libdvdread.so:multimedia/libdvdread \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libmodplug.so:audio/libmodplug \ libtheora.so:multimedia/libtheora \ libmad.so:audio/libmad \ libdca.so:multimedia/libdca \ libavcodec.so:multimedia/ffmpeg \ libfaad.so:audio/faad \ libvdpau.so:multimedia/libvdpau \ libvpx.so:multimedia/libvpx \ libogg.so:audio/libogg \ libdvdnav.so:multimedia/libdvdnav +EXTRA_PATCHES= ${FILESDIR}/ffmpeg8-1.patch:-p1 \ + ${FILESDIR}/ffmpeg8-2.patch:-p1 + USES= compiler cpe gl gmake gnome iconv libtool:keepla jpeg \ localbase pathfix perl5 pkgconfig tar:xz xorg LLD_UNSAFE= yes CPE_PRODUCT= xine-lib CPE_VENDOR= xine GNU_CONFIGURE= yes USE_XORG= x11 xcb xv xinerama xext sm ice USE_GL= gl glu USE_PERL5= build USE_LDCONFIG= yes CONFIGURE_ARGS= --with-libflac \ --with-fontconfig \ --with-freetype \ --enable-musepack \ --enable-real-codecs \ --without-esound \ --disable-crypto MAKE_ENV= V=1 MAKE_ARGS= pkgdatadir="${DATADIR}" \ datadir="${DATADIR}" \ libdir="${PREFIX}/lib" CFLAGS_i386= -fomit-frame-pointer DOCSDIR= ${PREFIX}/share/doc/xine-lib # Please sync with XINE_PLUGINSDIR in multimedia/xine # and multimedia/vdr-plugin-xineliboutput PLUGINSDIR= lib/xine/plugins/2.11 PLIST_SUB= PLUGINSDIR="${PLUGINSDIR}" OPTIONS_DEFINE= AALIB ALSA AOM CACA DAV1D DOCS DMX_IMAGE DVB \ IMAGEMAGICK IPV6 JACK LIBBLURAY NFS NLS PIXBUF \ PULSEAUDIO SDL SFTP SMB SNDIO SPEEX V4L VAAPI \ VCD WAVPACK WAYLAND XVMC OPTIONS_DEFAULT= DVB OPENSSL PIXBUF SPEEX VAAPI VCD WAVPACK OPTIONS_DEFINE_i386= W32DLL OPTIONS_DEFAULT_i386= W32DLL OPTIONS_GROUP= TLS OPTIONS_GROUP_TLS= GNUTLS OPENSSL OPTIONS_SUB= yes AOM_DESC= Enable libaom AV1 decoder support DAV1D_DESC= Enable dav1d AV1 decoder support DMX_IMAGE_DESC= DMX image plugin DVB_DESC= DVB plugin NFS_DESC= Enable NFS support using libnfs SDL_DESC= Enable support for SDL 1 video output SFTP_DESC= Enable SFTP support using libssh2 TLS_DESC= Enable TLS support for https and ftps VCD_DESC= Enable VCD (VideoCD) support W32DLL_DESC= Win32 codec support AALIB_LIB_DEPENDS= libaa.so:graphics/aalib AALIB_CONFIGURE_ENABLE= aalib ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_CONFIGURE_WITH= alsa AOM_LIB_DEPENDS= libaom.so:multimedia/aom AOM_CONFIGURE_WITH= libaom CACA_LIB_DEPENDS= libcaca.so:graphics/libcaca CACA_CONFIGURE_WITH= caca DAV1D_LIB_DEPENDS= libdav1d.so:multimedia/dav1d DAV1D_CONFIGURE_WITH= dav1d DVB_BUILD_DEPENDS= v4l_compat>=1.0.20100321:multimedia/v4l_compat DVB_CONFIGURE_ENABLE= dvb GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_CONFIGURE_ON= --enable-tls IMAGEMAGICK_USES= magick IMAGEMAGICK_CONFIGURE_WITH= imagemagick IMAGEMAGICK_IMPLIES= DMX_IMAGE IPV6_CONFIGURE_ENABLE= ipv6 JACK_LIB_DEPENDS= libjack.so:audio/jack JACK_CONFIGURE_WITH= jack LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray LIBBLURAY_CONFIGURE_ENABLE= bluray NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls NFS_LIB_DEPENDS= libnfs.so:net/libnfs NFS_CONFIGURE_ENABLE= nfs OPENSSL_CONFIGURE_ON= --enable-tls OPENSSL_CONFIGURE_ENV= OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto -lssl" \ OPENSSL_CFLAGS="-I${OPENSSLINC}" OPENSSL_USES= ssl PIXBUF_CONFIGURE_ENABLE= gdkpixbuf PIXBUF_IMPLIES= DMX_IMAGE PIXBUF_USE= GNOME=gdkpixbuf,glib20 PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_CONFIGURE_WITH= pulseaudio SDL_CONFIGURE_WITH= sdl SDL_USES= sdl SDL_USE= SDL=sdl SFTP_LIB_DEPENDS= libssh2.so:security/libssh2 SFTP_CONFIGURE_ENABLE= sftp SMB_USES= samba:lib SMB_CONFIGURE_ENV= LIBSMBCLIENT_LIBS="-L${SAMBA_LIBDIR} -lsmbclient" \ LIBSMBCLIENT_CFLAGS="-I${SAMBA_INCLUDEDIR}" SMB_CONFIGURE_ENABLE= samba SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_CONFIGURE_ENABLE= sndio SPEEX_LIB_DEPENDS= libspeex.so:audio/speex SPEEX_CONFIGURE_WITH= speex VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_CONFIGURE_ENABLE= vaapi V4L_BUILD_DEPENDS= v4l_compat>=1.0.20100321:multimedia/v4l_compat V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l V4L_CONFIGURE_ENABLE= libv4l v4l v4l2 VCD_LIB_DEPENDS= libvcdinfo.so:multimedia/vcdimager \ libcdio.so:sysutils/libcdio VCD_CONFIGURE_ENABLE= vcd W32DLL_CONFIGURE_ENABLE= w32dll W32DLL_PLIST_FILES= ${PLUGINSDIR}/xineplug_decode_w32dll.so WAVPACK_LIB_DEPENDS= libwavpack.so:audio/wavpack WAVPACK_CONFIGURE_WITH= wavpack WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland WAYLAND_CONFIGURE_ENABLE= wayland .if defined(WITH_NVIDIA304_GL) || exists(${LOCALBASE}/lib/libXvMCNVIDIA.so.1) XVMC_CONFIGURE_WITH= xvmc-lib=XvMCNVIDIA XVMC_LIB_DEPENDS= libXvMCNVIDIA.so:x11/nvidia-driver-304 .else XVMC_CONFIGURE_WITH= xvmc-lib=XvMCW XVMC_LIB_DEPENDS= libXvMC.so:x11/libXvMC .endif XVMC_CONFIGURE_ENABLE= xvmc .include .if ${ARCH} == aarch64 BUILD_DEPENDS+= as:devel/binutils .endif .if !${PORT_OPTIONS:MGNUTLS} && !${PORT_OPTIONS:MOPENSSL} CONFIGURE_ARGS+= --disable-tls .endif post-patch: @${REINPLACE_CMD} -e '/xine_set_flags/s/XINE_PROTECTED//' \ ${WRKSRC}/include/xine.h .if ${COMPILER_TYPE} == "clang" @${REINPLACE_CMD} -e 's|-fno-rename-registers||' \ ${WRKSRC}/src/libw32dll/Makefile.in .endif post-patch-GNUTLS-off: @${REINPLACE_CMD} -e '/have_gnutls=/s|yes|no|' \ ${WRKSRC}/configure post-patch-WAYLAND-off: @${REINPLACE_CMD} -e '/have_vaapi_wayland=/s|yes|no|' \ ${WRKSRC}/configure post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so @${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PLUGINSDIR}/*.so @${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PLUGINSDIR}/post/*.so .include diff --git a/multimedia/libxine/files/ffmpeg8-1.patch b/multimedia/libxine/files/ffmpeg8-1.patch new file mode 100644 index 000000000000..be5805b82061 --- /dev/null +++ b/multimedia/libxine/files/ffmpeg8-1.patch @@ -0,0 +1,114 @@ +# HG changeset patch +# User Torsten Jager +# Date 1757753985 -7200 +# Sat Sep 13 10:59:45 2025 +0200 +# Node ID 9bb3977ea7e2b652742b3cdd200b0a4a72eb48bc +# Parent 9e326869fe0faf21957642c8c7c5cac9ed4f445c +FFmpeg compatibilty update. + +diff -r 9e326869fe0f -r 9bb3977ea7e2 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Sat May 31 15:55:00 2025 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Sat Sep 13 10:59:45 2025 +0200 +@@ -60,6 +60,10 @@ + + #include "ffmpeg_compat.h" + ++#if XFF_FRAME_RATE == 2 ++# include ++#endif ++ + #if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(59,0,100) + # undef HAVE_POSTPROC + #endif +@@ -2289,8 +2293,8 @@ + } + + /* transfer some more frame settings for deinterlacing */ +- img->progressive_frame = !this->av_frame->interlaced_frame; +- img->top_field_first = this->av_frame->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame); + + /* get back reordered pts */ + img->pts = ff_untag_pts (this, this->av_frame); +@@ -2370,20 +2374,29 @@ + + static int ff_video_step_get (ff_video_decoder_t *this) { + /* use externally provided video_step or fall back to stream's time_base otherwise */ +- int step = this->video_step; ++ int step = this->video_step, num_fields; + if (step || !this->context->time_base.den) + return step; + ++#if XFF_FRAME_RATE == 1 ++ num_fields = this->context->ticks_per_frame; ++#else /* XFF_FRAME_RATE == 2 */ ++ { ++ const AVCodecDescriptor *desc = avcodec_descriptor_get (this->context->codec_id); ++ if (desc) ++ num_fields = (desc->props & AV_CODEC_PROP_FIELDS) ? 2 : 1; ++ else ++ num_fields = 2; ++ } ++#endif + /* good: 2 * 1001 / 48000. */ +- step = (int64_t)90000 * this->context->ticks_per_frame +- * this->context->time_base.num / this->context->time_base.den; ++ step = (int64_t)90000 * num_fields * this->context->time_base.num / this->context->time_base.den; + if (step >= 90) + return step; + + /* bad: 2 * 1 / 60000. seen this once from broken h.264 video usability info (VUI). + * VAAPI seems to apply a similar HACK.*/ +- step = (int64_t)90000000 * this->context->ticks_per_frame +- * this->context->time_base.num / this->context->time_base.den; ++ step = (int64_t)90000000 * num_fields * this->context->time_base.num / this->context->time_base.den; + return step; + } + +@@ -2680,8 +2693,8 @@ + img->duration = video_step_to_use; + + /* transfer some more frame settings for deinterlacing */ +- img->progressive_frame = !this->av_frame->interlaced_frame; +- img->top_field_first = this->av_frame->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame); + + this->skipframes = img->draw(img, this->stream); + this->state = STATE_FRAME_SENT; +@@ -2894,8 +2907,8 @@ + if (video_step_to_use <= 750) + video_step_to_use = 0; + img->duration = this->av_frame2->repeat_pict ? video_step_to_use * 3 / 2 : video_step_to_use; +- img->progressive_frame = !this->av_frame2->interlaced_frame; +- img->top_field_first = this->av_frame2->top_field_first; ++ img->progressive_frame = !XFF_FRAME_IS_INTERLACED (this->av_frame2); ++ img->top_field_first = !!XFF_FRAME_IS_TOP_FIELD_FIRST (this->av_frame2); + + this->skipframes = img->draw (img, this->stream); + if (free_img) +diff -r 9e326869fe0f -r 9bb3977ea7e2 src/combined/ffmpeg/ffmpeg_compat.h +--- a/src/combined/ffmpeg/ffmpeg_compat.h Sat May 31 15:55:00 2025 +0200 ++++ b/src/combined/ffmpeg/ffmpeg_compat.h Sat Sep 13 10:59:45 2025 +0200 +@@ -319,4 +319,20 @@ + # error avcodec.h must be included first ! + #endif /* defined(LIBAVCODEC_VERSION_INT) */ + ++#if LIBAVUTIL_VERSION_INT >= XFF_INT_VERSION(58,7,0) ++# define XFF_FRAME_IS_INTERLACED(_frame) ((_frame)->flags & AV_FRAME_FLAG_INTERLACED) ++# define XFF_FRAME_IS_TOP_FIELD_FIRST(_frame) ((_frame)->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ++# define XFF_FRAME_IS_KEY(_frame) ((_frame)->flags & AV_FRAME_FLAG_KEY) ++#else ++# define XFF_FRAME_IS_INTERLACED(_frame) ((_frame)->interlaced_frame) ++# define XFF_FRAME_IS_TOP_FIELD_FIRST(_frame) ((_frame)->top_field_first) ++# define XFF_FRAME_IS_KEY(_frame) ((_frame)->key_frame) ++#endif ++ ++#if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(60,0,0) ++# define XFF_FRAME_RATE 2 /* AV_CODEC_PROP_FIELDS */ ++#else ++# define XFF_FRAME_RATE 1 /* AVCodecContext.ticks_per_frame */ ++#endif ++ + #endif /* XINE_AVCODEC_COMPAT_H */ diff --git a/multimedia/libxine/files/ffmpeg8-2.patch b/multimedia/libxine/files/ffmpeg8-2.patch new file mode 100644 index 000000000000..dffc575f70cd --- /dev/null +++ b/multimedia/libxine/files/ffmpeg8-2.patch @@ -0,0 +1,20 @@ +# HG changeset patch +# User Xavier Bachelot +# Date 1758280185 -7200 +# Fri Sep 19 13:09:45 2025 +0200 +# Node ID a8fffd1193b2247c7f732d4df83dcc03fce96dbe +# Parent 9bb3977ea7e2b652742b3cdd200b0a4a72eb48bc +Fix FFmpeg compatibilty update. + +diff -r 9bb3977ea7e2 -r a8fffd1193b2 src/combined/ffmpeg/ff_video_decoder.c +--- a/src/combined/ffmpeg/ff_video_decoder.c Sat Sep 13 10:59:45 2025 +0200 ++++ b/src/combined/ffmpeg/ff_video_decoder.c Fri Sep 19 13:09:45 2025 +0200 +@@ -61,7 +61,7 @@ + #include "ffmpeg_compat.h" + + #if XFF_FRAME_RATE == 2 +-# include ++# include + #endif + + #if LIBAVCODEC_VERSION_INT >= XFF_INT_VERSION(59,0,100)