Import cheese-2.22.3

Cheese uses your webcam to take photos and videos, applies fancy special
effects and lets you share the fun with others.  Under the hood, Cheese
uses GStreamer to apply fancy effects to photos and videos.  With Cheese
it is easy to take photos of you, your friends, pets or whatever you
want and share them with others.

Add a patch from NetBSD to fix v4l2 support.

BEWARE!
This port is not functionnal right now, an update to
gstreamer-plugins-good is needed first
This commit is contained in:
ajacoutot 2008-09-22 13:50:29 +00:00
parent 62d60aa075
commit eb1e1eb8e9
6 changed files with 413 additions and 0 deletions

58
x11/gnome/cheese/Makefile Normal file
View File

@ -0,0 +1,58 @@
# $OpenBSD: Makefile,v 1.1.1.1 2008/09/22 13:50:29 ajacoutot Exp $
COMMENT= PhotoBooth inspired application
GNOME_PROJECT= cheese
GNOME_VERSION= 2.22.3
CATEGORIES= multimedia
HOMEPAGE= http://www.gnome.org/projects/cheese/
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= ICE ORBit-2 ORBitCosNaming-2 SM X11 Xau Xcomposite \
Xcursor Xdamage Xdmcp Xext Xfixes Xi Xinerama Xrandr \
Xrender Xxf86vm art_lgpl_2 asn1 atk-1.0 audiofile \
bonobo-2 bonobo-activation bonoboui-2 bz2 c cairo \
com_err croco-0.6 crypto db dbus-1 dbus-glib-1 esd \
expat fontconfig freetype gailutil gconf-2 gdk-x11-2.0 \
gdk_pixbuf-2.0 gio-2.0 glib-2.0 glitz gmodule-2.0 \
gnome-2 gnome-keyring gnomecanvas-2 gnomevfs-2 \
gobject-2.0 gsf-1 gssapi gthread-2.0 gtk-x11-2.0 jpeg \
krb5 m nspr4 nss3 pango-1.0 pangocairo-1.0 \
pangoft2-1.0 pcre pixman-1 plc4 plds4 png popt pthread \
ssl ssl3 util xml2 z
MODULES= devel/gettext \
x11/gnome
BUILD_DEPENDS= ::x11/gnome/doc-utils
LIB_DEPENDS= camel-1.2.>=11,ebook-1.2,edataserver-1.2,smime3,softokn3::databases/evolution-data-server \
rsvg-2.>=20:librsvg-*-!no_gnome:x11/gnome/librsvg \
gstinterfaces-0.10,gstreamer-0.10::multimedia/gstreamer-0.10/plugins-base \
gnomeui-2::x11/gnome/libgnomeui
RUN_DEPENDS= :scrollkeeper-*:textproc/scrollkeeper \
:gstreamer-ogg-*:multimedia/gstreamer-0.10/plugins-base,-ogg \
:gstreamer-theora-*:multimedia/gstreamer-0.10/plugins-base,-theora \
:gstreamer-vorbis-*:multimedia/gstreamer-0.10/plugins-base,-vorbis \
::multimedia/gstreamer-0.10/plugins-good # gstreamer v4l2 plugin
USE_X11= Yes
DESKTOP_FILES= Yes
MODGNOME_HELP_FILES=Yes
FAKE_FLAGS= schemadir=${LOCALBASE}/share/schemas/cheese
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--disable-schemas-install \
--disable-scrollkeeper \
--with-gconf-schema-file-dir=${LOCALBASE}/share/schemas/cheese
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (gnome/cheese-2.22.3.tar.bz2) = IcI+KJscihrgFHBNYVqVQA==
RMD160 (gnome/cheese-2.22.3.tar.bz2) = y7YDB0Gzommm8cLuAAdJYVzqqJU=
SHA1 (gnome/cheese-2.22.3.tar.bz2) = gR35nHLwMcLrprLrBjCDVBJ/qig=
SHA256 (gnome/cheese-2.22.3.tar.bz2) = rCA5uqnMTMHQeUwAOkDaHZ2EuaWBvnocdhjC6IGZXFI=
SIZE (gnome/cheese-2.22.3.tar.bz2) = 1527967

View File

