Package init

This commit is contained in:
overweight 2019-09-30 10:38:54 -04:00
commit 101ed4b1e3
5 changed files with 164 additions and 0 deletions

BIN
flac-1.3.2.tar.xz Normal file

Binary file not shown.

31
flac-cflags.patch Normal file
View File

@ -0,0 +1,31 @@
diff -up flac-1.3.2/configure.ac.cflags flac-1.3.2/configure.ac
--- flac-1.3.2/configure.ac.cflags 2017-01-02 14:02:15.663046237 +0100
+++ flac-1.3.2/configure.ac 2017-01-02 14:04:20.718046015 +0100
@@ -390,7 +390,7 @@ if test "x$debug" = xtrue; then
else
CPPFLAGS="-DNDEBUG $CPPFLAGS"
CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//')
- CFLAGS="-O3 -funroll-loops $CFLAGS"
+ CFLAGS="$user_cflags"
fi
XIPH_GCC_VERSION
@@ -400,7 +400,6 @@ if test x$ac_cv_c_compiler_gnu = xyes ;
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
- XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
AC_LANG_PUSH([C++])
XIPH_ADD_CXXFLAGS([-Weffc++])
@@ -426,10 +425,6 @@ if test x$ac_cv_c_compiler_gnu = xyes ;
XIPH_ADD_CFLAGS([-fno-inline-small-functions])
fi
- if test "x$asm_optimisation$sse_os" = "xyesyes" ; then
- XIPH_ADD_CFLAGS([-msse2])
- fi
-
fi
case "$host_os" in

22
flac-memleak.patch Normal file
View File

@ -0,0 +1,22 @@
commit 4f47b63e9c971e6391590caf00a0f2a5ed612e67
Author: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Sat Apr 8 18:34:49 2017 +1000
stream_decoder.c: Fix a memory leak
Leak reported by Secunia Research.
diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c
index 14d5fe7f..a5527511 100644
--- a/src/libFLAC/stream_decoder.c
+++ b/src/libFLAC/stream_decoder.c
@@ -1753,6 +1753,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
}
memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
+ /* Current i-th entry is bad, so we delete it. */
+ free (obj->comments[i].entry) ;
+ obj->comments[i].entry = NULL ;
obj->num_comments = i;
goto skip;
}

102
flac.spec Normal file
View File

@ -0,0 +1,102 @@
%define xmms_inputdir %(xmms-config --input-plugin-dir 2>/dev/null || echo %{_libdir}/xmms/General)
Name: flac
Version: 1.3.2
Release: 9
Summary: encoder/decoder which support the Free Lossless Audio Codec
License: BSD and GPLv2+ and GFDL
Source0: http://downloads.xiph.org/releases/flac/flac-%{version}.tar.xz
Patch6000: flac-cflags.patch
Patch6001: flac-memleak.patch
Provides: %{name}-libs
Obsoletes: %{name}-libs
BuildRequires: gcc-c++ libogg-devel gcc automake autoconf libtool gettext-devel doxygen
BuildRequires: xmms-devel desktop-file-utils
Source1: xmms-flac.desktop
%description
FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3,
but lossless, meaning that audio is compressed in FLAC without any loss in quality.
%package devel
Summary: FLAC libraries and header files for development.
Requires: pkgconfig
%description devel
FLAC libraries and header files for development.
%package -n xmms-flac
Summary: XMMS plugin needed to play FLAC files
License: GPLv2+
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
%description -n xmms-flac
This package contains an XMMS input plugin to play FLAC audio streams. It also
provides symlinks for it to work with Beep Media Player, since plugins between
the two players are interchangeable.
%package help
Summary: help package for %{name} with man docs
%description help
document files for %{name}
%prep
%autosetup -n %{name}-%{version} -p1
%build
./autogen.sh -V
export CFLAGS="%{optflags} -funroll-loops"
%configure --enable-xmms-plugin --disable-silent-rules --disable-thorough-tests
make
%install
%make_install
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
mv %{buildroot}%{_docdir}/flac* ./flac-doc
mkdir -p flac-doc-devel
mv flac-doc{/html/api,-devel}
rm flac-doc/FLAC.tag %{buildroot}%{_libdir}/*.la \
%{buildroot}%{xmms_inputdir}/*.la
%check
make -C test check FLAC__TEST_LEVEL=0 &> /dev/null
%ldconfig_scriptlets libs
%post -n xmms-flac
update-desktop-database &> /dev/null || :
%postun -n xmms-flac
update-desktop-database &> /dev/null || :
%files
%doc flac-doc/* AUTHORS COPYING* README
%{_bindir}/flac
%{_bindir}/metaflac
%{_libdir}/*.so.*
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_datadir}/aclocal/*.m4
%files -n xmms-flac
%license COPYING.GPL
%{_datadir}/applications/xmms-flac.desktop
%{xmms_inputdir}/libxmms-flac.so
%files help
%{_mandir}/man1/*
%doc flac-doc-devel/*
%changelog
* Fri Sep 6 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.3.2-9
- Package init

9
xmms-flac.desktop Normal file
View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=XMMS
Exec=xmms -p -e %F
Icon=xmms
MimeType=audio/x-flac;audio/flac;
Categories=AudioVideo;Player;
Terminal=false
Type=Application
NoDisplay=true