Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=2e534b8af91eb270e32b3c8397b4cf8421558ca9
commit 2e534b8af91eb270e32b3c8397b4cf8421558ca9 Author: DeX77 <[email protected]> Date: Tue Oct 21 21:23:53 2014 +0200 camorama-0.19-3-x86_64 * rebuilt + added some patches from debian (thx debian! :) diff --git a/source/gnome-extra/camorama/665516-glib-headers.patch b/source/gnome-extra/camorama/665516-glib-headers.patch new file mode 100644 index 0000000..c8a2b43 --- /dev/null +++ b/source/gnome-extra/camorama/665516-glib-headers.patch @@ -0,0 +1,32 @@ +From: Michael Biebl <[email protected]> +Origin: vendor +Bug-Debian: http://bugs.debian.org/665516 +Subject: Including individual glib headers no longer supported + +--- + src/camorama-stock-items.h | 2 +- + src/glib-helpers.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- camorama.orig/src/camorama-stock-items.h ++++ camorama/src/camorama-stock-items.h +@@ -1,7 +1,7 @@ + #ifndef CAMORAMA_STOCK_ITEMS_H + #define CAMORAMA_STOCK_ITEMS_H + +-#include <glib/gmacros.h> ++#include <glib.h> + + G_BEGIN_DECLS + +--- camorama.orig/src/glib-helpers.h ++++ camorama/src/glib-helpers.h +@@ -24,7 +24,7 @@ + #ifndef GLIB_HELPERS_H + #define GLIB_HELPERS_H + +-#include <glib/gmacros.h> ++#include <glib.h> + + G_BEGIN_DECLS + diff --git a/source/gnome-extra/camorama/FrugalBuild b/source/gnome-extra/camorama/FrugalBuild index 56fa106..de238cc 100644 --- a/source/gnome-extra/camorama/FrugalBuild +++ b/source/gnome-extra/camorama/FrugalBuild @@ -3,12 +3,12 @@ pkgname=camorama pkgver=0.19 -pkgrel=2 +pkgrel=3 pkgdesc="camorama is a program i wrote to learn gtk and v4l. as you can see, i am still learning" url="http://camorama.fixedgear.org/" license="GPL" archs=('i686' 'x86_64') -depends=('libgnomeui>=2.24.3-2' 'libglade') +depends=('libgnomeui>=2.24.5' 'libglade>=2.6.4' 'v4l-utils') makedepends=('perl-xml-parser') _F_gnome_schemas=('/etc/gconf/schemas/camorama.schemas') _F_gnome_scrollkeeper="y" @@ -17,6 +17,21 @@ _F_gnome_devel="y" up2date="Flasttar $url/download.php" Finclude gnome gnome-scriptlet groups=('gnome-extra') -sha1sums=('ce04cd2d4abe265b19a365a515f225111dcfb969') +source=("${source[@]}" \ + 665516-glib-headers.patch \ + S50_0.18_missing_prototype.patch \ + S50_0.19_deprecated_v4l1.patch \ + S50_0.19_desktop.patch \ + S50_0.19_newv4l.patch \ + S50_0.19_versionfix.patch \ + desktop_file.patch) +sha1sums=('ce04cd2d4abe265b19a365a515f225111dcfb969' \ + '2637ce613ffce1a51e4399a9b990043591466eb4' \ + 'f609c803625caefb561ed73699eec28b5a2fe942' \ + 'e5b42624e242087556bfb470b35d4ada1dd11522' \ + '1c9e2761a7699d70494cfe77560b67d0f8bd7ca0' \ + '40f571f926e5242cefdb873857bc429e5767818b' \ + '2d7801b94e6b511f694d198d527fa78d590dcd6a' \ + '7911609bfcc5215f12a449f6646a4618770d1918') # optimization OK diff --git a/source/gnome-extra/camorama/S50_0.18_missing_prototype.patch b/source/gnome-extra/camorama/S50_0.18_missing_prototype.patch new file mode 100644 index 0000000..46dc824 --- /dev/null +++ b/source/gnome-extra/camorama/S50_0.18_missing_prototype.patch @@ -0,0 +1,14 @@ +--- + src/camorama-window.c | 1 + + 1 file changed, 1 insertion(+) + +--- camorama.orig/src/camorama-window.c ++++ camorama/src/camorama-window.c +@@ -36,6 +36,7 @@ + #include "camorama-stock-items.h" + #include "filter.h" + #include "glib-helpers.h" ++#include "support.h" + + static GQuark menu_item_filter_type = 0; + diff --git a/source/gnome-extra/camorama/S50_0.19_deprecated_v4l1.patch b/source/gnome-extra/camorama/S50_0.19_deprecated_v4l1.patch new file mode 100644 index 0000000..217f690 --- /dev/null +++ b/source/gnome-extra/camorama/S50_0.19_deprecated_v4l1.patch @@ -0,0 +1,20 @@ +Description: V4L1 support was removed in the most recent kernels. + Update #include statements to rely on v4l-utils's headers. +Origin: Ubuntu +Bug-Ubuntu: https://launchpad.net/bugs/749079 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621953 +--- + src/v4l.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- camorama.orig/src/v4l.h ++++ camorama/src/v4l.h +@@ -13,7 +13,7 @@ + #include <fcntl.h> + #include <gtk/gtk.h> + #include <linux/types.h> +-#include <linux/videodev.h> ++#include <libv4l1-videodev.h> + #include <signal.h> + #include <png.h> + #include <glade/glade.h> diff --git a/source/gnome-extra/camorama/S50_0.19_desktop.patch b/source/gnome-extra/camorama/S50_0.19_desktop.patch new file mode 100644 index 0000000..03518c6 --- /dev/null +++ b/source/gnome-extra/camorama/S50_0.19_desktop.patch @@ -0,0 +1,15 @@ +--- + camorama.desktop.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- camorama.orig/camorama.desktop.in ++++ camorama/camorama.desktop.in +@@ -5,7 +5,7 @@ Exec=camorama + Terminal=0 + Type=Application + Icon=camorama.png +-Categories=Application;Graphics ++Categories=Video;Graphics;Viewer + StartupNotify=true + X-GNOME-Bugzilla-Bugzilla=GNOME + X-GNOME-Bugzilla-Product=camorama diff --git a/source/gnome-extra/camorama/S50_0.19_newv4l.patch b/source/gnome-extra/camorama/S50_0.19_newv4l.patch new file mode 100644 index 0000000..58775f2 --- /dev/null +++ b/source/gnome-extra/camorama/S50_0.19_newv4l.patch @@ -0,0 +1,293 @@ +--- + src/Makefile.am | 2 +- + src/Makefile.in | 2 +- + src/callbacks.c | 31 ++++++++++++++++++++----------- + src/camorama-window.c | 6 +----- + src/filter.c | 4 ++-- + src/main.c | 9 ++++++--- + src/v4l.c | 19 +++++++++++-------- + 7 files changed, 42 insertions(+), 31 deletions(-) + +--- camorama.orig/src/callbacks.c ++++ camorama/src/callbacks.c +@@ -9,6 +9,7 @@ + #include <libgnomeui/gnome-propertybox.h> + #include <libgnomeui/gnome-window-icon.h> + #include <pthread.h> ++#include <libv4l1.h> + + extern GtkWidget *main_window, *prefswindow; + //extern state func_state; +@@ -387,13 +388,10 @@ void on_change_size_activate (GtkWidget + } + } + +- cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth); +- gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"), +- cam->x, cam->y); + + /* + * if(cam->read == FALSE) { +- * cam->pic = mmap(0, cam->vid_buf.size, PROT_READ | PROT_WRITE, MAP_SHARED, cam->dev, 0); ++ * cam->pic = v4l1_mmap(0, cam->vid_buf.size, PROT_READ | PROT_WRITE, MAP_SHARED, cam->dev, 0); + * + * if((unsigned char *) -1 == (unsigned char *) cam->pic) { + * if(cam->debug == TRUE) { +@@ -404,7 +402,7 @@ void on_change_size_activate (GtkWidget + * } + * }else{ + * cam->pic_buf = malloc(cam->x * cam->y * cam->depth); +- * read(cam->dev,cam->pic,(cam->x * cam->y * 3)); ++ * v4l1_read(cam->dev,cam->pic,(cam->x * cam->y * 3)); + * } + */ + +@@ -430,7 +428,7 @@ void on_change_size_activate (GtkWidget + * if(cam->read == FALSE) { + * * for(frame = 0; frame < cam->vid_buf.frames; frame++) { + * * cam->vid_map.frame = frame; +- * * if(ioctl(cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) { ++ * * if(v4l1_ioctl(cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) { + * * if(cam->debug == TRUE) { + * * fprintf(stderr, "Unable to capture image (VIDIOCMCAPTURE) during resize.\n"); + * * } +@@ -441,6 +439,11 @@ void on_change_size_activate (GtkWidget + * * } + */ + get_win_info (cam); ++ ++ cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth); ++ gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"), ++ cam->x, cam->y); ++ + frame = 0; + gtk_window_resize (GTK_WINDOW + (glade_xml_get_widget (cam->xml, "main_window")), 320, +@@ -520,8 +523,14 @@ void on_about_activate (GtkMenuItem * me + gtk_widget_show (about); + } + ++void ++camorama_filter_color_filter(void* filter, guchar *image, int x, int y, int depth); ++ + static void + apply_filters(cam* cam) { ++ /* v4l has reverse rgb order from what camora expect so call the color ++ filter to fix things up before running the user selected filters */ ++ camorama_filter_color_filter(NULL, cam->pic_buf, cam->x, cam->y, cam->depth); + camorama_filter_chain_apply(cam->filter_chain, cam->pic_buf, cam->x, cam->y, cam->depth); + #warning "FIXME: enable the threshold channel filter" + // if((effect_mask & CAMORAMA_FILTER_THRESHOLD_CHANNEL) != 0) +@@ -539,7 +548,7 @@ read_timeout_func(cam* cam) { + int i, count = 0; + GdkGC *gc; + +- read (cam->dev, cam->pic, (cam->x * cam->y * 3)); ++ v4l1_read (cam->dev, cam->pic, (cam->x * cam->y * 3)); + frames2++; + /* + * update_rec.x = 0; +@@ -580,7 +589,7 @@ gint timeout_func (cam * cam) + + i = -1; + while (i < 0) { +- i = ioctl (cam->dev, VIDIOCSYNC, &frame); ++ i = v4l1_ioctl (cam->dev, VIDIOCSYNC, &frame); + + if (i < 0 && errno == EINTR) { + if (cam->debug == TRUE) { +@@ -622,7 +631,7 @@ gint timeout_func (cam * cam) + 0, cam->x, cam->y); + + cam->vid_map.frame = frame; +- if (ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) { ++ if (v4l1_ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) { + if (cam->debug == TRUE) { + fprintf (stderr, "Unable to capture image (VIDIOCMCAPTURE)\n"); + } +@@ -669,7 +678,7 @@ void on_status_show (GtkWidget * sb, cam + void init_cam (GtkWidget * capture, cam * cam) + { + cam->pic = +- mmap (0, cam->vid_buf.size, PROT_READ | PROT_WRITE, ++ v4l1_mmap (0, cam->vid_buf.size, PROT_READ | PROT_WRITE, + MAP_SHARED, cam->dev, 0); + + if ((unsigned char *) -1 == (unsigned char *) cam->pic) { +@@ -684,7 +693,7 @@ void init_cam (GtkWidget * capture, cam + cam->vid_map.format = cam->vid_pic.palette; + for (frame = 0; frame < cam->vid_buf.frames; frame++) { + cam->vid_map.frame = frame; +- if (ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) { ++ if (v4l1_ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) { + if (cam->debug == TRUE) { + fprintf (stderr, + "Unable to capture image (VIDIOCMCAPTURE).\n"); +--- camorama.orig/src/camorama-window.c ++++ camorama/src/camorama-window.c +@@ -210,11 +210,7 @@ load_interface(cam* cam) { + + logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), CAMORAMA_STOCK_WEBCAM, 24, 0, NULL); + gtk_window_set_default_icon(logo); +- logo = (GdkPixbuf *) create_pixbuf (PACKAGE_DATA_DIR "/pixmaps/camorama.png"); +- if (logo == NULL) { +- printf ("\n\nLOGO NO GO\n\n"); +- } +- ++ logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), "camorama", 48, 0, NULL); + if (cam->show_adjustments == FALSE) { + gtk_widget_hide (glade_xml_get_widget + (cam->xml, "adjustments_table")); +--- camorama.orig/src/filter.c ++++ camorama/src/filter.c +@@ -151,12 +151,12 @@ G_DEFINE_TYPE(CamoramaFilterColor, camor + static void + camorama_filter_color_init(CamoramaFilterColor* self) {} + +-static void ++void + camorama_filter_color_filter(CamoramaFilterColor* filter, guchar *image, int x, int y, int depth) { + int i; + char tmp; + i = x * y; +- while (--i) { ++ while (i--) { + tmp = image[0]; + image[0] = image[2]; + image[2] = tmp; +--- camorama.orig/src/main.c ++++ camorama/src/main.c +@@ -9,6 +9,7 @@ + #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h> + #include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h> + #include <locale.h> ++#include <libv4l1.h> + + #include "camorama-display.h" + #include "camorama-stock-items.h" +@@ -206,7 +207,7 @@ main(int argc, char *argv[]) { + gdk_pixbuf_xlib_init (display, 0); + cam->desk_depth = xlib_rgb_get_depth (); + +- cam->dev = open (cam->video_dev, O_RDWR); ++ cam->dev = v4l1_open (cam->video_dev, O_RDWR); + + camera_cap (cam); + get_win_info (cam); +@@ -224,8 +225,7 @@ main(int argc, char *argv[]) { + + /* get picture attributes */ + get_pic_info (cam); +-// set_pic_info(cam); +- /* set_pic_info(cam); */ ++ set_pic_info (cam); + cam->contrast = cam->vid_pic.contrast; + cam->brightness = cam->vid_pic.brightness; + cam->colour = cam->vid_pic.colour; +@@ -285,5 +285,8 @@ main(int argc, char *argv[]) { + + gtk_timeout_add (2000, (GSourceFunc) fps, cam->status); + gtk_main (); ++ v4l1_munmap(cam->pic, cam->vid_buf.size); ++ v4l1_close(cam->dev); ++ + return 0; + } +--- camorama.orig/src/Makefile.am ++++ camorama/src/Makefile.am +@@ -36,7 +36,7 @@ camorama_SOURCES = \ + filter.h \ + $(BUILT_SOURCES)\ + $(NULL) +-camorama_LDADD = $(PACKAGE_LIBS) ++camorama_LDADD = $(PACKAGE_LIBS) -lv4l1 + + DISTCLEANFILES=$(BUILT_SOURCES) + +--- camorama.orig/src/Makefile.in ++++ camorama/src/Makefile.in +@@ -248,7 +248,7 @@ camorama_SOURCES = \ + $(BUILT_SOURCES)\ + $(NULL) + +-camorama_LDADD = $(PACKAGE_LIBS) ++camorama_LDADD = $(PACKAGE_LIBS) -lv4l1 + DISTCLEANFILES = $(BUILT_SOURCES) + all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am +--- camorama.orig/src/v4l.c ++++ camorama/src/v4l.c +@@ -2,6 +2,7 @@ + #include<time.h> + #include<errno.h> + #include<gnome.h> ++#include <libv4l1.h> + #include "support.h" + + extern int frame_number; +@@ -87,7 +88,7 @@ void print_palette(int p) + void camera_cap(cam * cam) + { + char *msg; +- if(ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) { ++ if(v4l1_ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) { + if(cam->debug == TRUE) { + fprintf(stderr, "VIDIOCGCAP -- could not get camera capabilities, exiting.....\n"); + } +@@ -158,10 +159,10 @@ set_pic_info(cam* cam) { + if(cam->debug) { + g_message("SET PIC"); + } +- //cam->vid_pic.palette = VIDEO_PALETTE_RGB24; +- //cam->vid_pic.depth = 24; ++ cam->vid_pic.palette = VIDEO_PALETTE_RGB24; ++ cam->vid_pic.depth = 24; + //cam->vid_pic.palette = VIDEO_PALETTE_YUV420P; +- if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) { ++ if(v4l1_ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) { + if(cam->debug) { + g_message("VIDIOCSPICT -- could not set picture info, exiting...."); + } +@@ -176,7 +177,7 @@ void get_pic_info(cam * cam){ + //set_pic_info(cam); + char *msg; + +- if(ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) { ++ if(v4l1_ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) { + msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev); + error_dialog(msg); + if(cam->debug == TRUE) { +@@ -201,7 +202,7 @@ void get_pic_info(cam * cam){ + void get_win_info(cam * cam) + { + gchar *msg; +- if(ioctl(cam->dev, VIDIOCGWIN, &cam->vid_win) == -1) { ++ if(v4l1_ioctl(cam->dev, VIDIOCGWIN, &cam->vid_win) == -1) { + msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev); + error_dialog(msg); + if(cam->debug == TRUE) { +@@ -222,7 +223,7 @@ void get_win_info(cam * cam) + void set_win_info(cam * cam) + { + gchar *msg; +- if(ioctl(cam->dev, VIDIOCSWIN, &cam->vid_win) == -1) { ++ if(v4l1_ioctl(cam->dev, VIDIOCSWIN, &cam->vid_win) == -1) { + msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev); + error_dialog(msg); + if(cam->debug == TRUE) { +@@ -232,12 +233,14 @@ void set_win_info(cam * cam) + exit(0); + } + ++ cam->x = cam->vid_win.width; ++ cam->y = cam->vid_win.height; + } + + void set_buffer(cam * cam) + { + char *msg; +- if(ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) { ++ if(v4l1_ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) { + msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev); + error_dialog(msg); + if(cam->debug == TRUE) { diff --git a/source/gnome-extra/camorama/S50_0.19_versionfix.patch b/source/gnome-extra/camorama/S50_0.19_versionfix.patch new file mode 100644 index 0000000..0f8c581 --- /dev/null +++ b/source/gnome-extra/camorama/S50_0.19_versionfix.patch @@ -0,0 +1,15 @@ +--- + src/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- camorama.orig/src/main.c ++++ camorama/src/main.c +@@ -128,7 +128,7 @@ main(int argc, char *argv[]) { + + + if (ver) { +- fprintf (stderr, _("\n\nCamorama version %s\n\n"), VERSION); ++ fprintf (stderr, _("\n\nCamorama version %s\n\n"), PACKAGE_VERSION); + exit (0); + } + if (max) { diff --git a/source/gnome-extra/camorama/desktop_file.patch b/source/gnome-extra/camorama/desktop_file.patch new file mode 100644 index 0000000..c64e08b --- /dev/null +++ b/source/gnome-extra/camorama/desktop_file.patch @@ -0,0 +1,46 @@ +Description: <short summary of the patch> + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . + camorama (0.19-3) unstable; urgency=medium + . + * Non-maintainer upload. + * +Author: Alessio Treglia <[email protected]> + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: <vendor|upstream|other>, <url of original patch> +Bug: <url in upstream bugtracker> +Bug-Debian: http://bugs.debian.org/<bugnumber> +Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> +Forwarded: <no|not-needed|url proving that it has been forwarded> +Reviewed-By: <name and email of someone who approved the patch> +Last-Update: <YYYY-MM-DD> + +--- + camorama.desktop.in.costela | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- /dev/null ++++ camorama/camorama.desktop.in.costela +@@ -0,0 +1,13 @@ ++[Desktop Entry] ++_Name=Camorama Webcam Viewer ++_Comment=View, alter and save images from a webcam ++Exec=camorama ++Terminal=0 ++Type=Application ++Icon=camorama.png ++Categories=Video;Graphics;Viewer ++StartupNotify=true ++X-GNOME-Bugzilla-Bugzilla=GNOME ++X-GNOME-Bugzilla-Product=camorama ++X-GNOME-Bugzilla-Component=General ++X-GNOME-Bugzilla-Component=User Interface _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
