gnu: liba52: Build shared library.
* gnu/packages/patches/liba52-enable-pic.patch, gnu/packages/patches/liba52-link-with-libm.patch, gnu/packages/patches/liba52-set-soname.patch, gnu/packages/patches/liba52-use-mtune-not-mcpu.patch: New files. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/video.scm (liba52)[source]: Add patches. [native-inputs]: Add autoconf, automake, and libtool. [arguments]: Add "--enable-shared" to configure-flags. Add 'bootstrap' phase.
This commit is contained in:
parent
4ca5c91f65
commit
23da88f61e
|
@ -486,6 +486,10 @@ dist_patch_DATA = \
|
|||
gnu/packages/patches/jbig2dec-ignore-testtest.patch \
|
||||
gnu/packages/patches/kmod-module-directory.patch \
|
||||
gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \
|
||||
gnu/packages/patches/liba52-enable-pic.patch \
|
||||
gnu/packages/patches/liba52-link-with-libm.patch \
|
||||
gnu/packages/patches/liba52-set-soname.patch \
|
||||
gnu/packages/patches/liba52-use-mtune-not-mcpu.patch \
|
||||
gnu/packages/patches/libarchive-CVE-2013-0211.patch \
|
||||
gnu/packages/patches/libarchive-fix-lzo-test-case.patch \
|
||||
gnu/packages/patches/libarchive-mtree-filename-length-fix.patch \
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
Copied from Debian.
|
||||
|
||||
Description: Disabling -prefer-non-pic which enables -fPIC
|
||||
Bug-Debian: http://bugs.debian.org/401590
|
||||
Author: Daniel Baumann <daniel@debian.org>, Dmitrijs Ledkovs <dmitrij.ledkov@gmail.com>
|
||||
|
||||
|
||||
---
|
||||
liba52/configure.incl | 3 ---
|
||||
1 files changed, 0 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: a52dec-deb/liba52/configure.incl
|
||||
===================================================================
|
||||
--- a52dec-deb.orig/liba52/configure.incl 2009-12-05 02:52:12.000000000 +0000
|
||||
+++ a52dec-deb/liba52/configure.incl 2009-12-05 03:23:45.000000000 +0000
|
||||
@@ -1,9 +1,6 @@
|
||||
AC_SUBST([LIBA52_CFLAGS])
|
||||
AC_SUBST([LIBA52_LIBS])
|
||||
|
||||
-dnl avoid -fPIC when possible
|
||||
-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
|
||||
-
|
||||
AC_ARG_ENABLE([double],
|
||||
[ --enable-double use double-precision samples])
|
||||
if test x"$enable_double" = x"yes"; then
|
|
@ -0,0 +1,33 @@
|
|||
Copied from Debian.
|
||||
|
||||
Description: Explicitely link against -lm
|
||||
Bug-Debian: http://bugs.debian.org/553595
|
||||
Author: Fabian Greffrath <fabian@debian-unofficial.org>, Dmitrijs Ledkovs <dmitrij.ledkov@gmail.com>
|
||||
|
||||
---
|
||||
libao/Makefile.am | 1 +
|
||||
src/Makefile.am | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -1,9 +1,9 @@
|
||||
-CFLAGS = @A52DEC_CFLAGS@
|
||||
+AM_CFLAGS = @A52DEC_CFLAGS@
|
||||
|
||||
bin_PROGRAMS = a52dec extract_a52
|
||||
a52dec_SOURCES = a52dec.c getopt.c gettimeofday.c
|
||||
a52dec_LDADD = $(top_builddir)/liba52/liba52.la \
|
||||
- $(top_builddir)/libao/libao.a @LIBAO_LIBS@
|
||||
+ $(top_builddir)/libao/libao.a @LIBAO_LIBS@ -lm
|
||||
extract_a52_SOURCES = extract_a52.c getopt.c
|
||||
|
||||
man_MANS = a52dec.1 extract_a52.1
|
||||
--- a/liba52/Makefile.am
|
||||
+++ b/liba52/Makefile.am
|
||||
@@ -1,4 +1,4 @@
|
||||
-CFLAGS = @CFLAGS@ @LIBA52_CFLAGS@
|
||||
+AM_CFLAGS = @CFLAGS@ @LIBA52_CFLAGS@
|
||||
|
||||
lib_LTLIBRARIES = liba52.la
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
Copied from Debian.
|
||||
|
||||
Description: Sets the soname to liba52-$(VERSION).so
|
||||
Bug-Debian: http://bugs.debian.org/401636
|
||||
Author: Daniel Baumann <daniel@debian.org>, Dmitrijs Ledkovs <dmitrij.ledkov@gmail.com>
|
||||
|
||||
|
||||
---
|
||||
liba52/Makefile.am | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
Index: a52dec-deb/liba52/Makefile.am
|
||||
===================================================================
|
||||
--- a52dec-deb.orig/liba52/Makefile.am 2009-12-05 02:52:12.000000000 +0000
|
||||
+++ a52dec-deb/liba52/Makefile.am 2009-12-05 03:23:47.000000000 +0000
|
||||
@@ -4,6 +4,6 @@
|
||||
|
||||
liba52_la_SOURCES = bitstream.c imdct.c bit_allocate.c parse.c downmix.c
|
||||
liba52_la_LIBADD = @LIBA52_LIBS@ -lm
|
||||
-liba52_la_LDFLAGS = -no-undefined
|
||||
+liba52_la_LDFLAGS = -no-undefined -release @VERSION@
|
||||
|
||||
EXTRA_DIST = configure.incl a52_internal.h bitstream.h tables.h
|
|
@ -0,0 +1,24 @@
|
|||
Copied from Debian.
|
||||
|
||||
From: Rodeo
|
||||
Origin: https://github.com/HandBrake/HandBrake/blob/master/contrib/a52dec/A04-modern-gcc-cflags.patch
|
||||
|
||||
--- a52dec-0.7.4/configure.in.orig
|
||||
+++ a52dec-0.7.4/configure.in
|
||||
@@ -34,11 +34,11 @@
|
||||
case "$host" in
|
||||
i?86-* | k?-*)
|
||||
case "$host" in
|
||||
- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
|
||||
- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
|
||||
- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
|
||||
- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
|
||||
- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
|
||||
+ i386-*) OPT_CFLAGS="$CFLAGS -mtune=i386";;
|
||||
+ i486-*) OPT_CFLAGS="$CFLAGS -mtune=i486";;
|
||||
+ i586-*) OPT_CFLAGS="$CFLAGS -mtune=pentium";;
|
||||
+ i686-*) OPT_CFLAGS="$CFLAGS -mtune=pentiumpro";;
|
||||
+ k6-*) OPT_CFLAGS="$CFLAGS -mtune=k6";;
|
||||
esac
|
||||
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
|
||||
sparc-* | sparc64-*)
|
|
@ -128,15 +128,32 @@ old-fashioned output methods with powerful ascii-art renderer.")
|
|||
".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))))
|
||||
"0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
|
||||
(patches (map search-patch '("liba52-enable-pic.patch"
|
||||
"liba52-set-soname.patch"
|
||||
"liba52-use-mtune-not-mcpu.patch"
|
||||
"liba52-link-with-libm.patch")))))
|
||||
(build-system gnu-build-system)
|
||||
;; XXX We need to run ./bootstrap because of the build system fixes above.
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)))
|
||||
(arguments `(#:configure-flags
|
||||
'(;; FIXME: liba52-0.7.4's config.guess fails on mips64el.
|
||||
'("--enable-shared"
|
||||
;; FIXME: liba52-0.7.4's config.guess fails on mips64el.
|
||||
,@(if (%current-target-system)
|
||||
'()
|
||||
(let ((triplet
|
||||
(nix-system->gnu-triplet (%current-system))))
|
||||
(list (string-append "--build=" triplet)))))))
|
||||
(list (string-append "--build=" triplet)))))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
;; XXX We need to run ./bootstrap because of the build
|
||||
;; system fixes above.
|
||||
(add-after
|
||||
'unpack 'bootstrap
|
||||
(lambda _ (zero? (system* "sh" "bootstrap")))))))
|
||||
(home-page "http://liba52.sourceforge.net/")
|
||||
(synopsis "ATSC A/52 stream decoder")
|
||||
(description "liba52 is a library for decoding ATSC A/52 streams. The
|
||||
|
|
Loading…
Reference in New Issue