1 | #!/bin/bash
|
---|
2 |
|
---|
3 | package=ffmpeg
|
---|
4 | version=-4.3.1
|
---|
5 |
|
---|
6 | progname=$0
|
---|
7 |
|
---|
8 | source ../cascade-make/lib/cascade-lib.bash GEXT_MARS ../.. $*
|
---|
9 |
|
---|
10 | prefix=$GEXT_MARS_INSTALLED
|
---|
11 |
|
---|
12 | export CFLAGS="$CFLAGS -fPIC"
|
---|
13 | export CXXFLAGS="$CXXFLAGS -fPIC"
|
---|
14 | export LDFLAGS="$LDFLAGS -fPIC"
|
---|
15 |
|
---|
16 | export CFLAGS="$CFLAGS -I$GEXT_MARS_INSTALLED/include"
|
---|
17 | #export CPPFLAGS="$CPPFLAGS -I$GEXT_MARS_INSTALLED/include"
|
---|
18 | export CXXFLAGS="$CXXFLAGS -I$GEXT_MARS_INSTALLED/include"
|
---|
19 | export LDFLAGS="$LDFLAGS -L$GEXT_MARS_INSTALLED/lib"
|
---|
20 | #export LD_LIBRARY_PATH="$GEXT_MARS_INSTALLED/lib"
|
---|
21 |
|
---|
22 | if [ "x$PKG_CONFIG_PATH" = "x" ] ; then
|
---|
23 | export PKG_CONFIG_PATH="$GEXT_MARS_INSTALLED/lib/pkgconfig"
|
---|
24 | else
|
---|
25 | export PKG_CONFIG_PATH="$GEXT_MARS_INSTALLED/lib/pkgconfig:$PKG_CONFIG_PATH"
|
---|
26 |
|
---|
27 | fi
|
---|
28 |
|
---|
29 | opt_run_untar $force_untar $auto_untar $package $version
|
---|
30 |
|
---|
31 | # '--enable-shared' added in to help with -fPIC linking error in *chromaprint*
|
---|
32 | # Issue seems to be that -- despite having -fPIC on -- the libavcodec.a that
|
---|
33 | # has been generated is *not* Position Independent Code (PIC), with the consequence
|
---|
34 | # that when chromaprint tries to generate a '.so' file, it tries to link against
|
---|
35 | # that libavcodec.a file, but then then produces the error about the file not
|
---|
36 | # being PIC.
|
---|
37 | #
|
---|
38 | # The file in question that is flagged (fft.o) within libavcodec.a is
|
---|
39 | # itself generated from a x86/.asm (not .c) file. It is not known
|
---|
40 | # if this is a futher issue to content with or not.
|
---|
41 | #
|
---|
42 | # An alternative strategy might be to look up how to prevent libchromaprint
|
---|
43 | # (a cmake build) from generating .so files
|
---|
44 |
|
---|
45 |
|
---|
46 | #opt_run_configure $force_config $auto_config $package $version $prefix --enable-shared --enable-avresample --enable-pic
|
---|
47 | opt_run_configure $force_config $auto_config $package $version $prefix --disable-shared --enable-avresample --enable-pic
|
---|
48 |
|
---|
49 | opt_run_make $compile $package $version
|
---|
50 | opt_run_make $install $package $version "install"
|
---|
51 | opt_run_make $clean $package $version "clean"
|
---|
52 | opt_run_make $distclean $package $version "distclean"
|
---|
53 |
|
---|
54 | opt_run_tarclean $tarclean $package $version
|
---|