ffmpeg: fix dependencies
[oi-userland.git] / components / encumbered / ffmpeg / Makefile
blob9abdad8bec0e8a618cb3b9b73ae78776e6f7caa9
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
5 # 1.0 of the CDDL.
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
22 COMPONENT_REVISION= 2
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
42 # gcc 14 complains about incompatible pointer types
43 CFLAGS += -Wno-error=incompatible-pointer-types
45 # helper target
46 update-license-file: patch
47 ( \
48 $(CAT) $(SOURCE_DIR)/LICENSE.md ; \
49 printf '\n--- COPYING.LGPLv2.1 ------------------------------------------------------\n\n' ; \
50 $(CAT) $(SOURCE_DIR)/COPYING.LGPLv2.1 ; \
51 printf '\n--- COPYING.LGPLv3 --------------------------------------------------------\n\n' ; \
52 $(CAT) $(SOURCE_DIR)/COPYING.LGPLv3 ; \
53 printf '\n--- COPYING.GPLv2 ---------------------------------------------------------\n\n' ; \
54 $(CAT) $(SOURCE_DIR)/COPYING.GPLv2 ; \
55 printf '\n--- COPYING.GPLv3 ---------------------------------------------------------\n\n' ; \
56 $(CAT) $(SOURCE_DIR)/COPYING.GPLv3 \
57 ) > $(COMPONENT_DIR)/$(COMPONENT_LICENSE_FILE)
59 # ISO C23 functions are needed, for example stdc_count_ones().
60 CPPFLAGS += $($(COMPILER)_C23_ENABLE)
62 CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
63 CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
64 CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.$(BITS))
65 CONFIGURE_OPTIONS += --libdir=$(CONFIGURE_LIBDIR.$(BITS))
66 CONFIGURE_OPTIONS += --cc=$(CC)
67 CONFIGURE_OPTIONS += --enable-runtime-cpudetect
68 CONFIGURE_OPTIONS += --enable-mmx --enable-sse --enable-ssse3
69 # force additional new CPU instruction enablement
70 CONFIGURE_OPTIONS += --enable-avx
71 CONFIGURE_OPTIONS += --disable-debug
72 CONFIGURE_OPTIONS += --enable-nonfree
73 CONFIGURE_OPTIONS += --enable-gpl
74 CONFIGURE_OPTIONS += --enable-postproc
75 CONFIGURE_OPTIONS += --enable-avfilter
76 CONFIGURE_OPTIONS += --enable-swscale
77 CONFIGURE_OPTIONS += --enable-libgsm
78 CONFIGURE_OPTIONS += --enable-libxvid
79 CONFIGURE_OPTIONS += --enable-libx264
80 CONFIGURE_OPTIONS += --enable-libx265
81 CONFIGURE_OPTIONS += --enable-libdav1d
82 CONFIGURE_OPTIONS += --enable-libwebp
83 # Don't enable it, resulting binary is not
84 # redistributable
85 #CONFIGURE_OPTIONS += --enable-libfaac
86 CONFIGURE_OPTIONS += --enable-libtheora
87 CONFIGURE_OPTIONS += --enable-libmp3lame
88 CONFIGURE_OPTIONS += --enable-libvorbis
89 CONFIGURE_OPTIONS += --enable-libvpx
90 # x11grab has been replaced by the x11xcb options
91 #CONFIGURE_OPTIONS += --enable-x11grab
92 CONFIGURE_OPTIONS += --enable-libxcb
93 CONFIGURE_OPTIONS += --enable-libspeex
94 CONFIGURE_OPTIONS += --enable-pthreads
95 # Incompatible with GPLv2
96 #CONFIGURE_OPTIONS += --enable-libopencore-amrnb
97 CONFIGURE_OPTIONS += --enable-libass
98 CONFIGURE_OPTIONS += --enable-openssl
99 CONFIGURE_OPTIONS += --enable-openal
100 # don't enable avresample any more, it's long-deprecated. Use swresample
101 # instead
102 #CONFIGURE_OPTIONS += --enable-avresample
103 CONFIGURE_OPTIONS += --enable-swresample
104 # Incompatible with GPLv2
105 #CONFIGURE_OPTIONS += --enable-libopencore-amrwb
106 # libschroedinger support was removed in 3.4.x
107 #CONFIGURE_OPTIONS += --enable-libschroedinger
108 CONFIGURE_OPTIONS += --enable-libopenjpeg
109 CONFIGURE_OPTIONS += --enable-librtmp
110 CONFIGURE_OPTIONS += --enable-vdpau
111 CONFIGURE_OPTIONS += --enable-shared
112 CONFIGURE_OPTIONS += --disable-static
113 # these tests cause problems, skip them
114 CONFIGURE_OPTIONS += --ignore-tests=source
116 CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
118 COMPONENT_TEST_ENV += PATH=$(PROTO_DIR)/$(CONFIGURE_BINDIR.$(BITS)):$(PATH)
119 COMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))
121 COMPONENT_TEST_TRANSFORMS+= '-n -e "/TEST/p" -e "/^IGNORE/p" '
123 # You must run the 'install' target before running the test
124 # suite, as we use binaries and libraries from $(PROTO_DIR) for tests
125 # to reduce issues with all the test binaries not being able to find
126 # ffmpeg's libraries.
127 test: install $(TEST_64)
129 # Auto-generated dependencies
130 REQUIRED_PACKAGES += $(OPENSSL_PKG)
131 REQUIRED_PACKAGES += audio/lame
132 REQUIRED_PACKAGES += codec/dav1d
133 REQUIRED_PACKAGES += codec/libtheora
134 REQUIRED_PACKAGES += codec/speex
135 REQUIRED_PACKAGES += compress/bzip2
136 REQUIRED_PACKAGES += compress/xz
137 REQUIRED_PACKAGES += image/library/openjpeg
138 REQUIRED_PACKAGES += library/audio/libgsm
139 REQUIRED_PACKAGES += library/audio/openal
140 REQUIRED_PACKAGES += library/graphics/libvdpau
141 REQUIRED_PACKAGES += library/libvorbis
142 REQUIRED_PACKAGES += library/libwebp
143 REQUIRED_PACKAGES += library/sdl2
144 REQUIRED_PACKAGES += library/video/libass
145 REQUIRED_PACKAGES += library/video/libvpx
146 REQUIRED_PACKAGES += library/video/x264
147 REQUIRED_PACKAGES += library/video/x265
148 REQUIRED_PACKAGES += library/video/x265-41
149 REQUIRED_PACKAGES += library/video/xvid
150 REQUIRED_PACKAGES += library/zlib
151 REQUIRED_PACKAGES += system/library
152 REQUIRED_PACKAGES += system/library/math
153 REQUIRED_PACKAGES += video/rtmpdump
154 REQUIRED_PACKAGES += x11/library/libdrm
155 REQUIRED_PACKAGES += x11/library/libx11
156 REQUIRED_PACKAGES += x11/library/libxcb
157 REQUIRED_PACKAGES += x11/library/libxext
158 REQUIRED_PACKAGES += x11/library/libxv