2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2015 Alexander Pyhalov
14 # Copyright 2023 Niklas Poslovski
17 USE_PARALLEL_BUILD
= yes
18 include ..
/..
/..
/make-rules
/shared-macros.mk
20 COMPONENT_NAME
= ffmpeg
21 COMPONENT_VERSION
= 7.1
23 COMPONENT_SUMMARY
= A very fast video and audio converter
24 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(HUMAN_VERSION
)
25 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
26 COMPONENT_ARCHIVE_HASH
= sha256
:40973d44970dbc83ef302b0609f2e74982be2d85916dd2ee7472d30678a7abe6
27 COMPONENT_PROJECT_URL
= https
://www.ffmpeg.org
28 COMPONENT_ARCHIVE_URL
= $(COMPONENT_PROJECT_URL
)/releases
/$(COMPONENT_ARCHIVE
)
29 COMPONENT_FMRI
= video
/ffmpeg
30 COMPONENT_CLASSIFICATION
= System
/Multimedia Libraries
31 COMPONENT_LICENSE
= LGPLv2.1
+, GPLv2
, MIT
/X11
/BSD-style
33 COMPONENT_FMRI.library
= library
/ffmpeg-7
34 COMPONENT_SUMMARY.library
= $(COMPONENT_SUMMARY
) (runtime libraries
)
36 COMPONENT_FMRI.developer
= developer
/ffmpeg-7
37 COMPONENT_SUMMARY.developer
= $(COMPONENT_SUMMARY
) (development files
)
39 include $(WS_MAKE_RULES
)/encumbered.mk
40 include $(WS_MAKE_RULES
)/common.mk
43 update-license-file
: patch
45 $(CAT
) $(SOURCE_DIR
)/LICENSE.md
; \
46 printf
'\n--- COPYING.LGPLv2.1 ------------------------------------------------------\n\n' ; \
47 $(CAT
) $(SOURCE_DIR
)/COPYING.LGPLv2.1
; \
48 printf
'\n--- COPYING.LGPLv3 --------------------------------------------------------\n\n' ; \
49 $(CAT
) $(SOURCE_DIR
)/COPYING.LGPLv3
; \
50 printf
'\n--- COPYING.GPLv2 ---------------------------------------------------------\n\n' ; \
51 $(CAT
) $(SOURCE_DIR
)/COPYING.GPLv2
; \
52 printf
'\n--- COPYING.GPLv3 ---------------------------------------------------------\n\n' ; \
53 $(CAT
) $(SOURCE_DIR
)/COPYING.GPLv3 \
54 ) > $(COMPONENT_DIR
)/$(COMPONENT_LICENSE_FILE
)
56 # ISO C23 functions are needed, for example stdc_count_ones().
57 CPPFLAGS
+= $($(COMPILER
)_C23_ENABLE
)
59 CONFIGURE_OPTIONS
= --prefix=$(CONFIGURE_PREFIX
)
60 CONFIGURE_OPTIONS
+= --mandir=$(CONFIGURE_MANDIR
)
61 CONFIGURE_OPTIONS
+= --bindir=$(CONFIGURE_BINDIR.
$(BITS
))
62 CONFIGURE_OPTIONS
+= --libdir=$(CONFIGURE_LIBDIR.
$(BITS
))
63 CONFIGURE_OPTIONS
+= --cc=$(CC
)
64 CONFIGURE_OPTIONS
+= --enable-runtime-cpudetect
65 CONFIGURE_OPTIONS
+= --enable-mmx
--enable-sse
--enable-ssse3
66 # force additional new CPU instruction enablement
67 CONFIGURE_OPTIONS
+= --enable-avx
68 CONFIGURE_OPTIONS
+= --disable-debug
69 CONFIGURE_OPTIONS
+= --enable-nonfree
70 CONFIGURE_OPTIONS
+= --enable-gpl
71 CONFIGURE_OPTIONS
+= --enable-postproc
72 CONFIGURE_OPTIONS
+= --enable-avfilter
73 CONFIGURE_OPTIONS
+= --enable-swscale
74 CONFIGURE_OPTIONS
+= --enable-libgsm
75 CONFIGURE_OPTIONS
+= --enable-libxvid
76 CONFIGURE_OPTIONS
+= --enable-libx264
77 CONFIGURE_OPTIONS
+= --enable-libx265
78 CONFIGURE_OPTIONS
+= --enable-libdav1d
79 CONFIGURE_OPTIONS
+= --enable-libwebp
80 # Don't enable it, resulting binary is not
82 #CONFIGURE_OPTIONS += --enable-libfaac
83 CONFIGURE_OPTIONS
+= --enable-libtheora
84 CONFIGURE_OPTIONS
+= --enable-libmp3lame
85 CONFIGURE_OPTIONS
+= --enable-libvorbis
86 CONFIGURE_OPTIONS
+= --enable-libvpx
87 # x11grab has been replaced by the x11xcb options
88 #CONFIGURE_OPTIONS += --enable-x11grab
89 CONFIGURE_OPTIONS
+= --enable-libxcb
90 CONFIGURE_OPTIONS
+= --enable-libspeex
91 CONFIGURE_OPTIONS
+= --enable-pthreads
92 # Incompatible with GPLv2
93 #CONFIGURE_OPTIONS += --enable-libopencore-amrnb
94 CONFIGURE_OPTIONS
+= --enable-libass
95 CONFIGURE_OPTIONS
+= --enable-openssl
96 CONFIGURE_OPTIONS
+= --enable-openal
97 # don't enable avresample any more, it's long-deprecated. Use swresample
99 #CONFIGURE_OPTIONS += --enable-avresample
100 CONFIGURE_OPTIONS
+= --enable-swresample
101 # Incompatible with GPLv2
102 #CONFIGURE_OPTIONS += --enable-libopencore-amrwb
103 # libschroedinger support was removed in 3.4.x
104 #CONFIGURE_OPTIONS += --enable-libschroedinger
105 CONFIGURE_OPTIONS
+= --enable-libopenjpeg
106 CONFIGURE_OPTIONS
+= --enable-librtmp
107 CONFIGURE_OPTIONS
+= --enable-vdpau
108 CONFIGURE_OPTIONS
+= --enable-shared
109 CONFIGURE_OPTIONS
+= --disable-static
110 # these tests cause problems, skip them
111 CONFIGURE_OPTIONS
+= --ignore-tests
=source
113 CONFIGURE_ENV
+= CPPFLAGS
="$(CPPFLAGS)"
115 COMPONENT_TEST_ENV
+= PATH
=$(PROTO_DIR
)/$(CONFIGURE_BINDIR.
$(BITS
)):$(PATH
)
116 COMPONENT_TEST_ENV
+= LD_LIBRARY_PATH
=$(PROTO_DIR
)/$(CONFIGURE_LIBDIR.
$(BITS
))
118 COMPONENT_TEST_TRANSFORMS
+= '-n -e "/TEST/p" -e "/^IGNORE/p" '
120 # You must run the 'install' target before running the test
121 # suite, as we use binaries and libraries from $(PROTO_DIR) for tests
122 # to reduce issues with all the test binaries not being able to find
123 # ffmpeg's libraries.
124 test: install $(TEST_64
)
126 # Auto-generated dependencies
127 REQUIRED_PACKAGES
+= $(OPENSSL_PKG
)
128 REQUIRED_PACKAGES
+= audio
/lame
129 REQUIRED_PACKAGES
+= codec
/dav1d
130 REQUIRED_PACKAGES
+= codec
/libtheora
131 REQUIRED_PACKAGES
+= codec
/speex
132 REQUIRED_PACKAGES
+= compress
/bzip2
133 REQUIRED_PACKAGES
+= compress
/xz
134 REQUIRED_PACKAGES
+= image
/library
/openjpeg
135 REQUIRED_PACKAGES
+= library
/audio
/libgsm
136 REQUIRED_PACKAGES
+= library
/audio
/openal
137 REQUIRED_PACKAGES
+= library
/graphics
/libvdpau
138 REQUIRED_PACKAGES
+= library
/libvorbis
139 REQUIRED_PACKAGES
+= library
/libwebp
140 REQUIRED_PACKAGES
+= library
/sdl2
141 REQUIRED_PACKAGES
+= library
/video
/libass
142 REQUIRED_PACKAGES
+= library
/video
/libvpx
143 REQUIRED_PACKAGES
+= library
/video
/x264
144 REQUIRED_PACKAGES
+= library
/video
/x265
145 REQUIRED_PACKAGES
+= library
/video
/xvid
146 REQUIRED_PACKAGES
+= library
/zlib
147 REQUIRED_PACKAGES
+= system
/library
148 REQUIRED_PACKAGES
+= system
/library
/math
149 REQUIRED_PACKAGES
+= video
/rtmpdump
150 REQUIRED_PACKAGES
+= x11
/library
/libdrm
151 REQUIRED_PACKAGES
+= x11
/library
/libx11
152 REQUIRED_PACKAGES
+= x11
/library
/libxcb
153 REQUIRED_PACKAGES
+= x11
/library
/libxext
154 REQUIRED_PACKAGES
+= x11
/library
/libxv