ffmpeg-6: fix COMPONENT_REVISION
[oi-userland.git] / components / encumbered / ffmpeg-6 / Makefile
blobeb3ca3dbd4f748e0ad6e346d68031107ac59bb0b
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= 6.1.2
22 COMPONENT_REVISION= 1
23 COMPONENT_SUMMARY= A very fast video and audio converter (runtime libraries)
24 COMPONENT_SRC= $(COMPONENT_NAME)-$(HUMAN_VERSION)
25 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
26 COMPONENT_ARCHIVE_HASH= sha256:3b624649725ecdc565c903ca6643d41f33bd49239922e45c9b1442c63dca4e38
27 COMPONENT_PROJECT_URL= https://www.ffmpeg.org
28 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/releases/$(COMPONENT_ARCHIVE)
29 COMPONENT_FMRI= library/ffmpeg-6
30 COMPONENT_CLASSIFICATION= System/Multimedia Libraries
31 COMPONENT_LICENSE= LGPLv2.1+, GPLv2, MIT/X11/BSD-style
33 COMPONENT_FMRI.developer = developer/ffmpeg-6
34 COMPONENT_SUMMARY.developer = $(COMPONENT_SUMMARY) (development files)
36 include $(WS_MAKE_RULES)/encumbered.mk
37 include $(WS_MAKE_RULES)/common.mk
39 CFLAGS += -I/usr/X11/include
40 CFLAGS += $(CPP_LARGEFILES)
42 CPPFLAGS += $($(COMPILER)_C99_ENABLE)
44 CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
45 CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
46 CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.$(BITS))
47 CONFIGURE_OPTIONS += --libdir=$(CONFIGURE_LIBDIR.$(BITS))
48 CONFIGURE_OPTIONS += --cc=$(CC)
49 CONFIGURE_OPTIONS += --enable-runtime-cpudetect
50 CONFIGURE_OPTIONS += --enable-mmx --enable-sse --enable-ssse3
51 # force additional new CPU instruction enablement
52 CONFIGURE_OPTIONS += --enable-avx
53 CONFIGURE_OPTIONS += --disable-debug
54 CONFIGURE_OPTIONS += --enable-nonfree
55 CONFIGURE_OPTIONS += --enable-gpl
56 CONFIGURE_OPTIONS += --enable-postproc
57 CONFIGURE_OPTIONS += --enable-avfilter
58 CONFIGURE_OPTIONS += --enable-swscale
59 CONFIGURE_OPTIONS += --enable-libgsm
60 CONFIGURE_OPTIONS += --enable-libxvid
61 CONFIGURE_OPTIONS += --enable-libx264
62 CONFIGURE_OPTIONS += --enable-libx265
63 CONFIGURE_OPTIONS += --enable-libdav1d
64 CONFIGURE_OPTIONS += --enable-libwebp
65 # Don't enable it, resulting binary is not
66 # redistributable
67 #CONFIGURE_OPTIONS += --enable-libfaac
68 CONFIGURE_OPTIONS += --enable-libtheora
69 CONFIGURE_OPTIONS += --enable-libmp3lame
70 CONFIGURE_OPTIONS += --enable-libvorbis
71 CONFIGURE_OPTIONS += --enable-libvpx
72 # x11grab has been replaced by the x11xcb options
73 #CONFIGURE_OPTIONS += --enable-x11grab
74 CONFIGURE_OPTIONS += --enable-libxcb
75 CONFIGURE_OPTIONS += --enable-libspeex
76 CONFIGURE_OPTIONS += --enable-pthreads
77 # Incompatible with GPLv2
78 #CONFIGURE_OPTIONS += --enable-libopencore-amrnb
79 CONFIGURE_OPTIONS += --enable-libass
80 CONFIGURE_OPTIONS += --enable-openssl
81 CONFIGURE_OPTIONS += --enable-openal
82 # don't enable avresample any more, it's long-deprecated. Use swresample
83 # instead
84 #CONFIGURE_OPTIONS += --enable-avresample
85 CONFIGURE_OPTIONS += --enable-swresample
86 # Incompatible with GPLv2
87 #CONFIGURE_OPTIONS += --enable-libopencore-amrwb
88 # libschroedinger support was removed in 3.4.x
89 #CONFIGURE_OPTIONS += --enable-libschroedinger
90 CONFIGURE_OPTIONS += --enable-libopenjpeg
91 CONFIGURE_OPTIONS += --enable-librtmp
92 CONFIGURE_OPTIONS += --enable-vdpau
93 CONFIGURE_OPTIONS += --enable-shared
94 CONFIGURE_OPTIONS += --disable-static
95 # these tests cause problems, skip them
96 CONFIGURE_OPTIONS += --ignore-tests=source
98 CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
100 # We do not need documentation for old ffmpeg version
101 CONFIGURE_OPTIONS += --disable-doc
102 # Install ffmpeg-6 development support into dedicated directories
103 CONFIGURE_OPTIONS += --incdir=$(CONFIGURE_PREFIX)/include/ffmpeg-6
104 CONFIGURE_OPTIONS += --pkgconfigdir=$(PKG_CONFIG_PATH.$(BITS))/ffmpeg-6
105 # We do not need programs in /usr/bin. We cannot use --disable-programs
106 # configure option because testing needs the ffmpeg binary.
107 COMPONENT_POST_INSTALL_ACTION += $(RM) -r $(PROTOUSRBINDIR) ;
108 # We do not need examples and other share files needed for programs
109 COMPONENT_POST_INSTALL_ACTION += $(RM) -r $(PROTOUSRSHAREDIR)/ffmpeg ;
111 COMPONENT_TEST_ENV += PATH=$(PROTO_DIR)/$(CONFIGURE_BINDIR.$(BITS)):$(PATH)
112 COMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS))
114 COMPONENT_TEST_TRANSFORMS+= '-n -e "/TEST/p" -e "/^IGNORE/p" '
116 # You must run the 'install' target before running the test
117 # suite, as we use binaries and libraries from $(PROTO_DIR) for tests
118 # to reduce issues with all the test binaries not being able to find
119 # ffmpeg's libraries.
120 test: install $(TEST_64)
122 # Auto-generated dependencies
123 REQUIRED_PACKAGES += $(OPENSSL_PKG)
124 REQUIRED_PACKAGES += audio/lame
125 REQUIRED_PACKAGES += codec/dav1d
126 REQUIRED_PACKAGES += codec/libtheora
127 REQUIRED_PACKAGES += codec/speex
128 REQUIRED_PACKAGES += compress/bzip2
129 REQUIRED_PACKAGES += compress/xz
130 REQUIRED_PACKAGES += image/library/openjpeg
131 REQUIRED_PACKAGES += library/audio/libgsm
132 REQUIRED_PACKAGES += library/audio/openal
133 REQUIRED_PACKAGES += library/graphics/libvdpau
134 REQUIRED_PACKAGES += library/libvorbis
135 REQUIRED_PACKAGES += library/libwebp
136 REQUIRED_PACKAGES += library/sdl2
137 REQUIRED_PACKAGES += library/video/libass
138 REQUIRED_PACKAGES += library/video/libvpx
139 REQUIRED_PACKAGES += library/video/x264
140 REQUIRED_PACKAGES += library/video/x265
141 REQUIRED_PACKAGES += library/video/xvid
142 REQUIRED_PACKAGES += library/zlib
143 REQUIRED_PACKAGES += system/library
144 REQUIRED_PACKAGES += system/library/math
145 REQUIRED_PACKAGES += video/rtmpdump
146 REQUIRED_PACKAGES += x11/library/libx11
147 REQUIRED_PACKAGES += x11/library/libxcb
148 REQUIRED_PACKAGES += x11/library/libxext
149 REQUIRED_PACKAGES += x11/library/libxv