moc: 2.5.2 -> 2.6-alpha3-unstable-2019-09-14
Includes upstream fixes for FFmpeg 4(!), and downstream ones from Cygwin for FFmpeg 6 and 7. If anyone really like this player, there are a bunch more patches here: * <https://cygwin.com/cgit/cygwin-packages/moc/tree/> * <https://salsa.debian.org/riesebie/moc/-/tree/master/debian/patches?ref_type=heads> But you should maybe, like, fork it and apply all of these rather than having downstreams carry even more of them.
This commit is contained in:
parent
affeca17c0
commit
335d4f548c
@ -1,9 +1,10 @@
|
||||
{ lib, stdenv, fetchurl, pkg-config
|
||||
{ lib, stdenv, fetchsvn, fetchpatch2, pkg-config
|
||||
, autoreconfHook, autoconf-archive
|
||||
, ncurses, db , popt, libtool
|
||||
, libiconv, CoreServices
|
||||
# Sound sub-systems
|
||||
, alsaSupport ? (!stdenv.isDarwin), alsa-lib
|
||||
, pulseSupport ? true, libpulseaudio, autoreconfHook
|
||||
, pulseSupport ? true, libpulseaudio
|
||||
, jackSupport ? true, libjack2
|
||||
, ossSupport ? true
|
||||
# Audio formats
|
||||
@ -15,7 +16,7 @@
|
||||
, musepackSupport ? true, libmpc, libmpcdec, taglib
|
||||
, vorbisSupport ? true, libvorbis
|
||||
, speexSupport ? true, speex
|
||||
, ffmpegSupport ? true, ffmpeg_4
|
||||
, ffmpegSupport ? true, ffmpeg_7
|
||||
, sndfileSupport ? true, libsndfile
|
||||
, wavpackSupport ? true, wavpack
|
||||
# Misc
|
||||
@ -24,22 +25,39 @@
|
||||
, withDebug ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "moc";
|
||||
version = "2.5.2";
|
||||
version = "2.6-alpha3-unstable-2019-09-14";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ftp.daper.net/pub/soft/moc/stable/moc-${version}.tar.bz2";
|
||||
sha256 = "026v977kwb0wbmlmf6mnik328plxg8wykfx9ryvqhirac0aq39pk";
|
||||
src = fetchsvn {
|
||||
url = "svn://svn.daper.net/moc/trunk";
|
||||
rev = "3005";
|
||||
hash = "sha256-JksJxHQgQ8hPTFtLvEvZuFh2lflDNrEmDTMWWwVnjZQ=";
|
||||
};
|
||||
|
||||
patches = []
|
||||
++ lib.optional ffmpegSupport ./moc-ffmpeg4.patch
|
||||
++ lib.optional pulseSupport ./pulseaudio.patch;
|
||||
patches = [
|
||||
# FFmpeg 6 support
|
||||
(fetchpatch2 {
|
||||
url = "https://cygwin.com/cgit/cygwin-packages/moc/plain/Support-for-recent-ffmpeg-change.patch?id=ab70f1306b8416852915be4347003aac3bdc216";
|
||||
hash = "sha256-5hLEFBJ+7Nvxn6pNj4bngcg2qJsCzxiuP6yEj+7tvs0=";
|
||||
stripLen = 1;
|
||||
})
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optional pulseSupport autoreconfHook;
|
||||
# FFmpeg 7 support
|
||||
(fetchpatch2 {
|
||||
url = "https://cygwin.com/cgit/cygwin-packages/moc/plain/ffmpeg-7.0.patch?id=ab70f1306b8416852915be4347003aac3bdc216e";
|
||||
hash = "sha256-dYw6DNyw61MGfv+GdBz5Dtrr9fVph1tf7vxexWONwF8=";
|
||||
stripLen = 1;
|
||||
})
|
||||
|
||||
./use-ax-check-compile-flag.patch
|
||||
] ++ lib.optional pulseSupport ./pulseaudio.patch;
|
||||
|
||||
postPatch = ''
|
||||
rm m4/*
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook autoconf-archive ];
|
||||
|
||||
buildInputs = [ ncurses db popt libtool ]
|
||||
# Sound sub-systems
|
||||
@ -56,7 +74,7 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optionals musepackSupport [ libmpc libmpcdec taglib ]
|
||||
++ lib.optional vorbisSupport libvorbis
|
||||
++ lib.optional speexSupport speex
|
||||
++ lib.optional ffmpegSupport ffmpeg_4
|
||||
++ lib.optional ffmpegSupport ffmpeg_7
|
||||
++ lib.optional sndfileSupport libsndfile
|
||||
++ lib.optional wavpackSupport wavpack
|
||||
# Misc
|
||||
|
@ -1,33 +0,0 @@
|
||||
Index: decoder_plugins/ffmpeg/ffmpeg.c
|
||||
===================================================================
|
||||
--- /decoder_plugins/ffmpeg/ffmpeg.c (revisión: 2963)
|
||||
+++ /decoder_plugins/ffmpeg/ffmpeg.c (copia de trabajo)
|
||||
@@ -697,7 +697,7 @@
|
||||
* FFmpeg/LibAV in use. For some versions this will be caught in
|
||||
* *_find_stream_info() above and misreported as an unfound codec
|
||||
* parameters error. */
|
||||
- if (data->codec->capabilities & CODEC_CAP_EXPERIMENTAL) {
|
||||
+ if (data->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) {
|
||||
decoder_error (&data->error, ERROR_FATAL, 0,
|
||||
"The codec is experimental and may damage MOC: %s",
|
||||
data->codec->name);
|
||||
@@ -705,8 +705,8 @@
|
||||
}
|
||||
|
||||
set_downmixing (data);
|
||||
- if (data->codec->capabilities & CODEC_CAP_TRUNCATED)
|
||||
- data->enc->flags |= CODEC_FLAG_TRUNCATED;
|
||||
+ if (data->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
|
||||
+ data->enc->flags |= AV_CODEC_FLAG_TRUNCATED;
|
||||
|
||||
if (avcodec_open2 (data->enc, data->codec, NULL) < 0)
|
||||
{
|
||||
@@ -725,7 +725,7 @@
|
||||
|
||||
data->sample_width = sfmt_Bps (data->fmt);
|
||||
|
||||
- if (data->codec->capabilities & CODEC_CAP_DELAY)
|
||||
+ if (data->codec->capabilities & AV_CODEC_CAP_DELAY)
|
||||
data->delay = true;
|
||||
data->seek_broken = is_seek_broken (data);
|
||||
data->timing_broken = is_timing_broken (data->ic);
|
43
pkgs/applications/audio/moc/use-ax-check-compile-flag.patch
Normal file
43
pkgs/applications/audio/moc/use-ax-check-compile-flag.patch
Normal file
@ -0,0 +1,43 @@
|
||||
diff --git a/configure.in b/configure.in
|
||||
index eb71bdf0b0...342baf10c5 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -102,16 +102,16 @@
|
||||
|
||||
AC_C_CONST
|
||||
AC_TYPE_INTPTR_T
|
||||
-AX_CFLAGS_GCC_OPTION(-Wall)
|
||||
-AX_CFLAGS_GCC_OPTION(-Wextra)
|
||||
+AX_CHECK_COMPILE_FLAG(-Wall)
|
||||
+AX_CHECK_COMPILE_FLAG(-Wextra)
|
||||
|
||||
dnl Overly-enthusiastic warning suppression.
|
||||
save_CFLAGS="$CFLAGS"
|
||||
-AX_CFLAGS_GCC_OPTION([-Wgnu-zero-variadic-macro-arguments], ,
|
||||
+AX_CHECK_COMPILE_FLAG([-Wgnu-zero-variadic-macro-arguments],
|
||||
AC_DEFINE([HAVE_VARIADIC_MACRO_WARNING], 1,
|
||||
[Define if compiler recognises warning option]))
|
||||
-AX_CFLAGS_GCC_OPTION([-Werror=unknown-warning-option])
|
||||
-AX_CFLAGS_GCC_OPTION([-Wformat-truncation], ,
|
||||
+AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option])
|
||||
+AX_CHECK_COMPILE_FLAG([-Wformat-truncation],
|
||||
AC_DEFINE([HAVE_FORMAT_TRUNCATION_WARNING], 1,
|
||||
[Define if compiler recognises warning option]))
|
||||
CFLAGS="$save_CFLAGS"
|
||||
@@ -242,13 +242,13 @@
|
||||
else
|
||||
if test "x$enable_debug" = "xgdb"
|
||||
then
|
||||
- AX_CFLAGS_GCC_OPTION([-ggdb])
|
||||
- AX_CFLAGS_GCC_OPTION([-O0])
|
||||
+ AX_CHECK_COMPILE_FLAG([-ggdb])
|
||||
+ AX_CHECK_COMPILE_FLAG([-O0])
|
||||
COMPILE_DEBUG='gdb'
|
||||
fi
|
||||
if test "x$ac_cv_cflags_gcc_option__ggdb" = "x"
|
||||
then
|
||||
- AX_CFLAGS_GCC_OPTION([-g])
|
||||
+ AX_CHECK_COMPILE_FLAG([-g])
|
||||
COMPILE_DEBUG='yes'
|
||||
fi
|
||||
EXTRA_OBJS="$EXTRA_OBJS null_out.o md5.o"
|
Loading…
Reference in New Issue
Block a user