55a8210a32
FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec - the leading audio/video codec library. This package contains major version 5.
85 lines
2.5 KiB
Text
85 lines
2.5 KiB
Text
# $NetBSD: Makefile.common,v 1.1 2022/01/31 23:16:41 ryoon Exp $
|
|
# used by multimedia/ffmpeg5/Makefile
|
|
# used by multimedia/ffplay5/Makefile
|
|
|
|
DISTNAME= ffmpeg-5.0
|
|
CATEGORIES= multimedia
|
|
MASTER_SITES= http://www.ffmpeg.org/releases/
|
|
EXTRACT_SUFX= .tar.xz
|
|
|
|
LICENSE= gnu-lgpl-v2.1 AND gnu-gpl-v2 ${ADDITIONAL_LICENSE}
|
|
|
|
PATCHDIR= ${.CURDIR}/../../multimedia/ffmpeg5/patches
|
|
|
|
USE_LIBTOOL= yes
|
|
USE_TOOLS+= gmake pod2man perl pkg-config
|
|
HAS_CONFIGURE= yes
|
|
CONFIGURE_ARGS+= --cc=${CC:Q}
|
|
CONFIGURE_ARGS+= --disable-debug
|
|
CONFIGURE_ARGS+= --disable-optimizations
|
|
CONFIGURE_ARGS+= --disable-stripping
|
|
CONFIGURE_ARGS+= --enable-gpl
|
|
CONFIGURE_ARGS+= --enable-libxml2
|
|
CONFIGURE_ARGS+= --enable-pthreads
|
|
CONFIGURE_ARGS+= --enable-shared
|
|
CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
|
|
CONFIGURE_ARGS+= --prefix=${PREFIX}
|
|
|
|
CONFIGURE_ARGS+= --progs-suffix=5
|
|
CONFIGURE_ARGS+= --datadir=${PREFIX}/share/ffmpeg5
|
|
CONFIGURE_ARGS+= --docdir=${PREFIX}/share/doc/ffmpeg5
|
|
CONFIGURE_ARGS+= --incdir=${PREFIX}/include/ffmpeg5
|
|
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/ffmpeg5
|
|
CONFIGURE_ARGS+= --shlibdir=${PREFIX}/lib/ffmpeg5
|
|
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/ffmpeg5
|
|
|
|
.if !empty(MACHINE_PLATFORM:MDarwin-1[2-9].*-*) || !empty(MACHINE_PLATFORM:MDarwin-2*)
|
|
CONFIGURE_ARGS+= --enable-opencl
|
|
.endif
|
|
|
|
.if ${OPSYS} == "SunOS"
|
|
USE_TOOLS+= bash:build
|
|
CONFIG_SHELL= ${TOOLS_PATH.bash}
|
|
.endif
|
|
|
|
CONFIGURE_ARGS+= --enable-runtime-cpudetect
|
|
|
|
# Let's not put garbage into /tmp
|
|
CONFIGURE_ENV+= TMPDIR=${WRKSRC}/tmp
|
|
|
|
.include "../../mk/compiler.mk"
|
|
|
|
.if !empty(PKGSRC_COMPILER:Msunpro)
|
|
SUBST_CLASSES+= sunwspro
|
|
SUBST_MESSAGE.sunwspro= Fixing compiler options for SunStudio C compiler.
|
|
SUBST_STAGE.sunwspro= post-configure
|
|
SUBST_FILES.sunwspro= config.mak
|
|
SUBST_SED.sunwspro= -e "s/-O /-KPIC -DPIC /"
|
|
SUBST_SED.sunwspro+= -e "s/-O3/-xO2/g"
|
|
SUBST_SED.sunwspro+= -e "s/-std=c99/-xc99=all/"
|
|
SUBST_SED.sunwspro+= -e "s/-Wl,-rpath-link,/-L /g"
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == i386
|
|
BUILD_DEPENDS+= nasm>=2.13:../../devel/nasm
|
|
.endif
|
|
|
|
REPLACE_PERL+= doc/texi2pod.pl
|
|
REPLACE_SH+= configure
|
|
REPLACE_SH+= ffbuild/pkgconfig_generate.sh
|
|
REPLACE_SH+= ffbuild/version.sh
|
|
|
|
PLIST_SRC+= ${PKGDIR}/PLIST
|
|
|
|
MAKE_ENV+= EXTRA_LIBS=${LIBGETOPT:Q}
|
|
|
|
pre-configure:
|
|
mkdir ${WRKSRC}/tmp
|
|
|
|
.include "../../archivers/bzip2/buildlink3.mk"
|
|
.include "../../archivers/xz/buildlink3.mk"
|
|
.include "../../devel/libgetopt/buildlink3.mk"
|
|
.include "../../devel/zlib/buildlink3.mk"
|
|
.include "../../textproc/libxml2/buildlink3.mk"
|
|
.include "../../mk/atomic64.mk"
|
|
.include "../../mk/pthread.buildlink3.mk"
|