mirror of
https://abf.rosa.ru/djam/SDL2_sound.git
synced 2025-02-23 17:12:48 +00:00
Update to 2.0.1
This commit is contained in:
parent
9e807cf3c1
commit
1c338d4e2c
4 changed files with 73 additions and 87 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,2 +1,2 @@
|
|||
sources:
|
||||
SDL_sound-default.tar.bz2: 7f20277870fe37789c4f2f60db40cbcbef709d22
|
||||
SDL_sound-2.0.1.tar.gz: 53b035d88f7348a8c373da71254c9e7b947de5f5
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
diff --git a/examples/playsound.c b/examples/playsound.c
|
||||
index a24d7fa..57387da 100644
|
||||
--- a/examples/playsound.c
|
||||
+++ b/examples/playsound.c
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifdef _WIN32
|
||||
#define SDL_MAIN_HANDLED /* this is a console-only app */
|
||||
#endif
|
||||
-#include "SDL.h"
|
||||
+#include "SDL2/SDL.h"
|
||||
#include "SDL_sound.h"
|
||||
|
||||
#define DEFAULT_DECODEBUF 16384
|
||||
diff --git a/examples/playsound_simple.c b/examples/playsound_simple.c
|
||||
index e720035..d7381df 100644
|
||||
--- a/examples/playsound_simple.c
|
||||
+++ b/examples/playsound_simple.c
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifdef _WIN32
|
||||
#define SDL_MAIN_HANDLED /* this is a console-only app */
|
||||
#endif
|
||||
-#include "SDL.h"
|
||||
+#include "SDL2/SDL.h"
|
||||
#include "SDL_sound.h"
|
||||
|
||||
/* global decoding state. */
|
||||
diff --git a/src/SDL_sound.h b/src/SDL_sound.h
|
||||
index 2e4e4c1..a87cea3 100644
|
||||
--- a/src/SDL_sound.h
|
||||
+++ b/src/SDL_sound.h
|
||||
@@ -50,7 +50,7 @@
|
||||
#ifndef _INCLUDE_SDL_SOUND_H_
|
||||
#define _INCLUDE_SDL_SOUND_H_
|
||||
|
||||
-#include "SDL.h"
|
||||
+#include "SDL2/SDL.h"
|
||||
|
||||
#if SDL_MAJOR_VERSION < 2
|
||||
#error SDL2_sound requires SDL 2.0.0 or later.
|
||||
diff --git a/src/libmodplug/libmodplug.h b/src/libmodplug/libmodplug.h
|
||||
index f34a86a..37b1d84 100644
|
||||
--- a/src/libmodplug/libmodplug.h
|
||||
+++ b/src/libmodplug/libmodplug.h
|
||||
@@ -9,7 +9,7 @@
|
||||
#ifndef _INCL_LIBMODPLUG_H_
|
||||
#define _INCL_LIBMODPLUG_H_
|
||||
|
||||
-#include "SDL.h"
|
||||
+#include "SDL2/SDL.h"
|
||||
|
||||
#if ((defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__)) && !defined(_WIN32)
|
||||
#pragma GCC visibility push(hidden)
|
36
sdl2_sound-sdl2-path.patch
Normal file
36
sdl2_sound-sdl2-path.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
diff -ur SDL_sound-2.0.1/examples/playsound.c SDL_sound-2.0.1_patched/examples/playsound.c
|
||||
--- SDL_sound-2.0.1/examples/playsound.c 2022-03-25 23:17:50.000000000 +0300
|
||||
+++ SDL_sound-2.0.1_patched/examples/playsound.c 2022-04-20 09:06:24.649341390 +0300
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifdef _WIN32
|
||||
#define SDL_MAIN_HANDLED /* this is a console-only app */
|
||||
#endif
|
||||
-#include "SDL.h"
|
||||
+#include "SDL2/SDL.h"
|
||||
#include "SDL_sound.h"
|
||||
|
||||
#define DEFAULT_DECODEBUF 16384
|
||||
diff -ur SDL_sound-2.0.1/examples/playsound_simple.c SDL_sound-2.0.1_patched/examples/playsound_simple.c
|
||||
--- SDL_sound-2.0.1/examples/playsound_simple.c 2022-03-25 23:17:50.000000000 +0300
|
||||
+++ SDL_sound-2.0.1_patched/examples/playsound_simple.c 2022-04-20 09:06:40.035635467 +0300
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifdef _WIN32
|
||||
#define SDL_MAIN_HANDLED /* this is a console-only app */
|
||||
#endif
|
||||
-#include "SDL.h"
|
||||
+#include "SDL2/SDL.h"
|
||||
#include "SDL_sound.h"
|
||||
|
||||
/* global decoding state. */
|
||||
diff -ur SDL_sound-2.0.1/src/SDL_sound.h SDL_sound-2.0.1_patched/src/SDL_sound.h
|
||||
--- SDL_sound-2.0.1/src/SDL_sound.h 2022-03-25 23:17:50.000000000 +0300
|
||||
+++ SDL_sound-2.0.1_patched/src/SDL_sound.h 2022-04-20 09:07:06.588326724 +0300
|
||||
@@ -50,7 +50,7 @@
|
||||
#ifndef _INCLUDE_SDL_SOUND_H_
|
||||
#define _INCLUDE_SDL_SOUND_H_
|
||||
|
||||
-#include "SDL.h"
|
||||
+#include "SDL2/SDL.h"
|
||||
|
||||
#if SDL_MAJOR_VERSION < 2
|
||||
#error SDL2_sound requires SDL 2.0.0 or later.
|
|
@ -1,28 +1,27 @@
|
|||
%define major 2
|
||||
%define libname %mklibname %{name} %{major}
|
||||
%define develname %mklibname -d %{name}
|
||||
%define oname SDL_sound-default
|
||||
%define major 2
|
||||
%define libname %mklibname %{name} %{major}
|
||||
%define develname %mklibname -d %{name}
|
||||
%define oname SDL_sound
|
||||
|
||||
Name: sdl2_sound
|
||||
Summary: An abstract SDL2 sound-file decoder
|
||||
Name: sdl2_sound
|
||||
# see cmake file
|
||||
#set(SDLSOUND_VERSION 2.0.0)
|
||||
Version: 2.0.0
|
||||
Release: 1
|
||||
Summary: An abstract SDL2 sound-file decoder
|
||||
License: zlib
|
||||
Group: System/Libraries
|
||||
Url: https://hg.icculus.org/icculus/SDL_sound/
|
||||
Source0: https://hg.icculus.org/icculus/SDL_sound/archive/SDL_sound-default.tar.bz2
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(flac)
|
||||
BuildRequires: pkgconfig(libmikmod)
|
||||
BuildRequires: pkgconfig(libmodplug)
|
||||
BuildRequires: pkgconfig(vorbis)
|
||||
BuildRequires: pkgconfig(speex)
|
||||
BuildRequires: physfs-devel
|
||||
Patch0: rosa-SDL2_sound.patch
|
||||
Version: 2.0.1
|
||||
Release: 1
|
||||
License: zlib
|
||||
Group: System/Libraries
|
||||
Url: https://hg.icculus.org/icculus/SDL_sound/
|
||||
Source0: https://github.com/icculus/SDL_sound/archive/v%{version}.tar.gz?/%{oname}-%{version}.tar.gz
|
||||
Patch0: sdl2_sound-sdl2-path.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: physfs-devel
|
||||
BuildRequires: pkgconfig(flac)
|
||||
BuildRequires: pkgconfig(libmikmod)
|
||||
BuildRequires: pkgconfig(libmodplug)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(speex)
|
||||
BuildRequires: pkgconfig(vorbis)
|
||||
|
||||
%description
|
||||
SDL2_sound is SDL_sound but with a SDL2 backend. This is a library
|
||||
|
@ -38,14 +37,15 @@ sample rate, audio format, and channel conversion on-the-fly and
|
|||
behind-the-scenes.
|
||||
|
||||
%files
|
||||
%doc LICENSE.txt docs/CREDITS.txt
|
||||
%doc docs/CREDITS.txt
|
||||
%license LICENSE.txt
|
||||
%{_bindir}/*
|
||||
|
||||
#--------------------------------------------------------------
|
||||
|
||||
%package -n %{libname}
|
||||
Summary: SDL2_sound main library
|
||||
Group: System/Libraries
|
||||
|
||||
Summary: SDL2_sound main library
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{libname}
|
||||
%{summary}.
|
||||
|
@ -54,14 +54,16 @@ Group: System/Libraries
|
|||
%doc docs/README.txt docs/INSTALL.txt
|
||||
%{_libdir}/libSDL2_sound.so.%{major}
|
||||
%{_libdir}/libSDL2_sound.so.%{major}.*
|
||||
|
||||
#--------------------------------------------------------------
|
||||
|
||||
%package -n %{develname}
|
||||
Summary: Development files for SDL2_sound applications
|
||||
Group: Development/C
|
||||
Requires: %{libname} = %{EVRD}
|
||||
Provides: SDL2_sound-devel = %{EVRD}
|
||||
Provides: lib%{name}-devel = %{EVRD}
|
||||
Provides: %{name}-devel = %{EVRD}
|
||||
Summary: Development files for SDL2_sound applications
|
||||
Group: Development/C
|
||||
Requires: %{libname} = %{EVRD}
|
||||
Provides: SDL2_sound-devel = %{EVRD}
|
||||
Provides: lib%{name}-devel = %{EVRD}
|
||||
Provides: %{name}-devel = %{EVRD}
|
||||
|
||||
%description -n %{develname}
|
||||
%{summary}.
|
||||
|
@ -69,11 +71,11 @@ Provides: %{name}-devel = %{EVRD}
|
|||
%files -n %{develname}
|
||||
%{_libdir}/lib*.so
|
||||
%{_includedir}/SDL2/SDL_sound.h
|
||||
|
||||
#-------------------------------------------------------------
|
||||
|
||||
%prep
|
||||
%setup -qn %{oname}
|
||||
%patch0 -p1
|
||||
%autosetup -p1 -n %{oname}-%{version}
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -lm -lSDL2"
|
||||
|
|
Loading…
Add table
Reference in a new issue