summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2014-08-17 22:58:02 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2014-08-20 23:12:38 +0200
commit006ebdfe7853002299ebf8b14e175eb68f37a31f (patch)
tree0538ad744f440371e426f05eb7bb2e146a9af490 /pkgs/applications/video
parent4ee77e2fc5394531f1c1b049d49845da45bd425d (diff)
linuxstopmotion: new package
Linux Stopmotion is a program for creating stop-motion animation movies.

http://linuxstopmotion.org/

I had to apply a small patch to make grabbing images from webcam work
(using uvccapture). I find it odd that it didn't work without the patch,
seeing that Arch Linux also have the v0.8.0 version, but with no patch.
Latest Ubuntu (14.04) has v0.7.2, which is unaffected.
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/linuxstopmotion/default.nix36
-rw-r--r--pkgs/applications/video/linuxstopmotion/linuxstopmotion-fix-wrong-isProcess-logic.patch33
2 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/applications/video/linuxstopmotion/default.nix b/pkgs/applications/video/linuxstopmotion/default.nix
new file mode 100644
index 0000000000000..23a033844b38e
--- /dev/null
+++ b/pkgs/applications/video/linuxstopmotion/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchgit, pkgconfig, qt4, SDL, SDL_image, libvorbis, libtar, libxml2
+, gamin
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.8";
+  name = "linuxstopmotion-${version}";
+  
+  src = fetchgit {
+    url = "git://git.code.sf.net/p/linuxstopmotion/code";
+    rev = "refs/tags/${version}";
+    sha256 = "1xkkrhllgy2d7k0vrdj794ya7y3g3n7xh8c2qgnb26yrarz79dqj";
+  };
+
+  buildInputs = [ pkgconfig qt4 SDL SDL_image libvorbis libtar libxml2 gamin ];
+
+  patches = [ ./linuxstopmotion-fix-wrong-isProcess-logic.patch ];
+
+  configurePhase = ''
+    qmake PREFIX="$out"
+  '';
+
+  # Installation breaks without this
+  preInstall = ''
+    mkdir -p "$out/share/stopmotion/translations/"
+    cp -v build/*.qm "$out/share/stopmotion/translations/"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Create stop-motion animation movies";
+    homepage = http://linuxstopmotion.org/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/pkgs/applications/video/linuxstopmotion/linuxstopmotion-fix-wrong-isProcess-logic.patch b/pkgs/applications/video/linuxstopmotion/linuxstopmotion-fix-wrong-isProcess-logic.patch
new file mode 100644
index 0000000000000..caab48d0e2d9b
--- /dev/null
+++ b/pkgs/applications/video/linuxstopmotion/linuxstopmotion-fix-wrong-isProcess-logic.patch
@@ -0,0 +1,33 @@
+From b23b7dab1d540b0710fcb9ded1c6256a49844906 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
+Date: Wed, 20 Aug 2014 22:22:00 +0200
+Subject: [PATCH] Fix wrong "isProcess" logic
+
+Stopmotion wrongly thinks that uvccapture should be run as a daemon,
+even though configuration for uvccapture has no "daemon-like" command
+line to be run (according to "preferences"). The result is an error
+popup instead of video/image grabbing.
+
+This brings back the "isProcess" logic that was in stopmotion v0.7.2,
+because it seems to work, while the current logic (v0.8.0) seems to
+fail.
+---
+ src/presentation/frontends/qtfrontend/frameview.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/presentation/frontends/qtfrontend/frameview.cpp b/src/presentation/frontends/qtfrontend/frameview.cpp
+index e44dca7..d2c41fd 100644
+--- a/src/presentation/frontends/qtfrontend/frameview.cpp
++++ b/src/presentation/frontends/qtfrontend/frameview.cpp
+@@ -270,7 +270,7 @@ bool FrameView::on() {
+ 	Preference device(QString("device%1")
+ 			.arg(activeDev).toLatin1().constData(), "");
+ 	QString pre = QString(prepoll.get()).replace("$VIDEODEVICE", device.get());
+-	bool isProcess = startDaemon.get();
++	bool isProcess = (strcmp(startDaemon.get(), "") == 0) ? false : true;
+ 
+ 	bool isCameraReady = true;
+ 	this->grabber = new CommandLineGrabber(capturedFile.path(), isProcess);
+-- 
+2.0.2
+