Commit 64f1b9a1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Contribs: build sidplay2 and patch it so it can actually compile

parent d72e2884
--- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/sidendian.h
+++ sidplay-libs-2.1.1/libsidplay/include/sidplay/sidendian.h
@@ -16,6 +16,10 @@
***************************************************************************/
/***************************************************************************
* $Log: sidendian.h,v $
+ * Revision 1.6 2005/11/20 11:02:06 s_a_white
+ * Work around for bug in gcc 4 (optimiser breaks if variable never has a
+ * direct assignment).
+ *
* Revision 1.5 2001/07/03 22:44:13 s_a_white
* Added endian_16 to convert a 16 bit value to an array of 8s.
*
@@ -141,7 +145,7 @@
// Convert high-byte and low-byte to 16-bit word.
inline uint_least16_t endian_16 (uint8_t hi, uint8_t lo)
{
- uint_least16_t word;
+ uint_least16_t word = 0;
endian_16lo8 (word, lo);
endian_16hi8 (word, hi);
return word;
@@ -334,7 +338,7 @@
// Swap word endian.
inline void endian_32swap8 (uint_least32_t &dword)
{
- uint_least16_t lo, hi;
+ uint_least16_t lo = 0, hi = 0;
lo = endian_32lo16 (dword);
hi = endian_32hi16 (dword);
endian_16swap8 (lo);
@@ -346,8 +350,8 @@
// Convert high-byte and low-byte to 32-bit word.
inline uint_least32_t endian_32 (uint8_t hihi, uint8_t hilo, uint8_t hi, uint8_t lo)
{
- uint_least32_t dword;
- uint_least16_t word;
+ uint_least32_t dword = 0;
+ uint_least16_t word = 0;
endian_32lo8 (dword, lo);
endian_32hi8 (dword, hi);
endian_16lo8 (word, hilo);
@@ -374,7 +378,7 @@
defined(SID_WORDS_LITTLEENDIAN)
*((uint_least32_t *) ptr) = dword;
#else
- uint_least16_t word;
+ uint_least16_t word = 0;
ptr[0] = endian_32lo8 (dword);
ptr[1] = endian_32hi8 (dword);
word = endian_32hi16 (dword);
@@ -401,7 +405,7 @@
defined(SID_WORDS_BIGENDIAN)
*((uint_least32_t *) ptr) = dword;
#else
- uint_least16_t word;
+ uint_least16_t word = 0;
word = endian_32hi16 (dword);
ptr[1] = endian_16lo8 (word);
ptr[0] = endian_16hi8 (word);
--- sidplay-libs-2.1.1/libsidplay/src/sidtune/SidTune.cpp.old 2008-07-25 16:55:02.000000000 \
+0000
+++ sidplay-libs-2.1.1/libsidplay/src/sidtune/SidTune.cpp 2008-07-25 16:53:58.000000000 \
+0000
@@ -283,7 +283,7 @@
uint_least32_t fileLen = 0;
// This sucks big time
- openmode createAtrr = std::ios::in;
+ std::_Ios_Openmode createAtrr = std::ios::in;
#ifdef HAVE_IOS_NOCREATE
createAtrr |= std::ios::nocreate;
#endif
@@ -952,7 +952,7 @@
if ( status )
{
// Open binary output file stream.
- openmode createAttr = std::ios::out;
+ std::_Ios_Openmode createAttr = std::ios::out;
#if defined(HAVE_IOS_BIN)
createAttr |= std::ios::bin;
#else
@@ -1002,7 +1002,7 @@
if ( status )
{
// Open ASCII output file stream.
- openmode createAttr = std::ios::out;
+ std::_Ios_Openmode createAttr = std::ios::out;
if ( overWriteFlag )
createAttr |= std::ios::trunc;
else
@@ -1036,7 +1036,7 @@
if ( status )
{
// Open binary output file stream.
- openmode createAttr = std::ios::out;
+ std::_Ios_Openmode createAttr = std::ios::out;
#if defined(HAVE_IOS_BIN)
createAttr |= std::ios::bin;
#else
--- sidplay-2.1.1/libsidplay/include/sidplay/SmartPtr.h 2004-06-14 22:08:04.000000000 +0200
+++ sidplay2/libsidplay/include/sidplay/SmartPtr.h 2010-12-28 23:33:07.803027697 +0100
@@ -211,16 +211,16 @@
{
if ( bufferLen >= 1 )
{
- pBufCurrent = ( bufBegin = buffer );
- bufEnd = bufBegin + bufferLen;
- bufLen = bufferLen;
- status = true;
+ this->pBufCurrent = ( this->bufBegin = buffer );
+ this->bufEnd = this->bufBegin + bufferLen;
+ this->bufLen = bufferLen;
+ this->status = true;
}
else
{
- pBufCurrent = bufBegin = bufEnd = 0;
- bufLen = 0;
- status = false;
+ this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
+ this->bufLen = 0;
+ this->status = false;
}
}
};
...@@ -2644,6 +2644,27 @@ CLEAN_FILE += .gme ...@@ -2644,6 +2644,27 @@ CLEAN_FILE += .gme
CLEAN_PKG += game-music-emu-$(GME_VERSION) CLEAN_PKG += game-music-emu-$(GME_VERSION)
DISTCLEAN_PKG += game-music-emu-$(GME_VERSION).tbz2 DISTCLEAN_PKG += game-music-emu-$(GME_VERSION).tbz2
# ********************************
# SidPlay2
# ********************************
sidplay-libs-2.1.1.tar.gz:
$(WGET) $(SID_URL)
sidplay-2.1.1: sidplay-libs-2.1.1.tar.gz
$(EXTRACT_GZ)
(cd $@; patch -p1 < ../Patches/sidplay2-openmode.patch)
(cd $@; patch -p1 < ../Patches/sidplay2-endian.patch)
(cd $@; patch -p1 < ../Patches/sidplay2-smartprt.patch)
.sidplay: sidplay-2.1.1
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make -C libsidplay && make -C libsidplay install )
CLEAN_FILE += .sidplay
CLEAN_PKG += sidplay-2.1.1
DISTCLEAN_PKG += sidplay-libs-2.1.1.tar.gz
##
tools: $(TOOLS) tools: $(TOOLS)
# *************************************************************************** # ***************************************************************************
......
...@@ -246,3 +246,4 @@ VPX_VERSION=0.9.2 ...@@ -246,3 +246,4 @@ VPX_VERSION=0.9.2
VPX_URL=http://webm.googlecode.com/files/libvpx-$(VPX_VERSION).tar.bz2 VPX_URL=http://webm.googlecode.com/files/libvpx-$(VPX_VERSION).tar.bz2
GME_VERSION=0.5.5 GME_VERSION=0.5.5
GME_URL=http://game-music-emu.googlecode.com/files/game-music-emu-$(GME_VERSION).tbz2 GME_URL=http://game-music-emu.googlecode.com/files/game-music-emu-$(GME_VERSION).tbz2
SID_URL=$(SF)/sidplay2/sidplay2/sidplay-libs-2.1.1/sidplay-libs-2.1.1.tar.gz
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment