summaryrefslogtreecommitdiffstats
path: root/audio-soft/sox/PRE_BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'audio-soft/sox/PRE_BUILD')
-rwxr-xr-xaudio-soft/sox/PRE_BUILD12
1 files changed, 11 insertions, 1 deletions
diff --git a/audio-soft/sox/PRE_BUILD b/audio-soft/sox/PRE_BUILD
index af4ad33976..6784daec71 100755
--- a/audio-soft/sox/PRE_BUILD
+++ b/audio-soft/sox/PRE_BUILD
@@ -1,5 +1,15 @@
+. "$GRIMOIRE/FUNCTIONS" &&
+
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
patch -p0 < "$SPELL_DIRECTORY/file-5.0.patch" &&
-patch -p1 < "${SPELL_DIRECTORY}/ffmpeg-0.11-arch.patch"
+
+if spell_ok ffmpeg && is_version_less 0.10 $(installed_version ffmpeg); then
+ patch -p1 < "${SPELL_DIRECTORY}/ffmpeg-0.11-arch.patch"
+fi
+# New ffmpeg misses that define for some reason.
+echo "#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
+#endif" >> src/ffmpeg.h
+