Mercurial > mxe-octave
annotate src/ffmpeg.mk @ 7203:d0888036e522 default tip @
maint: Merge release to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 16 May 2024 20:29:42 +0200 |
parents | 556f39f841a3 |
children |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
2299
diff
changeset
|
1 # This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2349
diff
changeset
|
2 # See index.html for further information. |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
3 |
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
4 PKG := ffmpeg |
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
5 $(PKG)_IGNORE := |
6692
25b6833fabcc
* src/ffmpeg.mk: update to v4.2.9
John Donoghue <john.donoghue@ieee.org>
parents:
6522
diff
changeset
|
6 $(PKG)_VERSION := 4.2.9 |
25b6833fabcc
* src/ffmpeg.mk: update to v4.2.9
John Donoghue <john.donoghue@ieee.org>
parents:
6522
diff
changeset
|
7 $(PKG)_CHECKSUM := 7bfec63cfe78f50775f0931396552b7e898dfff7 |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) |
1499
9e587ca588dc
remove $($PKG)_SUBDIR) from FILE and URL defintions
Mark Brand <mabrand@mabrand.nl>
parents:
1485
diff
changeset
|
9 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
10 $(PKG)_URL := http://www.ffmpeg.org/releases/$($(PKG)_FILE) |
1333
6d9671318bdd
add alternative download URL for package ffmpeg
Volker Grabsch <vog@notjusthosting.com>
parents:
1332
diff
changeset
|
11 $(PKG)_URL_2 := http://launchpad.net/ffmpeg/main/$($(PKG)_VERSION)/+download/$($(PKG)_FILE) |
6010
3aad637952e6
* src/ffmpeg.mk, src/wxwidgets.mk: set dependancy in sdl2
John Donoghue <john.donoghue@ieee.org>
parents:
5424
diff
changeset
|
12 $(PKG)_DEPS := bzip2 gnutls lame libvpx opencore-amr sdl2 speex theora vorbis x264 xvidcore zlib |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
13 |
4024 | 14 $(PKG)_CONFIG_OPTS := |
15 | |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
16 define $(PKG)_UPDATE |
2525
4d0f3a9da57e
all packages: use $(WGET) portability variable
Tony Theodore <tonyt@logyst.com>
parents:
2507
diff
changeset
|
17 $(WGET) -q -O- 'http://www.ffmpeg.org/download.html' | \ |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
18 $(SED) -n 's,.*ffmpeg-\([0-9][^>]*\)\.tar.*,\1,p' | \ |
6293
ce6bf1e55f17
* src/ffmpeg.mk: only update using 4.2.X versions
John Donoghue <john.donoghue@ieee.org>
parents:
6267
diff
changeset
|
19 $(GREP) "^4.2" | \ |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
20 head -1 |
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
21 endef |
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
22 |
6228
f40df5c4d8c8
* src/ffmpeg.mk: update to v4.2.6, disable optimizations in x86 mode
John Donoghue <john.donoghue@ieee.org>
parents:
6010
diff
changeset
|
23 ifeq ($(TARGET),i686-w64-mingw32) |
f40df5c4d8c8
* src/ffmpeg.mk: update to v4.2.6, disable optimizations in x86 mode
John Donoghue <john.donoghue@ieee.org>
parents:
6010
diff
changeset
|
24 $(PKG)_CONFIG_OPTS += --disable-optimizations |
f40df5c4d8c8
* src/ffmpeg.mk: update to v4.2.6, disable optimizations in x86 mode
John Donoghue <john.donoghue@ieee.org>
parents:
6010
diff
changeset
|
25 endif |
f40df5c4d8c8
* src/ffmpeg.mk: update to v4.2.6, disable optimizations in x86 mode
John Donoghue <john.donoghue@ieee.org>
parents:
6010
diff
changeset
|
26 |
6784
556f39f841a3
* src/ffmpeg .mk: use --disable-asm when compile for gnu-linux and system gcc
John Donoghue <john.donoghue@ieee.org>
parents:
6775
diff
changeset
|
27 # disable asm usage when native linux with system gcc |
556f39f841a3
* src/ffmpeg .mk: use --disable-asm when compile for gnu-linux and system gcc
John Donoghue <john.donoghue@ieee.org>
parents:
6775
diff
changeset
|
28 ifeq ($(MXE_SYSTEM)$(USE_SYSTEM_GCC),gnu-linuxyes) |
556f39f841a3
* src/ffmpeg .mk: use --disable-asm when compile for gnu-linux and system gcc
John Donoghue <john.donoghue@ieee.org>
parents:
6775
diff
changeset
|
29 $(PKG)_CONFIG_OPTS += --disable-asm |
556f39f841a3
* src/ffmpeg .mk: use --disable-asm when compile for gnu-linux and system gcc
John Donoghue <john.donoghue@ieee.org>
parents:
6775
diff
changeset
|
30 endif |
556f39f841a3
* src/ffmpeg .mk: use --disable-asm when compile for gnu-linux and system gcc
John Donoghue <john.donoghue@ieee.org>
parents:
6775
diff
changeset
|
31 |
4026 | 32 ifeq ($(MXE_NATIVE_BUILD),no) |
6228
f40df5c4d8c8
* src/ffmpeg.mk: update to v4.2.6, disable optimizations in x86 mode
John Donoghue <john.donoghue@ieee.org>
parents:
6010
diff
changeset
|
33 |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
34 define $(PKG)_BUILD |
3031
951da75fd09c
improve handling of cross tool prefix
John W. Eaton <jwe@octave.org>
parents:
3012
diff
changeset
|
35 '$(SED)' -i "s^[-]lvpx^`'$(MXE_PKG_CONFIG)' --libs-only-l vpx`^g;" $(1)/configure |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
36 cd '$(1)' && ./configure \ |
4026 | 37 --cross-prefix='$(MXE_TOOL_PREFIX)' \ |
38 --enable-cross-compile \ | |
39 --target-os=mingw32 \ | |
4024 | 40 --arch=$(firstword $(subst -, ,$(TARGET))) \ |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2855
diff
changeset
|
41 --prefix='$(HOST_PREFIX)' \ |
2855
47558e958113
Allow static/shared libraries to be configured in top-level Makefile.
John W. Eaton <jwe@octave.org>
parents:
2792
diff
changeset
|
42 $(ENABLE_SHARED_OR_STATIC) \ |
4063 | 43 --yasmexe='$(BUILD_TOOLS_PREFIX)/bin/yasm' \ |
4029 | 44 --extra-libs='-mconsole' \ |
1261
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
45 --disable-debug \ |
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
46 --disable-doc \ |
4063 | 47 --enable-avresample \ |
1485
9265ba80f4cc
re-enable GPL and GPLv3 parts of package ffmpeg
Volker Grabsch <vog@notjusthosting.com>
parents:
1484
diff
changeset
|
48 --enable-gpl \ |
9265ba80f4cc
re-enable GPL and GPLv3 parts of package ffmpeg
Volker Grabsch <vog@notjusthosting.com>
parents:
1484
diff
changeset
|
49 --enable-version3 \ |
1781
cdcd17e66d70
upgrade package: ffmpeg
Volker Grabsch <vog@notjusthosting.com>
parents:
1705
diff
changeset
|
50 --disable-pthreads \ |
cdcd17e66d70
upgrade package: ffmpeg
Volker Grabsch <vog@notjusthosting.com>
parents:
1705
diff
changeset
|
51 --enable-w32threads \ |
2228
bcdf8e03b838
package ffmpeg: enable avisynth
Martin Lambers <marlam@marlam.de>
parents:
2221
diff
changeset
|
52 --enable-avisynth \ |
4063 | 53 --enable-gnutls \ |
1261
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
54 --enable-libspeex \ |
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
55 --enable-libtheora \ |
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
56 --enable-libvorbis \ |
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
57 --enable-libmp3lame \ |
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
58 --enable-libxvid \ |
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
59 --enable-libopencore-amrnb \ |
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
60 --enable-libopencore-amrwb \ |
050f5ff03b26
improve coding style of ffmpeg and dependencies
Tony Theodore <tonyt@logyst.com>
parents:
1259
diff
changeset
|
61 --enable-libx264 \ |
6228
f40df5c4d8c8
* src/ffmpeg.mk: update to v4.2.6, disable optimizations in x86 mode
John Donoghue <john.donoghue@ieee.org>
parents:
6010
diff
changeset
|
62 --enable-libvpx \ |
f40df5c4d8c8
* src/ffmpeg.mk: update to v4.2.6, disable optimizations in x86 mode
John Donoghue <john.donoghue@ieee.org>
parents:
6010
diff
changeset
|
63 $($(PKG)_CONFIG_OPTS) |
f40df5c4d8c8
* src/ffmpeg.mk: update to v4.2.6, disable optimizations in x86 mode
John Donoghue <john.donoghue@ieee.org>
parents:
6010
diff
changeset
|
64 $(MAKE) -C '$(1)' -j '$(JOBS)' V=1 |
6522
a2d0ea5e6b2b
* src/ffmpeg.mk: disable ffmpeg programs, remove example sources
John Donoghue <john.donoghue@ieee.org>
parents:
6450
diff
changeset
|
65 $(MAKE) -C '$(1)' -j 1 install DESTDIR='$(3)' |
a2d0ea5e6b2b
* src/ffmpeg.mk: disable ffmpeg programs, remove example sources
John Donoghue <john.donoghue@ieee.org>
parents:
6450
diff
changeset
|
66 rm -rf "$(3)$(HOST_PREFIX)/share/ffmpeg" |
1257
afabf3a51818
new packages: faac, faad2, ffmpeg, lame, libvpx, opencore-amr, x264
Di Appoggio <diappoggio@gmail.com>
parents:
diff
changeset
|
67 endef |
4026 | 68 else |
69 define $(PKG)_BUILD | |
70 '$(SED)' -i "s^[-]lvpx^`'$(MXE_PKG_CONFIG)' --libs-only-l vpx`^g;" $(1)/configure | |
71 cd '$(1)' && CPPFLAGS=-I$(HOST_INCDIR) LDFLAGS=-L$(HOST_LIBDIR) ./configure \ | |
72 --prefix='$(HOST_PREFIX)' \ | |
73 $(ENABLE_SHARED_OR_STATIC) \ | |
74 --disable-debug \ | |
75 --disable-doc \ | |
6522
a2d0ea5e6b2b
* src/ffmpeg.mk: disable ffmpeg programs, remove example sources
John Donoghue <john.donoghue@ieee.org>
parents:
6450
diff
changeset
|
76 --disable-programs \ |
4026 | 77 --enable-gpl \ |
78 --enable-version3 \ | |
79 --disable-nonfree \ | |
80 --enable-postproc \ | |
81 --enable-avisynth \ | |
82 --enable-libspeex \ | |
83 --enable-libtheora \ | |
84 --enable-libvorbis \ | |
85 --enable-libmp3lame \ | |
86 --enable-libxvid \ | |
87 --enable-libopencore-amrnb \ | |
88 --enable-libopencore-amrwb \ | |
89 --enable-libx264 \ | |
6784
556f39f841a3
* src/ffmpeg .mk: use --disable-asm when compile for gnu-linux and system gcc
John Donoghue <john.donoghue@ieee.org>
parents:
6775
diff
changeset
|
90 --enable-libvpx \ |
556f39f841a3
* src/ffmpeg .mk: use --disable-asm when compile for gnu-linux and system gcc
John Donoghue <john.donoghue@ieee.org>
parents:
6775
diff
changeset
|
91 $($(PKG)_CONFIG_OPTS) |
4026 | 92 $(MAKE) -C '$(1)' -j '$(JOBS)' |
6522
a2d0ea5e6b2b
* src/ffmpeg.mk: disable ffmpeg programs, remove example sources
John Donoghue <john.donoghue@ieee.org>
parents:
6450
diff
changeset
|
93 $(MAKE) -C '$(1)' -j 1 install DESTDIR='$(3)' |
a2d0ea5e6b2b
* src/ffmpeg.mk: disable ffmpeg programs, remove example sources
John Donoghue <john.donoghue@ieee.org>
parents:
6450
diff
changeset
|
94 rm -rf "$(3)$(HOST_PREFIX)/share/ffmpeg" |
4026 | 95 endef |
96 | |
97 endif |