about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2024-05-03 12:09:11 +0200
committerGitHub <noreply@github.com>2024-05-03 12:09:11 +0200
commita43d424da04b9a021986a96e3e360473cc89f575 (patch)
tree6f09cae5d8b7e615d6a1eeaa9176d03fc723908d /pkgs/development
parentaeec72414cdb8350052ff3076c66211e9f8e9386 (diff)
parentc0ad46e480df160c0c51dcf2cc02ba40b730e99c (diff)
Merge pull request #308362 from atorres1985-contrib/sdl2_mixer
SDL2_mixer: adopt and refactor
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/SDL2_mixer/2_0.nix34
-rw-r--r--pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch26
-rw-r--r--pkgs/development/libraries/SDL2_mixer/default.nix74
3 files changed, 0 insertions, 134 deletions
diff --git a/pkgs/development/libraries/SDL2_mixer/2_0.nix b/pkgs/development/libraries/SDL2_mixer/2_0.nix
deleted file mode 100644
index e75e0c9c5cc09..0000000000000
--- a/pkgs/development/libraries/SDL2_mixer/2_0.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ fetchurl
-, fetchpatch
-, lzwolf
-, SDL2_mixer
-, timidity
-}:
-
-SDL2_mixer.overrideAttrs(oa: rec {
-  version = "2.0.4";
-
-  src = fetchurl {
-    url = "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${version}.tar.gz";
-    sha256 = "0694vsz5bjkcdgfdra6x9fq8vpzrl8m6q96gh58df7065hw5mkxl";
-  };
-
-  patches = [
-    # These patches fix incompatible function pointer conversion errors with clang 16.
-    (fetchpatch {
-      url = "https://github.com/libsdl-org/SDL_mixer/commit/4119ec3fe838d38d2433f4432cd18926bda5d093.patch";
-      stripLen = 2;
-      hash = "sha256-Ug1EEZIRcV8+e1MeMsGHuTW7Zn6j4szqujP8IkIq2VM=";
-    })
-    # Based on https://github.com/libsdl-org/SDL_mixer/commit/64ab759111ddb1b033bcce64e1a04e0cba6e498f
-    ./SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch
-  ];
-
-  # fix default path to timidity.cfg so MIDI files could be played
-  postPatch = ''
-    substituteInPlace timidity/options.h \
-      --replace "/usr/share/timidity" "${timidity}/share/timidity"
-  '';
-
-  passthru.tests.lzwolf = lzwolf;
-})
diff --git a/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch b/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch
deleted file mode 100644
index 76fff3fa63e25..0000000000000
--- a/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/music_mpg123.c	2018-10-31 10:59:00.000000000 -0400
-+++ b/music_mpg123.c	2023-09-05 21:31:51.529191521 -0400
-@@ -48,7 +48,11 @@
-     int (*mpg123_open_handle)(mpg123_handle *mh, void *iohandle);
-     const char* (*mpg123_plain_strerror)(int errcode);
-     void (*mpg123_rates)(const long **list, size_t *number);
-+#if (MPG123_API_VERSION >= 45) /* api (but not abi) change as of mpg123-1.26.0 */
-+    int (*mpg123_read)(mpg123_handle *mh, void *outmemory, size_t outmemsize, size_t *done );
-+#else
-     int (*mpg123_read)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done );
-+#endif
-     int (*mpg123_replace_reader_handle)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) );
-     off_t (*mpg123_seek)( mpg123_handle *mh, off_t sampleoff, int whence );
-     const char* (*mpg123_strerror)(mpg123_handle *mh);
-@@ -95,7 +99,11 @@
-         FUNCTION_LOADER(mpg123_open_handle, int (*)(mpg123_handle *mh, void *iohandle))
-         FUNCTION_LOADER(mpg123_plain_strerror, const char* (*)(int errcode))
-         FUNCTION_LOADER(mpg123_rates, void (*)(const long **list, size_t *number));
-+#if (MPG123_API_VERSION >= 45) /* api (but not abi) change as of mpg123-1.26.0 */
-+        FUNCTION_LOADER(mpg123_read, int (*)(mpg123_handle *mh, void *outmemory, size_t outmemsize, size_t *done ))
-+#else
-         FUNCTION_LOADER(mpg123_read, int (*)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done ))
-+#endif
-         FUNCTION_LOADER(mpg123_replace_reader_handle, int (*)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) ))
-         FUNCTION_LOADER(mpg123_seek, off_t (*)( mpg123_handle *mh, off_t sampleoff, int whence ))
-         FUNCTION_LOADER(mpg123_strerror, const char* (*)(mpg123_handle *mh))
diff --git a/pkgs/development/libraries/SDL2_mixer/default.nix b/pkgs/development/libraries/SDL2_mixer/default.nix
deleted file mode 100644
index d9e8d7e774a71..0000000000000
--- a/pkgs/development/libraries/SDL2_mixer/default.nix
+++ /dev/null
@@ -1,74 +0,0 @@
-{ lib, stdenv
-, fetchurl
-, pkg-config
-, AudioToolbox
-, AudioUnit
-, CoreServices
-, SDL2
-, flac
-, fluidsynth
-, libmodplug
-, libogg
-, libvorbis
-, mpg123
-, opusfile
-, smpeg2
-, timidity
-}:
-
-stdenv.mkDerivation rec {
-  pname = "SDL2_mixer";
-  version = "2.8.0";
-
-  src = fetchurl {
-    url = "https://www.libsdl.org/projects/SDL_mixer/release/${pname}-${version}.tar.gz";
-    sha256 = "sha256-HPs0yHsm29vHr9aMT1RcARarX5C7/sxa6+Kpy0uzFUk=";
-  };
-
-  configureFlags = [
-    "--disable-music-ogg-shared"
-    "--disable-music-flac-shared"
-    "--disable-music-mod-modplug-shared"
-    "--disable-music-mp3-mpg123-shared"
-    "--disable-music-opus-shared"
-    "--disable-music-midi-fluidsynth-shared"
-
-    # override default path to allow MIDI files to be played
-    "--with-timidity-cfg=${timidity}/share/timidity/timidity.cfg"
-  ] ++ lib.optionals stdenv.isDarwin [
-    "--disable-sdltest"
-    "--disable-smpegtest"
-  ];
-
-  nativeBuildInputs = [ pkg-config ];
-
-  buildInputs = lib.optionals stdenv.isDarwin [
-    AudioToolbox
-    AudioUnit
-    CoreServices
-  ];
-
-  propagatedBuildInputs = [
-    SDL2
-    flac
-    fluidsynth
-    libmodplug
-    libogg
-    libvorbis
-    mpg123
-    opusfile
-    smpeg2
-    # MIDI patterns
-    timidity
-  ];
-
-  outputs = [ "out" "dev" ];
-
-  meta = with lib; {
-    description = "SDL multi-channel audio mixer library";
-    platforms = platforms.unix;
-    homepage = "https://github.com/libsdl-org/SDL_mixer";
-    maintainers = with maintainers; [ ];
-    license = licenses.zlib;
-  };
-}