From f4e8efcf343fe8383f97bfefeb18664ec7c0ec445e4df867e60adbc8df685313 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 6 Dec 2017 08:48:56 +0000 Subject: [PATCH] - 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 --- 00_fix-configure.in.patch | 97 +++++++++++++++++++++++++++++++ 01_Makefile.am.patch | 17 ++++++ 03_fails-to-write.patch | 15 +++++ 05_MAXPATHLEN.patch | 23 ++++++++ 06_sizeof-FTBFS.patch | 17 ++++++ 07_fix-spelling-in-binaries.patch | 29 +++++++++ 08_fix-manpage.patch | 32 ++++++++++ 09_fix-FTBFS-GCC6.patch | 34 +++++++++++ zvbi-automake-1.13.patch | 13 ----- zvbi.changes | 10 ++++ zvbi.spec | 18 +++++- 11 files changed, 290 insertions(+), 15 deletions(-) create mode 100644 00_fix-configure.in.patch create mode 100644 01_Makefile.am.patch create mode 100644 03_fails-to-write.patch create mode 100644 05_MAXPATHLEN.patch create mode 100644 06_sizeof-FTBFS.patch create mode 100644 07_fix-spelling-in-binaries.patch create mode 100644 08_fix-manpage.patch create mode 100644 09_fix-FTBFS-GCC6.patch delete mode 100644 zvbi-automake-1.13.patch diff --git a/00_fix-configure.in.patch b/00_fix-configure.in.patch new file mode 100644 index 0000000..e4b36e5 --- /dev/null +++ b/00_fix-configure.in.patch @@ -0,0 +1,97 @@ +Description: fix some warnings in Makefile.in. +Author: Joao Eriberto Mota Filho +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 + #include + 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 + #include + 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 + #include + 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 + 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 ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include + __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)]) diff --git a/01_Makefile.am.patch b/01_Makefile.am.patch new file mode 100644 index 0000000..a59351e --- /dev/null +++ b/01_Makefile.am.patch @@ -0,0 +1,17 @@ +Description: zvbi-chains now load libzvbi-chains.so.0.0.0. (Closes: 283004) +Author: Christian Marillat +Reviewed-by: Joao Eriberto Mota Filho +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 + diff --git a/03_fails-to-write.patch b/03_fails-to-write.patch new file mode 100644 index 0000000..e360460 --- /dev/null +++ b/03_fails-to-write.patch @@ -0,0 +1,15 @@ +Description: fix write output to a file. (Closes: #603128) +Author: Christian Marillat +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); + } + } + diff --git a/05_MAXPATHLEN.patch b/05_MAXPATHLEN.patch new file mode 100644 index 0000000..f37caeb --- /dev/null +++ b/05_MAXPATHLEN.patch @@ -0,0 +1,23 @@ +Description: fix unconditional MAXPATHLEN use. (Closes: #676130) +Author: Christian Marillat +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))) + { diff --git a/06_sizeof-FTBFS.patch b/06_sizeof-FTBFS.patch new file mode 100644 index 0000000..02224d2 --- /dev/null +++ b/06_sizeof-FTBFS.patch @@ -0,0 +1,17 @@ +Description: Fix and FTBFS on ia64, s390x, alpha, and ppc64. +Author: Jackson Doak +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)); diff --git a/07_fix-spelling-in-binaries.patch b/07_fix-spelling-in-binaries.patch new file mode 100644 index 0000000..8c6293c --- /dev/null +++ b/07_fix-spelling-in-binaries.patch @@ -0,0 +1,29 @@ +Description: fix some spelling errors found in final binaries. +Author: Joao Eriberto Mota Filho +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)); + } diff --git a/08_fix-manpage.patch b/08_fix-manpage.patch new file mode 100644 index 0000000..ec42bf0 --- /dev/null +++ b/08_fix-manpage.patch @@ -0,0 +1,32 @@ +Description: fix some hyphens used as minus sign. +Author: Joao Eriberto Mota Filho +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 diff --git a/09_fix-FTBFS-GCC6.patch b/09_fix-FTBFS-GCC6.patch new file mode 100644 index 0000000..0e0cc6c --- /dev/null +++ b/09_fix-FTBFS-GCC6.patch @@ -0,0 +1,34 @@ +Description: fix a FTBFS with GCC-6 (narrowing conversion) +Author: Breno Leitao +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; diff --git a/zvbi-automake-1.13.patch b/zvbi-automake-1.13.patch deleted file mode 100644 index bf7d184..0000000 --- a/zvbi-automake-1.13.patch +++ /dev/null @@ -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 - diff --git a/zvbi.changes b/zvbi.changes index 21cc8cb..efa2c37 100644 --- a/zvbi.changes +++ b/zvbi.changes @@ -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 diff --git a/zvbi.spec b/zvbi.spec index 6f97c23..c672ac0 100644 --- a/zvbi.spec +++ b/zvbi.spec @@ -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