initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

50
libsidplay/PKGBUILD Normal file
View File

@@ -0,0 +1,50 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=libsidplay
pkgver=1.36.60
_debver=1.36.60
_debrel=1
pkgrel=1
pkgdesc="A library for playing SID music files."
arch=('i686' 'x86_64')
url="https://critical.ch/distfiles/"
license=('GPL-2')
depends=('gcc-libs')
makedepends=('quilt')
source=(https://deb.debian.org/debian/pool/main/libs/libsidplay/libsidplay_$pkgver.orig.tar.bz2
https://deb.debian.org/debian/pool/main/libs/libsidplay/libsidplay_$_debver-$_debrel.debian.tar.xz
libsidplay-1.36.59-gcc43.patch
g++-6_build.patch)
sha512sums=('51433057a910e99c6e888ad5f07c19721605565db6eb3ded7a13f90a4fe4e467f20e0b7ad15a4662d091bcaac3da4064d27dd7a73715b8012f1b1067cd3e38d6'
'016ef548fd01031c5c6a5cbdbdad1f1d7947d57b25a727258a358229bce9a7d5e48e85493f723d733810530661b7451bd5e91eeaf56956112a588bc7101efb8d'
'8ea90b2daffa1240729477f115bc57703c04bf4e44b7e1085b48a546d78886b61e514a5fc2d99906dca208baf364f8c4ba3e8f09774700ecd04ca47c7a8bea9e'
'd7b2f77ef755b4c69eb05ba4292ba2371dcac4aa8f1a67819816031ab2ddc1e869677b9b40e0792921c009b8c7df1df508e2ba5a79c466565b40cc9fc33e2423')
prepare() {
cd ${pkgname}-${pkgver}
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
else
patch -Np1 -i ../libsidplay-1.36.59-gcc43.patch
patch -Np1 -i ../g++-6_build.patch
fi
}
build() {
cd ${pkgname}-${pkgver}
./configure --prefix=/usr
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}

View File

@@ -0,0 +1,28 @@
Description: use unsigned char to keep int value
Use unsigned char to keep all bits of int values in the array.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Bug-Debian: https://bugs.debian.org/811762
Last-Update: 2016-07-16
---
--- libsidplay-1.36.59.orig/src/samples.cpp
+++ libsidplay-1.36.59/src/samples.cpp
@@ -75,7 +75,7 @@ struct sampleChannel
sampleChannel ch4, ch5;
-const sbyte galwayNoiseTab1[16] =
+const ubyte galwayNoiseTab1[16] =
{
0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7,
0x08,0x19,0x2a,0x3b,0x4c,0x5d,0x6e,0x7f
@@ -84,7 +84,7 @@ const sbyte galwayNoiseTab1[16] =
ubyte galwayNoiseVolTab[16];
sbyte galwayNoiseSamTab[16];
-const sbyte sampleConvertTab[16] =
+const ubyte sampleConvertTab[16] =
{
// 0x81,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff,
// 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x7f

View File

@@ -0,0 +1,40 @@
diff --git a/src/sidtune.cpp b/src/sidtune.cpp
index 4d1d33b..6fbae80 100644
--- a/src/sidtune.cpp
+++ b/src/sidtune.cpp
@@ -306,11 +306,7 @@ udword sidTune::loadFile(const char* fileName, ubyte** bufferRef)
return 0;
}
// Open binary input file stream at end of file.
-#if defined(SID_HAVE_IOS_BIN)
- ifstream myIn( fileName, ios::in|ios::bin|ios::ate );
-#else
ifstream myIn( fileName, ios::in|ios::binary|ios::ate );
-#endif
// As a replacement for !is_open(), bad() and the NOT-operator
// don't seem to work on all systems.
#if defined(SID_DONT_HAVE_IS_OPEN)
@@ -972,11 +968,7 @@ bool sidTune::saveC64dataFile( const char* fileName, bool overWriteFlag )
}
// Open binary output file stream.
else
-#if defined(SID_HAVE_IOS_BIN)
- fMyOut.open( fileName, ios::out|ios::bin|ios::trunc );
-#else
fMyOut.open( fileName, ios::out|ios::binary|ios::trunc );
-#endif
if ( !fMyOut )
{
info.statusString = text_cantCreateFile;
@@ -1061,11 +1053,7 @@ bool sidTune::savePSIDfile( const char* fileName, bool overWriteFlag )
}
// Open binary output file stream.
else
-#if defined(SID_HAVE_IOS_BIN)
- fMyOut.open( fileName, ios::out|ios::bin|ios::trunc );
-#else
fMyOut.open( fileName, ios::out|ios::binary|ios::trunc );
-#endif
if ( !fMyOut )
{
info.statusString = text_cantCreateFile;