SHA256
1
0
forked from pool/love-0_7_2

enable mpg123 backend

OBS-URL: https://build.opensuse.org/package/show/games/love-0_7_2?expand=0&rev=8
This commit is contained in:
Jan Engelhardt 2017-08-28 23:37:11 +00:00 committed by Git OBS Bridge
parent 154b6fff3e
commit d161973f83
4 changed files with 16 additions and 94 deletions

View File

@ -3,7 +3,9 @@ Mon Aug 28 23:17:52 UTC 2017 - jengelh@inai.de
- Make build with new /usr/include/lua5.1 directory work again. - Make build with new /usr/include/lua5.1 directory work again.
- Rename freetype.diff to system-packages.diff. - Rename freetype.diff to system-packages.diff.
- system-packages.diff: search for lua with pkg-config. - Remove love-remove-mpg123.patch: mpg123 is available in
openSUSE:Factory and can be used now.
- system-packages.diff: search for lua and mpg123 with pkg-config.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 13 17:57:56 UTC 2011 - jmatejek@suse.com Tue Sep 13 17:57:56 UTC 2011 - jmatejek@suse.com

View File

@ -26,8 +26,7 @@ Url: http://love2d.org/
Source: https://bitbucket.org/rude/love/downloads/love-0.7.2-linux-src.tar.gz Source: https://bitbucket.org/rude/love/downloads/love-0.7.2-linux-src.tar.gz
Patch1: love-modplug.patch Patch1: love-modplug.patch
Patch2: love-remove-mpg123.patch Patch2: system-packages.diff
Patch3: system-packages.diff
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -41,24 +40,21 @@ BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(libmodplug) BuildRequires: pkgconfig(libmodplug)
BuildRequires: pkgconfig(libmpg123)
BuildRequires: pkgconfig(lua5.1) BuildRequires: pkgconfig(lua5.1)
BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(sdl) BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(vorbisfile) BuildRequires: pkgconfig(vorbisfile)
%if %{with mpg123}
BuildRequires: pkgconfig(libmpg123)
%endif
%description %description
LÖVE is a framework for making 2D games in Lua. LÖVE is a framework for making 2D games in Lua.
%prep %prep
%setup -qn love-HEAD %setup -qn love-HEAD
%patch -P 1 -P 2 -P 3 -p1 %patch -P 1 -P 2 -p1
%build %build
sed -i 's/\r$//' *.txt sed -i 's/\r$//' *.txt
rm -f src/modules/sound/lullaby/Mpg123Decoder.{cpp,h}
mv configure.{in,ac} mv configure.{in,ac}
autoreconf -fi autoreconf -fi
%configure %configure

View File

