diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/smpeg | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/smpeg')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/smpeg/default.nix | 48 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/smpeg/format.patch | 11 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/smpeg/gcc6.patch | 33 |
3 files changed, 92 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/smpeg/default.nix b/nixpkgs/pkgs/development/libraries/smpeg/default.nix new file mode 100644 index 000000000000..7119f76c55fd --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/smpeg/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchsvn, SDL, autoconf, automake, libtool, gtk2, m4, pkgconfig, libGLU_combined, makeWrapper }: + +stdenv.mkDerivation rec { + name = "smpeg-svn${version}"; + version = "390"; + + src = fetchsvn { + url = svn://svn.icculus.org/smpeg/trunk; + rev = version; + sha256 = "0ynwn7ih5l2b1kpzpibns9bb9wzfjak7mgrb1ji0dkn2q5pv6lr0"; + }; + + patches = [ + ./format.patch + ./gcc6.patch + ]; + + enableParallelBuilding = true; + + buildInputs = [ SDL gtk2 libGLU_combined ]; + + nativeBuildInputs = [ autoconf automake libtool m4 pkgconfig makeWrapper ]; + + preConfigure = '' + touch NEWS AUTHORS ChangeLog + sh autogen.sh + ''; + + postInstall = '' + sed -i -e 's,"SDL.h",<SDL/SDL.h>,' \ + -e 's,"SDL_mutex.h",<SDL/SDL_mutex.h>,' \ + -e 's,"SDL_audio.h",<SDL/SDL_audio.h>,' \ + -e 's,"SDL_thread.h",<SDL/SDL_thread.h>,' \ + -e 's,"SDL_types.h",<SDL/SDL_types.h>,' \ + $out/include/smpeg/*.h + + wrapProgram $out/bin/smpeg-config \ + --prefix PATH ":" "${pkgconfig}/bin" \ + --prefix PKG_CONFIG_PATH ":" "${SDL.dev}/lib/pkgconfig" + ''; + + meta = { + homepage = http://icculus.org/smpeg/; + description = "MPEG decoding library"; + license = stdenv.lib.licenses.gpl2Plus; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/smpeg/format.patch b/nixpkgs/pkgs/development/libraries/smpeg/format.patch new file mode 100644 index 000000000000..8486dee5cda4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/smpeg/format.patch @@ -0,0 +1,11 @@ +--- a/plaympeg.c 2014-09-04 08:55:10.646132150 +0200 ++++ b/plaympeg.c 2014-09-04 08:56:57.465210820 +0200 +@@ -262,7 +262,7 @@ + answer[i] = c; + } + answer[i] = 0; +- fprintf(stderr, answer + 4); ++ fprintf(stderr, "%s", answer + 4); + } + while(answer[3] == '-'); + diff --git a/nixpkgs/pkgs/development/libraries/smpeg/gcc6.patch b/nixpkgs/pkgs/development/libraries/smpeg/gcc6.patch new file mode 100644 index 000000000000..165feb4428c2 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/smpeg/gcc6.patch @@ -0,0 +1,33 @@ +--- a/audio/hufftable.cpp ++++ b/audio/hufftable.cpp +@@ -9,6 +9,7 @@ + #include "config.h" + #endif + ++#include <climits> + #include "MPEGaudio.h" + + static const unsigned int +@@ -550,11 +551,11 @@ htd33[ 31][2]={{ 16, 1},{ 8, 1},{ 4, + + const HUFFMANCODETABLE MPEGaudio::ht[HTN]= + { +- { 0, 0-1, 0-1, 0, 0, htd33}, ++ { 0, UINT_MAX, UINT_MAX, 0, 0, htd33}, + { 1, 2-1, 2-1, 0, 7,htd01}, + { 2, 3-1, 3-1, 0, 17,htd02}, + { 3, 3-1, 3-1, 0, 17,htd03}, +- { 4, 0-1, 0-1, 0, 0, htd33}, ++ { 4, UINT_MAX, UINT_MAX, 0, 0, htd33}, + { 5, 4-1, 4-1, 0, 31,htd05}, + { 6, 4-1, 4-1, 0, 31,htd06}, + { 7, 6-1, 6-1, 0, 71,htd07}, +@@ -564,7 +565,7 @@ const HUFFMANCODETABLE MPEGaudio::ht[HTN + {11, 8-1, 8-1, 0,127,htd11}, + {12, 8-1, 8-1, 0,127,htd12}, + {13,16-1,16-1, 0,511,htd13}, +- {14, 0-1, 0-1, 0, 0, htd33}, ++ {14, UINT_MAX, UINT_MAX, 0, 0, htd33}, + {15,16-1,16-1, 0,511,htd15}, + {16,16-1,16-1, 1,511,htd16}, + {17,16-1,16-1, 2,511,htd16}, |