mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
multimedia/ffmpeg3: New port: Legacy branch of ffmpeg 3.*
To be used exclusively with emulators/ppsspp as newer versions are incompatible due to how the hardware in the Sony PSP works. FFmpeg is stripped down to avoid incompatbilities with external dependencies, only provides static libraries to avoid getting pull in unintentionally and is statically linked to PPSSPP. PR: 282188, 282792
This commit is contained in:
parent
dc6aba525e
commit
2438c611d7
9 changed files with 318 additions and 0 deletions
|
@ -57,6 +57,7 @@
|
|||
SUBDIR += ffaudioconverter
|
||||
SUBDIR += ffdec
|
||||
SUBDIR += ffmpeg
|
||||
SUBDIR += ffmpeg3
|
||||
SUBDIR += ffmpeg4
|
||||
SUBDIR += ffmpegthumbnailer
|
||||
SUBDIR += ffms2
|
||||
|
|
128
multimedia/ffmpeg3/Makefile
Normal file
128
multimedia/ffmpeg3/Makefile
Normal file
|
@ -0,0 +1,128 @@
|
|||
PORTNAME= ffmpeg
|
||||
DISTVERSION= 3.0.2
|
||||
CATEGORIES= multimedia audio net
|
||||
MASTER_SITES= https://ffmpeg.org/releases/
|
||||
PKGNAMESUFFIX= 3
|
||||
|
||||
PATCH_SITES= https://github.com/hrydgard/ppsspp-ffmpeg/commit/
|
||||
PATCHFILES= 9c4f84d9d9ad147f4a44cff582829647a0c65420.patch:-p1
|
||||
|
||||
MAINTAINER= kreinholz@gmail.com
|
||||
COMMENT= Realtime audio/video encoder/converter and streaming server (legacy 3.* series)
|
||||
WWW= https://ffmpeg.org/
|
||||
|
||||
LICENSE= GPLv2+ LGPL21+
|
||||
LICENSE_COMB= multi
|
||||
|
||||
NOT_FOR_ARCHS= mips mips64 powerpc powerpc64 powerpcspe
|
||||
NOT_FOR_ARCHS_REASON= emulators/ppsspp only supports little-endian, see \
|
||||
https://github.com/hrydgard/ppsspp/issues/8823
|
||||
|
||||
USES= compiler:c11 cpe gmake localbase:ldflags perl5 pkgconfig \
|
||||
shebangfix tar:xz
|
||||
USE_PERL5= build
|
||||
SHEBANG_FILES= doc/texi2pod.pl
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
.ifdef PKGNAMESUFFIX
|
||||
PORTSCOUT= limit:^3\.
|
||||
PREFIX= ${LOCALBASE}/${PKGBASE} # avoid conflict with the default
|
||||
.endif
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_LOG= ffbuild/config.log
|
||||
|
||||
LDFLAGS_aarch64=-Wl,-z,notext
|
||||
|
||||
INSTALL_TARGET= install-libs install-headers
|
||||
|
||||
NOPRECIOUSMAKEVARS= yes
|
||||
MAKE_ENV+= V=1
|
||||
|
||||
.if defined(WITH_DEBUG)
|
||||
CONFIGURE_ARGS= --disable-stripping
|
||||
.else
|
||||
CONFIGURE_ARGS= --disable-debug
|
||||
.endif
|
||||
|
||||
CONFIGURE_ARGS+=--prefix="${PREFIX}" \
|
||||
--pkgconfigdir="${PREFIX}/libdata/pkgconfig" \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--enable-pic \
|
||||
--enable-zlib \
|
||||
--disable-everything \
|
||||
--enable-gpl \
|
||||
--cc="${CC}" \
|
||||
--cxx="${CXX}" \
|
||||
--disable-avdevice \
|
||||
--disable-filters \
|
||||
--disable-programs \
|
||||
--disable-network \
|
||||
--disable-avfilter \
|
||||
--disable-postproc \
|
||||
--disable-encoders \
|
||||
--disable-doc \
|
||||
--disable-ffplay \
|
||||
--disable-ffprobe \
|
||||
--disable-ffserver \
|
||||
--disable-ffmpeg \
|
||||
--enable-decoder=h264 \
|
||||
--enable-decoder=mpeg4 \
|
||||
--enable-decoder=h263 \
|
||||
--enable-decoder=h263p \
|
||||
--enable-decoder=mpeg2video \
|
||||
--enable-decoder=mjpeg \
|
||||
--enable-decoder=mjpegb \
|
||||
--enable-decoder=aac \
|
||||
--enable-decoder=aac_latm \
|
||||
--enable-decoder=atrac3 \
|
||||
--enable-decoder=atrac3p \
|
||||
--enable-decoder=mp3 \
|
||||
--enable-decoder=pcm_s16le \
|
||||
--enable-decoder=pcm_s8 \
|
||||
--enable-demuxer=h264 \
|
||||
--enable-demuxer=h263 \
|
||||
--enable-demuxer=m4v \
|
||||
--enable-demuxer=mpegps \
|
||||
--enable-demuxer=mpegvideo \
|
||||
--enable-demuxer=avi \
|
||||
--enable-demuxer=mp3 \
|
||||
--enable-demuxer=aac \
|
||||
--enable-demuxer=pmp \
|
||||
--enable-demuxer=oma \
|
||||
--enable-demuxer=pcm_s16le \
|
||||
--enable-demuxer=pcm_s8 \
|
||||
--enable-demuxer=wav \
|
||||
--enable-encoder=ffv1 \
|
||||
--enable-encoder=huffyuv \
|
||||
--enable-encoder=mpeg4 \
|
||||
--enable-encoder=pcm_s16le \
|
||||
--enable-muxer=avi \
|
||||
--enable-parser=h264 \
|
||||
--enable-parser=mpeg4video \
|
||||
--enable-parser=mpegvideo \
|
||||
--enable-parser=aac \
|
||||
--enable-parser=aac_latm \
|
||||
--enable-parser=mpegaudio \
|
||||
--enable-protocol=file \
|
||||
--disable-sdl \
|
||||
--disable-asm \
|
||||
--disable-iconv \
|
||||
--disable-vaapi \
|
||||
--disable-hwaccels
|
||||
|
||||
OPTIONS_DEFINE= LTO OPTIMIZED_CFLAGS RTCPU
|
||||
OPTIONS_DEFAULT= LTO OPTIMIZED_CFLAGS
|
||||
OPTIONS_DEFAULT_amd64= RTCPU
|
||||
OPTIONS_EXCLUDE_aarch64=RTCPU
|
||||
|
||||
RTCPU_DESC= Detect CPU capabilities at runtime
|
||||
|
||||
LTO_CONFIGURE_ENABLE= lto
|
||||
|
||||
OPTIMIZED_CFLAGS_CONFIGURE_ENABLE= optimizations
|
||||
|
||||
RTCPU_CONFIGURE_ENABLE= runtime-cpudetect
|
||||
|
||||
.include <bsd.port.mk>
|
5
multimedia/ffmpeg3/distinfo
Normal file
5
multimedia/ffmpeg3/distinfo
Normal file
|
@ -0,0 +1,5 @@
|
|||
TIMESTAMP = 1730140299
|
||||
SHA256 (ffmpeg-3.0.2.tar.xz) = 82943cc7b0c4d14b612404de0dd7b24cd8ca3511d51e4fd3ae36b2d71bb95223
|
||||
SIZE (ffmpeg-3.0.2.tar.xz) = 7461808
|
||||
SHA256 (9c4f84d9d9ad147f4a44cff582829647a0c65420.patch) = 120263d3b5a97e98ed9968d3a69da1e6e0770b870f4d0e5cb30e64a8036bdf60
|
||||
SIZE (9c4f84d9d9ad147f4a44cff582829647a0c65420.patch) = 1135
|
17
multimedia/ffmpeg3/files/patch-configure
Normal file
17
multimedia/ffmpeg3/files/patch-configure
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- configure.orig 2024-05-15 16:58:49 UTC
|
||||
+++ configure
|
||||
@@ -3024,13 +3024,7 @@ host_os=$target_os_default
|
||||
target_os_default=$(tolower $(uname -s))
|
||||
host_os=$target_os_default
|
||||
|
||||
-# machine
|
||||
-if test "$target_os_default" = aix; then
|
||||
- arch_default=$(uname -p)
|
||||
- strip_default="strip -X32_64"
|
||||
-else
|
||||
- arch_default=$(uname -m)
|
||||
-fi
|
||||
+arch_default=$(uname -p)
|
||||
cpu="generic"
|
||||
intrinsics="none"
|
||||
|
44
multimedia/ffmpeg3/files/patch-libavformat_rtsp.c
Normal file
44
multimedia/ffmpeg3/files/patch-libavformat_rtsp.c
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- libavformat/rtsp.c.orig 2024-05-15 16:46:06 UTC
|
||||
+++ libavformat/rtsp.c
|
||||
@@ -1607,7 +1607,12 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, con
|
||||
}
|
||||
if (ttl > 0)
|
||||
snprintf(optbuf, sizeof(optbuf), "?ttl=%d", ttl);
|
||||
- getnameinfo((struct sockaddr*) &addr, sizeof(addr),
|
||||
+ getnameinfo((struct sockaddr*) &addr,
|
||||
+#if HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||
+ ((struct sockaddr*) &addr)->sa_len,
|
||||
+#else
|
||||
+ sizeof(addr),
|
||||
+#endif
|
||||
namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST);
|
||||
ff_url_join(url, sizeof(url), "rtp", NULL, namebuf,
|
||||
port, "%s", optbuf);
|
||||
@@ -1815,8 +1820,13 @@ redirect:
|
||||
goto fail;
|
||||
}
|
||||
if (!getpeername(tcp_fd, (struct sockaddr*) &peer, &peer_len)) {
|
||||
- getnameinfo((struct sockaddr*) &peer, peer_len, host, sizeof(host),
|
||||
- NULL, 0, NI_NUMERICHOST);
|
||||
+ getnameinfo((struct sockaddr*) &peer,
|
||||
+#if HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||
+ ((struct sockaddr*) &peer)->sa_len,
|
||||
+#else
|
||||
+ peer_len,
|
||||
+#endif
|
||||
+ host, sizeof(host), NULL, 0, NI_NUMERICHOST);
|
||||
}
|
||||
|
||||
/* request options supported by the server; this also detects server
|
||||
@@ -2295,7 +2305,11 @@ static int sdp_read_header(AVFormatContext *s)
|
||||
AVDictionary *opts = map_to_opts(rt);
|
||||
|
||||
err = getnameinfo((struct sockaddr*) &rtsp_st->sdp_ip,
|
||||
+#if HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||
+ ((struct sockaddr*) &rtsp_st->sdp_ip)->sa_len,
|
||||
+#else
|
||||
sizeof(rtsp_st->sdp_ip),
|
||||
+#endif
|
||||
namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST);
|
||||
if (err) {
|
||||
av_log(s, AV_LOG_ERROR, "getnameinfo: %s\n", gai_strerror(err));
|
13
multimedia/ffmpeg3/files/patch-libavutil_common.h
Normal file
13
multimedia/ffmpeg3/files/patch-libavutil_common.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- libavutil/common.h.orig 2024-05-15 16:55:52 UTC
|
||||
+++ libavutil/common.h
|
||||
@@ -50,6 +50,10 @@
|
||||
# define AV_NE(be, le) (le)
|
||||
#endif
|
||||
|
||||
+#ifndef UINT64_C
|
||||
+#define UINT64_C(c) (c ## UL)
|
||||
+#endif
|
||||
+
|
||||
//rounded division & shift
|
||||
#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
|
||||
/* assume b>0 */
|
8
multimedia/ffmpeg3/override.mk
Normal file
8
multimedia/ffmpeg3/override.mk
Normal file
|
@ -0,0 +1,8 @@
|
|||
FF_SUFFIX= 3
|
||||
|
||||
BUILD_DEPENDS:= ${BUILD_DEPENDS:S/ffmpeg/&${FF_SUFFIX}/g}
|
||||
LIB_DEPENDS:= ${LIB_DEPENDS:S/ffmpeg$/&${FF_SUFFIX}/}
|
||||
|
||||
USES+= localbase # -isystem
|
||||
CONFIGURE_ENV+= PKG_CONFIG_PATH="${LOCALBASE}/ffmpeg${FF_SUFFIX}/libdata/pkgconfig"
|
||||
MAKE_ENV+= PKG_CONFIG_PATH="${LOCALBASE}/ffmpeg${FF_SUFFIX}/libdata/pkgconfig"
|
3
multimedia/ffmpeg3/pkg-descr
Normal file
3
multimedia/ffmpeg3/pkg-descr
Normal file
|
@ -0,0 +1,3 @@
|
|||
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 is a custom build of FFmpeg-3.0.2, a legacy version released in 2016, intended for use with PPSSPP.
|
99
multimedia/ffmpeg3/pkg-plist
Normal file
99
multimedia/ffmpeg3/pkg-plist
Normal file
|
@ -0,0 +1,99 @@
|
|||
include/libavcodec/avcodec.h
|
||||
include/libavcodec/avdct.h
|
||||
include/libavcodec/avfft.h
|
||||
include/libavcodec/d3d11va.h
|
||||
include/libavcodec/dirac.h
|
||||
include/libavcodec/dv_profile.h
|
||||
include/libavcodec/dxva2.h
|
||||
include/libavcodec/qsv.h
|
||||
include/libavcodec/vaapi.h
|
||||
include/libavcodec/vda.h
|
||||
include/libavcodec/vdpau.h
|
||||
include/libavcodec/version.h
|
||||
include/libavcodec/videotoolbox.h
|
||||
include/libavcodec/vorbis_parser.h
|
||||
include/libavcodec/xvmc.h
|
||||
include/libavformat/avformat.h
|
||||
include/libavformat/avio.h
|
||||
include/libavformat/version.h
|
||||
include/libavutil/adler32.h
|
||||
include/libavutil/aes.h
|
||||
include/libavutil/aes_ctr.h
|
||||
include/libavutil/attributes.h
|
||||
include/libavutil/audio_fifo.h
|
||||
include/libavutil/avassert.h
|
||||
include/libavutil/avconfig.h
|
||||
include/libavutil/avstring.h
|
||||
include/libavutil/avutil.h
|
||||
include/libavutil/base64.h
|
||||
include/libavutil/blowfish.h
|
||||
include/libavutil/bprint.h
|
||||
include/libavutil/bswap.h
|
||||
include/libavutil/buffer.h
|
||||
include/libavutil/camellia.h
|
||||
include/libavutil/cast5.h
|
||||
include/libavutil/channel_layout.h
|
||||
include/libavutil/common.h
|
||||
include/libavutil/cpu.h
|
||||
include/libavutil/crc.h
|
||||
include/libavutil/des.h
|
||||
include/libavutil/dict.h
|
||||
include/libavutil/display.h
|
||||
include/libavutil/downmix_info.h
|
||||
include/libavutil/error.h
|
||||
include/libavutil/eval.h
|
||||
include/libavutil/ffversion.h
|
||||
include/libavutil/fifo.h
|
||||
include/libavutil/file.h
|
||||
include/libavutil/frame.h
|
||||
include/libavutil/hash.h
|
||||
include/libavutil/hmac.h
|
||||
include/libavutil/imgutils.h
|
||||
include/libavutil/intfloat.h
|
||||
include/libavutil/intreadwrite.h
|
||||
include/libavutil/lfg.h
|
||||
include/libavutil/log.h
|
||||
include/libavutil/macros.h
|
||||
include/libavutil/mastering_display_metadata.h
|
||||
include/libavutil/mathematics.h
|
||||
include/libavutil/md5.h
|
||||
include/libavutil/mem.h
|
||||
include/libavutil/motion_vector.h
|
||||
include/libavutil/murmur3.h
|
||||
include/libavutil/opt.h
|
||||
include/libavutil/parseutils.h
|
||||
include/libavutil/pixdesc.h
|
||||
include/libavutil/pixelutils.h
|
||||
include/libavutil/pixfmt.h
|
||||
include/libavutil/random_seed.h
|
||||
include/libavutil/rational.h
|
||||
include/libavutil/rc4.h
|
||||
include/libavutil/replaygain.h
|
||||
include/libavutil/ripemd.h
|
||||
include/libavutil/samplefmt.h
|
||||
include/libavutil/sha.h
|
||||
include/libavutil/sha512.h
|
||||
include/libavutil/stereo3d.h
|
||||
include/libavutil/tea.h
|
||||
include/libavutil/threadmessage.h
|
||||
include/libavutil/time.h
|
||||
include/libavutil/timecode.h
|
||||
include/libavutil/timestamp.h
|
||||
include/libavutil/tree.h
|
||||
include/libavutil/twofish.h
|
||||
include/libavutil/version.h
|
||||
include/libavutil/xtea.h
|
||||
include/libswresample/swresample.h
|
||||
include/libswresample/version.h
|
||||
include/libswscale/swscale.h
|
||||
include/libswscale/version.h
|
||||
lib/libavcodec.a
|
||||
lib/libavformat.a
|
||||
lib/libavutil.a
|
||||
lib/libswresample.a
|
||||
lib/libswscale.a
|
||||
libdata/pkgconfig/libavcodec.pc
|
||||
libdata/pkgconfig/libavformat.pc
|
||||
libdata/pkgconfig/libavutil.pc
|
||||
libdata/pkgconfig/libswresample.pc
|
||||
libdata/pkgconfig/libswscale.pc
|
Loading…
Add table
Reference in a new issue