diff --git a/alure.changes b/alure.changes index 9982d61..3d6942c 100644 --- a/alure.changes +++ b/alure.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Feb 14 14:28:23 UTC 2022 - Ferdinand Thiessen + +- Changes authored by munix9@googlemail.com + * Enabled MPG123 support + * Restructured the SPEC file + * Renamed alure-gcc47.patch to fix-missing-include.patch + * Renamed alure-lib-suffix.patch to fix-lib-suffix.patch + * Add patches: + * fix-cmake_minimum_required.patch + * fix-link-flac.patch + * fix-FLUIDSYNTH_CFLAGS.patch + ------------------------------------------------------------------- Sat Apr 17 18:14:57 UTC 2021 - Ferdinand Thiessen diff --git a/alure.spec b/alure.spec index 1c173b4..819263c 100644 --- a/alure.spec +++ b/alure.spec @@ -1,8 +1,7 @@ # # spec file for package alure # -# Copyright (c) 2021 SUSE LLC -# Copyright (c) 2012 openSUSE_user1 +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,6 +16,8 @@ # +%define sover 1 + Name: alure Version: 1.2 Release: 0 @@ -26,53 +27,60 @@ License: LGPL-2.0-or-later Group: Development/Libraries/C and C++ URL: https://github.com/kcat/alure Source0: %{name}-%{version}.tar.bz2 -# PATCh-FIX-UPSTREAM alure-gcc47.patch -- patch for build with gcc47 -Patch0: alure-gcc47.patch -# PATCH-FIX-UPSTREAM alure-lib-suffix.patch -- Enable installation in suffixed directory -Patch1: alure-lib-suffix.patch +Patch0: fix-cmake_minimum_required.patch +Patch1: fix-missing-include.patch +Patch2: fix-lib-suffix.patch +Patch3: fix-link-flac.patch +Patch4: fix-FLUIDSYNTH_CFLAGS.patch BuildRequires: cmake -BuildRequires: flac-devel -BuildRequires: fluidsynth-devel BuildRequires: gcc-c++ -BuildRequires: libmodplug-devel -BuildRequires: libsndfile-devel -BuildRequires: libvorbis-devel -BuildRequires: openal-soft-devel +BuildRequires: ninja BuildRequires: pkgconfig +BuildRequires: pkgconfig(dumb) +BuildRequires: pkgconfig(flac) +BuildRequires: pkgconfig(fluidsynth) +BuildRequires: pkgconfig(libmodplug) +BuildRequires: pkgconfig(libmpg123) +BuildRequires: pkgconfig(openal) +BuildRequires: pkgconfig(sndfile) +BuildRequires: pkgconfig(vorbis) %description ALURE is a utility library to help manage common tasks with OpenAL applications. This includes device enumeration and initialization, file loading, and streaming. -%package devel -Summary: Development files for %{name} -# Devel doc includes some files under GPLv2+ from NaturalDocs -License: LGPL-2.0-or-later AND GPL-2.0-or-later -Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} - -%description devel -The %{name}-devel package contains libraries and header files for -developing applications that use %{name}. - -%package -n libalure1 +%package -n lib%{name}%{sover} Summary: Utility library around OpenAL License: LGPL-2.0-or-later Group: System/Libraries -%description -n libalure1 +%description -n lib%{name}%{sover} ALURE is a utility library to help manage common tasks with OpenAL applications. +%package devel +Summary: Development files for %{name} +# Devel doc includes some files under GPLv2+ from NaturalDocs +License: GPL-2.0-or-later AND LGPL-2.0-or-later +Group: Development/Libraries/C and C++ +Requires: lib%{name}%{sover} = %{version} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + %prep -%autosetup -p0 +%autosetup -p1 %build +%define __builder ninja +export CXXFLAGS="%{optflags} -fpermissive" %cmake \ - -DBUILD_STATIC=OFF \ - -DMPG123=OFF \ - -DMODPLUG=ON + -DBUILD_STATIC=OFF \ + -DDYNLOAD=OFF \ + -DMPG123=ON \ + -DMODPLUG=ON %cmake_build %install @@ -85,20 +93,20 @@ rm -rf %{buildroot}%{_datadir}/doc/%{name}/html # fix encoding sed -i 's/\r$//' docs/html/javascript/main.js docs/html/styles/1.css -%post -n libalure1 -p /sbin/ldconfig -%postun -n libalure1 -p /sbin/ldconfig +%post -n lib%{name}%{sover} -p /sbin/ldconfig +%postun -n lib%{name}%{sover} -p /sbin/ldconfig %files %license COPYING -%{_bindir}/alure* +%{_bindir}/alure{cdplay,play,stream} -%files -n libalure1 -%{_libdir}/libalure.so.* +%files -n lib%{name}%{sover} +%{_libdir}/lib%{name}.so.* %files devel %doc docs/html examples -%{_includedir}/AL/ -%{_libdir}/*.so -%{_libdir}/pkgconfig/*.pc +%{_includedir}/AL +%{_libdir}/lib%{name}.so +%{_libdir}/pkgconfig/%{name}.pc %changelog diff --git a/fix-FLUIDSYNTH_CFLAGS.patch b/fix-FLUIDSYNTH_CFLAGS.patch new file mode 100644 index 0000000..810e43b --- /dev/null +++ b/fix-FLUIDSYNTH_CFLAGS.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -376,7 +376,7 @@ + SET(HAS_FLUIDSYNTH 1) + LINK_DIRECTORIES(${FLUIDSYNTH_LIBRARY_DIRS}) + SET_SOURCE_FILES_PROPERTIES(src/codec_fluidsynth.cpp PROPERTIES +- COMPILE_FLAGS "${FLUIDSYNTH_CFLAGS}") ++ COMPILE_OPTIONS "${FLUIDSYNTH_CFLAGS}") + ENDIF(NOT FLUIDSYNTH_FOUND) + IF(HAS_FLUIDSYNTH) + SET(ALURE_OBJS ${ALURE_OBJS} src/codec_fluidsynth.cpp) diff --git a/fix-cmake_minimum_required.patch b/fix-cmake_minimum_required.patch new file mode 100644 index 0000000..063f282 --- /dev/null +++ b/fix-cmake_minimum_required.patch @@ -0,0 +1,9 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + # CMakeLists.txt for ALURE +-CMAKE_MINIMUM_REQUIRED(VERSION 2.4) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.0) + + IF(COMMAND CMAKE_POLICY) + CMAKE_POLICY(SET CMP0003 NEW) diff --git a/alure-lib-suffix.patch b/fix-lib-suffix.patch similarity index 76% rename from alure-lib-suffix.patch rename to fix-lib-suffix.patch index a3f48f2..446dfb0 100644 --- a/alure-lib-suffix.patch +++ b/fix-lib-suffix.patch @@ -1,5 +1,5 @@ ---- CMakeLists.txt.orig 2012-07-15 04:16:33.395014404 +0300 -+++ CMakeLists.txt 2012-07-15 04:21:37.780014550 +0300 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt @@ -30,6 +30,14 @@ SET(LIB_MINOR_VERSION "2") SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}") diff --git a/fix-link-flac.patch b/fix-link-flac.patch new file mode 100644 index 0000000..15e126d --- /dev/null +++ b/fix-link-flac.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -281,6 +281,7 @@ IF(FLAC) + IF(FLAC_FOUND) + INCLUDE_DIRECTORIES(${FLAC_INCLUDE_DIR}) + SET(HAS_FLAC 1) ++ SET(LIBFLAC_LIBRARIES ${FLAC_LIBRARIES}) + ENDIF(FLAC_FOUND) + IF(HAS_FLAC) + SET(ALURE_OBJS ${ALURE_OBJS} src/codec_flac.cpp) diff --git a/alure-gcc47.patch b/fix-missing-include.patch similarity index 55% rename from alure-gcc47.patch rename to fix-missing-include.patch index 173201b..acf87f4 100644 --- a/alure-gcc47.patch +++ b/fix-missing-include.patch @@ -1,5 +1,5 @@ ---- include/main.h.orig 2012-01-30 23:27:53.230334632 -0600 -+++ include/main.h 2012-01-30 23:28:26.241530184 -0600 +--- a/include/main.h ++++ b/include/main.h @@ -4,6 +4,8 @@ #include "AL/alure.h" #include "alext.h"