diff options
author | Eric Hameleers <alien@slackware.com> | 2018-05-16 13:40:01 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-16 13:40:01 +0000 |
commit | f1df1ed73b6c7589ead0c0676d5a74690aea4109 (patch) | |
tree | 84df823b665900e8da8082e3442b5d3399da569e /handbrake/build/handbrake.SlackBuild | |
parent | 67bcefb7a970633e05ed4132fca380d4b277df98 (diff) | |
download | asb-f1df1ed73b6c7589ead0c0676d5a74690aea4109.tar.gz asb-f1df1ed73b6c7589ead0c0676d5a74690aea4109.tar.xz |
handbrake: USE_PATENTS=NO generates a package that can be freely distributed
Diffstat (limited to 'handbrake/build/handbrake.SlackBuild')
-rwxr-xr-x | handbrake/build/handbrake.SlackBuild | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/handbrake/build/handbrake.SlackBuild b/handbrake/build/handbrake.SlackBuild index add35596..f790e3ef 100755 --- a/handbrake/build/handbrake.SlackBuild +++ b/handbrake/build/handbrake.SlackBuild @@ -79,6 +79,21 @@ RELREV=${RELREV:-""} BUILD=${BUILD:-1} TAG=${TAG:-alien} +# -- PATENT ALERT! -- +# The ffmpeg in HandBrake can be built with AAC audio encoder (used in MP4) +# but this library is 'contaminated' with patents from Apple etc. +# In addition, the FDK AAC encoder has a GPL-imcompatible license so +# ffmpeg forbids redistribution of binaries containing that encoder. +# You can build these patended algorithms into ffmpeg, and if you are an +# ordinary end user, no one will bother you for using them. +# For the binaries based on this SlackBuild that I distribute, it is a +# different story. I am not allowed to distribute binary packages that +# incorporate non-free code. So here you go. My Slackware package was built +# with "USE_PATENTS=NO" i.e. without using the aac libs. +#USE_PATENTS="NO" +USE_PATENTS=${USE_PATENTS:-"YES"} +USE_PATENTS=$(echo $USE_PATENTS | tr 'a-z' 'A-Z') + # Do you want to compile the GTK+3 based GUI (ghb) or just HandBrakeCLI ? # By default the script compiles the GUI but that will fail if your GTK+3 # is not new enough. @@ -190,6 +205,16 @@ DLI=$(($DLI+1)) SOURCE[$DLI]="$SRCDIR/x265_$X265.tar.gz" SRCURL[$DLI]="$CONTRIBURL/x265_$X265.tar.gz" +if [ "${USE_PATENTS}" == "YES" ]; then + echo "" + echo "**" + echo "** This build uses patented/non-GPL-ed code (AAC encoder)" + echo "** Run the command 'USE_PATENTS=NO $0 $*' to avoid patent issues." + echo "**" + echo "" + sleep 1 +fi + ## ## --- with a little luck, you won't have to edit below this point --- ## ## @@ -353,6 +378,12 @@ else GUI_OPTS="--disable-gtk" fi +if [ "${USE_PATENTS}" == "YES" ]; then + USE_NONFREE="--enable-fdk-aac --enable-libav-aac" +else + USE_NONFREE=" " +fi + mkdir download for FF in $(seq 1 $(( ${#SOURCE[@]} -1 ))); do cp ${SOURCE[$FF]} download/ @@ -372,8 +403,7 @@ LDFLAGS="$SLKLDFLAGS -lglib-2.0" \ --prefix=/usr \ --launch --launch-jobs=0 \ --enable-x265 \ - --enable-fdk-aac \ - --enable-libav-aac \ + ${USE_NONFREE} \ ${GUI_OPTS} \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log |