packages: libsidplay2/libsidplay2.spec, libsidplay2/configure-fixes.patch (...

wiget wiget at pld-linux.org
Thu Feb 16 21:39:58 CET 2012


Author: wiget                        Date: Thu Feb 16 20:39:58 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- update debian patches (from sid 2.1.1-12)
- build shared builders
- drop libtool files
- rel. 5

---- Files affected:
packages/libsidplay2:
   libsidplay2.spec (1.11 -> 1.12) , configure-fixes.patch (NONE -> 1.1)  (NEW), gcc4-fixes.patch (NONE -> 1.1)  (NEW), pkg-config.patch (NONE -> 1.1)  (NEW), libsidplay2-debian_fixes.patch (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/libsidplay2/libsidplay2.spec
diff -u packages/libsidplay2/libsidplay2.spec:1.11 packages/libsidplay2/libsidplay2.spec:1.12
--- packages/libsidplay2/libsidplay2.spec:1.11	Sat Feb 19 04:35:37 2011
+++ packages/libsidplay2/libsidplay2.spec	Thu Feb 16 21:39:53 2012
@@ -2,26 +2,26 @@
 #
 # TODO:
 # - fix symlinks to libraries
-# - split out resid/hardsid builders as external specs, or find other hacks that will allow building of them(they requries libsidplay2 lib, so its recursive dependency). Lack of them is probably cause of MPD refusing to build with c64's SID support.
-# - replace skip_post_check_so with nicer solution
-
+#
 Summary:	A Commodore 64 music player and SID chip emulator library
 Summary(pl.UTF-8):	Biblioteka odtwarzająca muzyczki z Commodore 64 i emulująca układ SID
 Name:		libsidplay2
 Version:	2.1.1
-Release:	4
+Release:	5
 License:	GPL
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/sidplay2/sidplay-libs-%{version}.tar.gz
 # Source0-md5:	7ea0ba5dc1da4604d15eaae001f7d2a7
-Patch0:		%{name}-debian_fixes.patch
+Patch0:		gcc4-fixes.patch
+Patch1:		configure-fixes.patch
+Patch2:		pkg-config.patch
 URL:		http://sidplay2.sourceforge.net/
+BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	libstdc++-devel
+BuildRequires:	libtool
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		skip_post_check_so libsidplay2.so.1.0.1 libsidutils.so.0.0.4
-
 %description
 Sidplay 2 is the second in the Sidplay series originally developed by
 Michael Schwendt. This version is written by Simon White and is cycle
@@ -65,13 +65,47 @@
 %prep
 %setup -q -n sidplay-libs-%{version}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
-cp -f /usr/share/automake/config.* unix
-cp -f /usr/share/automake/config.* libsidplay/unix
-cp -f /usr/share/automake/config.* libsidutils/unix
-cp -f /usr/share/automake/config.* resid
-%configure
+cd libsidplay
+%{__libtoolize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
+cd ../libsidutils
+%{__libtoolize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
+cd ../resid
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+cd ../builders/hardsid-builder
+%{__libtoolize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
+cd ../resid-builder
+%{__libtoolize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
+cd ../..
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure \
+	--enable-shared \
+	--enable-static
 %{__make}
 
 %install
@@ -80,6 +114,8 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -93,15 +129,17 @@
 %attr(755,root,root) %{_libdir}/libsidplay2.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libsidutils.so.0
 %attr(755,root,root) %{_libdir}/libsidutils.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhardsid-builder.so.0
+%attr(755,root,root) %{_libdir}/libhardsid-builder.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libresid-builder.so.0
+%attr(755,root,root) %{_libdir}/libresid-builder.so.*.*.*
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libsidplay2.so
 %attr(755,root,root) %{_libdir}/libsidutils.so
-%{_libdir}/libhardsid-builder.la
-%{_libdir}/libresid-builder.la
-%{_libdir}/libsidplay2.la
-%{_libdir}/libsidutils.la
+%attr(755,root,root) %{_libdir}/libhardsid-builder.so
+%attr(755,root,root) %{_libdir}/libresid-builder.so
 %{_includedir}/sidplay
 %{_pkgconfigdir}/libsidplay2.pc
 %{_pkgconfigdir}/libsidutils.pc
@@ -119,6 +157,12 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.12  2012/02/16 20:39:53  wiget
+- update debian patches (from sid 2.1.1-12)
+- build shared builders
+- drop libtool files
+- rel. 5
+
 Revision 1.11  2011/02/19 03:35:37  evil
 - replaced gcc41 by debian_fixes patch (which works)
 - adapterized

================================================================
Index: packages/libsidplay2/configure-fixes.patch
diff -u /dev/null packages/libsidplay2/configure-fixes.patch:1.1
--- /dev/null	Thu Feb 16 21:39:59 2012
+++ packages/libsidplay2/configure-fixes.patch	Thu Feb 16 21:39:53 2012
@@ -0,0 +1,53 @@
+--- sidplay-libs-2.1.1.orig/configure.ac
++++ sidplay-libs-2.1.1/configure.ac
+@@ -2,7 +2,7 @@ AC_INIT(Makefile.am)
+ 
+ #Variables
+ pwd=`pwd`
+-builders='${libdir}'/sidplay/builders
++builders='${libdir}'/
+ ac_configure_args="$ac_configure_args --disable-library-checks"
+ 
+ AC_CONFIG_AUX_DIR(unix)
+--- sidplay-libs-2.1.1.orig/libsidplay/configure.ac
++++ sidplay-libs-2.1.1/libsidplay/configure.ac
+@@ -5,6 +5,9 @@ m4_define([LIBAGE],0)
+ 
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(libsidplay,2.LIBCUR.LIBREV)
++m4_include([unix/ac_compile_check_sizeof.m4])
++m4_include([unix/ac_create_stdint_h.m4])
++m4_include([unix/my_macros.m4])
+ AC_CONFIG_HEADER(unix/config.h)
+ AC_CONFIG_SRCDIR(Makefile.am)
+ AC_CONFIG_AUX_DIR(unix)
+--- sidplay-libs-2.1.1/libsidutils/configure.ac.orig	2012-02-07 21:02:19.144288211 +0100
++++ sidplay-libs-2.1.1/libsidutils/configure.ac	2012-02-07 21:02:49.452289775 +0100
+@@ -1,5 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(Makefile.am)
++m4_include([unix/my_macros.m4])
++m4_include([unix/sidplay2.m4])
+ AC_CONFIG_AUX_DIR(unix)
+ AM_CONFIG_HEADER(unix/config.h)
+ 
+--- sidplay-libs-2.1.1/builders/hardsid-builder/configure.ac.orig	2012-02-07 20:53:45.060261696 +0100
++++ sidplay-libs-2.1.1/builders/hardsid-builder/configure.ac	2012-02-07 20:54:13.956263188 +0100
+@@ -1,5 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(Makefile.am)
++m4_include([unix/my_macros.m4])
++m4_include([unix/sidplay2.m4])
+ AC_CONFIG_AUX_DIR(unix)
+ AM_CONFIG_HEADER(unix/config.h)
+ 
+--- sidplay-libs-2.1.1/builders/resid-builder/configure.ac.orig	2012-02-07 20:29:06.764185453 +0100
++++ sidplay-libs-2.1.1/builders/resid-builder/configure.ac	2012-02-07 20:29:36.188186968 +0100
+@@ -1,5 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(Makefile.am)
++m4_include([unix/my_macros.m4])
++m4_include([unix/sidplay2.m4])
+ AC_CONFIG_AUX_DIR(unix)
+ AM_CONFIG_HEADER(unix/config.h)
+ 

================================================================
Index: packages/libsidplay2/gcc4-fixes.patch
diff -u /dev/null packages/libsidplay2/gcc4-fixes.patch:1.1
--- /dev/null	Thu Feb 16 21:39:59 2012
+++ packages/libsidplay2/gcc4-fixes.patch	Thu Feb 16 21:39:53 2012
@@ -0,0 +1,180 @@
+--- sidplay-libs-2.1.1.orig/libsidplay/unix/my_macros.m4
++++ sidplay-libs-2.1.1/libsidplay/unix/my_macros.m4
+@@ -105,8 +105,9 @@ AC_DEFUN([MY_CHECK_IOS_OPENMODE],
+     AC_CACHE_VAL(test_cv_have_ios_openmode,
+     [
+         AC_TRY_COMPILE(
+-            [#include <fstream.h>
+-             #include <iomanip.h>],
++            [#include <fstream>
++             #include <iomanip>
++	     using namespace std;],
+             [ios::openmode myTest = ios::in;],
+             [test_cv_have_ios_openmode=yes],
+             [test_cv_have_ios_openmode=no]
+--- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/SmartPtr.h
++++ sidplay-libs-2.1.1/libsidplay/include/sidplay/SmartPtr.h
+@@ -17,16 +17,16 @@ class SmartPtrBase_sidtt
+ 		doFree = bufOwner;
+ 		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;
+ 		}
+ 	}
+ 	
+@@ -211,16 +211,16 @@ class SmartPtr_sidtt : public SmartPtrBa
+ 	{
+ 		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;
+ 		}
+ 	}
+ };
+--- 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$
+  *  Revision 1.1  2012/02/16 20:39:53  wiget
+  *  - update debian patches (from sid 2.1.1-12)
+  *  - build shared builders
+  *  - drop libtool files
+  *  - rel. 5
+  *
++ *  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 @@ inline void endian_16swap8 (uint_least16
+ // 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;
+@@ -165,7 +169,7 @@ inline void endian_16 (uint8_t ptr[2], u
+ 
+ inline void endian_16 (char ptr[2], uint_least16_t word)
+ {
+-	endian_16 ((uint8_t *) ptr, word);
++    endian_16 ((uint8_t *) ptr, word);
+ }
+ 
+ // Convert high-byte and low-byte to 16-bit little endian word.
+@@ -334,7 +338,7 @@ inline void endian_32swap16 (uint_least3
+ // 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 @@ inline void endian_32swap8 (uint_least32
+ // 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 @@ inline void endian_little32 (uint8_t ptr
+     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 @@ inline void endian_big32 (uint8_t ptr[4]
+     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.orig/libsidutils/include/sidplay/utils/SidUsage.h
++++ sidplay-libs-2.1.1/libsidutils/include/sidplay/utils/SidUsage.h
+@@ -33,7 +33,7 @@ struct sid2_usage_t: public sid_usage_t
+     uint_least16_t length;  // usage scan length
+ 
+     // Copy common parts of basic usage to extended usage.
+-    sid2_usage_t &sid2_usage_t::operator= (const sid_usage_t &usage)
++    sid2_usage_t &operator= (const sid_usage_t &usage)
+     {
+         *((sid_usage_t *) this) = usage;
+         return *this;
+--- sidplay-libs-2.1.1.orig/builders/resid-builder/src/resid-builder.cpp
++++ sidplay-libs-2.1.1/builders/resid-builder/src/resid-builder.cpp
+@@ -37,6 +37,7 @@
+  ***************************************************************************/
+ 
+ #include <stdio.h>
++#include <cstring>
+ 
+ #include "config.h"
+ #ifdef HAVE_EXCEPTIONS
+--- sidplay-libs-2.1.1.orig/builders/resid-builder/src/resid.cpp
++++ sidplay-libs-2.1.1/builders/resid-builder/src/resid.cpp
+@@ -16,6 +16,7 @@
+  *                                                                         *
+  ***************************************************************************/
+ 
++#include <cstring>
+ #include "config.h"
+ 
+ #ifdef HAVE_EXCEPTIONS
+--- sidplay-libs-2.1.1.orig/builders/hardsid-builder/src/hardsid-builder.cpp
++++ sidplay-libs-2.1.1/builders/hardsid-builder/src/hardsid-builder.cpp
+@@ -47,6 +47,7 @@
+  ***************************************************************************/
+ 
+ #include <stdio.h>
++#include <cstring>
+ #include "config.h"
+ 
+ #ifdef HAVE_EXCEPTIONS

================================================================
Index: packages/libsidplay2/pkg-config.patch
diff -u /dev/null packages/libsidplay2/pkg-config.patch:1.1
--- /dev/null	Thu Feb 16 21:39:59 2012
+++ packages/libsidplay2/pkg-config.patch	Thu Feb 16 21:39:53 2012
@@ -0,0 +1,18 @@
+--- sidplay-libs-2.1.1.orig/libsidplay/unix/libsidplay2.pc.in
++++ sidplay-libs-2.1.1/libsidplay/unix/libsidplay2.pc.in
+@@ -7,5 +7,5 @@ builders=@builders@
+ Name: @PACKAGE@
+ Description: C64 cycle exact stereo sidplayer library.
+ Version: @VERSION@
+-Libs: ${libdir}/libsidplay2.la
++Libs: -L${libdir} -lsidplay2
+ Cflags: -DHAVE_UNIX -I${includedir}
+--- sidplay-libs-2.1.1.orig/libsidutils/unix/libsidutils.pc.in
++++ sidplay-libs-2.1.1/libsidutils/unix/libsidutils.pc.in
+@@ -6,5 +6,5 @@ includedir=@includedir@
+ Name: @PACKAGE@
+ Description: Utils for supporting the libsidplay2 library.
+ Version: @VERSION@
+-Libs: ${libdir}/libsidutils.la
++Libs: -L${libdir} -lsidutils
+ Cflags: -DHAVE_UNIX -I${includedir}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/libsidplay2/libsidplay2.spec?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list