Fix FTBFS with GCC 6 (#1307307)

This commit is contained in:
Yaakov Selkowitz 2016-03-08 01:10:41 -06:00
commit fa59ad202d
2 changed files with 30 additions and 1 deletions

23
adplug-2.1-gcc6.patch Normal file
View file

@ -0,0 +1,23 @@
diff -upr a/src/s3m.cpp b/src/s3m.cpp
--- a/src/s3m.cpp 2006-07-02 00:27:00.000000000 -0500
+++ b/src/s3m.cpp 2016-03-07 23:20:56.039017533 -0600
@@ -25,7 +25,7 @@
#include <cstring>
#include "s3m.h"
-const char Cs3mPlayer::chnresolv[] = // S3M -> adlib channel conversion
+const signed char Cs3mPlayer::chnresolv[] = // S3M -> adlib channel conversion
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,-1,-1,-1,-1,-1,-1,-1};
const unsigned short Cs3mPlayer::notetable[12] = // S3M adlib note table
--- a/src/s3m.h 2006-05-13 00:36:42.000000000 -0500
+++ b/src/s3m.h 2016-03-08 00:56:07.953972552 -0600
@@ -90,7 +90,7 @@ class Cs3mPlayer: public CPlayer
unsigned char crow,ord,speed,tempo,del,songend,loopstart,loopcnt;
private:
- static const char chnresolv[];
+ static const signed char chnresolv[];
static const unsigned short notetable[12];
static const unsigned char vibratotab[32];

View file

@ -4,7 +4,7 @@
%define adplugdbver 2006-07-07
Name: adplug
Version: 2.1
Release: 20%{?dist}
Release: 21%{?dist}
Summary: A software library for AdLib (OPL2) emulation
URL: http://adplug.sourceforge.net/
Group: Applications/Multimedia
@ -14,6 +14,8 @@ Patch0: adplug-1.5.1-texinfo.patch
# Lifted from the debian patchset
# http://ftp.de.debian.org/debian/pool/main/a/adplug/adplug_2.0.1-6.diff.gz
Patch1: adplug-2.1-include.patch
# fix build with GCC 6 (#1307307)
Patch2: adplug-2.1-gcc6.patch
License: LGPLv2+
BuildRequires: libbinio-devel >= 1.4
BuildRequires: pkgconfig
@ -48,6 +50,7 @@ This package contains development files for the AdPlug AdLib
# This removes the version.texi dependency
%patch0 -p1
%patch1 -p1
%patch2 -p1
tar xvfz %{SOURCE1}
# Include these by different name
mv %{adplugdbver}/README README.adplugdb
@ -94,6 +97,9 @@ fi
%{_infodir}/*.gz
%changelog
* Tue Mar 08 2016 Yaakov Selkowitz <yselkowi@redhat.com> - 2.1-21
- Fix FTBFS with GCC 6 (#1307307)
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild