From 4aba5cb326c37c94215887a2174beb00549a3531 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 15 Sep 2018 16:39:12 +1000 Subject: [PATCH] libspectrum: bump version --- .../libspectrum/libspectrum-1.1.1.recipe | 62 --------- .../libspectrum/libspectrum-1.4.4.recipe | 67 ++++++++++ .../patches/libspectrum-1.1.1.patchset | 123 ------------------ 3 files changed, 67 insertions(+), 185 deletions(-) delete mode 100644 app-emulation/libspectrum/libspectrum-1.1.1.recipe create mode 100644 app-emulation/libspectrum/libspectrum-1.4.4.recipe delete mode 100644 app-emulation/libspectrum/patches/libspectrum-1.1.1.patchset diff --git a/app-emulation/libspectrum/libspectrum-1.1.1.recipe b/app-emulation/libspectrum/libspectrum-1.1.1.recipe deleted file mode 100644 index 9e3ef9dde..000000000 --- a/app-emulation/libspectrum/libspectrum-1.1.1.recipe +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY="Emulator support library" -DESCRIPTION="Library designed to make the input and output of some ZX Spectrum \ -emulator files slightly easier. It is intended to be usable on Unix variants, \ -Win32 and Mac OS X. Currently, it is mainly (only?) used by Fuse, but other \ -Spectrum emulator and utility authors are encouraged to use it." -HOMEPAGE="http://fuse-emulator.sourceforge.net/libspectrum.php" -COPYRIGHT="2003-2013 Philip Kendall and libspectrum contributors" -LICENSE="GNU GPL v2" -REVISION="1" -SOURCE_URI="https://sourceforge.net/projects/fuse-emulator/files/libspectrum/1.1.1/libspectrum-1.1.1.tar.gz" -CHECKSUM_SHA256="178d3607af2109b6b8dafac4f91912745b9f3c087319945c3a886bb7fe7989d5" -PATCHES="libspectrum-$portVersion.patchset" - -ARCHITECTURES="x86_gcc2 x86_64" - -PROVIDES=" - libspectrum = $portVersion - lib:libspectrum = 8.1.0 compat >= 8 - " -REQUIRES=" - haiku - lib:libbz2 - lib:libgcrypt - lib:libz - " - -PROVIDES_devel=" - libspectrum_devel = $portVersion - devel:libspectrum = 8.1.0 compat >= 8 - " -REQUIRES_devel=" - libspectrum == $portVersion base - " - -BUILD_REQUIRES=" - haiku_devel - devel:libbz2 - devel:libgcrypt - devel:libz - " -BUILD_PREREQUIRES=" - cmd:awk - cmd:gcc - cmd:make - cmd:perl - cmd:pkg_config - " - -BUILD() -{ - runConfigure ./configure - make $jobArgs -} - -INSTALL() -{ - make install - - prepareInstalledDevelLib libspectrum - - packageEntries devel $developDir -} diff --git a/app-emulation/libspectrum/libspectrum-1.4.4.recipe b/app-emulation/libspectrum/libspectrum-1.4.4.recipe new file mode 100644 index 000000000..07d32cb4f --- /dev/null +++ b/app-emulation/libspectrum/libspectrum-1.4.4.recipe @@ -0,0 +1,67 @@ +SUMMARY="Emulator support library" +DESCRIPTION="Library designed to make the input and output of some ZX Spectrum \ +emulator files slightly easier. It is intended to be usable on Unix variants, \ +Win32 and Mac OS X. Currently, it is mainly (only?) used by Fuse, but other \ +Spectrum emulator and utility authors are encouraged to use it." +HOMEPAGE="http://fuse-emulator.sourceforge.net/libspectrum.php" +COPYRIGHT="2003-2018 Philip Kendall and libspectrum contributors" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://sourceforge.net/projects/fuse-emulator/files/libspectrum/$portVersion/libspectrum-$portVersion.tar.gz" +CHECKSUM_SHA256="fdfb2b2bad17bcfc98c098deaebf2a9811824b08d525172436d5eb134c9780b1" + +ARCHITECTURES="!x86_gcc2 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + libspectrum$secondaryArchSuffix = $portVersion + lib:libspectrum$secondaryArchSuffix = 8.8.14 compat >= 8 + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libaudiofile$secondaryArchSuffix + lib:libbz2$secondaryArchSuffix + lib:libgcrypt$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + libspectrum${secondaryArchSuffix}_devel = $portVersion + devel:libspectrum$secondaryArchSuffix = 8.8.14 compat >= 8 + " +REQUIRES_devel=" + libspectrum$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libaudiofile$secondaryArchSuffix + devel:libbz2$secondaryArchSuffix + devel:libgcrypt$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:perl + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install + rm $libDir/*.la + prepareInstalledDevelLib libspectrum + fixPkgconfig + packageEntries devel $developDir +} diff --git a/app-emulation/libspectrum/patches/libspectrum-1.1.1.patchset b/app-emulation/libspectrum/patches/libspectrum-1.1.1.patchset deleted file mode 100644 index 017bcc372..000000000 --- a/app-emulation/libspectrum/patches/libspectrum-1.1.1.patchset +++ /dev/null @@ -1,123 +0,0 @@ -From 3e80dac7bfb6f5c24a75eef84a787bf3204a00cf Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Tue, 12 May 2015 18:41:28 +0200 -Subject: C89 "declaration after statement" fixes. - - -diff --git a/pzx_read.c b/pzx_read.c -index 64ea969..cbdae60 100644 ---- a/pzx_read.c -+++ b/pzx_read.c -@@ -238,6 +238,15 @@ read_data_block( libspectrum_tape *tape, const libspectrum_byte **buffer, - libspectrum_byte *data; - - libspectrum_error error; -+ libspectrum_dword count; -+ int initial_level; -+ size_t count_bytes; -+ size_t bits_in_last_byte; -+ libspectrum_word tail; -+ libspectrum_byte p0_count; -+ libspectrum_byte p1_count; -+ libspectrum_word *p0_pulses; -+ libspectrum_word *p1_pulses; - - /* Check there's enough left in the buffer for all the metadata */ - if( data_length < 8 ) { -@@ -249,16 +258,16 @@ read_data_block( libspectrum_tape *tape, const libspectrum_byte **buffer, - } - - /* Get the metadata */ -- libspectrum_dword count = libspectrum_read_dword( buffer ); -- int initial_level = !!(count & 0x80000000); -+ count = libspectrum_read_dword( buffer ); -+ initial_level = !!(count & 0x80000000); - count &= 0x7fffffff; -- size_t count_bytes = ceil( count / (double)LIBSPECTRUM_BITS_IN_BYTE ); -- size_t bits_in_last_byte = -+ count_bytes = ceil( count / (double)LIBSPECTRUM_BITS_IN_BYTE ); -+ bits_in_last_byte = - count % LIBSPECTRUM_BITS_IN_BYTE ? - count % LIBSPECTRUM_BITS_IN_BYTE : LIBSPECTRUM_BITS_IN_BYTE; -- libspectrum_word tail = libspectrum_read_word( buffer ); -- libspectrum_byte p0_count = **buffer; (*buffer)++; -- libspectrum_byte p1_count = **buffer; (*buffer)++; -+ tail = libspectrum_read_word( buffer ); -+ p0_count = **buffer; (*buffer)++; -+ p1_count = **buffer; (*buffer)++; - - /* need to confirm that we have enough length left for the pulse definitions - */ -@@ -270,13 +279,11 @@ read_data_block( libspectrum_tape *tape, const libspectrum_byte **buffer, - return LIBSPECTRUM_ERROR_CORRUPT; - } - -- libspectrum_word *p0_pulses; - error = pzx_read_data( buffer, block_end, - p0_count * sizeof( libspectrum_word ), - (libspectrum_byte**)&p0_pulses ); - if( error ) return error; - -- libspectrum_word *p1_pulses; - error = pzx_read_data( buffer, block_end, - p1_count * sizeof( libspectrum_word ), - (libspectrum_byte**)&p1_pulses ); -@@ -462,6 +469,7 @@ read_stop_block( libspectrum_tape *tape, const libspectrum_byte **buffer, - pzx_context *ctx ) - { - libspectrum_tape_block *block; -+ libspectrum_word flags; - - if( data_length < 2 ) { - libspectrum_print_error( LIBSPECTRUM_ERROR_CORRUPT, -@@ -469,7 +477,7 @@ read_stop_block( libspectrum_tape *tape, const libspectrum_byte **buffer, - return LIBSPECTRUM_ERROR_CORRUPT; - } - -- libspectrum_word flags = libspectrum_read_word( buffer ); -+ flags = libspectrum_read_word( buffer ); - - if( flags == PZXF_STOP48 ) { - block = libspectrum_tape_block_alloc( LIBSPECTRUM_TAPE_BLOCK_STOP48 ); -diff --git a/szx.c b/szx.c -index 214184a..cf8bb8d 100644 ---- a/szx.c -+++ b/szx.c -@@ -577,10 +577,12 @@ read_crtr_chunk( libspectrum_snap *snap, libspectrum_word version GCC_UNUSED, - /* This is ugly, but I can't see a better way to do it */ - if( sizeof( libspectrum_byte ) == sizeof( char ) ) { - char *custom = libspectrum_malloc( data_length + 1 ); -+ char *libspectrum; -+ - memcpy( custom, *buffer, data_length ); - custom[data_length] = 0; - -- char *libspectrum = strstr( custom, libspectrum_string ); -+ libspectrum = strstr( custom, libspectrum_string ); - if( libspectrum ) { - int matches, v1, v2, v3; - libspectrum += strlen( libspectrum_string ); -diff --git a/tzx_write.c b/tzx_write.c -index 8dec404..1981ea1 100644 ---- a/tzx_write.c -+++ b/tzx_write.c -@@ -970,6 +970,7 @@ tzx_write_data_block( libspectrum_tape_block *block, libspectrum_byte **buffer, - { - libspectrum_tape_block *pure_data; - size_t data_length; -+ libspectrum_byte *data; - - /* Pure data block can only have two identical pulses for bit 0 and bit 1 */ - if( libspectrum_tape_block_bit0_pulse_count( block ) != 2 || -@@ -998,7 +999,7 @@ tzx_write_data_block( libspectrum_tape_block *block, libspectrum_byte **buffer, - /* And the actual data */ - data_length = libspectrum_tape_block_data_length( block ); - libspectrum_tape_block_set_data_length( pure_data, data_length ); -- libspectrum_byte *data = libspectrum_malloc( data_length * sizeof( *data ) ); -+ data = libspectrum_malloc( data_length * sizeof( *data ) ); - memcpy( data, libspectrum_tape_block_data( block ), data_length ); - libspectrum_tape_block_set_data( pure_data, data ); - --- -2.2.2 -