1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
4 # T2 SDE: package/*/ffmpeg/ffmpeg.conf
5 # Copyright (C) 2004 - 2021 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
16 hook_add preconf 5 'export TMPDIR="$(mktemp -d -p $PWD)"'
18 # use our (cross) toolchain for configure, too :-/
19 var_append extraconfopt " " "--cc=$CC --cxx=$CXX --ranlib=$RANLIB --host-cc=$CC"
20 var_append extraconfopt " " "--disable-stripping"
22 atstage cross && var_append extraconfopt " " "--enable-cross-compile --disable-doc"
24 # select architecture, for cross compilation
25 var_append extraconfopt " " "--arch=`echo $arch | arch2uname`"
28 var_append extraconfopt " " "--shlibdir=$libdir"
30 # fill options the configure does not attempt to detect ...
31 var_append confopt " " "--enable-pthreads"
33 pkginstalled lame && var_append extraconfopt " " "--enable-libmp3lame"
34 pkginstalled a52dec && var_append extraconfopt " " "--enable-liba52"
35 pkginstalled xvid && var_append extraconfopt " " "--enable-libxvid"
36 pkginstalled libtheora && var_append extraconfopt " " "--enable-libtheora"
37 pkginstalled x264 && var_append extraconfopt " " "--enable-libx264"
38 pkginstalled faac && var_append extraconfopt " " "--enable-libfaac --enable-nonfree"
39 pkginstalled faad && var_append extraconfopt " " "--enabled-libfaad"
40 pkginstalled libsdl2 || var_append extraconfopt " " "--disable-sdl2"
41 pkginstalled valgrind || var_append extraconfopt " " "--disable-valgrind-backtrace"
43 pkginstalled libext &&
44 var_append extraconfopt " " "--enable-x11grab" &&
45 var_append extraconfopt " " "--extra-ldflags=-L$root`pkgprefix libdir libxext`"
46 pkginstalled zlib && var_append extraconfopt " " "--enable-zlib"
47 pkginstalled libsdl || var_append extraconfopt " " "--disable-ffplay"
48 pkginstalled opencore-amr &&
49 var_append extraconfopt " " "--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3"
50 pkginstalled libdc1394 && pkginstalled libraw1394 && var_append extraconfopt " " "--enable-libdc1394"
51 pkginstalled freetype && var_append extraconfopt " " "--enable-libfreetype"
52 pkginstalled schroedinger && var_append extraconfopt " " "--enable-libschroedinger"
53 pkginstalled libvpx && var_append extraconfopt " " "--enable-libvpx"
54 pkginstalled speex && var_append extraconfopt " " "--enable-libspeex"
55 pkginstalled libcdio && var_append extraconfopt " " "--enable-libcdio"
56 pkginstalled gnutls && var_append extraconfopt " " "--enable-gnutls"
57 pkginstalled pulseaudio && var_append extraconfopt " " "--enable-libpulse"
60 if pkginstalled imlib2; then
62 var_append extraconfopt " " "--extra-cflags=-I$root/$( pkgprefix includedir imlib2 )"
63 var_append extraconfopt " " "--extra-ldflags=-L$root/$( pkgprefix libdir imlib2 )"
67 if pkginstalled libogg; then
68 var_append extraconfopt " " "--enable-libogg"
69 pkginstalled libvorbis && var_append extraconfopt " " "--enable-libvorbis"
72 # MMX optimizations currently don't compile (version 0.4.8)
73 var_append confopt " " "--enable-gpl --enable-shared --enable-postproc"
74 var_append confopt " " "--enable-swscale"
76 # no fPIC for x86 right now
77 if [ "$arch" = "x86" ]; then
78 var_remove GCC_WRAPPER_APPEND ' ' '-fPIC'
80 # configure fails on lame (linker does not use libm with --as-needed)
81 var_append GCC_WRAPPER_REMOVE ' ' '-Wl,--as-needed'
84 var_append makeopt ' ' 'LD=$CC'
85 var_remove_regex makeopt ' ' 'STRIP=.*'
86 var_remove_regex makeopt ' ' 'AS=.*'