@ -0,0 +1,91 @@
$OpenBSD: patch-configure,v 1.1.1.1 2008/09/22 13:50:29 ajacoutot Exp $
--- configure.orig Tue Aug 26 14:39:36 2008
+++ configure Tue Aug 26 14:39:58 2008
@@ -23850,7 +23850,6 @@ CAIRO_REQUIRED=1.2.4
GNOME_VFS_REQUIRED=2.18.0
LIBEBOOK_REQUIRED=1.12.0
DBUS_REQUIRED=1.0
-HAL_REQUIRED=0.5.9
DBUS_GLIB_REQUIRED=0.7
LIBRSVG_REQUIRED=2.18.0
PANGOCAIRO_REQUIRED=1.18.0
@@ -23877,7 +23876,6 @@ if test -n "$PKG_CONFIG"; then
libebook-1.2 >= \$LIBEBOOK_REQUIRED \\
cairo >= \$CAIRO_REQUIRED \\
dbus-1 >= \$DBUS_REQUIRED \\
- hal >= \$HAL_REQUIRED \\
dbus-glib-1 >= \$DBUS_GLIB_REQUIRED \\
pangocairo >= \$PANGOCAIRO_REQUIRED \\
librsvg-2.0 >= \$LIBRSVG_REQUIRED \\
@@ -23894,7 +23892,6 @@ if test -n "$PKG_CONFIG"; then
libebook-1.2 >= $LIBEBOOK_REQUIRED \
cairo >= $CAIRO_REQUIRED \
dbus-1 >= $DBUS_REQUIRED \
- hal >= $HAL_REQUIRED \
dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
pangocairo >= $PANGOCAIRO_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
@@ -23914,7 +23911,6 @@ if test -n "$PKG_CONFIG"; then
libebook-1.2 >= $LIBEBOOK_REQUIRED \
cairo >= $CAIRO_REQUIRED \
dbus-1 >= $DBUS_REQUIRED \
- hal >= $HAL_REQUIRED \
dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
pangocairo >= $PANGOCAIRO_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
@@ -23943,7 +23939,6 @@ if test -n "$PKG_CONFIG"; then
libebook-1.2 >= \$LIBEBOOK_REQUIRED \\
cairo >= \$CAIRO_REQUIRED \\
dbus-1 >= \$DBUS_REQUIRED \\
- hal >= \$HAL_REQUIRED \\
dbus-glib-1 >= \$DBUS_GLIB_REQUIRED \\
pangocairo >= \$PANGOCAIRO_REQUIRED \\
librsvg-2.0 >= \$LIBRSVG_REQUIRED \\
@@ -23960,7 +23955,6 @@ if test -n "$PKG_CONFIG"; then
libebook-1.2 >= $LIBEBOOK_REQUIRED \
cairo >= $CAIRO_REQUIRED \
dbus-1 >= $DBUS_REQUIRED \
- hal >= $HAL_REQUIRED \
dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
pangocairo >= $PANGOCAIRO_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
@@ -23980,7 +23974,6 @@ if test -n "$PKG_CONFIG"; then
libebook-1.2 >= $LIBEBOOK_REQUIRED \
cairo >= $CAIRO_REQUIRED \
dbus-1 >= $DBUS_REQUIRED \
- hal >= $HAL_REQUIRED \
dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
pangocairo >= $PANGOCAIRO_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
@@ -24015,7 +24008,6 @@ fi
libebook-1.2 >= $LIBEBOOK_REQUIRED \
cairo >= $CAIRO_REQUIRED \
dbus-1 >= $DBUS_REQUIRED \
- hal >= $HAL_REQUIRED \
dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
pangocairo >= $PANGOCAIRO_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
@@ -24033,7 +24025,6 @@ fi
libebook-1.2 >= $LIBEBOOK_REQUIRED \
cairo >= $CAIRO_REQUIRED \
dbus-1 >= $DBUS_REQUIRED \
- hal >= $HAL_REQUIRED \
dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
pangocairo >= $PANGOCAIRO_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
@@ -24054,7 +24045,6 @@ fi
libebook-1.2 >= $LIBEBOOK_REQUIRED \
cairo >= $CAIRO_REQUIRED \
dbus-1 >= $DBUS_REQUIRED \
- hal >= $HAL_REQUIRED \
dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
pangocairo >= $PANGOCAIRO_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
@@ -24081,7 +24071,6 @@ echo "$as_me: error: Package requirements (\
libebook-1.2 >= $LIBEBOOK_REQUIRED \
cairo >= $CAIRO_REQUIRED \
dbus-1 >= $DBUS_REQUIRED \
- hal >= $HAL_REQUIRED \
dbus-glib-1 >= $DBUS_GLIB_REQUIRED \
pangocairo >= $PANGOCAIRO_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \

