summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/lame/package.py22
-rw-r--r--var/spack/repos/builtin/packages/libmad/libmad-0.15.1b.patch108
-rw-r--r--var/spack/repos/builtin/packages/libmad/package.py27
-rw-r--r--var/spack/repos/builtin/packages/sox/package.py6
4 files changed, 163 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/lame/package.py b/var/spack/repos/builtin/packages/lame/package.py
new file mode 100644
index 0000000000..0673ee2487
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lame/package.py
@@ -0,0 +1,22 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Lame(AutotoolsPackage):
+ """LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed
+ under the LGPL."""
+
+ homepage = "http://lame.sourceforge.net/"
+ url = "https://download.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz"
+
+ version('3.100', sha256='ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e')
+
+ depends_on('nasm', type='build')
+
+ def configure_args(self):
+ args = ['--enable-mp3rtp', '--disable-static']
+ return args
diff --git a/var/spack/repos/builtin/packages/libmad/libmad-0.15.1b.patch b/var/spack/repos/builtin/packages/libmad/libmad-0.15.1b.patch
new file mode 100644
index 0000000000..8d607287d3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libmad/libmad-0.15.1b.patch
@@ -0,0 +1,108 @@
+diff -Naur libmad-0.15.1b.orig/AUTHORS libmad-0.15.1b/AUTHORS
+--- libmad-0.15.1b.orig/AUTHORS 1970-01-01 02:00:00.000000000 +0200
++++ libmad-0.15.1b/AUTHORS 2019-07-09 16:11:58.671099511 +0300
+@@ -0,0 +1 @@
++# patch
+diff -Naur libmad-0.15.1b.orig/ChangeLog libmad-0.15.1b/ChangeLog
+--- libmad-0.15.1b.orig/ChangeLog 1970-01-01 02:00:00.000000000 +0200
++++ libmad-0.15.1b/ChangeLog 2019-07-09 16:12:02.871091228 +0300
+@@ -0,0 +1 @@
++# patch
+diff -Naur libmad-0.15.1b.orig/configure.ac libmad-0.15.1b/configure.ac
+--- libmad-0.15.1b.orig/configure.ac 2019-07-09 16:03:27.560110809 +0300
++++ libmad-0.15.1b/configure.ac 2019-07-09 16:04:03.960038510 +0300
+@@ -28,7 +28,7 @@
+
+ AM_INIT_AUTOMAKE
+
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+
+ dnl System type.
+
+@@ -124,71 +124,7 @@
+
+ if test "$GCC" = yes
+ then
+- if test -z "$arch"
+- then
+- case "$host" in
+- i386-*) ;;
+- i?86-*) arch="-march=i486" ;;
+- arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;;
+- armv4*-*) arch="-march=armv4 -mtune=strongarm" ;;
+- powerpc-*) ;;
+- mips*-agenda-*) arch="-mcpu=vr4100" ;;
+- mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
+- esac
+- fi
+-
+- case "$optimize" in
+- -O|"-O "*)
+- optimize="-O"
+- optimize="$optimize -fforce-mem"
+- optimize="$optimize -fforce-addr"
+- : #x optimize="$optimize -finline-functions"
+- : #- optimize="$optimize -fstrength-reduce"
+- optimize="$optimize -fthread-jumps"
+- optimize="$optimize -fcse-follow-jumps"
+- optimize="$optimize -fcse-skip-blocks"
+- : #x optimize="$optimize -frerun-cse-after-loop"
+- : #x optimize="$optimize -frerun-loop-opt"
+- : #x optimize="$optimize -fgcse"
+- optimize="$optimize -fexpensive-optimizations"
+- optimize="$optimize -fregmove"
+- : #* optimize="$optimize -fdelayed-branch"
+- : #x optimize="$optimize -fschedule-insns"
+- optimize="$optimize -fschedule-insns2"
+- : #? optimize="$optimize -ffunction-sections"
+- : #? optimize="$optimize -fcaller-saves"
+- : #> optimize="$optimize -funroll-loops"
+- : #> optimize="$optimize -funroll-all-loops"
+- : #x optimize="$optimize -fmove-all-movables"
+- : #x optimize="$optimize -freduce-all-givs"
+- : #? optimize="$optimize -fstrict-aliasing"
+- : #* optimize="$optimize -fstructure-noalias"
+-
+- case "$host" in
+- arm*-*)
+- optimize="$optimize -fstrength-reduce"
+- ;;
+- mips*-*)
+- optimize="$optimize -fstrength-reduce"
+- optimize="$optimize -finline-functions"
+- ;;
+- i?86-*)
+- optimize="$optimize -fstrength-reduce"
+- ;;
+- powerpc-apple-*)
+- # this triggers an internal compiler error with gcc2
+- : #optimize="$optimize -fstrength-reduce"
+-
+- # this is really only beneficial with gcc3
+- : #optimize="$optimize -finline-functions"
+- ;;
+- *)
+- # this sometimes provokes bugs in gcc 2.95.2
+- : #optimize="$optimize -fstrength-reduce"
+- ;;
+- esac
+- ;;
+- esac
++ optimize="-O2"
+ fi
+
+ case "$host" in
+@@ -297,6 +233,7 @@
+ then
+ case "$host" in
+ i?86-*) FPM="INTEL" ;;
++ x86_64*) FPM="64BIT" ;;
+ arm*-*) FPM="ARM" ;;
+ mips*-*) FPM="MIPS" ;;
+ sparc*-*) FPM="SPARC" ;;
+diff -Naur libmad-0.15.1b.orig/NEWS libmad-0.15.1b/NEWS
+--- libmad-0.15.1b.orig/NEWS 1970-01-01 02:00:00.000000000 +0200
++++ libmad-0.15.1b/NEWS 2019-07-09 16:11:56.887103030 +0300
+@@ -0,0 +1 @@
++# patch
diff --git a/var/spack/repos/builtin/packages/libmad/package.py b/var/spack/repos/builtin/packages/libmad/package.py
new file mode 100644
index 0000000000..42fa7341b2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libmad/package.py
@@ -0,0 +1,27 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Libmad(AutotoolsPackage):
+ """MAD is a high-quality MPEG audio decoder."""
+
+ homepage = "https://www.underbit.com/products/mad/"
+ url = "ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz"
+ list_url = "ftp://ftp.mars.org/pub/mpeg/"
+
+ version('0.15.1b', sha256='bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690')
+
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
+
+ # Patch orignally from here, adapted to create missing files:
+ # http://www.linuxfromscratch.org/blfs/view/svn/multimedia/libmad.html
+ patch('libmad-0.15.1b.patch')
+
+ force_autoreconf = True
diff --git a/var/spack/repos/builtin/packages/sox/package.py b/var/spack/repos/builtin/packages/sox/package.py
index 626b031c10..2a92660baa 100644
--- a/var/spack/repos/builtin/packages/sox/package.py
+++ b/var/spack/repos/builtin/packages/sox/package.py
@@ -14,8 +14,14 @@ class Sox(AutotoolsPackage):
version('14.4.2', 'ba804bb1ce5c71dd484a102a5b27d0dd')
+ variant('mp3',
+ default=False,
+ description='Build with mp3 support')
+
depends_on('bzip2')
depends_on('flac')
depends_on('id3lib')
depends_on('libvorbis')
depends_on('opus')
+ depends_on('lame', when='+mp3')
+ depends_on('libmad', when='+mp3')