Hello community, here is the log from the commit of package libgme for openSUSE:Factory checked in at 2017-06-12 15:27:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgme (Old) and /work/SRC/openSUSE:Factory/.libgme.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgme" Mon Jun 12 15:27:01 2017 rev:15 rq:502823 version:0.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libgme/libgme.changes 2017-01-24 10:27:09.995448903 +0100 +++ /work/SRC/openSUSE:Factory/.libgme.new/libgme.changes 2017-06-12 15:27:02.957911004 +0200 @@ -1,0 +2,10 @@ +Sat Jun 10 18:19:33 UTC 2017 - [email protected] + +- Update to 0.6.1: + * "libgme-0.6.0-pkgconfig_path.patch" and "cve-2016-9957.patch" + got fixed upstream + * Following functions added to API: + - gme_tell_samples(); + - gme_seek_samples(); + +------------------------------------------------------------------- Old: ---- cve-2016-9957.patch game-music-emu-0.6.0.tar.bz2 libgme-0.6.0-pkgconfig_path.patch New: ---- game-music-emu-0.6.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgme.spec ++++++ --- /var/tmp/diff_new_pack.rpnpNy/_old 2017-06-12 15:27:03.701806031 +0200 +++ /var/tmp/diff_new_pack.rpnpNy/_new 2017-06-12 15:27:03.705805467 +0200 @@ -1,7 +1,7 @@ # # spec file for package libgme # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define soname 0 Name: libgme -Version: 0.6.0 +Version: 0.6.1 Release: 0 Summary: Collection of video game music file emulators License: LGPL-2.1+ @@ -26,9 +26,6 @@ Url: https://bitbucket.org/mpyne/game-music-emu/wiki/Home Source0: https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-%{version}.tar.bz2 Source1: baselibs.conf -# PATCH-FIX-UPSTREAM libgme-0.6.0-pkgconfig_path.patch http://code.google.com/p/game-music-emu/issues/detail?id=19 [email protected] -- Fix .pc installation path -Patch0: libgme-0.6.0-pkgconfig_path.patch -Patch1: cve-2016-9957.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkg-config @@ -75,8 +72,6 @@ %prep %setup -q -n game-music-emu-%{version} -%patch0 -%patch1 -p1 sed -i 's/\r$//' changes.txt design.txt gme.txt license.txt readme.txt %build ++++++ game-music-emu-0.6.0.tar.bz2 -> game-music-emu-0.6.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/CMakeLists.txt new/game-music-emu-0.6.1/CMakeLists.txt --- old/game-music-emu-0.6.0/CMakeLists.txt 2013-03-17 03:13:46.000000000 +0100 +++ new/game-music-emu-0.6.1/CMakeLists.txt 2016-12-15 02:23:52.000000000 +0100 @@ -4,7 +4,7 @@ include (CheckCXXCompilerFlag) # When version is changed, also change the one in gme/gme.h to match -set(GME_VERSION 0.6.0 CACHE INTERNAL "libgme Version") +set(GME_VERSION 0.6.1 CACHE INTERNAL "libgme Version") # 2.6+ always assumes FATAL_ERROR, but 2.4 and below don't. # Of course, 2.4 might work, in which case you're welcome to drop @@ -57,6 +57,8 @@ SET(USE_GME_NSF 1 CACHE BOOL "Enable NES NSF music emulation" FORCE) endif() +option(BUILD_SHARED_LIBS "Build shared library (set to OFF for static library)" ON) + # Check for GCC "visibility" support. if (CMAKE_COMPILER_IS_GNUCXX) check_cxx_compiler_flag (-fvisibility=hidden __LIBGME_TEST_VISIBILITY) @@ -79,10 +81,10 @@ endif() endif() endif() # test visibility -endif (CMAKE_COMPILER_IS_GNUCXX) -# Cache this result -set( LIBGME_HAVE_GCC_VISIBILITY ${ENABLE_VISIBILITY} CACHE BOOL "GCC support for hidden visibility") + # Cache this result + set( LIBGME_HAVE_GCC_VISIBILITY ${ENABLE_VISIBILITY} CACHE BOOL "GCC support for hidden visibility") +endif (CMAKE_COMPILER_IS_GNUCXX) # Shared library defined here add_subdirectory(gme) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/changes.txt new/game-music-emu-0.6.1/changes.txt --- old/game-music-emu-0.6.0/changes.txt 2013-03-17 03:02:38.000000000 +0100 +++ new/game-music-emu-0.6.1/changes.txt 2016-12-15 02:23:52.000000000 +0100 @@ -1,6 +1,18 @@ Game_Music_Emu Change Log ------------------------- +Game_Music_Emu 0.6.1 +-------------------- + +- Moved repository to Bitbucket since Google Code announced they would + shutdown this year. + +- Packaging improvements: + - Honor $LIB_SUFFIX for installed pkg-config metadata. + - Support setting BUILD_SHARED_LIBS to OFF to build libgme as a static + library. (Pass -DBUILD_SHARED_LIBS=OFF when running cmake). + Thanks to lachs0r. + Game_Music_Emu 0.6.0 -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/demo/basics.c new/game-music-emu-0.6.1/demo/basics.c --- old/game-music-emu-0.6.0/demo/basics.c 2008-12-21 01:14:46.000000000 +0100 +++ new/game-music-emu-0.6.1/demo/basics.c 2016-12-15 02:23:52.000000000 +0100 @@ -1,7 +1,5 @@ /* C example that opens a game music file and records 10 seconds to "out.wav" */ -static char filename [] = "test.nsf"; /* opens this file (can be any music type) */ - #include "gme/gme.h" #include "Wave_Writer.h" /* wave_ functions for writing sound file */ @@ -10,10 +8,15 @@ void handle_error( const char* str ); -int main() +int main(int argc, char *argv[]) { + const char *filename = "test.nsf"; /* Default file to open */ + if ( argc >= 2 ) + filename = argv[1]; + long sample_rate = 44100; /* number of samples per second */ - int track = 0; /* index of track to play (0 = first) */ + /* index of track to play (0 = first) */ + int track = argc >= 3 ? atoi(argv[2]) : 0; /* Open music file in new emulator */ Music_Emu* emu; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/demo/cpp_basics.cpp new/game-music-emu-0.6.1/demo/cpp_basics.cpp --- old/game-music-emu-0.6.0/demo/cpp_basics.cpp 2008-12-21 01:14:46.000000000 +0100 +++ new/game-music-emu-0.6.1/demo/cpp_basics.cpp 2016-12-15 02:23:52.000000000 +0100 @@ -1,7 +1,5 @@ // C++ example that opens a game music file and records 10 seconds to "out.wav" -static char filename [] = "test.nsf"; /* opens this file (can be any music type) */ - #include "gme/Music_Emu.h" #include "Wave_Writer.h" @@ -10,10 +8,15 @@ void handle_error( const char* str ); -int main() +int main(int argc, char *argv[]) { + const char *filename = "test.nsf"; /* Default file to open */ + if ( argc >= 2 ) + filename = argv[1]; + long sample_rate = 44100; // number of samples per second - int track = 0; // index of track to play (0 = first) + // index of track to play (0 = first) + int track = argc >= 3 ? atoi(argv[2]) : 0; // Determine file type gme_type_t file_type; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/CMakeLists.txt new/game-music-emu-0.6.1/gme/CMakeLists.txt --- old/game-music-emu-0.6.0/gme/CMakeLists.txt 2012-05-27 22:48:53.000000000 +0200 +++ new/game-music-emu-0.6.1/gme/CMakeLists.txt 2016-12-15 02:23:52.000000000 +0100 @@ -143,7 +143,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) # Add library to be compiled. -add_library(gme SHARED ${libgme_SRCS}) +add_library(gme ${libgme_SRCS}) # The version is the release. The "soversion" is the API version. As long # as only build fixes are performed (i.e. no backwards-incompatible changes @@ -159,4 +159,4 @@ ARCHIVE DESTINATION lib) # DLL platforms install(FILES ${EXPORTED_HEADERS} DESTINATION include/gme) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgme.pc DESTINATION lib/pkgconfig) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgme.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/Data_Reader.h new/game-music-emu-0.6.1/gme/Data_Reader.h --- old/game-music-emu-0.6.0/gme/Data_Reader.h 2009-01-04 15:07:29.000000000 +0100 +++ new/game-music-emu-0.6.1/gme/Data_Reader.h 2016-12-15 02:23:52.000000000 +0100 @@ -129,6 +129,8 @@ }; #ifdef HAVE_ZLIB_H +#include <zlib.h> + // Gzip compressed file reader class Gzip_File_Reader : public File_Reader { public: @@ -143,7 +145,7 @@ long tell() const; blargg_err_t seek( long ); private: - void* file_; + gzFile file_; long size_; }; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/Music_Emu.cpp new/game-music-emu-0.6.1/gme/Music_Emu.cpp --- old/game-music-emu-0.6.0/gme/Music_Emu.cpp 2013-03-17 02:38:55.000000000 +0100 +++ new/game-music-emu-0.6.1/gme/Music_Emu.cpp 2016-12-15 02:23:52.000000000 +0100 @@ -178,6 +178,11 @@ return (sec * sample_rate() + msec * sample_rate() / 1000) * stereo; } +long Music_Emu::tell_samples() const +{ + return out_time; +} + long Music_Emu::tell() const { blargg_long rate = sample_rate() * stereo; @@ -185,14 +190,18 @@ return sec * 1000 + (out_time - sec * rate) * 1000 / rate; } -blargg_err_t Music_Emu::seek( long msec ) +blargg_err_t Music_Emu::seek_samples( long time ) { - blargg_long time = msec_to_samples( msec ); if ( time < out_time ) RETURN_ERR( start_track( current_track_ ) ); return skip( time - out_time ); } +blargg_err_t Music_Emu::seek( long msec ) +{ + return seek_samples( msec_to_samples( msec ) ); +} + blargg_err_t Music_Emu::skip( long count ) { require( current_track() >= 0 ); // start_track() must have been called already diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/Music_Emu.h new/game-music-emu-0.6.1/gme/Music_Emu.h --- old/game-music-emu-0.6.0/gme/Music_Emu.h 2013-03-17 02:38:55.000000000 +0100 +++ new/game-music-emu-0.6.1/gme/Music_Emu.h 2016-12-15 02:23:52.000000000 +0100 @@ -41,9 +41,15 @@ // Number of milliseconds (1000 msec = 1 second) played since beginning of track long tell() const; + // Number of samples generated since beginning of track + long tell_samples() const; + // Seek to new time in track. Seeking backwards or far forward can take a while. blargg_err_t seek( long msec ); + // Equivalent to restarting track then skipping n samples + blargg_err_t seek_samples( long n ); + // Skip n samples blargg_err_t skip( long n ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/Spc_Cpu.cpp new/game-music-emu-0.6.1/gme/Spc_Cpu.cpp --- old/game-music-emu-0.6.0/gme/Spc_Cpu.cpp 2013-03-17 02:38:55.000000000 +0100 +++ new/game-music-emu-0.6.1/gme/Spc_Cpu.cpp 2016-12-15 02:23:52.000000000 +0100 @@ -433,9 +433,7 @@ #endif // Registers other than $F2 and $F4-$F7 - //if ( reg != 2 && reg != 4 && reg != 5 && reg != 6 && reg != 7 ) - // TODO: this is a bit on the fragile side - if ( ((~0x2F00 << (bits_in_int - 16)) << reg) < 0 ) // 36% + if ( reg != 2 && (reg < 4 || reg > 7) ) // 36% cpu_write_smp_reg( data, time, reg ); } // High mem/address wrap-around diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/Spc_Cpu.h new/game-music-emu-0.6.1/gme/Spc_Cpu.h --- old/game-music-emu-0.6.0/gme/Spc_Cpu.h 2013-03-17 02:38:55.000000000 +0100 +++ new/game-music-emu-0.6.1/gme/Spc_Cpu.h 2016-12-15 02:23:52.000000000 +0100 @@ -76,8 +76,8 @@ // TODO: remove non-wrapping versions? #define SPC_NO_SP_WRAPAROUND 0 -#define SET_SP( v ) (sp = ram + 0x101 + (v)) -#define GET_SP() (sp - 0x101 - ram) +#define SET_SP( v ) (sp = ram + 0x101 + ((uint8_t) v)) +#define GET_SP() (uint8_t (sp - 0x101 - ram)) #if SPC_NO_SP_WRAPAROUND #define PUSH16( v ) (sp -= 2, SET_LE16( sp, v )) @@ -485,7 +485,7 @@ case 0xAF: // MOV (X)+,A WRITE_DP( 0, x, a + no_read_before_write ); - x++; + x = (uint8_t) (x + 1); goto loop; // 5. 8-BIT LOGIC OPERATION COMMANDS @@ -808,7 +808,7 @@ unsigned temp = y * a; a = (uint8_t) temp; nz = ((temp >> 1) | temp) & 0x7F; - y = temp >> 8; + y = (uint8_t) (temp >> 8); nz |= y; goto loop; } @@ -838,6 +838,7 @@ nz = (uint8_t) a; a = (uint8_t) a; + y = (uint8_t) y; goto loop; } @@ -1004,7 +1005,7 @@ case 0x7F: // RET1 temp = *sp; SET_PC( GET_LE16( sp + 1 ) ); - sp += 3; + SET_SP( GET_SP() + 3 ); goto set_psw; case 0x8E: // POP PSW POP( temp ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/gme.cpp new/game-music-emu-0.6.1/gme/gme.cpp --- old/game-music-emu-0.6.0/gme/gme.cpp 2013-03-17 02:38:55.000000000 +0100 +++ new/game-music-emu-0.6.1/gme/gme.cpp 2016-12-15 02:23:52.000000000 +0100 @@ -337,7 +337,9 @@ BLARGG_EXPORT void gme_set_fade ( Music_Emu* me, int start_msec ) { me->set_fade( start_msec ); } BLARGG_EXPORT int gme_track_ended ( Music_Emu const* me ) { return me->track_ended(); } BLARGG_EXPORT int gme_tell ( Music_Emu const* me ) { return me->tell(); } +BLARGG_EXPORT int gme_tell_samples ( Music_Emu const* me ) { return me->tell_samples(); } BLARGG_EXPORT gme_err_t gme_seek ( Music_Emu* me, int msec ) { return me->seek( msec ); } +BLARGG_EXPORT gme_err_t gme_seek_samples ( Music_Emu* me, int n ) { return me->seek_samples( n ); } BLARGG_EXPORT int gme_voice_count ( Music_Emu const* me ) { return me->voice_count(); } BLARGG_EXPORT void gme_ignore_silence ( Music_Emu* me, int disable ) { me->ignore_silence( disable != 0 ); } BLARGG_EXPORT void gme_set_tempo ( Music_Emu* me, double t ) { me->set_tempo( t ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/gme.h new/game-music-emu-0.6.1/gme/gme.h --- old/game-music-emu-0.6.0/gme/gme.h 2013-03-17 03:13:46.000000000 +0100 +++ new/game-music-emu-0.6.1/gme/gme.h 2016-12-15 02:23:52.000000000 +0100 @@ -1,6 +1,6 @@ /* Game music emulator library C interface (also usable from C++) */ -/* Game_Music_Emu 0.6.0 */ +/* Game_Music_Emu 0.6.1 */ #ifndef GME_H #define GME_H @@ -8,7 +8,7 @@ extern "C" { #endif -#define GME_VERSION 0x000600 /* 1 byte major, 1 byte minor, 1 byte patch-level */ +#define GME_VERSION 0x000601 /* 1 byte major, 1 byte minor, 1 byte patch-level */ /* Error string returned by library functions, or NULL if no error (success) */ typedef const char* gme_err_t; @@ -47,9 +47,15 @@ /* Number of milliseconds (1000 = one second) played since beginning of track */ int gme_tell( Music_Emu const* ); +/* Number of samples generated since beginning of track */ +int gme_tell_samples( Music_Emu const* ); + /* Seek to new time in track. Seeking backwards or far forward can take a while. */ gme_err_t gme_seek( Music_Emu*, int msec ); +/* Equivalent to restarting track then skipping n samples */ +gme_err_t gme_seek_samples( Music_Emu*, int n ); + /******** Informational ********/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme/libgme.pc.in new/game-music-emu-0.6.1/gme/libgme.pc.in --- old/game-music-emu-0.6.0/gme/libgme.pc.in 2009-08-06 03:48:17.000000000 +0200 +++ new/game-music-emu-0.6.1/gme/libgme.pc.in 2016-12-15 02:23:52.000000000 +0100 @@ -3,7 +3,7 @@ # later are used by pkg-config. prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} -lib_suffix= +lib_suffix=@LIB_SUFFIX@ libdir=${exec_prefix}/lib${lib_suffix} includedir=${prefix}/include @@ -13,3 +13,4 @@ Version: @GME_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lgme +Libs.private: -lstdc++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/gme.txt new/game-music-emu-0.6.1/gme.txt --- old/game-music-emu-0.6.0/gme.txt 2013-03-17 03:02:38.000000000 +0100 +++ new/game-music-emu-0.6.1/gme.txt 2016-12-15 02:23:52.000000000 +0100 @@ -1,10 +1,11 @@ -Game_Music_Emu 0.6.0 +Game_Music_Emu 0.6.1 -------------------- -Author : Shay Green <[email protected]> -Website: http://www.slack.net/~ant/libs/ -Forum : http://groups.google.com/group/blargg-sound-libs -Source : https://code.google.com/p/game-music-emu/ -License: GNU Lesser General Public License (LGPL) +Author : Shay Green <[email protected]> +Maintainer : Michael Pyne <[email protected]> +Website : http://www.slack.net/~ant/libs/ +Forum : http://groups.google.com/group/blargg-sound-libs +Source : https://bitbucket.org/mpyne/game-music-emu/ +License : GNU Lesser General Public License (LGPL), see LICENSE.txt Contents -------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/game-music-emu-0.6.0/readme.txt new/game-music-emu-0.6.1/readme.txt --- old/game-music-emu-0.6.0/readme.txt 2013-03-17 03:02:38.000000000 +0100 +++ new/game-music-emu-0.6.1/readme.txt 2016-12-15 02:23:52.000000000 +0100 @@ -1,4 +1,4 @@ -Game_Music_Emu 0.6.0: Game Music Emulators +Game_Music_Emu 0.6.1: Game Music Emulators ------------------------------------------ Game_Music_Emu is a collection of video game music file emulators that support the following formats and systems: @@ -38,26 +38,42 @@ Forum : http://groups.google.com/group/blargg-sound-libs License: GNU Lesser General Public License (LGPL) +Current Maintainer: Michael Pyne <[email protected]> Getting Started --------------- Build a program consisting of demo/basics.c, demo/Wave_Writer.cpp, and -all source files in gme/. If you have CMake 2.6 or later, execute +all source files in gme/. - run cmake - cd demo - run make +Or, if you have CMake 2.6 or later, execute at a command prompt (from the +extracted source directory): -Be sure "test.nsf" is in the same directory as the program. Running it + mkdir build + cd build + cmake ../ # <-- Pass any needed CMake flags here + make # To build the library + cd demo + make # To build the demo itself + +Be sure "test.nsf" is in the same directory as the demo program. Running it should generate the recording "out.wav". +You can use "make install" to install the library. To choose where to install +the library to, use the CMake argument "-DCMAKE_INSTALL_PREFIX=/usr/local" +(and replace /usr/local with the base path you wish to use). Alternately, you +can specify the base path to install to when you run "make install" by passing +'DESTDIR=/usr/local' on the make install command line (again, replace +/usr/local as appropriate). + +To build a static library instead of shared (the default), pass +-DBUILD_SHARED_LIBS=OFF to the cmake command when running cmake. + A slightly more extensive demo application is available in the player/ directory. It requires SDL to build. Read gme.txt for more information. Post to the discussion forum for assistance. - Files ----- gme.txt General notes about the library
