[add] sdl_sound-patched-hg

This commit is contained in:
Carsten Teibes 2014-01-11 09:39:00 +01:00
commit 3853f05590
4 changed files with 152 additions and 0 deletions

24
.SRCINFO Normal file
View file

@ -0,0 +1,24 @@
pkgbase = sdl_sound-patched-hg
pkgdesc = A library to decode several popular sound file formats, patched for SDL2 (development version)
pkgver = r596.719dade41745
pkgrel = 1
url = http://icculus.org/SDL_sound/
arch = i686
arch = x86_64
license = LGPL
depends = sdl2
depends = libmodplug
depends = libvorbis
depends = flac
depends = speex
provides = sdl_sound
conflicts = sdl_sound
source = sdl_sound::hg+http://hg.icculus.org/icculus/SDL_sound
source = pkgconfig.patch
source = physfs-renamed-export.patch
sha256sums = SKIP
sha256sums = c2ebc5487c678ca4d77f5530a01c14602b9794861f4f75a1097fe47f9a8bd7ff
sha256sums = d7bd96390d9bc877c0204922c7c4666cadfdccc5e6c0cfcf9477d113377f5d10
pkgname = sdl_sound-patched-hg

48
PKGBUILD Normal file
View file

@ -0,0 +1,48 @@
# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
_name=sdl_sound
pkgname=$_name-patched-hg
pkgver=r596.719dade41745
pkgrel=1
pkgdesc="A library to decode several popular sound file formats, patched for SDL2 (development version)"
arch=('i686' 'x86_64')
url="http://icculus.org/SDL_sound/"
license=('LGPL')
depends=('sdl2' 'libmodplug' 'libvorbis' 'flac' 'speex')
conflicts=("$_name")
provides=("$_name")
source=($_name::"hg+http://hg.icculus.org/icculus/SDL_sound"
'pkgconfig.patch'
'physfs-renamed-export.patch')
sha256sums=('SKIP'
'c2ebc5487c678ca4d77f5530a01c14602b9794861f4f75a1097fe47f9a8bd7ff'
'd7bd96390d9bc877c0204922c7c4666cadfdccc5e6c0cfcf9477d113377f5d10')
pkgver() {
cd $_name
printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}
prepare() {
cd $_name
# fix deprecated physfs declaration
patch -Np1 < ../physfs-renamed-export.patch
# patch for SDL2 and pkgconfig support
patch -Np1 < ../pkgconfig.patch
}
build() {
cd $_name
./bootstrap
./configure --prefix=/usr --disable-static --disable-mikmod
make
}
package() {
make -C $_name DESTDIR="$pkgdir/" install
}

View file

@ -0,0 +1,27 @@
diff -ru SDL_sound.orig/playsound/physfsrwops.h SDL_sound/playsound/physfsrwops.h
--- SDL_sound.orig/playsound/physfsrwops.h 2014-01-11 06:28:35.494936000 +0100
+++ SDL_sound/playsound/physfsrwops.h 2014-01-11 06:31:38.315675483 +0100
@@ -29,6 +29,11 @@
extern "C" {
#endif
+/* renamed in physfs dev, add alias */
+#ifdef PHYSFS_DECL
+#define __EXPORT__ PHYSFS_DECL
+#endif
+
/**
* Open a platform-independent filename for reading, and make it accessible
* via an SDL_RWops structure. The file will be closed in PhysicsFS when the
@@ -77,6 +82,11 @@
*/
__EXPORT__ SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle);
+/* renamed in physfs dev, remove alias */
+#ifdef PHYSFS_DECL
+#undef __EXPORT__
+#endif
+
#ifdef __cplusplus
}
#endif

53
pkgconfig.patch Normal file
View file

@ -0,0 +1,53 @@
diff -r 719dade41745 Makefile.am
--- a/Makefile.am Wed Aug 15 23:52:18 2012 -0400
+++ b/Makefile.am Thu Nov 28 18:42:40 2013 +0100
@@ -1,8 +1,8 @@
lib_LTLIBRARIES = libSDL_sound.la
SUBDIRS = decoders . playsound
-libSDL_soundincludedir = $(includedir)/SDL
+libSDL_soundincludedir = $(includedir)/SDL2
libSDL_soundinclude_HEADERS = \
SDL_sound.h
@@ -49,3 +49,5 @@
echo >> $(distdir)/docs/README
rm -rf `find $(distdir) -type d -name ".svn"`
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = SDL_sound.pc
diff -r 719dade41745 SDL_sound.pc.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SDL_sound.pc.in Thu Nov 28 18:42:40 2013 +0100
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: SDL_sound
+Description: audio decoding library for Simple DirectMedia Layer
+Version: @VERSION@
+Requires: sdl2 >= @SDL_VERSION@
+Libs: -L${libdir} -lSDL_sound
+Cflags: -I${includedir}/SDL2
diff -r 719dade41745 configure.in
--- a/configure.in Wed Aug 15 23:52:18 2012 -0400
+++ b/configure.in Thu Nov 28 18:42:40 2013 +0100
@@ -107,7 +107,8 @@
dnl ---------------------------------------------------------------------
dnl Check for SDL
-SDL_VERSION=1.2.0
+SDL_VERSION=2.0.0
+AC_SUBST(SDL_VERSION)
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
@@ -339,4 +340,5 @@
decoders/timidity/Makefile
decoders/libmpg123/Makefile
playsound/Makefile
+SDL_sound.pc
])