[vlc-commits] contrib: add sidplay2 and complement string.h patch
Rémi Denis-Courmont
git at videolan.org
Mon Jul 4 22:54:11 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 4 23:53:37 2011 +0300| [0c777beeada64dc924cac053bb42ff9d47a2f99d] | committer: Rémi Denis-Courmont
contrib: add sidplay2 and complement string.h patch
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c777beeada64dc924cac053bb42ff9d47a2f99d
---
contrib/src/sidplay2/SHA512SUMS | 1 +
contrib/src/sidplay2/rules.mak | 27 ++++++++++++
contrib/src/sidplay2/sidplay2-endian.patch | 60 ++++++++++++++++++++++++++
contrib/src/sidplay2/sidplay2-noutils.patch | 11 +++++
contrib/src/sidplay2/sidplay2-openmode.patch | 40 +++++++++++++++++
contrib/src/sidplay2/sidplay2-smartprt.patch | 26 +++++++++++
contrib/src/sidplay2/sidplay2-string.patch | 35 +++++++++++++++
7 files changed, 200 insertions(+), 0 deletions(-)
diff --git a/contrib/src/sidplay2/SHA512SUMS b/contrib/src/sidplay2/SHA512SUMS
new file mode 100644
index 0000000..f8b95e4
--- /dev/null
+++ b/contrib/src/sidplay2/SHA512SUMS
@@ -0,0 +1 @@
+754cd41f3d2d76754049522c395022bc090f99ea838e6d1ffb8d7689f3aedad9b3879be0312d0af49ba108563296c1176d1e533d1151d5b33368bfda0a1910e3 sidplay-libs-2.1.1.tar.gz
diff --git a/contrib/src/sidplay2/rules.mak b/contrib/src/sidplay2/rules.mak
new file mode 100644
index 0000000..6184629
--- /dev/null
+++ b/contrib/src/sidplay2/rules.mak
@@ -0,0 +1,27 @@
+# sidplay2
+
+SID_VERSION := 2.1.1
+SID_URL := $(SF)/sidplay2/sidplay2/sidplay-libs-$(SID_VERSION)/sidplay-libs-$(SID_VERSION).tar.gz
+
+PKGS += sidplay2
+
+$(TARBALLS)/sidplay-libs-$(SID_VERSION).tar.gz:
+ $(call download,$(SID_URL))
+
+.sum-sidplay2: sidplay-libs-$(SID_VERSION).tar.gz
+
+sidplay-libs: sidplay-libs-$(SID_VERSION).tar.gz .sum-sidplay2
+ $(UNPACK)
+ $(APPLY) $(SRC)/sidplay2/sidplay2-openmode.patch
+ $(APPLY) $(SRC)/sidplay2/sidplay2-endian.patch
+ $(APPLY) $(SRC)/sidplay2/sidplay2-smartprt.patch
+ $(APPLY) $(SRC)/sidplay2/sidplay2-noutils.patch
+ $(APPLY) $(SRC)/sidplay2/sidplay2-string.patch
+ $(MOVE)
+
+.sidplay2: sidplay-libs
+ $(RECONF)
+ cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
+ cd $< && $(MAKE) install
+ cp -- $(PREFIX)/lib/sidplay/builders/* "$(PREFIX)/lib/"
+ touch $@
diff --git a/contrib/src/sidplay2/sidplay2-endian.patch b/contrib/src/sidplay2/sidplay2-endian.patch
new file mode 100644
index 0000000..f24db0c
--- /dev/null
+++ b/contrib/src/sidplay2/sidplay2-endian.patch
@@ -0,0 +1,60 @@
+--- 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);
diff --git a/contrib/src/sidplay2/sidplay2-noutils.patch b/contrib/src/sidplay2/sidplay2-noutils.patch
new file mode 100644
index 0000000..0917b50
--- /dev/null
+++ b/contrib/src/sidplay2/sidplay2-noutils.patch
@@ -0,0 +1,11 @@
+--- sidplay-2.1.1/Makefile.am 2002-12-23 21:21:03.000000000 +0100
++++ sidplay-2.1.1.new/Makefile.am 2011-01-15 16:50:45.517649286 +0100
+@@ -1,7 +1,7 @@
+
+ AUTOMAKE_OPTIONS = foreign
+
+-SUBDIRS = libsidplay libsidutils resid builders
++SUBDIRS = libsidplay resid builders
+
+ # Remove CVS directories from any subdirs that get
+ # included completely (e.g. win, directx,...).
diff --git a/contrib/src/sidplay2/sidplay2-openmode.patch b/contrib/src/sidplay2/sidplay2-openmode.patch
new file mode 100644
index 0000000..80a8e27
--- /dev/null
+++ b/contrib/src/sidplay2/sidplay2-openmode.patch
@@ -0,0 +1,40 @@
+--- 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
diff --git a/contrib/src/sidplay2/sidplay2-smartprt.patch b/contrib/src/sidplay2/sidplay2-smartprt.patch
new file mode 100644
index 0000000..19a9e62
--- /dev/null
+++ b/contrib/src/sidplay2/sidplay2-smartprt.patch
@@ -0,0 +1,26 @@
+--- 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;
+ }
+ }
+ };
diff --git a/contrib/src/sidplay2/sidplay2-string.patch b/contrib/src/sidplay2/sidplay2-string.patch
new file mode 100644
index 0000000..7bcf6d2
--- /dev/null
+++ b/contrib/src/sidplay2/sidplay2-string.patch
@@ -0,0 +1,35 @@
+diff -ruN sidplay-2.1.1/builders/resid-builder/src/resid-builder.cpp sidplay-2.1.1.new/builders/resid-builder/src/resid-builder.cpp
+--- sidplay-2.1.1/builders/resid-builder/src/resid-builder.cpp 2004-06-14 22:07:58.000000000 +0200
++++ sidplay-2.1.1.new/builders/resid-builder/src/resid-builder.cpp 2011-01-15 16:49:24.909660710 +0100
+@@ -46,6 +46,8 @@
+ #include "resid.h"
+ #include "resid-emu.h"
+
++#include <string.h>
++
+ // Error String(s)
+ const char *ReSIDBuilder::ERR_FILTER_DEFINITION = "RESID ERROR: Filter definition is not valid (see docs).";
+
+Les fichiers binaires sidplay-2.1.1/builders/resid-builder/src/resid-builder.o et sidplay-2.1.1.new/builders/resid-builder/src/resid-builder.o sont différents.
+diff -ruN sidplay-2.1.1/builders/resid-builder/src/resid.cpp sidplay-2.1.1.new/builders/resid-builder/src/resid.cpp
+--- sidplay-2.1.1/builders/resid-builder/src/resid.cpp 2004-06-14 22:07:58.000000000 +0200
++++ sidplay-2.1.1.new/builders/resid-builder/src/resid.cpp 2011-01-15 16:49:05.441652832 +0100
+@@ -25,6 +25,7 @@
+ #include "resid.h"
+ #include "resid-emu.h"
+
++#include <string.h>
+
+ char ReSID::m_credit[];
+
+diff -ru sidplay-libs.orig//builders/hardsid-builder/src/hardsid-builder.cpp sidplay-libs/builders/hardsid-builder/src/hardsid-builder.cpp
+--- sidplay-libs.orig//builders/hardsid-builder/src/hardsid-builder.cpp 2011-07-04 23:51:26.000000000 +0300
++++ sidplay-libs/builders/hardsid-builder/src/hardsid-builder.cpp 2011-07-04 23:51:47.000000000 +0300
+@@ -47,6 +47,7 @@
+ ***************************************************************************/
+
+ #include <stdio.h>
++#include <string.h>
+ #include "config.h"
+
+ #ifdef HAVE_EXCEPTIONS
More information about the vlc-commits
mailing list