- Use patches from debian:

* 00_fix-configure.in.patch
  * 01_Makefile.am.patch
  * 03_fails-to-write.patch
  * 05_MAXPATHLEN.patch
  * 06_sizeof-FTBFS.patch
  * 07_fix-spelling-in-binaries.patch
  * 08_fix-manpage.patch
  * 09_fix-FTBFS-GCC6.patch
- Drop zvbi-automake-1.13.patch

OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/zvbi?expand=0&rev=19
This commit is contained in:
Martin Pluskal 2017-12-06 08:48:56 +00:00 committed by Git OBS Bridge
parent 6fc0be46c6
commit a44fd73525
11 changed files with 290 additions and 15 deletions

97
00_fix-configure.in.patch Normal file
View File

@ -0,0 +1,97 @@
Description: fix some warnings in Makefile.in.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Reference: https://autotools.io/forwardporting/autoconf.html
Last-Update:2015-05-20
Index: zvbi-0.2.35/configure.in
===================================================================
--- zvbi-0.2.35.orig/configure.in
+++ zvbi-0.2.35/configure.in
@@ -9,6 +9,8 @@ AM_CONFIG_HEADER(config.h)
AM_ACLOCAL_INCLUDE(m4)
AM_MAINTAINER_MODE
+AC_CONFIG_MACRO_DIR([m4])
+
dnl [current:revision:age]
dnl Any change: ++revision
dnl Interface added: ++current, revision = 0
@@ -35,6 +37,7 @@ dnl sincos() is a GNU extension (a macro
dnl If not present we use a replacement.
AC_MSG_CHECKING([for sincos])
AC_LINK_IFELSE([
+AC_LANG_SOURCE([
#include <stdio.h>
#include <math.h>
int main (void) {
@@ -46,7 +49,7 @@ sincos (s, &s, &c);
printf ("%f %f", s, c);
return 0;
}
-],[
+])],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_SINCOS, 1, [Define if the sincos() function is available])
],[
@@ -57,6 +60,7 @@ dnl log2() is a GNU extension (a macro,
dnl If not present we use a replacement.
AC_MSG_CHECKING([for log2])
AC_LINK_IFELSE([
+AC_LANG_SOURCE([
#include <stdio.h>
#include <math.h>
int main (void) {
@@ -65,7 +69,7 @@ scanf ("%f", &x);
printf ("%f", log2 (x));
return 0;
}
-],[
+])],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_LOG2, 1, [Define if the log2() function is available])
],[
@@ -76,6 +80,7 @@ dnl strerror() is not thread safe and th
dnl of strerror_r(). If none of them are present we use a replacement.
AC_MSG_CHECKING([for strerror_r])
AC_COMPILE_IFELSE([
+AC_LANG_SOURCE([
#include <stdlib.h>
#include <string.h>
int main (void) {
@@ -94,7 +99,7 @@ int main (void) {
printf ("%f", 1.0 + strerror_r (22, malloc (128), 128));
return 0;
}
- ],[
+ ])],[
AC_MSG_RESULT([yes, SUSV3 version])
AC_DEFINE(HAVE_SUSV3_STRERROR_R, 1, [Define to 1 if you have
the SUSV3 version of the strerror_r() function.])
@@ -182,13 +187,14 @@ dnl (Used in test/date.)
dnl
AC_MSG_CHECKING([if struct tm has tm_gmtoff])
AC_COMPILE_IFELSE([
+AC_LANG_SOURCE([
#include <time.h>
int main (void) {
struct tm tm;
tm.tm_gmtoff = 0;
return 0;
}
-],[
+])],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field])
],[
@@ -317,10 +323,10 @@ if test "x$enable_v4l" = xyes -o "x$enab
dnl if __GNUC__ is defined. These types are required to compile
dnl videodev2.h and the Linux DVB headers.
AC_MSG_CHECKING([if asm/types.h defines __s64 and __u64])
- AC_COMPILE_IFELSE([#include <asm/types.h>
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <asm/types.h>
__s64 a = 1;
__u64 b = 2;
- ], [AC_DEFINE(HAVE_S64_U64, 1,
+ ])], [AC_DEFINE(HAVE_S64_U64, 1,
[Define if asm/types.h defines __s64 and __u64])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])

17
01_Makefile.am.patch Normal file
View File

@ -0,0 +1,17 @@
Description: zvbi-chains now load libzvbi-chains.so.0.0.0. (Closes: 283004)
Author: Christian Marillat <marillat@debian.org>
Reviewed-by: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2015-05-20
Index: zvbi-0.2.35/daemon/Makefile.am
===================================================================
--- zvbi-0.2.35.orig/daemon/Makefile.am
+++ zvbi-0.2.35/daemon/Makefile.am
@@ -16,7 +16,7 @@ EXTRA_DIST = \
AM_CPPFLAGS = \
-I$(top_srcdir) \
- -DLIBZVBI_CHAINS_PATH=\"libzvbi-chains.so\" \
+ -DLIBZVBI_CHAINS_PATH=\"libzvbi-chains.so.0.0.0\" \
-D_REENTRANT \
-D_GNU_SOURCE

15
03_fails-to-write.patch Normal file
View File

@ -0,0 +1,15 @@
Description: fix write output to a file. (Closes: #603128)
Author: Christian Marillat <marillat@debian.org>
Last-Update: 2010-11-26
Index: zvbi-0.2.35/contrib/atsc-cc.c
===================================================================
--- zvbi-0.2.35.orig/contrib/atsc-cc.c
+++ zvbi-0.2.35/contrib/atsc-cc.c
@@ -1848,6 +1848,7 @@ cr_new_line (struct caption_recorder *
cr->ucs_buffer,
cr->ucs_buffer_length,
/* repl_char */ '?');
+ fflush(fp);
}
}

23
05_MAXPATHLEN.patch Normal file
View File

@ -0,0 +1,23 @@
Description: fix unconditional MAXPATHLEN use. (Closes: #676130)
Author: Christian Marillat <marillat@debian.org>
Last-Update: 2012-06-14
Index: zvbi-0.2.35/src/proxy-msg.c
===================================================================
--- zvbi-0.2.35.orig/src/proxy-msg.c
+++ zvbi-0.2.35/src/proxy-msg.c
@@ -1039,7 +1039,6 @@ int vbi_proxy_msg_accept_connection( int
static char * vbi_proxy_msg_resolve_symlinks( const char * p_dev_name )
{
struct stat stbuf;
- char link_name[MAXPATHLEN + 1];
char * p_path;
char * p_tmp;
char * p_tmp2;
@@ -1054,6 +1053,7 @@ static char * vbi_proxy_msg_resolve_syml
res = lstat(p_path, &stbuf);
if ((res == 0) && S_ISLNK(stbuf.st_mode))
{
+ char link_name[stbuf.st_size + 1];
name_len = readlink(p_path, link_name, sizeof(link_name));
if ((name_len > 0) && (name_len < (int) sizeof(link_name)))
{

17
06_sizeof-FTBFS.patch Normal file
View File

@ -0,0 +1,17 @@
Description: Fix and FTBFS on ia64, s390x, alpha, and ppc64.
Author: Jackson Doak <noskcaj@ubuntu.com>
Bug-Debian: http://bugs.debian.org/726186
Last-Update: 2013-10-15
Index: zvbi-0.2.35/test/test-packet-830.cc
===================================================================
--- zvbi-0.2.35.orig/test/test-packet-830.cc
+++ zvbi-0.2.35/test/test-packet-830.cc
@@ -115,7 +115,7 @@ assert_decode_teletext_8301_cni (unsigne
unsigned int cni2;
memcpy (buffer2, buffer, sizeof (buffer2));
- memset_rand (cni, sizeof (cni));
+ memset_rand (cni, sizeof(*cni));
cni2 = *cni;
assert (TRUE == vbi_decode_teletext_8301_cni (cni, buffer));

View File

@ -0,0 +1,29 @@
Description: fix some spelling errors found in final binaries.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2015-04-12
Index: zvbi-0.2.35/src/proxy-client.c
===================================================================
--- zvbi-0.2.35.orig/src/proxy-client.c
+++ zvbi-0.2.35/src/proxy-client.c
@@ -763,7 +763,7 @@ static vbi_bool proxy_client_start_acq(
}
else if (vpc->endianSwap)
{ /* endian swapping currently unsupported */
- asprintf(&vpc->p_errorstr, _("Incompatible server architecture (endianess mismatch)."));
+ asprintf(&vpc->p_errorstr, _("Incompatible server architecture (endianness mismatch)."));
goto failure;
}
else
Index: zvbi-0.2.35/daemon/proxyd.c
===================================================================
--- zvbi-0.2.35.orig/daemon/proxyd.c
+++ zvbi-0.2.35/daemon/proxyd.c
@@ -852,7 +852,7 @@ static void vbi_proxyd_stop_acq_thread(
{
ret = pthread_join(p_proxy_dev->thread_id, NULL);
if (ret == 0)
- dprintf(DBG_MSG, "stop_acq_thread: acq thread killed sucessfully\n");
+ dprintf(DBG_MSG, "stop_acq_thread: acq thread killed successfully\n");
else
dprintf(DBG_MSG, "stop_acq_thread: pthread_join failed: %d (%s)\n", errno, strerror(errno));
}

32
08_fix-manpage.patch Normal file
View File

@ -0,0 +1,32 @@
Description: fix some hyphens used as minus sign.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2015-05-04
Index: zvbi-0.2.35/contrib/zvbi-atsc-cc.1
===================================================================
--- zvbi-0.2.35.orig/contrib/zvbi-atsc-cc.1
+++ zvbi-0.2.35/contrib/zvbi-atsc-cc.1
@@ -193,9 +193,9 @@ timezone, title. Multiple \fB-f\fP optio
is "all".
.SH EXAMPLES
.nf
-zvbi-atsc-cc -c NJN-HD
+zvbi-atsc-cc \-c NJN-HD
.P
-zvbi-atsc-cc --cc1-file wnyw.txt WNYW-DT --cc1-file wwor.txt WWOR-DT
+zvbi-atsc-cc \-\-cc1-file wnyw.txt WNYW-DT \-\-cc1-file wwor.txt WWOR-DT
.P
(NJN-HD, WNYW-DT and WWOR-DT are TV stations in New York. WNYW-DT
and WWOR-DT can be captured simultaneously because they share a
Index: zvbi-0.2.35/contrib/zvbi-ntsc-cc.1
===================================================================
--- zvbi-0.2.35.orig/contrib/zvbi-ntsc-cc.1
+++ zvbi-0.2.35/contrib/zvbi-ntsc-cc.1
@@ -6,7 +6,7 @@ zvbi-ntsc-cc - closed caption decoder
.SH DESCRIPTION
.B zvbi-ntsc-cc
reads vbi data from /dev/vbi and decodes the enclosed cc data.
-Start it with '-h' to get a list of cmd line options.
+Start it with '\-h' to get a list of cmd line options.
.SH AUTHORS
timecop@japan.co.jp
.br

34
09_fix-FTBFS-GCC6.patch Normal file
View File

@ -0,0 +1,34 @@
Description: fix a FTBFS with GCC-6 (narrowing conversion)
Author: Breno Leitao <brenohl@br.ibm.com>
Last-Update: 2016-07-17
Index: zvbi-0.2.35/test/test-dvb_mux.cc
===================================================================
--- zvbi-0.2.35.orig/test/test-dvb_mux.cc
+++ zvbi-0.2.35/test/test-dvb_mux.cc
@@ -137,7 +137,7 @@ is_good_service (vbi_service_set servi
static const vbi_service_set
all_services [] = {
0,
- -1,
+ UINT_MAX,
VBI_SLICED_2xCAPTION_525,
VBI_SLICED_CAPTION_525,
VBI_SLICED_CAPTION_525_F1,
@@ -1279,7 +1279,7 @@ test_multiplex_sliced_service_checks
/* Verify the service filter. */
- if (-1u == service
+ if (UINT_MAX == service
|| (VBI_SLICED_TELETEXT_B_625
== (VBI_SLICED_TELETEXT_B_625 & service))) {
assert_multiplex_sliced (buffer, buffer_size,
@@ -3237,7 +3237,7 @@ static void
test_dvb_mux_cor_pts (void)
{
static const int64_t ptss [] = {
- 0x8000000000000000ll, -1, 0, 0x7FFFFFFFFFFFFFFFll,
+ 0, -1, 0, 0x7FFFFFFFFFFFFFFFll,
};
DVBPESMuxTest mx;
unsigned int i;

View File

@ -1,13 +0,0 @@
Index: zvbi-0.2.33/configure.in
===================================================================
--- zvbi-0.2.33.orig/configure.in
+++ zvbi-0.2.33/configure.in
@@ -5,7 +5,7 @@ AC_INIT(zvbi, 0.2.33)
AC_CONFIG_SRCDIR(src/vbi.c)
AM_INIT_AUTOMAKE([1.9 check-news dist-bzip2])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
AM_ACLOCAL_INCLUDE(m4)
AM_MAINTAINER_MODE

View File

@ -6,6 +6,16 @@ Wed Dec 6 08:10:39 UTC 2017 - mpluskal@suse.com
- Add dependency for libpng support
- Split lang subpackage
- Split library subpackages
- Use patches from debian:
* 00_fix-configure.in.patch
* 01_Makefile.am.patch
* 03_fails-to-write.patch
* 05_MAXPATHLEN.patch
* 06_sizeof-FTBFS.patch
* 07_fix-spelling-in-binaries.patch
* 08_fix-manpage.patch
* 09_fix-FTBFS-GCC6.patch
- Drop zvbi-automake-1.13.patch
-------------------------------------------------------------------
Tue Dec 5 15:28:02 UTC 2017 - crrodriguez@opensuse.org

View File

@ -28,7 +28,14 @@ Group: Development/Libraries/Other
Url: http://zapping.sf.net/
Source: %{name}-%{version}.tar.bz2
Source2: baselibs.conf
Patch2: zvbi-automake-1.13.patch
Patch00: 00_fix-configure.in.patch
Patch01: 01_Makefile.am.patch
Patch03: 03_fails-to-write.patch
Patch05: 05_MAXPATHLEN.patch
Patch06: 06_sizeof-FTBFS.patch
Patch07: 07_fix-spelling-in-binaries.patch
Patch08: 08_fix-manpage.patch
Patch09: 09_fix-FTBFS-GCC6.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
@ -91,7 +98,14 @@ sliced VBI data, and to interpret the data of several popular services.
%prep
%setup -q
%patch2 -p1
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%build
ACLOCAL="aclocal -I m4" autoreconf -fi