[gqradio] Replaced deprecated videodev.h for videodev2.h
Paulo Roma Cavalcanti
roma at fedoraproject.org
Thu Oct 25 22:33:18 UTC 2012
commit 86ddc9dc93ca600b123042235e3acdadb3ebfb27
Author: Paulo Roma Cavalcanti <promac at gmail.com>
Date: Thu Oct 25 20:32:48 2012 -0200
Replaced deprecated videodev.h for videodev2.h
gqradio-1.9.2-radiodev.patch | 118 ++++++++++++++++++++++++++++++++++++++++++
gqradio-1.9.2-v4l2.patch | 26 +++++----
gqradio.spec | 12 +++--
3 files changed, 139 insertions(+), 17 deletions(-)
---
diff --git a/gqradio-1.9.2-radiodev.patch b/gqradio-1.9.2-radiodev.patch
new file mode 100644
index 0000000..b3009fd
--- /dev/null
+++ b/gqradio-1.9.2-radiodev.patch
@@ -0,0 +1,118 @@
+diff -Naur gqradio-1.9.2/configure gqradio-1.9.2-new/configure
+--- gqradio-1.9.2/configure 2005-02-22 21:58:29.000000000 -0300
++++ gqradio-1.9.2-new/configure 2012-10-25 20:07:45.745138407 -0200
+@@ -4430,8 +4430,8 @@
+
+
+ if test "${ac_cv_header_linux_videodev_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for linux/videodev.h" >&5
+-echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6
++ echo "$as_me:$LINENO: checking for linux/videodev2.h" >&5
++echo $ECHO_N "checking for linux/videodev2.h... $ECHO_C" >&6
+ if test "${ac_cv_header_linux_videodev_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+@@ -4439,8 +4439,8 @@
+ echo "${ECHO_T}$ac_cv_header_linux_videodev_h" >&6
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking linux/videodev.h usability" >&5
+-echo $ECHO_N "checking linux/videodev.h usability... $ECHO_C" >&6
++echo "$as_me:$LINENO: checking linux/videodev2.h usability" >&5
++echo $ECHO_N "checking linux/videodev2.h usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -4448,7 +4448,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+@@ -4484,15 +4484,15 @@
+ echo "${ECHO_T}$ac_header_compiler" >&6
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking linux/videodev.h presence" >&5
+-echo $ECHO_N "checking linux/videodev.h presence... $ECHO_C" >&6
++echo "$as_me:$LINENO: checking linux/videodev2.h presence" >&5
++echo $ECHO_N "checking linux/videodev2.h presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+-#include <linux/videodev.h>
++#include <linux/videodev2.h>
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+@@ -4526,25 +4526,25 @@
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+- { echo "$as_me:$LINENO: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+- { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: linux/videodev.h: proceeding with the compiler's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: linux/videodev2.h: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: linux/videodev2.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: linux/videodev2.h: proceeding with the compiler's result" >&5
++echo "$as_me: WARNING: linux/videodev2.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+- { echo "$as_me:$LINENO: WARNING: linux/videodev.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: linux/videodev.h: present but cannot be compiled" >&2;}
+- { echo "$as_me:$LINENO: WARNING: linux/videodev.h: check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: linux/videodev.h: check for missing prerequisite headers?" >&2;}
+- { echo "$as_me:$LINENO: WARNING: linux/videodev.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: linux/videodev.h: see the Autoconf documentation" >&2;}
+- { echo "$as_me:$LINENO: WARNING: linux/videodev.h: section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: linux/videodev.h: section \"Present But Cannot Be Compiled\"" >&2;}
+- { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&2;}
+- { echo "$as_me:$LINENO: WARNING: linux/videodev.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: linux/videodev.h: in the future, the compiler will take precedence" >&2;}
++ { echo "$as_me:$LINENO: WARNING: linux/videodev2.h: present but cannot be compiled" >&5
++echo "$as_me: WARNING: linux/videodev2.h: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: linux/videodev2.h: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: linux/videodev2.h: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: linux/videodev2.h: see the Autoconf documentation" >&5
++echo "$as_me: WARNING: linux/videodev2.h: see the Autoconf documentation" >&2;}
++ { echo "$as_me:$LINENO: WARNING: linux/videodev2.h: section \"Present But Cannot Be Compiled\"" >&5
++echo "$as_me: WARNING: linux/videodev2.h: section \"Present But Cannot Be Compiled\"" >&2;}
++ { echo "$as_me:$LINENO: WARNING: linux/videodev2.h: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: linux/videodev2.h: proceeding with the preprocessor's result" >&2;}
++ { echo "$as_me:$LINENO: WARNING: linux/videodev2.h: in the future, the compiler will take precedence" >&5
++echo "$as_me: WARNING: linux/videodev2.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+ ## ------------------------------------------ ##
+@@ -4555,8 +4555,8 @@
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for linux/videodev.h" >&5
+-echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6
++echo "$as_me:$LINENO: checking for linux/videodev2.h" >&5
++echo $ECHO_N "checking for linux/videodev2.h... $ECHO_C" >&6
+ if test "${ac_cv_header_linux_videodev_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+diff -Naur gqradio-1.9.2/configure.in gqradio-1.9.2-new/configure.in
+--- gqradio-1.9.2/configure.in 2005-02-22 21:58:06.000000000 -0300
++++ gqradio-1.9.2-new/configure.in 2012-10-25 20:06:54.853152918 -0200
+@@ -22,7 +22,7 @@
+ AC_SUBST([GQRADIO_LIBS])
+
+ dnl Video4Linux
+-AC_CHECK_HEADER(linux/videodev.h, AC_DEFINE(HAVE_VIDEO4LINUX,,[Video4Linux support]))
++AC_CHECK_HEADER(linux/videodev2.h, AC_DEFINE(HAVE_VIDEO4LINUX,,[Video4Linux support]))
+
+ dnl bktr
+ AC_CHECK_HEADER(machine/ioctl_bt848.h, AC_DEFINE(HAVE_IOCTL_BT848,,[FreeBSD bktr support]))
diff --git a/gqradio-1.9.2-v4l2.patch b/gqradio-1.9.2-v4l2.patch
index ae72217..aa5350e 100644
--- a/gqradio-1.9.2-v4l2.patch
+++ b/gqradio-1.9.2-v4l2.patch
@@ -1,14 +1,16 @@
---- gqradio-1.9.2/src/io_radio.c 2005-02-23 04:01:18.000000000 +0000
-+++ gqradio-1.9.2/src/io_radio.c 2007-02-10 18:57:17.000000000 +0000
-@@ -38,6 +38,7 @@
+diff -Naur gqradio-1.9.2/src/io_radio.c gqradio-1.9.2-new/src/io_radio.c
+--- gqradio-1.9.2/src/io_radio.c 2005-02-23 01:01:18.000000000 -0300
++++ gqradio-1.9.2-new/src/io_radio.c 2012-10-25 19:54:14.038303871 -0200
+@@ -37,7 +37,7 @@
+ #if defined(linux) && defined(HAVE_VIDEO4LINUX)
#include <fcntl.h>
#include <sys/ioctl.h>
- #include <linux/videodev.h>
+- #include <linux/videodev.h>
+ #include <linux/videodev2.h>
#include <errno.h>
#elif defined(HAVE_IOCTL_BT848)
#include <fcntl.h>
-@@ -108,9 +109,9 @@ static void radio_error_message(void)
+@@ -108,9 +108,9 @@
printf("Error talking (ioctl) to %s, %s\n", RADIO_DEVICE, strerror(errno));
}
@@ -20,7 +22,7 @@
{
return 16000; /* field is KHz */
}
-@@ -149,27 +150,21 @@ static gint radio_control_off(void)
+@@ -149,27 +149,21 @@
static gint radio_control_set_mute(gint mute)
{
@@ -53,7 +55,7 @@
{
radio_error_message();
return FALSE;
-@@ -180,15 +175,15 @@ static gint radio_control_set_mute(gint
+@@ -180,15 +174,15 @@
static gint radio_control_set_freq(guint32 freq)
{
@@ -73,7 +75,7 @@
{
m = radio_calc_steps(&t);
}
-@@ -199,7 +194,10 @@ static gint radio_control_set_freq(guint
+@@ -199,7 +193,10 @@
}
f = (guint32)((gfloat)freq / 1000000.0 * m);
@@ -85,7 +87,7 @@
{
radio_error_message();
return FALSE;
-@@ -239,7 +237,7 @@ static gint radio_real_shutdown(void)
+@@ -239,7 +236,7 @@
static gint radio_real_test(void)
{
@@ -94,7 +96,7 @@
if (!radio_device) radio_device = g_strdup(RADIO_DEVICE);
-@@ -256,9 +254,8 @@ static gint radio_real_test(void)
+@@ -256,9 +253,8 @@
return FALSE;
}
@@ -106,7 +108,7 @@
{
guint g;
-@@ -281,19 +278,19 @@ static gint radio_real_test(void)
+@@ -281,19 +277,19 @@
/* stereo is 0 or 1, strength is 0 to 100 (%) */
static gint radio_real_status(gint *stereo, gint *strength)
{
@@ -130,7 +132,7 @@
{
*stereo = TRUE;
}
-@@ -304,12 +301,6 @@ static gint radio_real_status(gint *ster
+@@ -304,12 +300,6 @@
/* strength */
diff --git a/gqradio.spec b/gqradio.spec
index 37b316f..2d76ee8 100644
--- a/gqradio.spec
+++ b/gqradio.spec
@@ -6,8 +6,9 @@ License: GPL+
URL: http://gqmpeg.sourceforge.net
Group: Applications/Multimedia
Source0: http://download.sourceforge.net/gqmpeg/gqradio-%{version}.tar.gz
-Patch0: gqradio-1.9.2-v4l2.patch
+Patch0: gqradio-1.9.2-radiodev.patch
Patch1: gqradio-1.9.2-ld.patch
+Patch2: gqradio-1.9.2-v4l2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils, gettext
BuildRequires: gtk2-devel >= 2.4
@@ -18,8 +19,9 @@ Interfaces with video4linux compatible radio tuner cards.
%prep
%setup -q
-%patch0 -p1 -b .v4l2
-%patch1 -p1 -b .ld
+%patch0 -p1 -b .radiodev
+%patch1 -p1 -b .v4l2
+%patch2 -p1 -b .ld
for i in ./SKIN-SPECS ; do
iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_"
@@ -57,8 +59,8 @@ rm -rf %{buildroot}
%{_datadir}/pixmaps/gqradio.png
%changelog
-* Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.9.2-10
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+* Thu Oct 25 2012 Paulo Roma <roma at lcg.ufrj.br> - 1.9.2-10
+- Applied gqradio-1.9.2-radiodev.patch
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.9.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list