smpeg2: init at svn412

This commit is contained in:
Orivej Desh 2017-08-26 22:23:31 +00:00
parent 1715436b75
commit 5772ce1dd8
4 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,43 @@
{ stdenv, fetchsvn, autoconf, automake, libtool, m4, pkgconfig, makeWrapper, SDL2 }:
stdenv.mkDerivation rec {
name = "smpeg2-svn${version}";
version = "412";
src = fetchsvn {
url = svn://svn.icculus.org/smpeg/trunk;
rev = version;
sha256 = "1irf2d8f150j8cx8lbb0pz1rijap536crsz0mw871xrh6wd2fd96";
};
patches = [
./gcc6.patch
./sdl2.patch
];
nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
buildInputs = [ SDL2 ];
preConfigure = ''
sh autogen.sh
'';
postInstall = ''
sed -e 's,#include "\(SDL.*.h\)",#include <SDL2/\1>,' -i $out/include/smpeg2/*.h
wrapProgram $out/bin/smpeg2-config \
--prefix PATH ":" "${pkgconfig}/bin" \
--prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = http://icculus.org/smpeg/;
description = "SDL2 MPEG Player Library";
license = licenses.lgpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ orivej ];
};
}

View File

@ -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},

View File

@ -0,0 +1,22 @@
diff --git a/smpeg2-config.in b/smpeg2-config.in
index 5cce954..0e61939 100644
--- a/smpeg2-config.in
+++ b/smpeg2-config.in
@@ -42,7 +42,7 @@ while test $# -gt 0; do
if test @includedir@ != /usr/include ; then
includes=-I@includedir@
fi
- echo $includes -I@includedir@/smpeg2 `@SDL_CONFIG@ --cflags`
+ echo $includes -I@includedir@/smpeg2 `@SDL2_CONFIG@ --cflags`
;;
--libs)
if [ "`uname`" = "SunOS" ]; then
@@ -50,7 +50,7 @@ while test $# -gt 0; do
else
libdirs="-L@libdir@ @SMPEG_RLD_FLAGS@"
fi
- echo $libdirs -lsmpeg2 `@SDL_CONFIG@ --libs`
+ echo $libdirs -lsmpeg2 `@SDL2_CONFIG@ --libs`
;;
*)
echo "${usage}" 1>&2

View File

@ -10299,6 +10299,8 @@ with pkgs;
smpeg = callPackage ../development/libraries/smpeg { };
smpeg2 = callPackage ../development/libraries/smpeg2 { };
snack = callPackage ../development/libraries/snack {
# optional
};