aboutsummaryrefslogtreecommitdiff
path: root/multimedia/ucview
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/ucview')
-rw-r--r--multimedia/ucview/README6
-rw-r--r--multimedia/ucview/doinst.sh9
-rw-r--r--multimedia/ucview/patches/patches.README65
-rw-r--r--multimedia/ucview/patches/ucview-0.33-default_image_path.patch18
-rw-r--r--multimedia/ucview/patches/ucview-0.33-default_video_path.patch11
-rw-r--r--multimedia/ucview/patches/ucview-0.33-deprecated_Gtk_setting.patch24
-rw-r--r--multimedia/ucview/patches/ucview-0.33-plugins_mkdir_parents.patch10
-rw-r--r--multimedia/ucview/slack-desc19
-rw-r--r--multimedia/ucview/ucview.SlackBuild129
-rw-r--r--multimedia/ucview/ucview.info10
10 files changed, 301 insertions, 0 deletions
diff --git a/multimedia/ucview/README b/multimedia/ucview/README
new file mode 100644
index 000000000000..42e683b44506
--- /dev/null
+++ b/multimedia/ucview/README
@@ -0,0 +1,6 @@
+UCView is a video capture and display program based on the unicap video
+imaging library. It allows high performance live video display, by using
+XVideo hardware acceleration where possible. It supports a broad range of
+video capture devices via the unicap library. It allows audio and video
+recording and encoding, by using the free Ogg Vorbis and Theora high
+performance codecs. It can also be extended via plugins.
diff --git a/multimedia/ucview/doinst.sh b/multimedia/ucview/doinst.sh
new file mode 100644
index 000000000000..3e5691a052b5
--- /dev/null
+++ b/multimedia/ucview/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/multimedia/ucview/patches/patches.README b/multimedia/ucview/patches/patches.README
new file mode 100644
index 000000000000..a77aa855d344
--- /dev/null
+++ b/multimedia/ucview/patches/patches.README
@@ -0,0 +1,65 @@
+
+## Notes about patches to UCView 0.33, as applied by this SlackBuild ##
+
+## 2015, Philip Lacroix
+
+
+#~ ucview-0.33-deprecated_Gtk_setting.patch ~#
+
+When switching video encoding from "Uncompressed AVI" to "OGG/Theora", the
+following warning message is triggered for each related spin button, that
+is, for "Target Bitrate", "Encoding Quality" and "Encoding Frame Rate":
+
+> Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page
+> size is deprecated
+
+The cause of this is a deprecated page size setting for 'GtkSpinButton' in
+the function 'gtk_adjustment_new', which should be set to zero. This patch
+sets the page size to zero.
+
+Affected file: 'settings_dialog.c'
+
+References:
+https://blueprints.launchpad.net/ubuntu/+spec/spinbutton-adjustment-warnings
+https://developer.gnome.org/gtk3/unstable/GtkAdjustment.html
+
+
+#~ ucview-0.33-plugins_mkdir_parents.patch ~#
+
+UCView is unable to create a directory for plugins if the parent directory
+'.ucview' is not already there, for example when the box in the 'Select device'
+window was not checked at least once before starting the program. This gives
+the following warning message:
+
+> WARNING **: Failed to create '/home/<user>/.ucview/plugins'
+
+This patch replaces the related occurrence of the function 'g_mkdir()' with
+'g_mkdir_with_parents()'.
+
+Affected file: 'plugin_loader.c'
+
+References:
+https://developer.gnome.org/glib/stable/glib-File-Utilities.html
+
+
+#~ ucview-0.33-default_video_path.patch ~#
+
+The path where captured videos will be stored is NULL by default, even if the
+related Gtk widget shows the user's home directory. Therefore, videos cannot
+be saved unless the path is set explicitly by the user.
+
+This patch allows the path to be set by default with the user's home directory.
+
+Affected file: 'callbacks.c'
+
+
+#~ ucview-0.33-default_image_path.patch ~#
+
+This problem is similar to the previous one, but is related to the path where
+still images should be stored. Images cannot be saved because the default path
+is NULL, unless it is set explicitly by the user.
+
+This patch allows the path to be set by default with the user's home directory.
+
+Affected file: 'ucview-window.c'
+
diff --git a/multimedia/ucview/patches/ucview-0.33-default_image_path.patch b/multimedia/ucview/patches/ucview-0.33-default_image_path.patch
new file mode 100644
index 000000000000..09ab04d9786c
--- /dev/null
+++ b/multimedia/ucview/patches/ucview-0.33-default_image_path.patch
@@ -0,0 +1,18 @@
+diff -r -U 2 a/ucview-0.33/src/ucview-window.c b/ucview-0.33/src/ucview-window.c
+--- a/ucview-0.33/src/ucview-window.c 2009-12-08 18:24:08.000000000 +0100
++++ b/ucview-0.33/src/ucview-window.c 2015-02-10 19:34:41.104729578 +0100
+@@ -714,4 +714,7 @@
+ if( !filename ){
+ path = gconf_client_get_string( window->client, UCVIEW_GCONF_DIR "/still_image_file_path", NULL );
++ if( !path ){
++ path = g_get_home_dir();
++ }
+ if( !g_file_test( path, ( G_FILE_TEST_IS_DIR ) ) ){
+ g_set_error( error, UCVIEW_ERROR, 0, _("Path '%s' does not exist"), path );
+@@ -755,5 +758,5 @@
+ sidebar_add_image( SIDEBAR( window->sidebar ), buffer, filename );
+
+- g_free( path );
++/* g_free( path ); */
+ g_free( filetype );
+ g_free( filename );
diff --git a/multimedia/ucview/patches/ucview-0.33-default_video_path.patch b/multimedia/ucview/patches/ucview-0.33-default_video_path.patch
new file mode 100644
index 000000000000..116474b0714e
--- /dev/null
+++ b/multimedia/ucview/patches/ucview-0.33-default_video_path.patch
@@ -0,0 +1,11 @@
+diff -r -U 2 a/ucview-0.33/src/callbacks.c b/ucview-0.33/src/callbacks.c
+--- a/ucview-0.33/src/callbacks.c 2010-03-18 10:28:46.000000000 +0100
++++ b/ucview-0.33/src/callbacks.c 2015-02-10 19:29:27.329625095 +0100
+@@ -229,4 +229,7 @@
+
+ path = gconf_client_get_string( window->client, UCVIEW_GCONF_DIR "/video_file_path", NULL );
++ if( !path ){
++ path = g_get_home_dir();
++ }
+ if( !g_file_test( path, ( G_FILE_TEST_IS_DIR ) ) )
+ {
diff --git a/multimedia/ucview/patches/ucview-0.33-deprecated_Gtk_setting.patch b/multimedia/ucview/patches/ucview-0.33-deprecated_Gtk_setting.patch
new file mode 100644
index 000000000000..7923c23953d3
--- /dev/null
+++ b/multimedia/ucview/patches/ucview-0.33-deprecated_Gtk_setting.patch
@@ -0,0 +1,24 @@
+diff -r -U 2 a/ucview-0.33/src/settings_dialog.c b/ucview-0.33/src/settings_dialog.c
+--- a/ucview-0.33/src/settings_dialog.c 2009-11-11 18:14:47.000000000 +0100
++++ b/ucview-0.33/src/settings_dialog.c 2015-02-09 20:41:25.559495493 +0100
+@@ -562,5 +562,5 @@
+ default_value = gconf_client_get_int( dlg->client, UCVIEW_GCONF_DIR "/video_theora_bitrate", NULL );
+
+- adj = GTK_ADJUSTMENT( gtk_adjustment_new( default_value, 100.0, 10000.0, 50.0, 250.0, 250.0 ) );
++ adj = GTK_ADJUSTMENT( gtk_adjustment_new( default_value, 100.0, 10000.0, 50.0, 250.0, 0.0 ) );
+ if( ( default_value < 100 ) || ( default_value > 10000 ) )
+ {
+@@ -598,5 +598,5 @@
+ default_value = gconf_client_get_int( dlg->client, UCVIEW_GCONF_DIR "/video_theora_quality", NULL );
+
+- adj = GTK_ADJUSTMENT( gtk_adjustment_new( default_value, 0.0, 63.0, 1.0, 5.0, 5.0 ) );
++ adj = GTK_ADJUSTMENT( gtk_adjustment_new( default_value, 0.0, 63.0, 1.0, 5.0, 0.0 ) );
+ if( ( default_value < 0 ) || ( default_value > 63 ) )
+ {
+@@ -632,5 +632,5 @@
+ default_value = gconf_client_get_float( dlg->client, UCVIEW_GCONF_DIR "/video_frame_rate", NULL );
+
+- adj = GTK_ADJUSTMENT( gtk_adjustment_new( default_value, 0.0, 120.0, 1.0, 5.0, 5.0 ) );
++ adj = GTK_ADJUSTMENT( gtk_adjustment_new( default_value, 0.0, 120.0, 1.0, 5.0, 0.0 ) );
+ if( ( default_value <= 0.0 ) || ( default_value > 120.0 ) )
+ {
diff --git a/multimedia/ucview/patches/ucview-0.33-plugins_mkdir_parents.patch b/multimedia/ucview/patches/ucview-0.33-plugins_mkdir_parents.patch
new file mode 100644
index 000000000000..98b53184e7f4
--- /dev/null
+++ b/multimedia/ucview/patches/ucview-0.33-plugins_mkdir_parents.patch
@@ -0,0 +1,10 @@
+diff -r -U 2 a/ucview-0.33/src/plugin_loader.c b/ucview-0.33/src/plugin_loader.c
+--- a/ucview-0.33/src/plugin_loader.c 2009-11-11 16:05:09.000000000 +0100
++++ b/ucview-0.33/src/plugin_loader.c 2015-02-09 20:19:38.283750154 +0100
+@@ -241,5 +241,5 @@
+ else
+ {
+- if( g_mkdir( path, 0755 ) )
++ if( g_mkdir_with_parents( path, 0755 ) )
+ {
+ g_warning( "Failed to create '%s'\n", path );
diff --git a/multimedia/ucview/slack-desc b/multimedia/ucview/slack-desc
new file mode 100644
index 000000000000..b903783ecc30
--- /dev/null
+++ b/multimedia/ucview/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ucview: UCView (video capture and display program)
+ucview:
+ucview: unicap provides a uniform interface to video capture devices.
+ucview: It allows applications to use any supported video capture device
+ucview: via a single API.
+ucview:
+ucview: UCView is a video capture and display program based on the unicap
+ucview: video imaging library.
+ucview:
+ucview: Homepage: http://unicap-imaging.org
+ucview:
diff --git a/multimedia/ucview/ucview.SlackBuild b/multimedia/ucview/ucview.SlackBuild
new file mode 100644
index 000000000000..3d953744d7f6
--- /dev/null
+++ b/multimedia/ucview/ucview.SlackBuild
@@ -0,0 +1,129 @@
+#!/bin/sh
+
+# Slackware build script for UCView
+
+# Copyright 2015 Philip Lacroix <philnx at posteo dot de>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=ucview
+VERSION=${VERSION:-0.33}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+PTC=$CWD/patches
+
+## Fixing a few bugs. For more information than those provided below please
+## see the related file: 'patches/patches.README'.
+
+# 1) Fix bug caused by a deprecated page size setting of 'GtkSpinButton' in
+# function 'gtk_adjustment_new'. The bug triggers error messages when video
+# encoding is switched to OGG/Theora (i.e. one message for each related spin
+# button).
+patch src/settings_dialog.c < $PTC/ucview-0.33-deprecated_Gtk_setting.patch
+
+# 2) Fix bug caused by UCView not being able to create a directory for plugins
+# when the parent directory '.ucview' is not already there (e.g. when the box
+# in the 'Select device' window was not checked at least once).
+patch src/plugin_loader.c < $PTC/ucview-0.33-plugins_mkdir_parents.patch
+
+# 3) Fix bug caused by the path for captured video files being set by default
+# to NULL, thus not allowing to save anything unless it is set explicitly.
+patch src/callbacks.c < $PTC/ucview-0.33-default_video_path.patch
+
+# 4) Something similar to 3) happens to the path for image files as well.
+patch src/ucview-window.c < $PTC/ucview-0.33-default_image_path.patch
+
+PRGMAN=$PKG/usr/man/man1
+PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+
+CFLAGS="$SLKCFLAGS" \
+# Compiler fails without this library:
+LIBS="-lgmodule-2.0" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux \
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress man page.
+gzip -9 $PRGMAN/$PRGNAM.1
+
+# Install documentation.
+mkdir -p $PRGDOC
+cp -a ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL README $PRGDOC/
+cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/multimedia/ucview/ucview.info b/multimedia/ucview/ucview.info
new file mode 100644
index 000000000000..9d9c8e1a818d
--- /dev/null
+++ b/multimedia/ucview/ucview.info
@@ -0,0 +1,10 @@
+PRGNAM="ucview"
+VERSION="0.33"
+HOMEPAGE="http://unicap-imaging.org/"
+DOWNLOAD="http://unicap-imaging.org/downloads/ucview-0.33.tar.gz"
+MD5SUM="da609cf706e70254abea06cc1fb495e2"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="libunicapgtk"
+MAINTAINER="Philip Lacroix"
+EMAIL="philnx at posteo dot de"