tags 721160 + patch pending
tags 721164 + patch pending
thanks

I've prepared an NMU for avbin that fixes #721164. Unfortunately, the
fix is more invasive than I'd like it to be. At the moment there is a
upstream build system and one provided by Debian. Everything works fine
if only the Debian build system is used. However, if the clean target is
run before the Debian build system is generated, upstream's Makefile
will be used and fails. To fix this, I've moved the build system
provided by Debian to debian/build and explicitly told dh to use the
build system there.

I've also switched to use dh-autoreconf instead of manually generating
the build system and cleaning up the auto-generated files. The list of
auto-generated files that is removed in debian/rules is outdated.

Here's the usual nmudiff boilerplate:

Dear maintainer,

I've prepared an NMU for avbin (versioned as 7-1.4) and
uploaded it to DELAYED/7. Please feel free to tell me if I
should delay it longer.

Regards.
-- 
Sebastian Ramacher
reverted:
--- avbin-7/Makefile.am
+++ avbin-7.orig/Makefile.am
@@ -1,2 +0,0 @@
-AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src
reverted:
--- avbin-7/bootstrap.sh
+++ avbin-7.orig/bootstrap.sh
@@ -1,7 +0,0 @@
-#!/bin/sh
-ln -sf /usr/share/aclocal/libtool.m4 aclocal.m4
-libtoolize --force \
-&& autoheader \
-&& aclocal \
-&& automake --add-missing --foreign \
-&& autoconf
reverted:
--- avbin-7/configure.ac
+++ avbin-7.orig/configure.ac
@@ -1,31 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.61])
-AC_INIT(avbin, 7.0, alex.holk...@gmail.com)
-AM_INIT_AUTOMAKE(avbin, 7.0)
-AC_CONFIG_SRCDIR([include/avbin.h])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_MACRO_DIR([m4])
-
-AC_PROG_LIBTOOL
-
-# Checks for programs.
-AC_PROG_CC
-
-# Checks for libraries.
-
-# Checks for header files.
-AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_TYPE_INT16_T
-AC_TYPE_INT64_T
-AC_TYPE_SIZE_T
-AC_TYPE_UINT8_T
-
-# Checks for library functions.
-AC_FUNC_MALLOC
-
-AC_OUTPUT
-AC_OUTPUT(Makefile src/Makefile)
reverted:
--- avbin-7/src/Makefile.am
+++ avbin-7.orig/src/Makefile.am
@@ -1,10 +0,0 @@
-# See http://sourceware.org/autobook/autobook/autobook_88.html
-c_sources = avbin.c
-
-INCLUDES = -I$(top_srcdir) -I../include -I/usr/include/libavformat -I/usr/include/libavcodec -I/usr/include/libavutil -I/usr/include/libswscale -I/usr/include/ffmpeg
-
-lib_LTLIBRARIES= libavbin.la
-libavbin_la_SOURCES= $(c_sources)
-libavbin_la_CFLAGS= -DAVBIN_VERSION=7 -DFFMPEG_REVISION=15943
-libavbin_la_LDFLAGS= -version-info 0:7:0
-libavbin_la_LIBADD= -lavutil -lavcodec -lavformat -lswscale
diff -u avbin-7/src/avbin.c avbin-7/src/avbin.c
--- avbin-7/src/avbin.c
+++ avbin-7/src/avbin.c
@@ -93,7 +93,7 @@
 
 AVbinResult avbin_init()
 {
-    avcodec_init();
+    avcodec_register_all();
     av_register_all();
     av_log_level = av_log_get_level();
     return AVBIN_RESULT_OK;
@@ -127,7 +127,7 @@
     if (avformat_open_input(&file->context, filename, NULL, NULL) < 0)
         goto error;
 
-    if (av_find_stream_info(file->context) < 0)
+    if (avformat_find_stream_info(file->context, NULL) < 0)
         goto error;
 
     file->packet = NULL;
@@ -145,7 +145,7 @@
         av_free_packet(file->packet);
         free(file->packet);
     }
-    av_close_input_file(file->context);
+    avformat_close_input(&file->context);
 }
 
 AVbinResult avbin_seek_file(AVbinFile *file, AVbinTimestamp timestamp)
