[packages/lame] - enabled nasm on x86 (for runtime-detected MMX/3Dnow/SSE asm routines) - no-sse2 patch replaced by
qboosh
qboosh at pld-linux.org
Sat Mar 25 11:42:57 CET 2017
commit b67f4bf574d4ed887fbe1cf584394f811dd6d45d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Mar 25 11:44:59 2017 +0100
- enabled nasm on x86 (for runtime-detected MMX/3Dnow/SSE asm routines)
- no-sse2 patch replaced by sse patch (fix SSE routines compilation issue and add missing runtime detection parts)
- release 5
lame-sse.patch | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
lame.spec | 36 +++++++++++++++++-----------------
no-sse2.patch | 21 --------------------
3 files changed, 79 insertions(+), 39 deletions(-)
---
diff --git a/lame.spec b/lame.spec
index b7ed53e..01ad7fe 100644
--- a/lame.spec
+++ b/lame.spec
@@ -1,18 +1,14 @@
#
# 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)
@@ -22,7 +18,7 @@ Source0: http://downloads.sourceforge.net/lame/%{name}-%{version}.tar.gz
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
@@ -30,24 +26,27 @@ 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.
@@ -66,7 +65,7 @@ Biblioteka kodująca MP3 LAME.
%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}
@@ -78,7 +77,7 @@ Header files and devel documentation for LAME libraries.
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.
@@ -120,7 +119,7 @@ Analizator ramek w GTK+.
%patch0 -p1
%{!?with_gtk:%patch1 -p1}
%patch2 -p1
-%{!?with_sse2:%patch3 -p1}
+%patch3 -p1
%build
%{__libtoolize}
@@ -130,11 +129,12 @@ Analizator ramek w GTK+.
%{__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}
diff --git a/lame-sse.patch b/lame-sse.patch
new file mode 100644
index 0000000..1c37aec
--- /dev/null
+++ b/lame-sse.patch
@@ -0,0 +1,61 @@
+--- 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
diff --git a/no-sse2.patch b/no-sse2.patch
deleted file mode 100644
index a162901..0000000
--- a/no-sse2.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- lame-3.99.5/configure.in~ 2015-03-10 08:36:50.000000000 +0100
-+++ lame-3.99.5/configure.in 2015-03-10 08:40:32.503330833 +0100
-@@ -95,7 +95,6 @@
- sys/soundcard.h \
- sys/time.h \
- unistd.h \
-- xmmintrin.h \
- linux/soundcard.h)
-
- dnl Checks for typedefs, structures, and compiler characteristics.
-@@ -646,10 +646,6 @@
- ;;
- *86)
- CPUTYPE="i386"
-- if test $ac_cv_header_xmmintrin_h = yes ; then
-- WITH_XMM=yes
-- WITH_VECTOR=yes
-- fi
-
- # use internal knowledge of the IEEE 754 layout
- AC_DEFINE(TAKEHIRO_IEEE754_HACK, 1, IEEE754 compatible machine)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lame.git/commitdiff/b67f4bf574d4ed887fbe1cf584394f811dd6d45d
More information about the pld-cvs-commit
mailing list