diff options
author | dsomero <xgizzmo@slackbuilds.org> | 2012-09-02 19:34:40 -0400 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2012-09-03 15:58:30 -0400 |
commit | 62d66e8097ebed811753fe727bf3c568af4e126b (patch) | |
tree | bf3152ba4d25bbde12e150d00362b5451b7c1308 /audio/gqradio | |
parent | a59518de735ea45a5b7b8e938ff23eb8938b7205 (diff) |
audio/gqradio: Patched to fix linking.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'audio/gqradio')
-rw-r--r-- | audio/gqradio/gqradio-1.9.2-ld.patch | 11 | ||||
-rw-r--r-- | audio/gqradio/gqradio-1.9.2-v4l2.patch | 145 | ||||
-rw-r--r-- | audio/gqradio/gqradio.SlackBuild | 7 |
3 files changed, 162 insertions, 1 deletions
diff --git a/audio/gqradio/gqradio-1.9.2-ld.patch b/audio/gqradio/gqradio-1.9.2-ld.patch new file mode 100644 index 000000000000..5418996a1bc2 --- /dev/null +++ b/audio/gqradio/gqradio-1.9.2-ld.patch @@ -0,0 +1,11 @@ +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 2010-02-25 07:12:37.000000000 -0300 +@@ -4327,6 +4327,7 @@ + echo "$as_me:$LINENO: checking GQRADIO_LIBS" >&5 + echo $ECHO_N "checking GQRADIO_LIBS... $ECHO_C" >&6 + GQRADIO_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4.0"` ++ GQRADIO_LIBS=$GQRADIO_LIBS"-lX11 -lm" + echo "$as_me:$LINENO: result: $GQRADIO_LIBS" >&5 + echo "${ECHO_T}$GQRADIO_LIBS" >&6 + else diff --git a/audio/gqradio/gqradio-1.9.2-v4l2.patch b/audio/gqradio/gqradio-1.9.2-v4l2.patch new file mode 100644 index 000000000000..ae72217a72c7 --- /dev/null +++ b/audio/gqradio/gqradio-1.9.2-v4l2.patch @@ -0,0 +1,145 @@ +--- 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 @@ + #include <fcntl.h> + #include <sys/ioctl.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) + printf("Error talking (ioctl) to %s, %s\n", RADIO_DEVICE, strerror(errno)); + } + +-static guint radio_calc_steps(struct video_tuner *t) ++static guint radio_calc_steps(struct v4l2_tuner *t) + { +- if ( (t->flags & VIDEO_TUNER_LOW) ) ++ if ( (t->capability & V4L2_TUNER_CAP_LOW) ) + { + return 16000; /* field is KHz */ + } +@@ -149,27 +150,21 @@ static gint radio_control_off(void) + + static gint radio_control_set_mute(gint mute) + { +- struct video_audio av; ++ struct v4l2_control control; + + if (v4l_fd == -1) return FALSE; + +- if (ioctl(v4l_fd, VIDIOCGAUDIO, &av) != 0) +- { +- radio_error_message(); +- return FALSE; +- } +- ++ control.id = V4L2_CID_AUDIO_MUTE; + if (mute) + { +- av.flags |= VIDEO_AUDIO_MUTE; ++ control.value = 1; + } + else + { +- if (av.volume == 0 || radio_volume_boost) av.volume = 65535; +- av.flags &= ~VIDEO_AUDIO_MUTE; ++ control.value = 0; + } + +- if (ioctl(v4l_fd, VIDIOCSAUDIO, &av) != 0) ++ if (ioctl(v4l_fd, VIDIOC_S_CTRL, &control) != 0) + { + radio_error_message(); + return FALSE; +@@ -180,15 +175,15 @@ static gint radio_control_set_mute(gint + + static gint radio_control_set_freq(guint32 freq) + { +- struct video_tuner t; ++ struct v4l2_tuner t; ++ struct v4l2_frequency vfreq; + guint32 f; + guint m; + + if (v4l_fd == -1) return FALSE; + +- t.tuner = 0; +- +- if (ioctl(v4l_fd, VIDIOCGTUNER, &t) == 0) ++ memset(&t, 0, sizeof(struct v4l2_tuner)); ++ if (ioctl(v4l_fd, VIDIOC_G_TUNER, &t) == 0) + { + m = radio_calc_steps(&t); + } +@@ -199,7 +194,10 @@ static gint radio_control_set_freq(guint + } + + f = (guint32)((gfloat)freq / 1000000.0 * m); +- if (ioctl(v4l_fd, VIDIOCSFREQ, &f) != 0) ++ vfreq.tuner = 0; ++ vfreq.type = V4L2_TUNER_RADIO; ++ vfreq.frequency = f; ++ if (ioctl(v4l_fd, VIDIOC_S_FREQUENCY, &vfreq) != 0) + { + radio_error_message(); + return FALSE; +@@ -239,7 +237,7 @@ static gint radio_real_shutdown(void) + + static gint radio_real_test(void) + { +- struct video_tuner t; ++ struct v4l2_tuner t; + + if (!radio_device) radio_device = g_strdup(RADIO_DEVICE); + +@@ -256,9 +254,8 @@ static gint radio_real_test(void) + return FALSE; + } + +- t.tuner = 0; +- +- if (ioctl(v4l_fd, VIDIOCGTUNER, &t) == 0) ++ memset(&t, 0, sizeof(struct v4l2_tuner)); ++ if (ioctl(v4l_fd, VIDIOC_G_TUNER, &t) == 0) + { + guint g; + +@@ -281,19 +278,19 @@ static gint radio_real_test(void) + /* stereo is 0 or 1, strength is 0 to 100 (%) */ + static gint radio_real_status(gint *stereo, gint *strength) + { +- struct video_tuner t; +- struct video_audio av; ++ struct v4l2_tuner t; + + if (v4l_fd == -1 || !stereo || !strength) return FALSE; + + /* stereo */ + +- if (ioctl(v4l_fd, VIDIOCGAUDIO, &av) != 0) ++ memset(&t, 0, sizeof(struct v4l2_tuner)); ++ if (ioctl(v4l_fd, VIDIOC_G_TUNER, &t) != 0) + { + radio_error_message(); + return FALSE; + } +- if ( (av.mode & VIDEO_SOUND_STEREO) ) ++ if ( (t.audmode & V4L2_TUNER_MODE_STEREO) ) + { + *stereo = TRUE; + } +@@ -304,12 +301,6 @@ static gint radio_real_status(gint *ster + + /* strength */ + +- t.tuner = 0; +- if (ioctl(v4l_fd, VIDIOCGTUNER, &t) != 0) +- { +- radio_error_message(); +- return FALSE; +- } + *strength = (double)t.signal / 65535.0 * 100.0; /* 16bit scale */ + + return TRUE; diff --git a/audio/gqradio/gqradio.SlackBuild b/audio/gqradio/gqradio.SlackBuild index b9cb9068763f..2a72bbe98585 100644 --- a/audio/gqradio/gqradio.SlackBuild +++ b/audio/gqradio/gqradio.SlackBuild @@ -6,7 +6,7 @@ PRGNAM=gqradio VERSION=1.9.2 -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -51,6 +51,11 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Fix linking and v4lv2. +patch -p1 -i $CWD/gqradio-1.9.2-v4l2.patch +patch -p1 -i $CWD/gqradio-1.9.2-ld.patch + + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ |