--- /dev/null
+--- lame-3.99.5/libmp3lame/vector/Makefile.am.orig 2007-01-09 11:15:53.000000000 +0100
++++ lame-3.99.5/libmp3lame/vector/Makefile.am 2017-03-24 22:07:11.773733964 +0100
+@@ -8,6 +8,7 @@
+
+ ##liblamecpuroutines_la_LIBADD =
+ ##liblamecpuroutines_la_LDFLAGS =
++liblamevectorroutines_la_CFLAGS = -msse
+
+ INCLUDES = @INCLUDES@ \
+ -I$(top_srcdir)/libmp3lame \
+--- lame-3.99.5/libmp3lame/fft.c.orig 2009-04-20 23:48:00.000000000 +0200
++++ lame-3.99.5/libmp3lame/fft.c 2017-03-25 08:53:51.949957603 +0100
+@@ -308,7 +308,12 @@
+ for (i = 0; i < BLKSIZE_s / 2; i++)
+ window_s[i] = 0.5 * (1.0 - cos(2.0 * PI * (i + 0.5) / BLKSIZE_s));
+
+- gfc->fft_fht = fht;
++#ifdef HAVE_XMMINTRIN_H
++ if (gfc->CPU_features.SSE2) { // TODO: isn't fht_SSE2() just SSE? I don't see anything SSE2 (emmintrin.h) specific inside
++ gfc->fft_fht = fht_SSE2;
++ }
++ else
++#endif
+ #ifdef HAVE_NASM
+ if (gfc->CPU_features.AMD_3DNow) {
+ gfc->fft_fht = fht_3DN;
+@@ -316,14 +321,7 @@
+ else if (gfc->CPU_features.SSE) {
+ gfc->fft_fht = fht_SSE;
+ }
+- else {
+- gfc->fft_fht = fht;
+- }
+-#else
+-#ifdef HAVE_XMMINTRIN_H
+-#ifdef MIN_ARCH_SSE
+- gfc->fft_fht = fht_SSE2;
+-#endif
+-#endif
++ else
+ #endif
++ gfc->fft_fht = fht;
+ }
+--- lame-3.99.5/libmp3lame/lame.c.orig 2017-03-25 08:56:45.616622288 +0100
++++ lame-3.99.5/libmp3lame/lame.c 2017-03-25 08:56:51.436622221 +0100
+@@ -1344,12 +1344,11 @@
+ else if (gfc->CPU_features.SSE) {
+ fft_asm_used = 2;
+ }
+-#else
+-# if defined( HAVE_XMMINTRIN_H ) && defined( MIN_ARCH_SSE )
+- {
++#endif
++#ifdef HAVE_XMMINTRIN_H
++ if (gfc->CPU_features.SSE2) {
+ fft_asm_used = 3;
+ }
+-# endif
+ #endif
+ if (gfc->CPU_features.MMX) {
+ #ifdef MMX_choose_table
#
# Conditional build:
-%bcond_without gtk # without GTK+ frontend
-%bcond_without sse2 # disable SSE2 instructions usage
+%bcond_without gtk # GTK+ frontend
#
-%ifarch %{ix86}
-%undefine with_sse2
-%endif
Summary: Software to create compressed audio files
Summary(es.UTF-8): Lame es un gerador de MP3
Summary(pl.UTF-8): Program do tworzenia skompresowanych plików dźwiękowych
Summary(pt_BR.UTF-8): Lame é um gerador de MP3
Name: lame
Version: 3.99.5
-Release: 4
+Release: 5
# libmp3lame encoder is LGPL v2+, but decoder parts (enabled by default)
# come from old mpg123 code, which was licensed on GPL
License: GPL v2+ (MP3 decoder), LGPL v2+ (the rest)
Patch0: %{name}-link.patch
Patch1: %{name}-without_gtk.patch
Patch2: %{name}-automake_1_12.patch
-Patch3: no-sse2.patch
+Patch3: %{name}-sse.patch
URL: http://lame.sourceforge.net/
BuildRequires: autoconf >= 2.68
BuildRequires: automake
# with --with-fileio=sndfile (but disables stdin input)
#BuildRequires: libsndfile-devel >= 1.0.2
BuildRequires: libtool
+%ifarch %{ix86}
BuildRequires: nasm
+%endif
BuildRequires: ncurses-devel >= 4.2
BuildRequires: pkgconfig
Requires: %{name}-libs = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Lame is a program which can be used to create compressed audio files.
-(Lame aint MP3 encoder). These audio files can be played back by
+Lame (LAME Ain't an MP3 Encoder) is a program which can be used to
+create compressed audio files. These audio files can be played back by
popular MP3 players such as mpg123.
%description -l es.UTF-8
LAME es un encoder MP3 GPL.
%description -l pl.UTF-8
-Lame jest programem, który służy do tworzenia skompresowanych plików
-dźwiękowych. (Lame nie jest programem do kompresji w formacie MP3).
-Stworzone pliki można odtwarzać dekoderami MP3, np.: mpg123.
+Lame (LAME Ain't an MP3 Encoder - LAME to nie program do kodowania
+MP3) jest programem, który służy do tworzenia skompresowanych plików
+dźwiękowych. Stworzone pliki można odtwarzać dekoderami MP3, np.:
+mpg123.
%description -l pt_BR.UTF-8
LAME é um encoder MP3 GPL.
%package libs-devel
Summary: Header files and devel documentation
Summary(es.UTF-8): Archivos para desarrollo
-Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja developerska
+Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja deweloperska
Summary(pt_BR.UTF-8): Arquivos para desenvolvimento
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Archivos de desarrolo.
%description libs-devel -l pl.UTF-8
-Pliki nagłówkowe i dokumentacja developerska bibliotek LAME.
+Pliki nagłówkowe i dokumentacja deweloperska bibliotek LAME.
%description libs-devel -l pt_BR.UTF-8
Arquivos de desenvolvimento.
%patch0 -p1
%{!?with_gtk:%patch1 -p1}
%patch2 -p1
-%{!?with_sse2:%patch3 -p1}
+%patch3 -p1
%build
%{__libtoolize}
%{__automake}
%configure \
--disable-cpml \
- --enable-shared \
- --enable-static \
+ --enable-dynamic-frontends \
%{?with_gtk:--enable-mp3x} \
--enable-mp3rtp \
- --enable-brhist
+%ifarch %{ix86}
+ --enable-nasm
+%endif
%{__make}