From b1c9e5c0eaad231548e377fbb4e661baf1a543fc Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Sun, 12 Jun 2016 17:38:19 +0200 Subject: [PATCH] Declare some chars signed after the ARMv7hf compiler barfed like this: -mfpu=vfpv3-d16 -mfloat-abi=hard -c -o fmc.lo fmc.cpp s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] {-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}; ^ s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] s3m.cpp:29:90: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] I wonder if it helps. --- adplug-1.5.1-texinfo.patch | 11 - adplug-2.1-include.patch | 231 ------------------ ...c6.patch => adplug-2.2.1-signed-char.patch | 13 +- adplug.spec | 2 + 4 files changed, 9 insertions(+), 248 deletions(-) delete mode 100644 adplug-1.5.1-texinfo.patch delete mode 100644 adplug-2.1-include.patch rename adplug-2.1-gcc6.patch => adplug-2.2.1-signed-char.patch (60%) diff --git a/adplug-1.5.1-texinfo.patch b/adplug-1.5.1-texinfo.patch deleted file mode 100644 index b10560d..0000000 --- a/adplug-1.5.1-texinfo.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur adplug-1.5.1.orig/doc/libadplug.texi adplug-1.5.1/doc/libadplug.texi ---- adplug-1.5.1.orig/doc/libadplug.texi 2006-01-01 23:49:53.000000000 +0100 -+++ adplug-1.5.1/doc/libadplug.texi 2006-01-01 23:50:04.000000000 +0100 -@@ -1,7 +1,6 @@ - \input texinfo @c -*-texinfo-*- - @c %**start of header - @setfilename libadplug.info --@include version.texi - @settitle AdPlug Core Library @value{VERSION} Manual - @c %**end of header - diff --git a/adplug-2.1-include.patch b/adplug-2.1-include.patch deleted file mode 100644 index 88ffe69..0000000 --- a/adplug-2.1-include.patch +++ /dev/null @@ -1,231 +0,0 @@ -diff -ur adplug-2.1-orig/src/a2m.cpp adplug-2.1/src/a2m.cpp ---- adplug-2.1-orig/src/a2m.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/a2m.cpp 2008-02-11 13:31:41.000000000 +0100 -@@ -29,6 +29,7 @@ - * Following commands are ignored: Gxy, Hxy, Kxy - &xy - */ - -+#include - #include "a2m.h" - - const unsigned int Ca2mLoader::MAXFREQ = 2000, -diff -ur adplug-2.1-orig/src/adl.cpp adplug-2.1/src/adl.cpp ---- adplug-2.1-orig/src/adl.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/adl.cpp 2008-02-11 13:59:04.000000000 +0100 -@@ -48,6 +48,7 @@ - * - */ - -+#include - #include - #include - #include -diff -ur adplug-2.1-orig/src/adplug.cpp adplug-2.1/src/adplug.cpp ---- adplug-2.1-orig/src/adplug.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/adplug.cpp 2008-02-11 13:19:49.000000000 +0100 -@@ -19,6 +19,7 @@ - * adplug.cpp - CAdPlug utility class, by Simon Peter - */ - -+#include - #include - #include - -diff -ur adplug-2.1-orig/src/bmf.cpp adplug-2.1/src/bmf.cpp ---- adplug-2.1-orig/src/bmf.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/bmf.cpp 2008-02-11 13:51:49.000000000 +0100 -@@ -40,6 +40,7 @@ - comment : inaccurate replaying, because constant outport; in original player it can be 380 or 382. - */ - -+#include - #include "bmf.h" - #include "debug.h" - -diff -ur adplug-2.1-orig/src/cff.cpp adplug-2.1/src/cff.cpp ---- adplug-2.1-orig/src/cff.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/cff.cpp 2008-02-11 13:33:54.000000000 +0100 -@@ -24,6 +24,7 @@ - slides use previous effect data instead of current. - */ - -+#include - #include - - #include "cff.h" -diff -ur adplug-2.1-orig/src/dro.cpp adplug-2.1/src/dro.cpp ---- adplug-2.1-orig/src/dro.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/dro.cpp 2008-02-11 13:56:05.000000000 +0100 -@@ -23,6 +23,7 @@ - * NOTES: 3-oct-04: the DRO format is not yet finalized. beware. - */ - -+#include - #include - - #include "dro.h" -diff -ur adplug-2.1-orig/src/dtm.cpp adplug-2.1/src/dtm.cpp ---- adplug-2.1-orig/src/dtm.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/dtm.cpp 2008-02-11 13:37:45.000000000 +0100 -@@ -22,6 +22,7 @@ - NOTE: Panning (Ex) effect is ignored. - */ - -+#include - #include "dtm.h" - - /* -------- Public Methods -------------------------------- */ -diff -ur adplug-2.1-orig/src/fmc.cpp adplug-2.1/src/fmc.cpp ---- adplug-2.1-orig/src/fmc.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/fmc.cpp 2008-02-11 13:41:19.000000000 +0100 -@@ -19,6 +19,7 @@ - fmc.cpp - FMC Loader by Riven the Mage - */ - -+#include - #include "fmc.h" - - /* -------- Public Methods -------------------------------- */ -diff -ur adplug-2.1-orig/src/mad.cpp adplug-2.1/src/mad.cpp ---- adplug-2.1-orig/src/mad.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/mad.cpp 2008-02-11 13:31:50.000000000 +0100 -@@ -19,6 +19,7 @@ - mad.cpp - MAD loader by Riven the Mage - */ - -+#include - #include "mad.h" - - /* -------- Public Methods -------------------------------- */ -diff -ur adplug-2.1-orig/src/mkj.cpp adplug-2.1/src/mkj.cpp ---- adplug-2.1-orig/src/mkj.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/mkj.cpp 2008-02-11 13:32:55.000000000 +0100 -@@ -19,6 +19,7 @@ - * mkj.cpp - MKJamz Player, by Simon Peter - */ - -+#include - #include - - #include "mkj.h" -diff -ur adplug-2.1-orig/src/msc.cpp adplug-2.1/src/msc.cpp ---- adplug-2.1-orig/src/msc.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/msc.cpp 2008-02-11 13:57:26.000000000 +0100 -@@ -19,6 +19,7 @@ - * msc.c - MSC Player by Lubomir Bulej (pallas@kadan.cz) - */ - -+#include - #include - - #include "msc.h" -diff -ur adplug-2.1-orig/src/mtk.cpp adplug-2.1/src/mtk.cpp ---- adplug-2.1-orig/src/mtk.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/mtk.cpp 2008-02-11 13:37:52.000000000 +0100 -@@ -19,6 +19,7 @@ - * mtk.cpp - MPU-401 Trakker Loader by Simon Peter (dn.tlp@gmx.net) - */ - -+#include - #include "mtk.h" - - /*** public methods **************************************/ -diff -ur adplug-2.1-orig/src/protrack.cpp adplug-2.1/src/protrack.cpp ---- adplug-2.1-orig/src/protrack.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/protrack.cpp 2008-02-11 13:28:23.000000000 +0100 -@@ -25,6 +25,7 @@ - * Protracker-like format, this is most certainly the player you want to use. - */ - -+#include - #include "protrack.h" - #include "debug.h" - -diff -ur adplug-2.1-orig/src/rad.cpp adplug-2.1/src/rad.cpp ---- adplug-2.1-orig/src/rad.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/rad.cpp 2008-02-11 13:43:51.000000000 +0100 -@@ -22,6 +22,7 @@ - * some volumes are dropped out - */ - -+#include - #include "rad.h" - - CPlayer *CradLoader::factory(Copl *newopl) -diff -ur adplug-2.1-orig/src/rat.cpp adplug-2.1/src/rat.cpp ---- adplug-2.1-orig/src/rat.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/rat.cpp 2008-02-11 13:53:20.000000000 +0100 -@@ -29,6 +29,7 @@ - comment : there are bug in original replayer's adlib_init(): wrong frequency registers. - */ - -+#include - #include "rat.h" - #include "debug.h" - -diff -ur adplug-2.1-orig/src/raw.cpp adplug-2.1/src/raw.cpp ---- adplug-2.1-orig/src/raw.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/raw.cpp 2008-02-11 13:49:33.000000000 +0100 -@@ -19,6 +19,7 @@ - * raw.c - RAW Player by Simon Peter - */ - -+#include - #include "raw.h" - - /*** public methods *************************************/ -diff -ur adplug-2.1-orig/src/rix.cpp adplug-2.1/src/rix.cpp ---- adplug-2.1-orig/src/rix.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/rix.cpp 2008-02-11 14:00:37.000000000 +0100 -@@ -20,6 +20,7 @@ - * BSPAL - */ - -+#include - #include "rix.h" - #include "debug.h" - -diff -ur adplug-2.1-orig/src/rol.cpp adplug-2.1/src/rol.cpp ---- adplug-2.1-orig/src/rol.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/rol.cpp 2008-02-11 13:54:42.000000000 +0100 -@@ -20,6 +20,7 @@ - * - * Visit: http://tenacity.hispeed.com/aomit/oplx/ - */ -+#include - #include - - #include "rol.h" -diff -ur adplug-2.1-orig/src/s3m.cpp adplug-2.1/src/s3m.cpp ---- adplug-2.1-orig/src/s3m.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/s3m.cpp 2008-02-11 13:34:54.000000000 +0100 -@@ -22,6 +22,7 @@ - * Extra Fine Slides (EEx, FEx) & Fine Vibrato (Uxy) are inaccurate - */ - -+#include - #include "s3m.h" - - const char Cs3mPlayer::chnresolv[] = // S3M -> adlib channel conversion -diff -ur adplug-2.1-orig/src/sa2.cpp adplug-2.1/src/sa2.cpp ---- adplug-2.1-orig/src/sa2.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/sa2.cpp 2008-02-11 13:50:40.000000000 +0100 -@@ -20,6 +20,7 @@ - * SAdT Loader by Mamiya - */ - -+#include - #include - - #include "sa2.h" -diff -ur adplug-2.1-orig/src/sng.cpp adplug-2.1/src/sng.cpp ---- adplug-2.1-orig/src/sng.cpp 2008-02-11 13:19:21.000000000 +0100 -+++ adplug-2.1/src/sng.cpp 2008-02-11 13:20:27.000000000 +0100 -@@ -19,6 +19,7 @@ - * sng.cpp - SNG Player by Simon Peter - */ - -+#include - #include "sng.h" - - CPlayer *CsngPlayer::factory(Copl *newopl) diff --git a/adplug-2.1-gcc6.patch b/adplug-2.2.1-signed-char.patch similarity index 60% rename from adplug-2.1-gcc6.patch rename to adplug-2.2.1-signed-char.patch index 79dc342..ec3baf0 100644 --- a/adplug-2.1-gcc6.patch +++ b/adplug-2.2.1-signed-char.patch @@ -1,6 +1,6 @@ -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 +diff -ur adplug-2.2.1-orig/src/s3m.cpp adplug-2.2.1/src/s3m.cpp +--- adplug-2.2.1-orig/src/s3m.cpp 2016-06-12 17:19:33.369934280 +0200 ++++ adplug-2.2.1/src/s3m.cpp 2016-06-12 17:32:36.190932642 +0200 @@ -25,7 +25,7 @@ #include #include "s3m.h" @@ -10,9 +10,10 @@ diff -upr a/src/s3m.cpp b/src/s3m.cpp {-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 +diff -ur adplug-2.2.1-orig/src/s3m.h adplug-2.2.1/src/s3m.h +--- adplug-2.2.1-orig/src/s3m.h 2016-06-12 17:19:33.367934293 +0200 ++++ adplug-2.2.1/src/s3m.h 2016-06-12 17:37:14.538154102 +0200 +@@ -90,7 +90,7 @@ unsigned char crow,ord,speed,tempo,del,songend,loopstart,loopcnt; private: diff --git a/adplug.spec b/adplug.spec index a981ac2..8862733 100644 --- a/adplug.spec +++ b/adplug.spec @@ -10,6 +10,7 @@ URL: http://adplug.sourceforge.net/ Group: Applications/Multimedia Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 Source1: http://download.sourceforge.net/%{name}/adplugdb-%{adplugdbver}.tar.gz +Patch0: adplug-2.2.1-signed-char.patch License: LGPLv2+ BuildRequires: libbinio-devel >= 1.4 BuildRequires: pkgconfig @@ -44,6 +45,7 @@ This package contains development files for the AdPlug AdLib %prep %setup -q +%patch0 -p1 tar xvfz %{SOURCE1} # Include these by different name mv %{adplugdbver}/README README.adplugdb