multimedia/vlc: add ALTIVEC option, fix build on powerpc64 elfv2, add USES=localbase

Add ALTIVEC option to enable/disable AltiVec easily when needed.

Fix build with LLVM and AltiVec, altivec.h defines its own bool.

Add USES=localbase.

PR:		240537
Approved by:	linimon (mentor), multimedia (maintainer timeout)
This commit is contained in:
Piotr Kubaj 2019-09-30 14:18:36 +00:00
parent e37ca720b9
commit f50b14e979
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=513385
3 changed files with 31 additions and 3 deletions

View File

@ -26,7 +26,7 @@ BUILD_DEPENDS= ffmpeg>=3.4.1,1:multimedia/ffmpeg \
RUN_DEPENDS= ffmpeg>=3.4.1,1:multimedia/ffmpeg
USES= compiler:c++11-lib desktop-file-utils gettext-tools gmake gnome \
iconv libtool pathfix pkgconfig tar:xz
iconv libtool localbase pathfix pkgconfig tar:xz
# VLC git (post 2.2.4) requires C++11 support and passes the appropriate flag
# to the compiler. Until the port is updated, we explicitly pass -std=c++11 to
@ -58,9 +58,7 @@ CONFIGURE_ARGS= --enable-avcodec --enable-avformat --enable-dvbpsi \
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+=--enable-debug
.endif
CPPFLAGS+= -I${LOCALBASE}/include
CFLAGS_i386= -fomit-frame-pointer
LIBS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= A52 AALIB AOM ASS AVAHI CACA CHROMECAST DAV1D DBUS DCA DOCS DVDREAD \
DVDNAV FAAD FLAC FLUID FREERDP FRIBIDI GME GNUTLS \
@ -70,10 +68,14 @@ OPTIONS_DEFINE= A52 AALIB AOM ASS AVAHI CACA CHROMECAST DAV1D DBUS DCA DOCS DVDR
QT5 REALRTSP RUNROOT SAMPLERATE SIDPLAY SCHROEDINGER \
SDL SHOUTCAST SKINS SMB SNDIO STREAM SPEEX TAGLIB THEORA \
TWOLAME UPNP V4L VAAPI VCD VDPAU VPX VORBIS WAYLAND X11 X264 X265 ZVBI
OPTIONS_DEFINE_powerpc= ALTIVEC
OPTIONS_DEFINE_powerpc64= ALTIVEC
OPTIONS_DEFAULT=A52 AVAHI DAV1D DBUS DCA DVDREAD DVDNAV FAAD FLAC GNUTLS JPEG \
LIVEMEDIA LUA MAD MPEG2 OGG OPTIMIZED_CFLAGS \
OPUS PNG QT5 SAMPLERATE STREAM SPEEX TAGLIB THEORA TWOLAME \
V4L VAAPI VCD VDPAU VORBIS WAYLAND X11
OPTIONS_DEFAULT_powerpc= ALTIVEC
OPTIONS_DEFAULT_powerpc64= ALTIVEC
OPTIONS_SUB= yes
AOM_DESC= AV1 video encoding/decoding via libaom
@ -110,6 +112,8 @@ AALIB_CONFIGURE_ENABLE= aa
ASS_LIB_DEPENDS= libass.so:multimedia/libass
ASS_CONFIGURE_ENABLE= libass
ALTIVEC_CONFIGURE_ENABLE= altivec
AOM_LIB_DEPENDS= libaom.so:multimedia/aom
AOM_CONFIGURE_ENABLE= aom

View File

@ -0,0 +1,12 @@
--- modules/video_chroma/i420_yuy2.c.orig 2019-09-12 13:09:52 UTC
+++ modules/video_chroma/i420_yuy2.c
@@ -37,7 +37,9 @@
#include <vlc_cpu.h>
#if defined (MODULE_NAME_IS_i420_yuy2_altivec) && defined(HAVE_ALTIVEC_H)
+# undef bool
# include <altivec.h>
+# define bool _Bool
#endif
#include "i420_yuy2.h"

View File

@ -0,0 +1,12 @@
--- modules/video_filter/deinterlace/merge.c.orig 2019-09-12 13:33:43 UTC
+++ modules/video_filter/deinterlace/merge.c
@@ -39,7 +39,9 @@
#endif
#ifdef HAVE_ALTIVEC_H
+# undef bool
# include <altivec.h>
+# define bool _Bool
#endif
/*****************************************************************************