View File

@ -0,0 +1,101 @@
$OpenBSD: patch-src_cheese-webcam_c,v 1.1.1.1 2008/09/22 13:50:29 ajacoutot Exp $
--- src/cheese-webcam.c.orig Sun Jun 29 18:17:43 2008
+++ src/cheese-webcam.c Mon Sep 8 12:23:55 2008
@@ -31,8 +31,20 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <X11/Xlib.h>
#include <X11/extensions/xf86vmode.h>
+
+#ifndef __OpenBSD__ // no HAL under OpenBSD
#include <libhal.h>
+#else
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <unistd.h>
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+#include <sys/types.h>
+#include <sys/videoio.h>
+#endif
+#endif
+
#include "cheese-webcam.h"
G_DEFINE_TYPE (CheeseWebcam, cheese_webcam, G_TYPE_OBJECT)
@@ -233,7 +245,7 @@ cheese_webcam_bus_message_cb (GstBus *bus, GstMessage
}
}
-
+#ifndef __OpenBSD__ // no HAL under OpenBSD
static void
cheese_webcam_get_video_devices_from_hal (CheeseWebcam *webcam)
{
@@ -307,7 +319,55 @@ cheese_webcam_get_video_devices_from_hal (CheeseWebcam
}
libhal_free_string_array (udis);
}
+#else // __OpenBSD__
+static void
+cheese_webcam_get_video_devices_from_probe (CheeseWebcam *webcam)
+{
+ CheeseWebcamPrivate* priv = CHEESE_WEBCAM_GET_PRIVATE (webcam);
+ struct v4l2_capability caps;
+ gchar videodev[] = "/dev/video?";
+ guint16 cammask = 0;
+ int i, ncams = 0, fd, ret, cur = 0;
+ for (i = 0; i < 9; i++)
+ {
+ videodev[strlen(videodev) - 1] = '0' + i;
+ fd = open(videodev, O_RDONLY);
+ if (fd == -1)
+ continue;
+ ret = ioctl(fd, VIDIOC_QUERYCAP, &caps);
+ close(fd);
+ if (ret)
+ {
+ continue;
+ }
+ g_message("Found video device: %s\n", caps.card);
+ cammask |= (1 << i);
+ ++ncams;
+ }
+
+ priv->num_webcam_devices = ncams;
+ if (ncams == 0)
+ return;
+ priv->webcam_devices = g_new0 (CheeseWebcamDevice, ncams);
+ for (i = 0; i < ncams; i++)
+ {
+ priv->webcam_devices[i].num_video_formats = 0;
+ priv->webcam_devices[i].video_formats = g_array_new (FALSE, FALSE, sizeof (CheeseVideoFormat));
+ }
+
+ for (i = 0; i < 9; i++)
+ {
+ if (cammask & (1 << i))
+ {
+ videodev[strlen(videodev) - 1] = '0' + i;
+ priv->webcam_devices[i].video_device = g_strdup (videodev);
+ ++cur;
+ }
+ }
+}
+#endif /* __OpenBSD__ */
+
static void
cheese_webcam_get_supported_framerates (CheeseVideoFormat *video_format, GstStructure *structure)
{
@@ -549,7 +609,11 @@ cheese_webcam_detect_webcam_devices (CheeseWebcam *web
CheeseWebcamPrivate* priv = CHEESE_WEBCAM_GET_PRIVATE (webcam);
int i;
+#ifndef __OpenBSD__ // no HAL under OpenBSD
cheese_webcam_get_video_devices_from_hal (webcam);
+#else
+ cheese_webcam_get_video_devices_from_probe (webcam);
+#endif
for (i = 0; i < priv->num_webcam_devices; i++)
{
cheese_webcam_get_webcam_device_data (&(priv->webcam_devices[i]));

View File

@ -0,0 +1,5 @@
Cheese uses your webcam to take photos and videos, applies fancy special
effects and lets you share the fun with others. Under the hood, Cheese
uses GStreamer to apply fancy effects to photos and videos. With Cheese
it is easy to take photos of you, your friends, pets or whatever you
want and share them with others.

153
x11/gnome/cheese/pkg/PLIST Normal file
View File

@ -0,0 +1,153 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2008/09/22 13:50:29 ajacoutot Exp $
@bin bin/cheese
libexec/cheese/
libexec/cheese/cheese-bugreport.sh
share/applications/cheese.desktop
share/cheese/
share/cheese/cheese-ui.xml
share/cheese/cheese.ui
share/cheese/effects/
share/cheese/effects/Hulk.png
share/cheese/effects/Mauve.png
share/cheese/effects/NoirBlanc.png
share/cheese/effects/Saturation.png
share/cheese/effects/dicetv.png
share/cheese/effects/edgetv.png
share/cheese/effects/identity.png
share/cheese/effects/shagadelictv.png
share/cheese/effects/vertigotv.png
share/cheese/effects/videoflip_h.png
share/cheese/effects/videoflip_v.png
share/cheese/effects/warptv.png
share/cheese/pixmaps/
share/cheese/pixmaps/camera-icon.svg
share/cheese/pixmaps/thumbnail-frame.png
share/cheese/sounds/
share/cheese/sounds/shutter0.ogg
share/cheese/sounds/shutter1.ogg
share/cheese/sounds/shutter2.ogg
share/cheese/sounds/shutter3.ogg
share/cheese/sounds/shutter4.ogg
share/gnome/help/cheese/
share/gnome/help/cheese/C/
share/gnome/help/cheese/C/cheese.xml
share/gnome/help/cheese/C/figures/
share/gnome/help/cheese/C/figures/cheese-effects-screenshot.jpg
share/gnome/help/cheese/C/figures/cheese-screenshot.jpg
share/gnome/help/cheese/C/legal.xml
share/gnome/help/cheese/el/
share/gnome/help/cheese/el/cheese.xml
share/gnome/help/cheese/el/figures/
share/gnome/help/cheese/el/figures/cheese-effects-screenshot.jpg
share/gnome/help/cheese/el/figures/cheese-screenshot.jpg
share/gnome/help/cheese/es/
share/gnome/help/cheese/es/cheese.xml
share/gnome/help/cheese/es/figures/
share/gnome/help/cheese/es/figures/cheese-effects-screenshot.jpg
share/gnome/help/cheese/es/figures/cheese-screenshot.jpg
share/gnome/help/cheese/fr/
share/gnome/help/cheese/fr/cheese.xml
share/gnome/help/cheese/fr/figures/
share/gnome/help/cheese/fr/figures/cheese-effects-screenshot.jpg
share/gnome/help/cheese/fr/figures/cheese-screenshot.jpg
share/gnome/help/cheese/oc/
share/gnome/help/cheese/oc/cheese.xml
share/gnome/help/cheese/oc/figures/
share/gnome/help/cheese/oc/figures/cheese-effects-screenshot.jpg
share/gnome/help/cheese/oc/figures/cheese-screenshot.jpg
share/gnome/help/cheese/ru/
share/gnome/help/cheese/ru/cheese.xml
share/gnome/help/cheese/ru/figures/
share/gnome/help/cheese/ru/figures/cheese-effects-screenshot.jpg
share/gnome/help/cheese/ru/figures/cheese-screenshot.jpg
share/gnome/help/cheese/sv/
share/gnome/help/cheese/sv/cheese.xml
share/gnome/help/cheese/sv/figures/
share/gnome/help/cheese/sv/figures/cheese-effects-screenshot.jpg
share/gnome/help/cheese/sv/figures/cheese-screenshot.jpg
share/icons/hicolor/16x16/
share/icons/hicolor/16x16/apps/
share/icons/hicolor/16x16/apps/cheese.png
share/icons/hicolor/22x22/
share/icons/hicolor/22x22/apps/
share/icons/hicolor/22x22/apps/cheese.png
share/icons/hicolor/24x24/
share/icons/hicolor/24x24/apps/
share/icons/hicolor/24x24/apps/cheese.png
share/icons/hicolor/32x32/
share/icons/hicolor/32x32/apps/
share/icons/hicolor/32x32/apps/cheese.png
share/icons/hicolor/48x48/
share/icons/hicolor/48x48/apps/
share/icons/hicolor/48x48/apps/cheese.png
share/icons/hicolor/scalable/
share/icons/hicolor/scalable/apps/
share/icons/hicolor/scalable/apps/cheese.svg
share/locale/ar/LC_MESSAGES/cheese.mo
share/locale/be@latin/
share/locale/be@latin/LC_MESSAGES/
share/locale/be@latin/LC_MESSAGES/cheese.mo
share/locale/bg/LC_MESSAGES/cheese.mo
share/locale/bn_IN/LC_MESSAGES/cheese.mo
share/locale/ca/LC_MESSAGES/cheese.mo
share/locale/cs/LC_MESSAGES/cheese.mo
share/locale/da/LC_MESSAGES/cheese.mo
share/locale/de/LC_MESSAGES/cheese.mo
share/locale/el/LC_MESSAGES/cheese.mo
share/locale/en_GB/LC_MESSAGES/cheese.mo
share/locale/es/LC_MESSAGES/cheese.mo
share/locale/et/LC_MESSAGES/cheese.mo
share/locale/eu/LC_MESSAGES/cheese.mo
share/locale/fi/LC_MESSAGES/cheese.mo
share/locale/fr/LC_MESSAGES/cheese.mo
share/locale/ga/LC_MESSAGES/cheese.mo
share/locale/gl/LC_MESSAGES/cheese.mo
share/locale/gu/LC_MESSAGES/cheese.mo
share/locale/he/LC_MESSAGES/cheese.mo
share/locale/hu/LC_MESSAGES/cheese.mo
share/locale/it/LC_MESSAGES/cheese.mo
share/locale/ja/LC_MESSAGES/cheese.mo
share/locale/ko/LC_MESSAGES/cheese.mo
share/locale/lt/LC_MESSAGES/cheese.mo
share/locale/mk/LC_MESSAGES/cheese.mo
share/locale/ml/LC_MESSAGES/cheese.mo
share/locale/mr/LC_MESSAGES/cheese.mo
share/locale/nb/LC_MESSAGES/cheese.mo
share/locale/nl/LC_MESSAGES/cheese.mo
share/locale/nn/LC_MESSAGES/cheese.mo
share/locale/oc/
share/locale/oc/LC_MESSAGES/
share/locale/oc/LC_MESSAGES/cheese.mo
share/locale/pa/LC_MESSAGES/cheese.mo
share/locale/pl/LC_MESSAGES/cheese.mo
share/locale/pt/LC_MESSAGES/cheese.mo
share/locale/pt_BR/LC_MESSAGES/cheese.mo
share/locale/ro/LC_MESSAGES/cheese.mo
share/locale/ru/LC_MESSAGES/cheese.mo
share/locale/sl/LC_MESSAGES/cheese.mo
share/locale/sv/LC_MESSAGES/cheese.mo
share/locale/th/LC_MESSAGES/cheese.mo
share/locale/tr/LC_MESSAGES/cheese.mo
share/locale/uk/LC_MESSAGES/cheese.mo
share/locale/vi/LC_MESSAGES/cheese.mo
share/locale/zh_CN/LC_MESSAGES/cheese.mo
share/locale/zh_HK/LC_MESSAGES/cheese.mo
share/locale/zh_TW/LC_MESSAGES/cheese.mo
share/omf/cheese/
share/omf/cheese/cheese-C.omf
share/omf/cheese/cheese-el.omf
share/omf/cheese/cheese-es.omf
share/omf/cheese/cheese-fr.omf
share/omf/cheese/cheese-oc.omf
share/omf/cheese/cheese-ru.omf
share/omf/cheese/cheese-sv.omf
@unexec GCONF_CONFIG_SOURCE=`%D/bin/gconftool-2 --get-default-source` %D/bin/gconftool-2 --makefile-uninstall-rule %D/share/schemas/cheese/*.schemas > /dev/null
share/schemas/cheese/
share/schemas/cheese/cheese.schemas
@exec GCONF_CONFIG_SOURCE=`%D/bin/gconftool-2 --get-default-source` %D/bin/gconftool-2 --makefile-install-rule %D/share/schemas/cheese/*.schemas > /dev/null
@exec %D/bin/gtk-update-icon-cache -q -f -t %D/share/icons/hicolor 2> /dev/null || true
@unexec %D/bin/gtk-update-icon-cache -q -f -t %D/share/icons/hicolor 2> /dev/null || true
@exec %D/bin/scrollkeeper-update -q
@unexec %D/bin/scrollkeeper-update -q
@exec %D/bin/update-desktop-database
@unexec %D/bin/update-desktop-database