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.

+71
+36
pkgs/applications/video/linuxstopmotion/default.nix
···
··· 1 + { stdenv, fetchgit, pkgconfig, qt4, SDL, SDL_image, libvorbis, libtar, libxml2 2 + , gamin 3 + }: 4 + 5 + stdenv.mkDerivation rec { 6 + version = "0.8"; 7 + name = "linuxstopmotion-${version}"; 8 + 9 + src = fetchgit { 10 + url = "git://git.code.sf.net/p/linuxstopmotion/code"; 11 + rev = "refs/tags/${version}"; 12 + sha256 = "1xkkrhllgy2d7k0vrdj794ya7y3g3n7xh8c2qgnb26yrarz79dqj"; 13 + }; 14 + 15 + buildInputs = [ pkgconfig qt4 SDL SDL_image libvorbis libtar libxml2 gamin ]; 16 + 17 + patches = [ ./linuxstopmotion-fix-wrong-isProcess-logic.patch ]; 18 + 19 + configurePhase = '' 20 + qmake PREFIX="$out" 21 + ''; 22 + 23 + # Installation breaks without this 24 + preInstall = '' 25 + mkdir -p "$out/share/stopmotion/translations/" 26 + cp -v build/*.qm "$out/share/stopmotion/translations/" 27 + ''; 28 + 29 + meta = with stdenv.lib; { 30 + description = "Create stop-motion animation movies"; 31 + homepage = http://linuxstopmotion.org/; 32 + license = licenses.gpl2; 33 + platforms = platforms.linux; 34 + maintainers = [ maintainers.bjornfor ]; 35 + }; 36 + }
+33
pkgs/applications/video/linuxstopmotion/linuxstopmotion-fix-wrong-isProcess-logic.patch
···
··· 1 + From b23b7dab1d540b0710fcb9ded1c6256a49844906 Mon Sep 17 00:00:00 2001 2 + From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com> 3 + Date: Wed, 20 Aug 2014 22:22:00 +0200 4 + Subject: [PATCH] Fix wrong "isProcess" logic 5 + 6 + Stopmotion wrongly thinks that uvccapture should be run as a daemon, 7 + even though configuration for uvccapture has no "daemon-like" command 8 + line to be run (according to "preferences"). The result is an error 9 + popup instead of video/image grabbing. 10 + 11 + This brings back the "isProcess" logic that was in stopmotion v0.7.2, 12 + because it seems to work, while the current logic (v0.8.0) seems to 13 + fail. 14 + --- 15 + src/presentation/frontends/qtfrontend/frameview.cpp | 2 +- 16 + 1 file changed, 1 insertion(+), 1 deletion(-) 17 + 18 + diff --git a/src/presentation/frontends/qtfrontend/frameview.cpp b/src/presentation/frontends/qtfrontend/frameview.cpp 19 + index e44dca7..d2c41fd 100644 20 + --- a/src/presentation/frontends/qtfrontend/frameview.cpp 21 + +++ b/src/presentation/frontends/qtfrontend/frameview.cpp 22 + @@ -270,7 +270,7 @@ bool FrameView::on() { 23 + Preference device(QString("device%1") 24 + .arg(activeDev).toLatin1().constData(), ""); 25 + QString pre = QString(prepoll.get()).replace("$VIDEODEVICE", device.get()); 26 + - bool isProcess = startDaemon.get(); 27 + + bool isProcess = (strcmp(startDaemon.get(), "") == 0) ? false : true; 28 + 29 + bool isCameraReady = true; 30 + this->grabber = new CommandLineGrabber(capturedFile.path(), isProcess); 31 + -- 32 + 2.0.2 33 +
+2
pkgs/top-level/all-packages.nix
··· 9630 conf = config.st.conf or null; 9631 }; 9632 9633 sweethome3d = recurseIntoAttrs ( (callPackage ../applications/misc/sweethome3d { }) 9634 // (callPackage ../applications/misc/sweethome3d/editors.nix { 9635 sweethome3dApp = sweethome3d.application;
··· 9630 conf = config.st.conf or null; 9631 }; 9632 9633 + linuxstopmotion = callPackage ../applications/video/linuxstopmotion { }; 9634 + 9635 sweethome3d = recurseIntoAttrs ( (callPackage ../applications/misc/sweethome3d { }) 9636 // (callPackage ../applications/misc/sweethome3d/editors.nix { 9637 sweethome3dApp = sweethome3d.application;