--- libdvb-0.5.5.1.orig/debian/control
+++ libdvb-0.5.5.1/debian/control
@@ -0,0 +1,26 @@
+Source: libdvb
+Section: devel
+Priority: optional
+Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
+Uploaders: Sam Hocevar (Debian packages) <sam+deb@zoy.org>,
+           Loic Minier <lool@dooz.org>
+Build-Depends: debhelper (>= 5.0), quilt, linux-libc-dev (>= 2.5.999-test7-bk-6)
+Standards-Version: 3.7.2
+XS-Vcs-Svn: svn://svn.debian.org/pkg-multimedia/unstable/libdvb
+XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-multimedia/unstable/libdvb/
+
+Package: libdvb-dev
+Section: libdevel
+Architecture: any
+Description: library to tune and command Digital Video Broadcasting cards
+ The DVB standard (Digital Video Broadcasting) is an integrated package of
+ standards for the distribution of terrestrial (DVB-T), satellite (DVB-S)
+ and cable (DVB-C) digital television.
+ .
+ This library offers an abstraction layer over the Linux DVB kernel drivers
+ to tune and command DVB cards that are connected to the system. Common uses
+ include scanning transponders, selecting channels and retrieving raw MPEG-2
+ transport streams (TS).
+ .
+ This package contains the header files and static libraries needed to
+ compile applications or shared objects that use libdvb.
--- libdvb-0.5.5.1.orig/debian/libdvb-dev.dirs
+++ libdvb-0.5.5.1/debian/libdvb-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
--- libdvb-0.5.5.1.orig/debian/rules
+++ libdvb-0.5.5.1/debian/rules
@@ -0,0 +1,65 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+CFLAGS = -O2 -Wall -g
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
+	# Build the PIC library
+	echo 'CFLAGS=$(CFLAGS) -fPIC' > config.deb
+	$(MAKE) $(DEB_BUILD_OPTIONS)
+	mv libdvb/libdvb.a libdvb_pic.a
+	mv libdvbci/libdvbci.a libdvbci_pic.a
+	mv libdvbmpeg/libdvbmpegtools.a libdvbmpegtools_pic.a
+	$(MAKE) $(DEB_BUILD_OPTIONS) clean
+	# Build the normal static library
+	echo 'CFLAGS=$(CFLAGS)' > config.deb
+	$(MAKE) $(DEB_BUILD_OPTIONS)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	rm -f libdvb_pic.a libdvbci_pic.a libdvbmpegtools_pic.a
+	-$(MAKE) $(DEB_BUILD_OPTIONS) clean
+	rm -f config.deb
+	QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	$(MAKE) $(DEB_BUILD_OPTIONS) PREFIX=$(CURDIR)/debian/libdvb-dev/usr install
+	cp libdvb_pic.a debian/libdvb-dev/usr/lib/
+	cp libdvbci_pic.a debian/libdvb-dev/usr/lib/
+	cp libdvbmpegtools_pic.a debian/libdvb-dev/usr/lib/
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs README
+	dh_installchangelogs
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- libdvb-0.5.5.1.orig/debian/changelog
+++ libdvb-0.5.5.1/debian/changelog
@@ -0,0 +1,89 @@
+libdvb (0.5.5.1-5.1~jessie) jessie; urgency=low
+
+  * Jessie rebuild
+
+ -- Timothy Pearson <kb9vqf@pearsoncomputing.net>  Fri, 26 Sep 2014 16:57:00 -0600
+
+libdvb (0.5.5.1-5.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix GCC 4.3 compatibility, patch by Aurelien Jacobs (Closes: #454833)
+
+ -- Moritz Muehlenhoff <jmm@debian.org>  Sat, 22 Mar 2008 19:48:39 +0100
+
+libdvb (0.5.5.1-5) unstable; urgency=high
+
+  * Rename linux-kernel-headers build-dep to linux-libc-dev; closes: #433280.
+
+ -- Loic Minier <lool@dooz.org>  Mon, 16 Jul 2007 13:42:06 +0200
+
+libdvb (0.5.5.1-4) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * debian/rules:
+    + Fixed clean rule (Closes: #424514).
+
+  [ Loic Minier ]
+  * Add myself to uploaders.
+
+ -- Loic Minier <lool@dooz.org>  Wed, 16 May 2007 18:20:58 +0200
+
+libdvb (0.5.5.1-3) unstable; urgency=low
+
+  * debian/control:
+    + Set pkg-multimedia-maintainers as main maintainer.
+    + Added Vcs fields.
+    + Set policy to 3.7.2.
+  * debian/compat:
+    + Set compat to 5.
+
+  * debian/patches/030_implicit_declarations.diff:
+    + New patch. Fix implicit declarations of memcpy().
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 16 Mar 2007 17:30:24 +0100
+
+libdvb (0.5.5.1-2) unstable; urgency=low
+
+  * Switched patch system to quilt.
+  * debian/control:
+    + Build-depend on quilt.
+    + Build-depend on linux-kernel-headers (>= 2.5.999-test7-bk-6) instead
+      of the now deprecated dvb-dev (Closes: #359697).
+    + Build-depend on debhelper (>= 4.0).
+  * debian/compat:
+    + Set level to 4.
+  * debian/copyright:
+    + Fixed the FSF address.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Thu, 30 Mar 2006 16:54:32 +0200
+
+libdvb (0.5.5.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control:
+    + Set policy to 3.6.2.1.
+  * sample_progs/cam_menu.cc:
+    + Fixed a gcc-4.0 FTBFS (Closes: #287383).
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 15 Jul 2005 14:37:32 +0300
+
+libdvb (0.5.4-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 16 Feb 2004 14:24:32 +0100
+
+libdvb (0.5.0-2) unstable; urgency=low
+
+  * debian/control:
+    + Fixed build-dependencies.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Mon, 27 Oct 2003 21:06:52 +0100
+
+libdvb (0.5.0-1) unstable; urgency=low
+
+  * First Debian release (Closes: #215058).
+  * Removed non-free MPEG code from the upstream tarball.
+
+ -- Sam Hocevar (Debian packages) <sam+deb@zoy.org>  Fri, 10 Oct 2003 17:35:34 +0200
+
--- libdvb-0.5.5.1.orig/debian/copyright
+++ libdvb-0.5.5.1/debian/copyright
@@ -0,0 +1,24 @@
+This package was debianized by Sam Hocevar <sam@zoy.org>
+on Fri, 10 Oct 2003 17:35:34 +0200.
+
+It was downloaded from http://www.metzlerbros.org/dvb/index.html
+
+Upstream Author: Marcus Metzler <mocm@metzlerbros.de>
+
+  This library is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this library; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
--- libdvb-0.5.5.1.orig/debian/compat
+++ libdvb-0.5.5.1/debian/compat
@@ -0,0 +1 @@
+5
--- libdvb-0.5.5.1.orig/debian/patches/020_invalid_casts.diff
+++ libdvb-0.5.5.1/debian/patches/020_invalid_casts.diff
@@ -0,0 +1,43 @@
+--- libdvb-0.5.5.1.orig/libdvbmpeg/transform.c
++++ libdvb-0.5.5.1/libdvbmpeg/transform.c
+@@ -2458,9 +2458,9 @@
+ 	ipack *p;
+ 	uint8_t *sb;
+ 	int64_t apts=0;
+-	int64_t apos=0;
++	intptr_t apos=0;
+ 	int64_t vpts=0;
+-	int64_t vpos=0;
++	intptr_t vpos=0;
+ 	int verb = 0;
+ 	uint64_t length =0;
+ 	uint64_t l=0;
+@@ -2556,7 +2556,7 @@
+ 					      get_vinfo( pay, l,&p->vi,1)+1) >0
+ 						){
+ 						vpts = trans_pts_dts(sb+9);
+-						vpos = (int)(l-count+pay);
++						vpos = (intptr_t)(l-count+pay);
+ 						printf("vpts : %fs\n",
+ 						       vpts/90000.);
+ 					}
+@@ -2573,7 +2573,7 @@
+ 					      get_ac3info( pay, l,&p->ai,1)+1) >0
+ 						){
+ 						apts = trans_pts_dts(sb+9);
+-						apos = (int)(l-count+pay);
++						apos = (intptr_t)(l-count+pay);
+ 						printf("apts : %fs\n",
+ 						       apts/90000.);
+ 					}
+--- libdvb-0.5.5.1.orig/sample_progs/cam_menu.cc
++++ libdvb-0.5.5.1/sample_progs/cam_menu.cc
+@@ -46,7 +46,7 @@
+ 
+ void byebye(int i, void *f)
+ {
+-	int fd = (int) f;
++	int fd = (intptr_t) f;
+ 
+ 	CamPacket cp(fd, CMENU_CLOSE, 0, NULL);
+ 	cp.psend();
--- libdvb-0.5.5.1.orig/debian/patches/series
+++ libdvb-0.5.5.1/debian/patches/series
@@ -0,0 +1,7 @@
+000_config_deb.diff
+010_no_dvb_mpegtools.diff -p1
+020_invalid_casts.diff -p1
+030_implicit_declarations.diff
+040_gcc43.diff
+
+
--- libdvb-0.5.5.1.orig/debian/patches/040_gcc43.diff
+++ libdvb-0.5.5.1/debian/patches/040_gcc43.diff
@@ -0,0 +1,10 @@
+ --- sample_progs/cam_menu.hh.orig       2008-01-28 10:23:53.000000000 +0100
+ +++ libdvb-0.5.5.1/sample_progs/cam_menu.hh    2008-01-28 10:22:55.000000000 +0100
+ @@ -2,6 +2,7 @@
+   * cam_menu.hh
+   *
+   */
+ +#include <cstring>
+  #include <sys/types.h>
+  #include <sys/socket.h>
+
--- libdvb-0.5.5.1.orig/debian/patches/010_no_dvb_mpegtools.diff
+++ libdvb-0.5.5.1/debian/patches/010_no_dvb_mpegtools.diff
@@ -0,0 +1,47 @@
+Index: libdvb-0.5.5.1/Makefile
+===================================================================
+--- libdvb-0.5.5.1.orig/Makefile	2005-03-22 14:23:25.000000000 +0100
++++ libdvb-0.5.5.1/Makefile	2007-03-16 17:44:28.000000000 +0100
+@@ -1,5 +1,5 @@
+ 
+-SOURCEDIRS=include libdvb libdvbci libdvbmpeg sample_progs dvb-mpegtools samplerc 
++SOURCEDIRS=include libdvb libdvbci libdvbmpeg sample_progs samplerc 
+ DVB-MPEGTOOLS= dvb-mpegtools_main dvb-mplex audiofilter dvbaudio
+ DVB_LIBS=libdvb.a libdvbci.a libdvbmpegtools.a
+ HEADERS=include/DVB.hh include/ci.hh include/devices.hh include/channel.h include/ctools.h \
+@@ -8,19 +8,19 @@
+ 
+ 
+ 
+-main: $(DVB_LIBS) $(TEST_PROGS) $(DVB-MPEGTOOLS)
++main: $(DVB_LIBS) $(TEST_PROGS) #$(DVB-MPEGTOOLS)
+ 
+ install: $(DVB_LIBS) $(HEADERS)
+ 	mkdir -p $(DESTDIR)$(PREFIX)/lib
+ 	install -m 644 $(DVB_LIBS) $(DESTDIR)$(PREFIX)/lib/
+-	mkdir -p $(DESTDIR)$(PREFIX)/include
+-	install -m 644 $(HEADERS) $(DESTDIR)$(PREFIX)/include/
+-	make -C dvb-mpegtools install
++	mkdir -p $(DESTDIR)$(PREFIX)/include/libdvb
++	install -m 644 $(HEADERS) $(DESTDIR)$(PREFIX)/include/libdvb
++	#make -C dvb-mpegtools install
+ 
+ uninstall: 
+ 	for i in $(DVB_LIBS); do rm -f $(DESTDIR)$(PREFIX)/lib/$$i;done
+ 	for i in $(HEADERS); do rm -f $(DESTDIR)$(PREFIX)/$$i;done
+-	make -C dvb-mpegtools uninstall
++	#make -C dvb-mpegtools uninstall
+ 
+ libdvb.a: libdvb/libdvb.a
+ 	cp libdvb/libdvb.a .
+@@ -69,8 +70,8 @@
+ 	make -C libdvbci clean
+ 	make -C libdvbmpeg clean
+ 	make -C sample_progs clean
+-	make -C dvb-mpegtools clean
+-	rm include/*~
++	#make -C dvb-mpegtools clean
++	rm -f include/*~
+ 
+ dist:	
+ 	mkdir libdvb-$(VERSION)
--- libdvb-0.5.5.1.orig/debian/patches/000_config_deb.diff
+++ libdvb-0.5.5.1/debian/patches/000_config_deb.diff
@@ -0,0 +1,80 @@
+Index: libdvb-0.5.5.1/Makefile
+===================================================================
+--- libdvb-0.5.5.1.orig/Makefile	2005-03-22 14:23:25.000000000 +0100
++++ libdvb-0.5.5.1/Makefile	2007-03-16 17:44:28.000000000 +0100
+@@ -8,6 +8,7 @@
+ 
+ RESOURCES=README
+ include config.mk
++include config.deb
+ 
+ 
+ 
+Index: libdvb-0.5.5.1/config.mk
+===================================================================
+--- libdvb-0.5.5.1.orig/config.mk	2007-03-16 17:44:57.000000000 +0100
++++ libdvb-0.5.5.1/config.mk	2007-03-16 17:45:14.000000000 +0100
+@@ -3,7 +3,7 @@
+ 
+ PREFIX = /usr/local
+ VERSION = 0.5.5.1
+-CFLAGS=-O2 -Wall -g
++#CFLAGS=-O2 -Wall -g
+ INCLUDES=-I. -I../include 
+ TEST_PROGS= merge_dvb conv satscan cam_set cam_test quickscan cam_menu dump_TS
+ #CXX = g++-3.2
+Index: libdvb-0.5.5.1/dvb-mpegtools/Makefile
+===================================================================
+--- libdvb-0.5.5.1.orig/dvb-mpegtools/Makefile	2007-03-16 17:44:12.000000000 +0100
++++ libdvb-0.5.5.1/dvb-mpegtools/Makefile	2007-03-16 17:44:39.000000000 +0100
+@@ -1,5 +1,6 @@
+ 
+ include ../config.mk
++include ../config.deb
+ 
+ DCFLAGS =  $(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+ LIBS   = -L../ -ldvbmpegtools
+Index: libdvb-0.5.5.1/libdvb/Makefile
+===================================================================
+--- libdvb-0.5.5.1.orig/libdvb/Makefile	2007-03-16 17:44:12.000000000 +0100
++++ libdvb-0.5.5.1/libdvb/Makefile	2007-03-16 17:44:42.000000000 +0100
+@@ -1,5 +1,6 @@
+ 
+ include ../config.mk
++include ../config.deb
+ 
+ OBJS=devices.o DVB.o OSD.o 
+ LIBS=-L./ -lpthread
+Index: libdvb-0.5.5.1/libdvbci/Makefile
+===================================================================
+--- libdvb-0.5.5.1.orig/libdvbci/Makefile	2007-03-16 17:44:12.000000000 +0100
++++ libdvb-0.5.5.1/libdvbci/Makefile	2007-03-16 17:44:41.000000000 +0100
+@@ -1,5 +1,6 @@
+ 
+ include ../config.mk
++include ../config.deb
+ 
+ CI_OBJS=ci.o ci2.o
+ LIBS=-L./ -lpthread
+Index: libdvb-0.5.5.1/libdvbmpeg/Makefile
+===================================================================
+--- libdvb-0.5.5.1.orig/libdvbmpeg/Makefile	2007-03-16 17:44:12.000000000 +0100
++++ libdvb-0.5.5.1/libdvbmpeg/Makefile	2007-03-16 17:44:44.000000000 +0100
+@@ -1,5 +1,6 @@
+ 
+ include ../config.mk
++include ../config.deb
+ 
+ DCFLAGS =  $(CFLAGS) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+ MFLAG  = -M
+Index: libdvb-0.5.5.1/sample_progs/Makefile
+===================================================================
+--- libdvb-0.5.5.1.orig/sample_progs/Makefile	2007-03-16 17:44:13.000000000 +0100
++++ libdvb-0.5.5.1/sample_progs/Makefile	2007-03-16 17:44:46.000000000 +0100
+@@ -1,5 +1,6 @@
+ 
+ include ../config.mk
++include ../config.deb
+ 
+ LIBS=-L../ 
+ DVB_LIBS=libdvb.a libdvbci.a
--- libdvb-0.5.5.1.orig/debian/patches/030_implicit_declarations.diff
+++ libdvb-0.5.5.1/debian/patches/030_implicit_declarations.diff
@@ -0,0 +1,12 @@
+Index: libdvb-0.5.5.1/libdvbmpeg/ringbuffy.c
+===================================================================
+--- libdvb-0.5.5.1.orig/libdvbmpeg/ringbuffy.c	2007-03-16 17:53:31.000000000 +0100
++++ libdvb-0.5.5.1/libdvbmpeg/ringbuffy.c	2007-03-16 17:54:10.000000000 +0100
+@@ -19,6 +19,7 @@
+ */
+ 
+ #include "ringbuffy.h"
++#include <string.h>
+ 
+ int ring_init (ringbuffy *rbuf, int size)
+ {