~ruther/guix-local

4cc6389f7b8fbc2a076c66fec1fcd1889e1cf61c — Andrew Wong 1 year, 6 months ago ca552a5
gnu: liba52: Update to 0.8.0.

* gnu/packages/video.scm (liba52): Update to 0.8.0.
[source] <uri>: Switch to new, maintained repository.
<patches>: Convert to substitutions for flexibility.
<snippet>: New substitutions.
[arguments]: Remove redundant bootstrap phase replication.
[home-page]: Switch to new homepage.

* gnu/packages/patches/liba52-enable-pic.patch: Remove file.
* gnu/packages/patches/liba52-link-with-libm.patch: Likewise.
* gnu/packages/patches/liba52-set-soname.patch: Likewise.
* gnu/packages/patches/liba52-use-mtune-not-mcpu.patch: Likewise.

* gnu/local.mk (dist_patch_DATA): Deregister patches.

Change-Id: I65d61d2921a444b3f86fdc6f7e4be2143ada5ce5
Modified-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
6 files changed, 22 insertions(+), 135 deletions(-)

M gnu/local.mk
D gnu/packages/patches/liba52-enable-pic.patch
D gnu/packages/patches/liba52-link-with-libm.patch
D gnu/packages/patches/liba52-set-soname.patch
D gnu/packages/patches/liba52-use-mtune-not-mcpu.patch
M gnu/packages/video.scm
M gnu/local.mk => gnu/local.mk +0 -4
@@ 1720,10 1720,6 @@ dist_patch_DATA =						\
  %D%/packages/patches/ldns-drill-examples.patch		\
  %D%/packages/patches/leela-zero-gtest.patch			\
  %D%/packages/patches/less-hurd-path-max.patch			\
  %D%/packages/patches/liba52-enable-pic.patch			\
  %D%/packages/patches/liba52-link-with-libm.patch		\
  %D%/packages/patches/liba52-set-soname.patch			\
  %D%/packages/patches/liba52-use-mtune-not-mcpu.patch		\
  %D%/packages/patches/libaio-32bit-test.patch                  \
  %D%/packages/patches/libaio-riscv-test5.patch			\
  %D%/packages/patches/libarchive-remove-potential-backdoor.patch	\

D gnu/packages/patches/liba52-enable-pic.patch => gnu/packages/patches/liba52-enable-pic.patch +0 -25
@@ 1,25 0,0 @@
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

D gnu/packages/patches/liba52-link-with-libm.patch => gnu/packages/patches/liba52-link-with-libm.patch +0 -33
@@ 1,33 0,0 @@
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
 

D gnu/packages/patches/liba52-set-soname.patch => gnu/packages/patches/liba52-set-soname.patch +0 -23
@@ 1,23 0,0 @@
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

D gnu/packages/patches/liba52-use-mtune-not-mcpu.patch => gnu/packages/patches/liba52-use-mtune-not-mcpu.patch +0 -24
@@ 1,24 0,0 @@
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-*)

M gnu/packages/video.scm => gnu/packages/video.scm +22 -26
@@ 844,33 844,29 @@ mpv's powerful playback capabilities.")
(define-public liba52
  (package
    (name "liba52")
    (version "0.7.4")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    ;; A mirror://sourceforge URI doesn't work, presumably
                    ;; because the SourceForge project is misconfigured.
                    "http://liba52.sourceforge.net/files/a52dec-" version
                    ".tar.gz"))
              (sha256
               (base32
                "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
              (patches (search-patches "liba52-enable-pic.patch"
                                       "liba52-set-soname.patch"
                                       "liba52-use-mtune-not-mcpu.patch"
                                       "liba52-link-with-libm.patch"))))
    (version "0.8.0")
    (source
     (origin (method git-fetch)
             (uri (git-reference
                   (url "https://git.adelielinux.org/community/a52dec")
                   (commit (string-append "v" version))))
             (file-name (git-file-name name version))
             (sha256
              (base32 "0k1y7irz1hqfzs6yqv4brgwpa04biv50z05gc584h9md0y5y52k7"))
             (modules '((guix build utils)))
             (snippet
              #~(begin (substitute* "liba52/Makefile.am"
                         ;; Set so name to liba52-$(VERSION).so
                         (("liba52_la_LDFLAGS = -no-undefined" all)
                          (string-append all " -release @VERSION@")))
                       (substitute* "liba52/configure.incl"
                         ;; Don't avoid -fPIC
                         (("^.+-prefer-non-pic.*$") ""))
                       (substitute* "configure.ac" (("-mcpu") "-mtune"))))))
    (build-system gnu-build-system)
    ;; XXX We need to run ./bootstrap because of the build system fixes above.
    (native-inputs
     (list autoconf automake libtool))
    (arguments `(#:configure-flags '("--enable-shared")
                 #:phases
                 (modify-phases %standard-phases
                   ;; XXX We need to run ./bootstrap because of the build
                   ;; system fixes above.
                   (replace 'bootstrap
                     (lambda _ (invoke "sh" "bootstrap"))))))
    (home-page "https://liba52.sourceforge.net/")
    (native-inputs (list autoconf automake libtool))
    (arguments (list #:configure-flags #~(list "--enable-shared")))
    (home-page "https://git.adelielinux.org/community/a52dec/")
    (synopsis "ATSC A/52 audio stream decoder")
    (description "liba52 is a library for decoding ATSC A/52 audio streams.
The A/52 standard is used in a variety of applications, including digital