From 3853f0559090fca9ee9775e8e8402ff7324d4c8e Mon Sep 17 00:00:00 2001 From: Carsten Teibes Date: Sat, 11 Jan 2014 09:39:00 +0100 Subject: [PATCH] [add] sdl_sound-patched-hg --- .SRCINFO | 24 +++++++++++++++++ PKGBUILD | 48 +++++++++++++++++++++++++++++++++ physfs-renamed-export.patch | 27 +++++++++++++++++++ pkgconfig.patch | 53 +++++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 physfs-renamed-export.patch create mode 100644 pkgconfig.patch diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..de32b5a44f94 --- /dev/null +++ b/.SRCINFO @@ -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 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1adfadc0551e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: carstene1ns - http://git.io/ctPKG +# Contributor: Jan Alexander Steffens (heftig) +# Contributor: Tom Newsom + +_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 +} diff --git a/physfs-renamed-export.patch b/physfs-renamed-export.patch new file mode 100644 index 000000000000..316d165c71df --- /dev/null +++ b/physfs-renamed-export.patch @@ -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 diff --git a/pkgconfig.patch b/pkgconfig.patch new file mode 100644 index 000000000000..a7b48395ed1f --- /dev/null +++ b/pkgconfig.patch @@ -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 + ])