@ -1,78 +0,0 @@
---
Makefile.am | 1 -
configure.in | 3 ---
src/Makefile.am | 2 --
src/modules/sound/lullaby/Sound.cpp | 4 ----
4 files changed, 10 deletions(-)
Index: love-HEAD/Makefile.am
===================================================================
--- love-HEAD.orig/Makefile.am
+++ love-HEAD/Makefile.am
@@ -1,3 +1,2 @@
-ACLOCAL_AMFLAGS = -I platform/unix/m4
SUBDIRS = src
EXTRA_DIST = changes.txt license.txt readme.txt
Index: love-HEAD/configure.in
===================================================================
--- love-HEAD.orig/configure.in
+++ love-HEAD/configure.in
@@ -1,7 +1,6 @@
AC_INIT([love], [HEAD])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([platform/unix])
-AC_CONFIG_MACRO_DIR([platform/unix/m4])
AC_CONFIG_SRCDIR([src/love.cpp])
AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar])
AC_PREFIX_DEFAULT([/usr])
@@ -36,8 +35,6 @@ AC_SEARCH_LIBS([TIFFOpen], [tiff], [], A
AC_SEARCH_LIBS([FT_Load_Glyph], [freetype], [], AC_MSG_ERROR([Can't LÖVE without FreeType]))
AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], AC_MSG_ERROR([Can't LÖVE without PhysicsFS]))
AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without ModPlug]))
-AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [], AC_MSG_ERROR([Can't LÖVE without Mpg123]))
-AC_SEARCH_LIBS([mpg123_seek_64], [mpg123], AC_SUBST([FILE_OFFSET],[-D_FILE_OFFSET_BITS=64]), AC_SUBST([FILE_OFFSET],[]))
AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile]))
AC_CONFIG_FILES([
Makefile
Index: love-HEAD/src/Makefile.am
===================================================================
--- love-HEAD.orig/src/Makefile.am
+++ love-HEAD/src/Makefile.am
@@ -31,8 +31,6 @@ love_SOURCES = \
./modules/sound/lullaby/VorbisDecoder.cpp \
./modules/sound/lullaby/Sound.h \
./modules/sound/lullaby/Sound.cpp \
-./modules/sound/lullaby/Mpg123Decoder.h \
-./modules/sound/lullaby/Mpg123Decoder.cpp \
./modules/sound/lullaby/ModPlugDecoder.h \
./modules/sound/lullaby/ModPlugDecoder.cpp \
./modules/sound/lullaby/Decoder.h \
Index: love-HEAD/src/modules/sound/lullaby/Sound.cpp
===================================================================
--- love-HEAD.orig/src/modules/sound/lullaby/Sound.cpp
+++ love-HEAD/src/modules/sound/lullaby/Sound.cpp
@@ -21,7 +21,6 @@
#include "Sound.h"
#include "ModPlugDecoder.h"
-#include "Mpg123Decoder.h"
#include "VorbisDecoder.h"
//#include "FLACDecoder.h"
@@ -37,7 +36,6 @@ namespace lullaby
Sound::~Sound()
{
- Mpg123Decoder::quit();
}
const char * Sound::getName() const
@@ -55,8 +53,6 @@ namespace lullaby
// Find a suitable decoder here, and return it.
if(ModPlugDecoder::accepts(ext))
decoder = new ModPlugDecoder(data, ext, bufferSize);
- else if(Mpg123Decoder::accepts(ext))
- decoder = new Mpg123Decoder(data, ext, bufferSize);
else if(VorbisDecoder::accepts(ext))
decoder = new VorbisDecoder(data, ext, bufferSize);
/*else if (FLACDecoder::accepts(ext))

View File

@ -8,22 +8,22 @@ by upstream, and use pkg-config — not just for freetype, but also lua, and, b
extension, opportunistically for SDL/GL. extension, opportunistically for SDL/GL.
--- ---
configure.in | 36 ++++++------------------- configure.in | 38 ++++++-------------------
src/Makefile.am | 7 +--- src/Makefile.am | 7 +---
src/modules/font/freetype/Font.h | 8 ++--- src/modules/font/freetype/Font.h | 8 ++---
src/modules/font/freetype/TrueTypeRasterizer.h | 8 ++--- src/modules/font/freetype/TrueTypeRasterizer.h | 8 ++---
4 files changed, 20 insertions(+), 39 deletions(-) 4 files changed, 20 insertions(+), 41 deletions(-)
Index: love-HEAD/configure.in Index: love-HEAD/configure.in
=================================================================== ===================================================================
--- love-HEAD.orig/configure.in --- love-HEAD.orig/configure.in
+++ love-HEAD/configure.in +++ love-HEAD/configure.in
@@ -2,40 +2,24 @@ AC_INIT([love], [HEAD]) @@ -3,42 +3,24 @@ AC_CONFIG_HEADERS([config.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([platform/unix]) AC_CONFIG_AUX_DIR([platform/unix])
AC_CONFIG_MACRO_DIR([platform/unix/m4])
AC_CONFIG_SRCDIR([src/love.cpp]) AC_CONFIG_SRCDIR([src/love.cpp])
-AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar]) -AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar])
+AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar subdir-objects subdir-objects]) +AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar subdir-objects])
AC_PREFIX_DEFAULT([/usr]) AC_PREFIX_DEFAULT([/usr])
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_PROG_CC AC_PROG_CC
@ -53,7 +53,6 @@ Index: love-HEAD/configure.in
-AC_SEARCH_LIBS([ilInit], [IL], [], AC_MSG_ERROR([Can't LÖVE without DevIL])) -AC_SEARCH_LIBS([ilInit], [IL], [], AC_MSG_ERROR([Can't LÖVE without DevIL]))
+PKG_CHECK_MODULES([sdl], [sdl]) +PKG_CHECK_MODULES([sdl], [sdl])
+PKG_CHECK_MODULES([gl], [gl]) +PKG_CHECK_MODULES([gl], [gl])
+dnl PKG_CHECK_MODULES([glu], [glu])
+PKG_CHECK_MODULES([al], [openal]) +PKG_CHECK_MODULES([al], [openal])
+PKG_CHECK_MODULES([lua], [lua5.1]) +PKG_CHECK_MODULES([lua], [lua5.1])
+PKG_CHECK_MODULES([il], [IL]) +PKG_CHECK_MODULES([il], [IL])
@ -63,8 +62,11 @@ Index: love-HEAD/configure.in
+PKG_CHECK_MODULES([ft], [freetype2]) +PKG_CHECK_MODULES([ft], [freetype2])
AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], AC_MSG_ERROR([Can't LÖVE without PhysicsFS])) AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], AC_MSG_ERROR([Can't LÖVE without PhysicsFS]))
-AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without ModPlug])) -AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without ModPlug]))
-AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [], AC_MSG_ERROR([Can't LÖVE without Mpg123]))
-AC_SEARCH_LIBS([mpg123_seek_64], [mpg123], AC_SUBST([FILE_OFFSET],[-D_FILE_OFFSET_BITS=64]), AC_SUBST([FILE_OFFSET],[]))
-AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile])) -AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile]))
+PKG_CHECK_MODULES([modplug], [libmodplug]) +PKG_CHECK_MODULES([modplug], [libmodplug])
+PKG_CHECK_MODULES([mpg123], [libmpg123])
+PKG_CHECK_MODULES([vorbisfile], [vorbisfile]) +PKG_CHECK_MODULES([vorbisfile], [vorbisfile])
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
@ -77,14 +79,14 @@ Index: love-HEAD/src/Makefile.am
-AM_CPPFLAGS = -I. -I./modules -I/usr/include/AL -I/usr/include/freetype2 $(INCLUDE_LUA) -I/usr/include/SDL $(FILE_OFFSET) -AM_CPPFLAGS = -I. -I./modules -I/usr/include/AL -I/usr/include/freetype2 $(INCLUDE_LUA) -I/usr/include/SDL $(FILE_OFFSET)
-AUTOMAKE_OPTIONS = subdir-objects -AUTOMAKE_OPTIONS = subdir-objects
-DEFAULT_INCLUDES = -DEFAULT_INCLUDES =
+AM_CPPFLAGS = -I. -I./modules ${al_CFLAGS} ${ft_CFLAGS} ${gl_CFLAGS} ${glu_CFLAGS} ${il_CFLAGS} ${lua_CFLAGS} ${modplug_CFLAGS} ${sdl_CFLAGS} ${vorbisfile_CFLAGS} $(FILE_OFFSET) +AM_CPPFLAGS = -I. -I./modules ${al_CFLAGS} ${ft_CFLAGS} ${gl_CFLAGS} ${glu_CFLAGS} ${il_CFLAGS} ${lua_CFLAGS} ${modplug_CFLAGS} ${mpg123_CFLAGS} ${sdl_CFLAGS} ${vorbisfile_CFLAGS} $(FILE_OFFSET)
SUBDIRS = SUBDIRS =
# LÖVE executable # LÖVE executable
bin_PROGRAMS = love bin_PROGRAMS = love
-#love_LDFLAGS = -#love_LDFLAGS =
-#love_LDADD = -#love_LDADD =
+love_LDADD = ${al_LIBS} ${ft_LIBS} ${gl_LIBS} ${glu_LIBS} ${il_LIBS} ${lua_LIBS} ${modplug_LIBS} ${sdl_LIBS} ${vorbisfile_LIBS} +love_LDADD = ${al_LIBS} ${ft_LIBS} ${gl_LIBS} ${glu_LIBS} ${il_LIBS} ${lua_LIBS} ${modplug_LIBS} ${mpg123_LIBS} ${sdl_LIBS} ${vorbisfile_LIBS}
love_SOURCES = \ love_SOURCES = \
./scripts/graphics.lua.h \ ./scripts/graphics.lua.h \