From fec394b693932d302c9f0b0767edc43d557e8dae Mon Sep 17 00:00:00 2001 From: Andrew Killer Date: Wed, 18 Mar 2020 12:06:45 +0000 Subject: [PATCH] Add USER_BUILD_CONFIGURATION_FLAGS environment variable to allow custom user compile flags. --- README.md | 7 +++++-- scripts/ffmpeg/build.sh | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a95ac5..9a231e8 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,12 @@ The build output is copied to /build/build. This should be mounted to a folder o 2. Run the container. This will download ffmpeg, build it, then copy to /build/build: ```sh - docker container run --rm --name ffmpeg-android-maker -v /path/to/host/output:/build/build ffmpeg-android-maker - + docker container run --rm --name ffmpeg-android-maker USER_BUILD_CONFIGURATION_FLAGS="--disable-gpl" -v /path/to/host/output:/build/build ffmpeg-android-maker ``` + + Use the environment variable USER_BUILD_CONFIGURATION_FLAGS to pass custom compile flags if required, e.g. --disable-gpl. + + On Windows you can pass in a host path in the following way: ```sh -v C:\path\to\host\output:/build/build diff --git a/scripts/ffmpeg/build.sh b/scripts/ffmpeg/build.sh index 603d79c..33a915e 100755 --- a/scripts/ffmpeg/build.sh +++ b/scripts/ffmpeg/build.sh @@ -41,6 +41,7 @@ DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS" --disable-static \ --pkg-config=$(which pkg-config) \ ${EXTRA_BUILD_CONFIGURATION_FLAGS} \ + ${USER_BUILD_CONFIGURATION_FLAGS} \ --disable-runtime-cpudetect \ --disable-programs \ --disable-muxers \