[camorama/el6] Build for el6

Hans de Goede jwrdegoede at fedoraproject.org
Fri Apr 20 14:36:39 UTC 2012


commit 39e936010e9020b3b176391f48fecee435aea5c5
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Apr 20 16:38:58 2012 +0200

    Build for el6
    
    - Drop camorama-0.19-no-more-videodev_h.patch as that breaks rather then
      fixes the build on el6

 camorama-0.19-no-more-videodev_h.patch |   13 ---------
 camorama-0.19-rhel6-hack.patch         |   43 ++++++++++++++++++++++++++++++++
 camorama.spec                          |   11 ++++++--
 3 files changed, 51 insertions(+), 16 deletions(-)
---
diff --git a/camorama-0.19-rhel6-hack.patch b/camorama-0.19-rhel6-hack.patch
new file mode 100644
index 0000000..3249314
--- /dev/null
+++ b/camorama-0.19-rhel6-hack.patch
@@ -0,0 +1,43 @@
+diff -up camorama-0.19/src/v4l.c~ camorama-0.19/src/v4l.c
+--- camorama-0.19/src/v4l.c~	2012-04-20 16:11:05.000000000 +0200
++++ camorama-0.19/src/v4l.c	2012-04-20 16:31:34.661047003 +0200
+@@ -88,15 +88,10 @@ void print_palette(int p)
+ void camera_cap(cam * cam)
+ {
+    char *msg;
+-   if(v4l1_ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) {
+-      if(cam->debug == TRUE) {
+-         fprintf(stderr, "VIDIOCGCAP  --  could not get camera capabilities, exiting.....\n");
+-      }
+-      msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
+-      error_dialog(msg);
+-      g_free(msg);
+-      exit(0);
+-   }
++   /* RHEL-6 hack, rhel-6 has an old libv4l which relies on the kernel for
++      getcap emulation, but that is unreliable! Luckily the fields which are
++      relevant for us are always filled in, so we simply ignore the retval. */
++   v4l1_ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap);
+    if(cam->x > 0 && cam->y > 0) {
+       if(cam->vid_cap.maxwidth < cam->x) {
+          cam->x = cam->vid_cap.maxwidth;
+@@ -133,19 +128,9 @@ void camera_cap(cam * cam)
+          break;
+       }
+    }
+-   if((cam->vid_cap.type & VID_TYPE_CAPTURE) != 1) {
+-      cam->read = TRUE;
+-   }
+ 
+    if(cam->debug == TRUE) {
+       printf("\nVIDIOCGCAP\n");
+-      printf("device name = %s\n", cam->vid_cap.name);
+-      printf("device type = %d\n", cam->vid_cap.type);
+-      if(cam->read == FALSE){
+-		  printf("can use mmap()\n");
+-	  }
+-      printf("# of channels = %d\n", cam->vid_cap.channels);
+-      printf("# of audio devices = %d\n", cam->vid_cap.audios);
+       printf("max width = %d\n", cam->vid_cap.maxwidth);
+       printf("max height = %d\n", cam->vid_cap.maxheight);
+       printf("min width = %d\n", cam->vid_cap.minwidth);
diff --git a/camorama.spec b/camorama.spec
index ab81609..8b9d515 100644
--- a/camorama.spec
+++ b/camorama.spec
@@ -1,6 +1,6 @@
 Name:           camorama
 Version:        0.19
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        Gnome webcam viewer
 Group:          Amusements/Graphics
 License:        GPLv2+
@@ -14,8 +14,8 @@ Patch0:         camorama-0.19-fixes.patch
 Patch1:         camorama-0.19-desktop.patch
 # Make it use libv4l1 so it will work with v4l2 devices too
 Patch2:         camorama-0.19-libv4l.patch
-Patch3:         camorama-0.19-no-more-videodev_h.patch
-Patch4:         camorama-0.19-new-glib.patch
+Patch3:         camorama-0.19-new-glib.patch
+Patch4:         camorama-0.19-rhel6-hack.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  libgnomeui-devel ORBit2-devel gettext-devel libv4l-devel
 BuildRequires:  intltool desktop-file-utils
@@ -107,6 +107,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Fri Apr 20 2012 Hans de Goede <hdegoede at redhat.com> - 0.19-8
+- Build for el6
+- Drop camorama-0.19-no-more-videodev_h.patch as that breaks rather then
+  fixes the build on el6
+
 * Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.19-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list