diff --git a/.gitignore b/.gitignore index 6c8745f..b77bfd3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -adplug-2.1.tar.bz2 -adplugdb-2006-07-07.tar.gz -/adplug-2.2.1.tar.gz -/adplug-2.2.1.tar.bz2 +/adplug-*.tar.gz +/adplug-*.tar.bz2 +/adplugdb-*.tar.gz diff --git a/adplug-2.2.1-inline.patch b/adplug-2.2.1-inline.patch deleted file mode 100644 index aaf142b..0000000 --- a/adplug-2.2.1-inline.patch +++ /dev/null @@ -1,17 +0,0 @@ -Patch by Robert Scheck for adplug >= 2.2.1, which -works around undefined reference linking error when using GCC >= 9.1 (while -it works with GCC 9.0.x and older): - -/usr/bin/ld: ../src/.libs/libadplug.so: undefined reference to `OPL_CALC_RH' - ---- adplug-2.2.1/src/fmopl.c 2003-11-03 16:41:33.000000000 +0100 -+++ adplug-2.2.1/src/fmopl.c.inline 2019-07-31 19:57:40.925132660 +0200 -@@ -31,7 +31,7 @@ - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - --#define INLINE __inline -+#define INLINE - #define HAS_YM3812 1 - - #include diff --git a/adplug-2.2.1-signed-char.patch b/adplug-2.2.1-signed-char.patch deleted file mode 100644 index ec3baf0..0000000 --- a/adplug-2.2.1-signed-char.patch +++ /dev/null @@ -1,24 +0,0 @@ -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" - --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 -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: -- static const char chnresolv[]; -+ static const signed char chnresolv[]; - static const unsigned short notetable[12]; - static const unsigned char vibratotab[32]; - diff --git a/adplug-2.3.1-cve-2018-17825.patch b/adplug-2.3.1-cve-2018-17825.patch deleted file mode 100644 index bbf7701..0000000 --- a/adplug-2.3.1-cve-2018-17825.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 19ebb61bf92262dc1868de10ba5a211db249ce76 Mon Sep 17 00:00:00 2001 -From: Stas'M -Date: Thu, 4 Oct 2018 00:18:32 +0300 -Subject: [PATCH] FMOPL: Avoid double-free by checking OPL pointer (fix #67) - -Fixes CVE-2018-17825. ---- - src/fmopl.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/fmopl.c b/src/fmopl.c -index 0cd1d69..1c4485e 100644 ---- a/src/fmopl.c -+++ b/src/fmopl.c -@@ -1269,6 +1269,10 @@ FM_OPL *OPLCreate(int type, int clock, int rate) - /* ---------- Destroy one of vietual YM3812 ---------- */ - void OPLDestroy(FM_OPL *OPL) - { -+ if(!OPL) -+ { -+ return; -+ } - #ifdef OPL_OUTPUT_LOG - if(opl_dbg_fp) - { diff --git a/adplug.spec b/adplug.spec index af20cfc..d93d3bb 100644 --- a/adplug.spec +++ b/adplug.spec @@ -2,25 +2,19 @@ # RPM repository. %define adplugdbver 2006-07-07 -Name: adplug -Version: 2.2.1 -Release: 13%{?dist} -Summary: A software library for AdLib (OPL2) emulation -URL: http://adplug.github.io/ -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 -Patch1: adplug-2.3.1-cve-2018-17825.patch -Patch2: adplug-2.2.1-inline.patch +Name: adplug +Version: 2.3.3 +Release: 1%{?dist} +Summary: Software library for AdLib (OPL2/3) emulation +URL: https://adplug.github.io/ +Source0: https://github.com/adplug/adplug/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2 +Source1: https://download.sourceforge.net/%{name}/adplugdb-%{adplugdbver}.tar.gz License: LGPLv2+ BuildRequires: gcc-c++ -BuildRequires: libbinio-devel >= 1.4 -BuildRequires: pkgconfig -BuildRequires: texinfo -BuildRequires: libtool -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: make +BuildRequires: make +BuildRequires: libbinio-devel >= 1.4 +BuildRequires: pkgconfig +BuildRequires: texinfo # This is to resolve the endless disputes of the shared data for this # package. Whenever _sharedstatedir contains something acceptable to # Fedora that can be used instead. @@ -28,61 +22,63 @@ BuildRequires: make %description AdPlug is a free software, cross-platform, hardware independent AdLib -sound player library, mainly written in C++ and released under the -LGPL. AdPlug plays sound data, originally created for the AdLib (OPL2) -audio board, directly from its original format on top of an OPL2 -emulator or by using the real hardware. No OPL chip is required for -playback. It supports various audio formats from MS-DOS AdLib trackers. +sound player library, mainly written in C++. AdPlug plays sound data, +originally created for the AdLib (OPL2/3) audio board, directly from +its original format on top of an OPL2/3 emulator or by using the real +hardware. No OPL2/3 chips are required for playback. %package devel Summary: Development files for AdPlug Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: libbinio-devel +Requires: libbinio-devel +%if 0%{?rhel} && 0%{?rhel} <= 7 +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info +%endif %description devel -This package contains development files for the AdPlug AdLib -(OPL2) emulator. +This package contains development files for the AdPlug AdLib (OPL2/3) +emulator. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 tar xvfz %{SOURCE1} # Include these by different name mv %{adplugdbver}/README README.adplugdb mv %{adplugdbver}/NEWS NEWS.adplugdb %build -rm -f ltmain.sh config.guess config.sub -libtoolize --copy --force || fail -rm -f aclocal.m4 -aclocal $ACLOCAL_FLAGS || fail -rm -f depcomp install-sh missing -touch config.rpath -automake --add-missing --gnu || fail -rm -f configure -autoconf -%configure --disable-static --sharedstatedir=%{shareddata} --disable-rpath -make %{?_smp_mflags} +%configure --disable-static --sharedstatedir=%{shareddata} +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%make_build %install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install +%make_install rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_infodir}/dir -mkdir -p $RPM_BUILD_ROOT%{shareddata}/%{name} -install -p -m 644 %{adplugdbver}/adplug.db $RPM_BUILD_ROOT%{shareddata}/%{name} +install -D -p -m 644 %{adplugdbver}/adplug.db $RPM_BUILD_ROOT%{shareddata}/%{name}/adplug.db %ldconfig_scriptlets +%if 0%{?rhel} && 0%{?rhel} <= 7 +%post devel +/sbin/install-info %{_infodir}/libadplug.info.gz %{_infodir}/dir || : + +%preun devel +if [ $1 = 0 ]; then + /sbin/install-info --delete %{_infodir}/libadplug.info.gz %{_infodir}/dir || : +fi +%endif + %files %{_libdir}/*.so.* %dir %{shareddata}/%{name}/ %config(noreplace) %{shareddata}/%{name}/adplug.db %{_bindir}/adplugdb %{_mandir}/man1/adplugdb.1* -%doc AUTHORS BUGS ChangeLog COPYING INSTALL NEWS README TODO +%license COPYING +%doc AUTHORS BUGS ChangeLog NEWS README %doc NEWS.adplugdb README.adplugdb %files devel @@ -90,9 +86,13 @@ install -p -m 644 %{adplugdbver}/adplug.db $RPM_BUILD_ROOT%{shareddata}/%{name} %{_libdir}/pkgconfig/*.pc %dir %{_includedir}/%{name} %{_includedir}/%{name}/*.h -%{_infodir}/*.gz +%{_infodir}/libadplug.info* %changelog +* Tue Jan 05 2021 Robert Scheck - 2.3.3-1 +- Upgrade to 2.3.3 (#1743108, #1770224, #1770243, #1770257, + #1778710, #1778716, #1778720) + * Fri Jul 31 2020 Fedora Release Engineering - 2.2.1-13 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 3a8cf58..1a2ad47 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -8f815fd5d254de0fe5df818df9d1d8af adplug-2.2.1.tar.bz2 -40a1cc1222c7318172ee3740c4269df3 adplugdb-2006-07-07.tar.gz +SHA512 (adplug-2.3.3.tar.bz2) = 08647c746df69aa0a3941ee64d3adecd11a46febf51fe1bb9fe16ff01a6fef56321b18618f5ecb66309b8cdac8493a067707759fbdf0e91d556677c6b4c57a44 +SHA512 (adplugdb-2006-07-07.tar.gz) = c3391ac83b8433a94f036affd8618f1202499890056b9799854f66806b76a4ededc61b41ea7548bbe50e545fc5c7e33754c4e15bb940d34b7135cc9b5f129501