@@ -238,19 +238,19 @@
             info->audio.channels = context->channels;
             switch (context->sample_fmt)
             {
-                case SAMPLE_FMT_U8:
+                case AV_SAMPLE_FMT_U8:
                     info->audio.sample_rate = AVBIN_SAMPLE_FORMAT_U8;
                     info->audio.sample_bits = 8;
                     break;
-                case SAMPLE_FMT_S16:
+                case AV_SAMPLE_FMT_S16:
                     info->audio.sample_format = AVBIN_SAMPLE_FORMAT_S16;
                     info->audio.sample_bits = 16;
                     break;
-                case SAMPLE_FMT_S32:
+                case AV_SAMPLE_FMT_S32:
                     info->audio.sample_format = AVBIN_SAMPLE_FORMAT_S32;
                     info->audio.sample_bits = 32;
                     break;
-                case SAMPLE_FMT_FLT:
+                case AV_SAMPLE_FMT_FLT:
                     info->audio.sample_format = AVBIN_SAMPLE_FORMAT_FLOAT;
                     info->audio.sample_bits = 32;
                     break;
@@ -277,7 +277,7 @@
     if (!codec)
         return NULL;
 
-    if (avcodec_open(codec_context, codec) < 0)
+    if (avcodec_open2(codec_context, codec, NULL) < 0)
         return NULL;
 
     AVbinStream *stream = malloc(sizeof *stream);
diff -u avbin-7/debian/rules avbin-7/debian/rules
--- avbin-7/debian/rules
+++ avbin-7/debian/rules
@@ -3,10 +3,2 @@
-override_dh_auto_configure:
-	sh ./bootstrap.sh
-	dh_auto_configure
-
-clean:
-	dh clean
-	rm -rf config.guess config.sub ltmain.sh install-sh missing depcomp aclocal.m4 configure config.h.in Makefile.in src/Makefile.in m4
-
 %:
-	dh $@
+	dh $@ --with autoreconf --sourcedirectory debian/build
diff -u avbin-7/debian/control avbin-7/debian/control
--- avbin-7/debian/control
+++ avbin-7/debian/control
@@ -4,9 +4,10 @@
 Section: utils
 Priority: extra
 Build-Depends: debhelper (>= 7.0.50~),
-               libtool,
+               dh-autoreconf,
                autoconf,
                automake,
+               libtool,
                libavutil-dev,
                libavcodec-dev,
                libavformat-dev,
@@ -20,8 +21,7 @@
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends},
-         ${misc:Depends},
-         ffmpeg
+         ${misc:Depends}
 Description: cross-platform media decoding library
  AVbin is a thin wrapper around FFmpeg, providing binary compatibility
  for applications and languages that need it.
diff -u avbin-7/debian/changelog avbin-7/debian/changelog
--- avbin-7/debian/changelog
+++ avbin-7/debian/changelog
@@ -1,3 +1,23 @@
+avbin (7-1.4) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Separate upstream's and Debian's build system. Running targets in
+    upstream's Makefile causes build failures. (Closes: #721164)
+    + Move Debian's build system to debian/build and invoke dh with
+      --sourcedirectory=debian/build.
+    + Fix some warnings in Debian's build system:
+      - configure.ac: fix deprecated call of AM_INIT.
+      - Makefile.am: move -I and -D to CPPFLAGS. INCLUDES is deprecated and -D
+        is supposed to be in CPPFLAGS, not in CFLAGS.
+    + debian/rules: Use dh-autoreconf to generate the build system and get rid
+      of the manual removal of an incomplete list of files generated by the
+      build system.
+    + debian/control: Add dh-autoreconf to Build-Depends.
+  * debian/control: Remove unnecessary dependency on ffmpeg. (Closes: #721160)
+  * src/avbin.c: Port to libav 9 API.
+
+ -- Sebastian Ramacher <sramac...@debian.org>  Thu, 05 Sep 2013 14:50:27 +0200
+
 avbin (7-1.3) unstable; urgency=low
 
   * Non-maintainer upload.
only in patch2:
unchanged:
--- avbin-7.orig/debian/autoreconf
+++ avbin-7/debian/autoreconf
@@ -0,0 +1 @@
+debian/build
only in patch2:
unchanged:
--- avbin-7.orig/debian/build/Makefile.am
+++ avbin-7/debian/build/Makefile.am
@@ -0,0 +1,10 @@
+# See http://sourceware.org/autobook/autobook/autobook_88.html
+c_sources = ../../src/avbin.c
+
+lib_LTLIBRARIES= libavbin.la
+libavbin_la_SOURCES= $(c_sources)
+libavbin_la_CPPFLAGS= -DAVBIN_VERSION=7 -DFFMPEG_REVISION=15943 \
+	-I$(top_srcdir) -I../../include -I/usr/include/libavformat \
+	-I/usr/include/libavcodec -I/usr/include/libavutil -I/usr/include/libswscale
+libavbin_la_LDFLAGS= -version-info 0:7:0
+libavbin_la_LIBADD= -lavutil -lavcodec -lavformat -lswscale
only in patch2:
unchanged:
--- avbin-7.orig/debian/build/configure.ac
+++ avbin-7/debian/build/configure.ac
@@ -0,0 +1,31 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.61])
+AC_INIT(avbin, 7.0, alex.holk...@gmail.com)
+AC_CONFIG_SRCDIR([../../include/avbin.h])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_PROG_LIBTOOL
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_INT16_T
+AC_TYPE_INT64_T
+AC_TYPE_SIZE_T
+AC_TYPE_UINT8_T
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+
+AC_OUTPUT
+AC_OUTPUT(Makefile)

Attachment: signature.asc
Description: Digital signature

Reply via email to