From 3ef74a352b32d8fd96d10d6661b36bd345e4da30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Wed, 31 Jan 2018 23:01:14 +0100 Subject: [PATCH 1/5] - up to 2.8.8 --- faad2.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/faad2.spec b/faad2.spec index bd77728..19f6453 100644 --- a/faad2.spec +++ b/faad2.spec @@ -9,12 +9,12 @@ Summary: Freeware Advanced Audio Decoder 2 Summary(pl.UTF-8): Darmowy zaawansowany dekoder audio Name: faad2 -Version: 2.8.6 +Version: 2.8.8 Release: 1 License: GPL v2+ Group: Applications/Sound Source0: http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz -# Source0-md5: 21aa96dd6d57fd0436bf81c3988969ce +# Source0-md5: 28f6116efdbe9378269f8a6221767d1f Patch0: %{name}-make.patch Patch1: %{name}-mpeg4ip.patch Patch3: %{name}-backward_compat.patch -- 2.43.0 From ac4a87199b366ae80af5185885114d55b08df7f3 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 19 May 2020 19:09:10 +0200 Subject: [PATCH 2/5] - updated to 2.9.2 (fixes CVE-2018-19502 CVE-2018-19503 CVE-2018-19504 CVE-2018-20194 CVE-2018-20195 CVE-2018-20196 CVE-2018-20197 CVE-2018-20198 CVE-2018-20199 CVE-2018-20357 CVE-2018-20358 CVE-2018-20359 CVE-2018-20360 CVE-2018-20361 CVE-2018-20362 CVE-2019-6956 CVE-2019-15296) - mp4ff library has been removed upstream, but xmms plugin still requires it, so use externally packaged mp4ff, updated mp4ff patch accordingly --- faad2-mp4ff.patch | 28 +++++++++------------------- faad2.spec | 32 +++++++++++++++----------------- 2 files changed, 24 insertions(+), 36 deletions(-) diff --git a/faad2-mp4ff.patch b/faad2-mp4ff.patch index da948ab..4d9d4c1 100644 --- a/faad2-mp4ff.patch +++ b/faad2-mp4ff.patch @@ -1,25 +1,15 @@ ---- faad2-2.8.6/common/mp4ff/Makefile.am.orig 2017-12-11 17:43:53.975769960 +0100 -+++ faad2-2.8.6/common/mp4ff/Makefile.am 2017-12-11 17:54:59.092429032 +0100 -@@ -1,7 +1,7 @@ --noinst_LIBRARIES = libmp4ff.a --noinst_HEADERS = mp4ff.h mp4ffint.h -+lib_LTLIBRARIES = libmp4ff.la -+include_HEADERS = mp4ff.h mp4ffint.h +--- faad2-2_9_2/plugins/xmms/src/Makefile.am.orig 2020-05-19 18:03:13.548664034 +0200 ++++ faad2-2_9_2/plugins/xmms/src/Makefile.am 2020-05-19 18:05:21.617970223 +0200 +@@ -4,10 +4,9 @@ + plugin_LTLIBRARIES = libmp4.la --libmp4ff_a_CFLAGS = -DUSE_TAGGING=1 -+libmp4ff_la_CFLAGS = -DUSE_TAGGING=1 + libmp4_la_CFLAGS = $(local_CFLAGS) -Wall \ +- -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4ff ++ -I$(top_srcdir)/include --libmp4ff_a_SOURCES = mp4ff.c mp4atom.c mp4meta.c mp4sample.c mp4util.c \ -+libmp4ff_la_SOURCES = mp4ff.c mp4atom.c mp4meta.c mp4sample.c mp4util.c \ - mp4tagupdate.c mp4ff.h mp4ffint.h ---- faad2-2.7/plugins/xmms/src/Makefile.am.orig 2010-10-25 20:09:20.343741882 +0200 -+++ faad2-2.7/plugins/xmms/src/Makefile.am 2010-10-25 20:32:37.203740205 +0200 -@@ -7,7 +7,7 @@ - -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4ff - - libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la \ +-libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la \ - $(top_builddir)/common/mp4ff/libmp4ff.a -+ $(top_builddir)/common/mp4ff/libmp4ff.la ++libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la -lmp4ff libmp4_la_LDFLAGS = -module -avoid-version $(local_LDFLAGS) -lpthread diff --git a/faad2.spec b/faad2.spec index 19f6453..36ec73f 100644 --- a/faad2.spec +++ b/faad2.spec @@ -9,23 +9,27 @@ Summary: Freeware Advanced Audio Decoder 2 Summary(pl.UTF-8): Darmowy zaawansowany dekoder audio Name: faad2 -Version: 2.8.8 +Version: 2.9.2 +%define tag_ver %(echo %{version} | tr . _) Release: 1 License: GPL v2+ Group: Applications/Sound -Source0: http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz -# Source0-md5: 28f6116efdbe9378269f8a6221767d1f +#Source0: http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz +#Source0Download: https://github.com/knik0/faad2/releases +Source0: https://github.com/knik0/faad2/archive/%{tag_ver}/%{name}-%{tag_ver}.tar.gz +# Source0-md5: ed0db61d6ffa3e67748c3f03468c6eec Patch0: %{name}-make.patch Patch1: %{name}-mpeg4ip.patch Patch3: %{name}-backward_compat.patch Patch4: %{name}-mp4ff.patch -Patch6: %{name}-mp4v2.patch -URL: http://www.audiocoding.com/ +Patch5: %{name}-mp4v2.patch +URL: https://www.audiocoding.com/ %{?with_mpeg4ip:BuildRequires: SDL-devel} -BuildRequires: autoconf +BuildRequires: autoconf >= 2.50 BuildRequires: automake %{?with_xmms:BuildRequires: id3lib-devel >= 3.8.2} BuildRequires: libtool >= 2:1.4d-3 +%{?with_xmms:BuildRequires: mp4ff-devel} %if %{with mpeg4ip} BuildRequires: mp4v2-devel BuildRequires: mpeg4ip-devel >= 1:1.6 @@ -113,12 +117,12 @@ XMMS plugin for AAC files. Wtyczka XMMS do plików AAC. %prep -%setup -q +%setup -q -n %{name}-%{tag_ver} %patch0 -p1 %patch1 -p1 %patch3 -p1 %patch4 -p1 -%patch6 -p1 +%patch5 -p1 %build %{__libtoolize} @@ -127,8 +131,8 @@ Wtyczka XMMS do plików AAC. %{__autoheader} %{__automake} %configure \ - --with%{!?with_xmms:out}-xmms \ - --with%{!?with_mpeg4ip:out}-mpeg4ip \ + --with-xmms%{!?with_xmms:=no} \ + --with-mpeg4ip%{!?with_mpeg4ip:=no} \ %{!?with_static_libs:--disable-static} %{__make} @@ -169,28 +173,22 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libfaad.so.0 %attr(755,root,root) %{_libdir}/libfaad_drm.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfaad_drm.so.2 -%attr(755,root,root) %{_libdir}/libmp4ff.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libmp4ff.so.0 %files devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libfaad.so %attr(755,root,root) %{_libdir}/libfaad_drm.so -%attr(755,root,root) %{_libdir}/libmp4ff.so %{_libdir}/libfaad.la %{_libdir}/libfaad_drm.la -%{_libdir}/libmp4ff.la %{_includedir}/faad.h -%{_includedir}/mp4ff.h -%{_includedir}/mp4ffint.h %{_includedir}/neaacdec.h +%{_pkgconfigdir}/faad2.pc %if %{with static_libs} %files static %defattr(644,root,root,755) %{_libdir}/libfaad.a %{_libdir}/libfaad_drm.a -%{_libdir}/libmp4ff.a %endif %if %{with xmms} -- 2.43.0 From 4f3f8bc16b4cc8917632abb6653060b828c6fae5 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sun, 1 Nov 2020 23:14:02 +0100 Subject: [PATCH 3/5] up to 2.10.0 --- faad2.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/faad2.spec b/faad2.spec index 36ec73f..dc714cb 100644 --- a/faad2.spec +++ b/faad2.spec @@ -9,7 +9,7 @@ Summary: Freeware Advanced Audio Decoder 2 Summary(pl.UTF-8): Darmowy zaawansowany dekoder audio Name: faad2 -Version: 2.9.2 +Version: 2.10.0 %define tag_ver %(echo %{version} | tr . _) Release: 1 License: GPL v2+ @@ -17,7 +17,7 @@ Group: Applications/Sound #Source0: http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz #Source0Download: https://github.com/knik0/faad2/releases Source0: https://github.com/knik0/faad2/archive/%{tag_ver}/%{name}-%{tag_ver}.tar.gz -# Source0-md5: ed0db61d6ffa3e67748c3f03468c6eec +# Source0-md5: f948925a6763e30c53078f5af339d6cc Patch0: %{name}-make.patch Patch1: %{name}-mpeg4ip.patch Patch3: %{name}-backward_compat.patch -- 2.43.0 From d7cfa9188dba1678326bbc32f9d694d6775c3556 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 30 Mar 2023 20:55:30 +0200 Subject: [PATCH 4/5] - updated to 2.10.1 --- faad2-backward_compat.patch | 10 +++++----- faad2.spec | 15 +++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/faad2-backward_compat.patch b/faad2-backward_compat.patch index 8121189..635500c 100644 --- a/faad2-backward_compat.patch +++ b/faad2-backward_compat.patch @@ -58,11 +58,11 @@ + NeAACDecDecode); + +#endif ---- faad2/libfaad/mp4.c.orig 2007-11-01 13:33:32.000000000 +0100 -+++ faad2/libfaad/mp4.c 2007-11-04 12:35:57.860874110 +0100 -@@ -296,3 +296,14 @@ - - return result; +--- faad2-2.10.1/libfaad/mp4.c.orig 2023-03-30 20:51:02.976701799 +0200 ++++ faad2-2.10.1/libfaad/mp4.c 2023-03-30 20:52:50.676118341 +0200 +@@ -310,3 +310,14 @@ int8_t AudioSpecificConfig2(uint8_t *pBu + faad_endbits(&ld); + return ret; } + +#ifndef NO_BACKWARD_COMPAT diff --git a/faad2.spec b/faad2.spec index dc714cb..b9baca1 100644 --- a/faad2.spec +++ b/faad2.spec @@ -1,23 +1,22 @@ # # Conditional build: %bcond_with bootstrap # bootstrap (alias for _without_mpeg4ip) -%bcond_with mpeg4ip # don't build MPEG4IP plugin -%bcond_without static_libs # don't build static libraries -%bcond_without xmms # don't build XMMS plugin +%bcond_with mpeg4ip # MPEG4IP plugin +%bcond_without static_libs # static libraries +%bcond_without xmms # XMMS plugin %{?with_bootstrap:%undefine with_mpeg4ip} Summary: Freeware Advanced Audio Decoder 2 Summary(pl.UTF-8): Darmowy zaawansowany dekoder audio Name: faad2 -Version: 2.10.0 -%define tag_ver %(echo %{version} | tr . _) +Version: 2.10.1 Release: 1 License: GPL v2+ Group: Applications/Sound #Source0: http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz #Source0Download: https://github.com/knik0/faad2/releases -Source0: https://github.com/knik0/faad2/archive/%{tag_ver}/%{name}-%{tag_ver}.tar.gz -# Source0-md5: f948925a6763e30c53078f5af339d6cc +Source0: https://github.com/knik0/faad2/archive/%{version}/%{name}-%{version}.tar.gz +# Source0-md5: 62a0427c6ff3a273aa720e27da166758 Patch0: %{name}-make.patch Patch1: %{name}-mpeg4ip.patch Patch3: %{name}-backward_compat.patch @@ -117,7 +116,7 @@ XMMS plugin for AAC files. Wtyczka XMMS do plików AAC. %prep -%setup -q -n %{name}-%{tag_ver} +%setup -q %patch0 -p1 %patch1 -p1 %patch3 -p1 -- 2.43.0 From 43c8175c9122a06cc67b8f7fc78ac468b79e799d Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 3 Mar 2024 15:37:31 +0100 Subject: [PATCH 5/5] - updated to 2.11.1; uses cmake now, mpeg4ip and xmms plugins are gone --- faad2-make.patch | 12 ---- faad2-mp4ff.patch | 15 ----- faad2-mp4v2.patch | 21 ------- faad2-mpeg4ip.patch | 135 -------------------------------------------- faad2.spec | 113 +++++++++--------------------------- 5 files changed, 26 insertions(+), 270 deletions(-) delete mode 100644 faad2-make.patch delete mode 100644 faad2-mp4ff.patch delete mode 100644 faad2-mp4v2.patch delete mode 100644 faad2-mpeg4ip.patch diff --git a/faad2-make.patch b/faad2-make.patch deleted file mode 100644 index c8e54f5..0000000 --- a/faad2-make.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- faad2/plugins/xmms/src/Makefile.am.orig 2006-09-25 21:52:53.000000000 +0200 -+++ faad2/plugins/xmms/src/Makefile.am 2007-11-04 11:45:59.870028348 +0100 -@@ -1,7 +1,7 @@ - local_CFLAGS=`$(XMMS_CONFIG) --cflags` -Wall - local_LDFLAGS=`$(XMMS_CONFIG) --libs` --libdir = `$(XMMS_CONFIG) --input-plugin-dir` --lib_LTLIBRARIES = libmp4.la -+plugindir = `$(XMMS_CONFIG) --input-plugin-dir` -+plugin_LTLIBRARIES = libmp4.la - - libmp4_la_CFLAGS = $(local_CFLAGS) -Wall \ - -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4ff diff --git a/faad2-mp4ff.patch b/faad2-mp4ff.patch deleted file mode 100644 index 4d9d4c1..0000000 --- a/faad2-mp4ff.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- faad2-2_9_2/plugins/xmms/src/Makefile.am.orig 2020-05-19 18:03:13.548664034 +0200 -+++ faad2-2_9_2/plugins/xmms/src/Makefile.am 2020-05-19 18:05:21.617970223 +0200 -@@ -4,10 +4,9 @@ - plugin_LTLIBRARIES = libmp4.la - - libmp4_la_CFLAGS = $(local_CFLAGS) -Wall \ -- -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4ff -+ -I$(top_srcdir)/include - --libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la \ -- $(top_builddir)/common/mp4ff/libmp4ff.a -+libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la -lmp4ff - - libmp4_la_LDFLAGS = -module -avoid-version $(local_LDFLAGS) -lpthread - diff --git a/faad2-mp4v2.patch b/faad2-mp4v2.patch deleted file mode 100644 index 2c01f31..0000000 --- a/faad2-mp4v2.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- faad2-2.7/plugins/mpeg4ip/faad2.cpp.orig 2012-12-09 09:30:54.613929786 +0100 -+++ faad2-2.7/plugins/mpeg4ip/faad2.cpp 2012-12-09 11:02:12.133815617 +0100 -@@ -21,7 +21,7 @@ - #include "faad2.h" - #include - #include --#include -+#include - #include - - #define DEBUG_SYNC 2 ---- faad2-2.7/plugins/mpeg4ip/Makefile.am.orig 2003-08-07 19:21:21.000000000 +0200 -+++ faad2-2.7/plugins/mpeg4ip/Makefile.am 2012-12-09 11:12:59.277135462 +0100 -@@ -10,6 +10,7 @@ - - faad2_plugin_la_LIBADD = \ - $(top_builddir)/libfaad/libfaad.la \ -+ -lmp4util \ - -lm - - diff --git a/faad2-mpeg4ip.patch b/faad2-mpeg4ip.patch deleted file mode 100644 index 0c9efed..0000000 --- a/faad2-mpeg4ip.patch +++ /dev/null @@ -1,135 +0,0 @@ ---- faad2/plugins/mpeg4ip/faad2.cpp.orig 2004-08-20 10:30:53.000000000 +0200 -+++ faad2/plugins/mpeg4ip/faad2.cpp 2006-08-24 08:27:51.399489000 +0200 -@@ -35,7 +35,7 @@ - /* - * Create CAACodec class - */ --static codec_data_t *aac_codec_create (const char *compressor, -+static codec_data_t *aac_codec_create (const char *stream_type, const char *compressor, - int type, - int profile, - format_list_t *media_fmt, -@@ -148,7 +148,7 @@ - * Decode task call for FAAC - */ - static int aac_decode (codec_data_t *ptr, -- uint64_t ts, -+ frame_timestamp_t *ts, - int from_rtp, - int *sync_frame, - uint8_t *buffer, -@@ -163,15 +163,15 @@ - if (aac->m_record_sync_time) { - aac->m_current_frame = 0; - aac->m_record_sync_time = 0; -- aac->m_current_time = ts; -- aac->m_last_rtp_ts = ts; -+ aac->m_current_time = ts->msec_timestamp; -+ aac->m_last_rtp_ts = ts->msec_timestamp; - } else { -- if (aac->m_last_rtp_ts == ts) { -+ if (aac->m_last_rtp_ts == ts->msec_timestamp) { - aac->m_current_time += aac->m_msec_per_frame; - aac->m_current_frame++; - } else { -- aac->m_last_rtp_ts = ts; -- aac->m_current_time = ts; -+ aac->m_last_rtp_ts = ts->msec_timestamp; -+ aac->m_current_time = ts->msec_timestamp; - aac->m_current_frame = 0; - } - -@@ -239,7 +239,7 @@ - aac->m_chans, - (audio_format_t)AUDIO_S16SYS, - aac->m_output_frame_size); -- uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr); -+ uint8_t *now = aac->m_vft->audio_get_buffer(aac->m_ifptr, (ts->msec_timestamp * aac->m_freq) / 1000, ts->msec_timestamp); - aac->m_audio_inited = 1; - } - /* -@@ -281,6 +281,7 @@ - }; - - static int aac_codec_check (lib_message_func_t message, -+ const char *stream_type, - const char *compressor, - int type, - int profile, -@@ -322,7 +323,7 @@ - } - if (userdata != NULL) { - mpeg4_audio_config_t audio_config; -- decode_mpeg4_audio_config(userdata, userdata_size, &audio_config); -+ decode_mpeg4_audio_config(userdata, userdata_size, &audio_config, 1 /* ??? */); - message(LOG_DEBUG, "aac", "audio type is %d", audio_config.audio_object_type); - if (fmtp != NULL) free_fmtp_parse(fmtp); - ---- faad2/plugins/mpeg4ip/aa_file.cpp.orig 2004-01-05 15:05:12.000000000 +0100 -+++ faad2/plugins/mpeg4ip/aa_file.cpp 2006-08-24 08:33:42.189412000 +0200 -@@ -77,7 +77,7 @@ - - int aac_file_next_frame (codec_data_t *your, - uint8_t **buffer, -- uint64_t *ts) -+ frame_timestamp_t *ts) - { - aac_codec_t *aac = (aac_codec_t *)your; - -@@ -98,7 +98,10 @@ - uint64_t calc; - calc = aac->m_framecount * 1024 * M_LLU; - calc /= aac->m_freq; -- *ts = calc; -+ ts->msec_timestamp = calc; -+ ts->audio_freq_timestamp = calc; /* XXX */ -+ ts->audio_freq = 1; /* XXX */ -+ ts->timestamp_is_pts = false; - *buffer = aac->m_buffer; - aac->m_framecount++; - return (aac->m_buffer_size); ---- faad2/plugins/mpeg4ip/faad2.h.orig 2004-01-05 15:05:12.000000000 +0100 -+++ faad2/plugins/mpeg4ip/faad2.h 2006-08-24 08:29:23.233228250 +0200 -@@ -81,7 +81,7 @@ - - int aac_file_next_frame(codec_data_t *ifptr, - uint8_t **buffer, -- uint64_t *ts); -+ frame_timestamp_t *ts); - int aac_file_eof(codec_data_t *ifptr); - - void aac_file_used_for_frame(codec_data_t *ifptr, ---- faad2/configure.ac.orig 2006-09-25 21:52:53.000000000 +0200 -+++ faad2/configure.ac 2007-11-04 11:51:50.486008814 +0100 -@@ -123,6 +123,8 @@ - if test x$external_mp4v2 = xyes; then - AM_CONDITIONAL(HAVE_MPEG4IP_PLUG, true) - AC_MSG_NOTICE("Building MPEG4IP plugin") -+ MPEG4IP_PLAYER_PLUGIN_DIR="`mpeg4ip-config --player-plugin-dir`" -+ AC_SUBST(MPEG4IP_PLAYER_PLUGIN_DIR) - else - AC_MSG_NOTICE("MPEG4IP libmp4v2 is required for MPEG4IP plugin") - fi ---- faad2/plugins/mpeg4ip/faad2.cpp.orig 2007-11-13 21:24:36.000000000 +0100 -+++ faad2/plugins/mpeg4ip/faad2.cpp 2007-11-13 21:38:55.000000000 +0100 -@@ -67,7 +67,7 @@ - // This is not necessarilly right - it is, for the most part, but - // we should be reading the fmtp statement, and looking at the config. - // (like we do below in the userdata section... -- aac->m_freq = media_fmt->rtpmap->clock_rate; -+ aac->m_freq = media_fmt->rtpmap_clock_rate; - fmtp = parse_fmtp_for_mpeg4(media_fmt->fmt_param, vft->log_msg); - if (fmtp != NULL) { - userdata = fmtp->config_binary; -@@ -308,9 +308,8 @@ - } - } - if (fptr != NULL && -- fptr->rtpmap != NULL && -- fptr->rtpmap->encode_name != NULL) { -- if (strcasecmp(fptr->rtpmap->encode_name, "mpeg4-generic") != 0) { -+ fptr->rtpmap_name != NULL) { -+ if (strcasecmp(fptr->rtpmap_name, "mpeg4-generic") != 0) { - return -1; - } - if (userdata == NULL) { diff --git a/faad2.spec b/faad2.spec index b9baca1..4a1054f 100644 --- a/faad2.spec +++ b/faad2.spec @@ -1,40 +1,22 @@ # # Conditional build: -%bcond_with bootstrap # bootstrap (alias for _without_mpeg4ip) -%bcond_with mpeg4ip # MPEG4IP plugin %bcond_without static_libs # static libraries -%bcond_without xmms # XMMS plugin -%{?with_bootstrap:%undefine with_mpeg4ip} Summary: Freeware Advanced Audio Decoder 2 Summary(pl.UTF-8): Darmowy zaawansowany dekoder audio Name: faad2 -Version: 2.10.1 +Version: 2.11.1 Release: 1 License: GPL v2+ Group: Applications/Sound #Source0: http://downloads.sourceforge.net/faac/%{name}-%{version}.tar.gz #Source0Download: https://github.com/knik0/faad2/releases Source0: https://github.com/knik0/faad2/archive/%{version}/%{name}-%{version}.tar.gz -# Source0-md5: 62a0427c6ff3a273aa720e27da166758 -Patch0: %{name}-make.patch -Patch1: %{name}-mpeg4ip.patch -Patch3: %{name}-backward_compat.patch -Patch4: %{name}-mp4ff.patch -Patch5: %{name}-mp4v2.patch -URL: https://www.audiocoding.com/ -%{?with_mpeg4ip:BuildRequires: SDL-devel} -BuildRequires: autoconf >= 2.50 -BuildRequires: automake -%{?with_xmms:BuildRequires: id3lib-devel >= 3.8.2} -BuildRequires: libtool >= 2:1.4d-3 -%{?with_xmms:BuildRequires: mp4ff-devel} -%if %{with mpeg4ip} -BuildRequires: mp4v2-devel -BuildRequires: mpeg4ip-devel >= 1:1.6 -%endif +# Source0-md5: f85b2514c4fb2f87d22a3bc879d83277 +Patch0: %{name}-backward_compat.patch +URL: https://github.com/knik0/faad2 +BuildRequires: cmake >= 3.15 BuildRequires: rpmbuild(macros) >= 1.721 -%{?with_xmms:BuildRequires: xmms-devel} Requires: %{name}-libs = %{version}-%{release} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -58,12 +40,12 @@ Conflicts: faad2 < 2.0-3 %description libs FAAD 2 is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder, completely written from scratch. This package contains base FAAD 2 -libraries: libfaad and libmp4ff. +libraries: libfaad and libfaad_drm. %description libs -l pl.UTF-8 FAAD 2 to napisany całkowicie od początku dekoder MPEG2 i MPEG-4 obsługujący profile LC, MAIN i LTP. Ten pakiet zawiera podstawowe -biblioteki FAAD 2: libfaad i libmp4ff. +biblioteki FAAD 2: libfaad i libfaad_drm. %package devel Summary: Header files for faad2 @@ -89,66 +71,37 @@ Static faad2 library. %description static -l pl.UTF-8 Statyczna biblioteka faad2. -%package -n mpeg4ip-plugin-faad2 -Summary: MPEG4IP plugin for AAC files -Summary(pl.UTF-8): Wtyczka MPEG4IP do plików AAC -Group: Applications/Sound -Requires: %{name}-libs = %{version}-%{release} -Requires: mpeg4ip - -%description -n mpeg4ip-plugin-faad2 -MPEG4IP plugin for AAC files. - -%description -n mpeg4ip-plugin-faad2 -l pl.UTF-8 -Wtyczka MPEG4IP do plików AAC. - -%package -n xmms-input-faad2 -Summary: XMMS plugin for AAC files -Summary(pl.UTF-8): Wtyczka XMMS do plików AAC -Group: X11/Applications/Sound -Requires: %{name}-libs = %{version}-%{release} -Requires: xmms - -%description -n xmms-input-faad2 -XMMS plugin for AAC files. - -%description -n xmms-input-faad2 -l pl.UTF-8 -Wtyczka XMMS do plików AAC. - %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %build -%{__libtoolize} -%{__aclocal} -%{__autoconf} -%{__autoheader} -%{__automake} -%configure \ - --with-xmms%{!?with_xmms:=no} \ - --with-mpeg4ip%{!?with_mpeg4ip:=no} \ - %{!?with_static_libs:--disable-static} - -%{__make} +%if %{with static_libs} +%cmake -B build-static \ + -DBUILD_SHARED_LIBS=OFF + +%{__make} -C build-static +%endif + +%cmake -B build + +%{__make} -C build %install rm -rf $RPM_BUILD_ROOT -%{__make} install \ +%if %{with static_libs} +%{__make} -C build-static install \ DESTDIR=$RPM_BUILD_ROOT -%if %{with xmms} -%{__rm} $RPM_BUILD_ROOT%{xmms_input_plugindir}/*.{la,a} -%endif -%if %{with mpeg4ip} -%{__rm} $RPM_BUILD_ROOT%{_libdir}/mp4player_plugin/*.{la,a} +# ensure files from shared build are packaged +%{__rm} $RPM_BUILD_ROOT%{_bindir}/faad +%{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/faad2.pc %endif +%{__make} -C build install \ + DESTDIR=$RPM_BUILD_ROOT + # for compatibility with apps using dlopen("libfaad.so.0") ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libfaad.so.2.*.*) $RPM_BUILD_ROOT%{_libdir}/libfaad.so.0 @@ -165,7 +118,7 @@ rm -rf $RPM_BUILD_ROOT %files libs %defattr(644,root,root,755) -%doc AUTHORS ChangeLog NEWS README TODO +%doc AUTHORS ChangeLog README %attr(755,root,root) %{_libdir}/libfaad.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libfaad.so.2 # compat symlink @@ -177,8 +130,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libfaad.so %attr(755,root,root) %{_libdir}/libfaad_drm.so -%{_libdir}/libfaad.la -%{_libdir}/libfaad_drm.la %{_includedir}/faad.h %{_includedir}/neaacdec.h %{_pkgconfigdir}/faad2.pc @@ -189,15 +140,3 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libfaad.a %{_libdir}/libfaad_drm.a %endif - -%if %{with xmms} -%files -n xmms-input-faad2 -%defattr(644,root,root,755) -%attr(755,root,root) %{xmms_input_plugindir}/libmp4.so -%endif - -%if %{with mpeg4ip} -%files -n mpeg4ip-plugin-faad2 -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/mp4player_plugin/faad2_plugin.so* -%endif -- 2.43.0