all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Add Synfig Studio.
@ 2015-11-16 17:48 Ricardo Wurmus
  2015-11-19 16:33 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2015-11-16 17:48 UTC (permalink / raw)
  To: guix-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

Hi Guix,

the attached patch set adds a new “animation.scm” module containing
Synfig Studio, a really nice 2D animation suite.

A couple of patches and substitutions were needed to make Synfig build
with our version of libsigc++ and the latest version of libxml++ (added
with the first patch).

I added ETL to the “animation.scm” module, even though it isn’t much to
do with animation.  It is, however, part of the Synfig sourceforge
project, its release tarball is to be downloaded from under the
versioned Synfig URL hierarchy (so its URL must be synchronised with the
Synfig version), and it doesn’t have its own project page.

~~ Ricardo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-libxml.patch --]
[-- Type: text/x-patch, Size: 1696 bytes --]

From 14040badd5312c8e093604bd3c8ddc6287ba82b1 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Mon, 16 Nov 2015 18:28:22 +0100
Subject: [PATCH 1/5] gnu: Add libxml++.

* gnu/packages/gnome.scm (libxml++): New variable.
---
 gnu/packages/gnome.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4bd9d9c..1f8afe4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4072,3 +4072,30 @@ Evolution (hence the name), but is now used by other packages as well.")
      "Caribou is an input assistive technology intended for switch and pointer
 users.")
     (license license:lgpl2.1)))
+
+(define-public libxml++
+  (package
+    (name "libxml++")
+    (version "2.91.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version) "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0h4h7hhh9lg8h34py116517m3wqbzhd5v63k1c6pp1p2a43s18fs"))))
+    (build-system gnu-build-system)
+    ;; libxml++-3.0.pc refers to all these.
+    (propagated-inputs
+     `(("libxml2" ,libxml2)
+       ("glibmm" ,glibmm)))
+    (native-inputs
+     `(("perl" ,perl)
+       ("pkg-config" ,pkg-config)))
+    (home-page "http://libxmlplusplus.sourceforge.net/")
+    (synopsis "C++ wrapper for XML parser library @code{libxml2}")
+    (description
+     "This package provides a C++ wrapper for the XML parser library
+@code{libxml2}.")
+    (license license:lgpl2.1+)))
-- 
2.5.0


[-- Attachment #3: 0002-gnu-Add-MLT.patch --]
[-- Type: text/x-patch, Size: 2893 bytes --]

From f0322d71271403d047f7d275277bf1b6e34603cd Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Mon, 16 Nov 2015 18:28:59 +0100
Subject: [PATCH 2/5] gnu: Add MLT.

* gnu/packages/video.scm (mlt): New variable.
---
 gnu/packages/video.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 687057f..2dd84cf 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1199,3 +1200,53 @@ and custom quantization matrices.")
 from various services and pipes them into a video playing application.")
     (home-page "http://livestreamer.io/")
     (license license:bsd-2)))
+
+(define-public mlt
+  (package
+    (name "mlt")
+    (version "0.9.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/mlt/mlt/mlt-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0rmrkj7z9g3nr4099f3ff0r14l3ixcfnlx2cdbkqa6pxin0pv9bz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:make-flags '("CC=gcc")
+       #:configure-flags
+       (list "--enable-gpl3"
+             "--enable-gpl")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'configure 'override-LDFLAGS
+          (lambda* (#:key outputs #:allow-other-keys)
+            (substitute* "config.mak"
+              (("LDFLAGS\\+=")
+               (string-append "LDFLAGS+=-Wl,-rpath="
+                              (assoc-ref outputs "out")
+                              "/lib ")))
+            #t)))))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("fftw" ,fftw)
+       ("libxml2" ,libxml2)
+       ("jack" ,jack-1)
+       ("ladspa" ,ladspa)
+       ("libsamplerate" ,libsamplerate)
+       ("sdl" ,sdl)
+       ("sox" ,sox)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://www.mltframework.org/")
+    (synopsis "Author, manage, and run multitrack audio/video compositions")
+    (description
+     "MLT is a multimedia framework, designed and developed for television
+broadcasting.  It provides a toolkit for broadcasters, video editors, media
+players, transcoders, web streamers and many more types of applications.  The
+functionality of the system is provided via an assortment of ready to use
+tools, XML authoring components, and an extensible plug-in based API.")
+    (license license:lgpl2.1+)))
-- 
2.5.0


[-- Attachment #4: 0003-gnu-Add-ETL.patch --]
[-- Type: text/x-patch, Size: 2984 bytes --]

From 1e783fab150edebc15f47f55019785398d469113 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Mon, 16 Nov 2015 18:32:38 +0100
Subject: [PATCH 3/5] gnu: Add ETL.

* gnu/packages/animation.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am              |  1 +
 gnu/packages/animation.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 gnu/packages/animation.scm

diff --git a/gnu-system.am b/gnu-system.am
index 008d645..9454325 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -33,6 +33,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/adns.scm				\
   gnu/packages/algebra.scm			\
   gnu/packages/aidc.scm				\
+  gnu/packages/animation.scm			\
   gnu/packages/apl.scm				\
   gnu/packages/apr.scm				\
   gnu/packages/aria2.scm			\
diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
new file mode 100644
index 0000000..0b6ee67
--- /dev/null
+++ b/gnu/packages/animation.scm
@@ -0,0 +1,47 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages animation)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix utils)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages))
+
+(define-public etl
+  (package
+    (name "etl")
+    (version "0.04.19")
+    (source (origin
+              (method url-fetch)
+              ;; Keep this synchronized with the synfig release version.
+              (uri (string-append "mirror://sourceforge/synfig/releases/"
+                                  "1.0.2/source/ETL-" version ".tar.gz"))
+              (sha256
+               (base32
+                "070c70slizrklq1gbgja8m49xfmq65wlcd6hz6418cpx0wd4r55s"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.synfig.org")
+    (synopsis "Extended C++ template library")
+    (description
+     "ETL is a multi-platform class and template library designed to add new
+datatypes and functions which combine well with the existing types and
+functions from the C++ @dfn{Standard Template Library} (STL).")
+    (license license:gpl3+)))
+
-- 
2.5.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-Add-Synfig.patch --]
[-- Type: text/x-patch, Size: 8016 bytes --]

From 44da7f71a5420260a82499bca355a784f7306236 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Mon, 16 Nov 2015 18:34:30 +0100
Subject: [PATCH 4/5] gnu: Add Synfig.

* gnu/packages/animation.scm (synfig): New variable.
* gnu/packages/patches/synfig-build-fix.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                               |  1 +
 gnu/packages/animation.scm                  | 85 ++++++++++++++++++++++++++++-
 gnu/packages/patches/synfig-build-fix.patch | 59 ++++++++++++++++++++
 3 files changed, 144 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/synfig-build-fix.patch

diff --git a/gnu-system.am b/gnu-system.am
index 9454325..af77b52 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -667,6 +667,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/slim-sigusr1.patch			\
   gnu/packages/patches/soprano-find-clucene.patch		\
   gnu/packages/patches/superlu-dist-scotchmetis.patch		\
+  gnu/packages/patches/synfig-build-fix.patch			\
   gnu/packages/patches/tar-d_ino_in_dirent-fix.patch		\
   gnu/packages/patches/tar-skip-unreliable-tests.patch		\
   gnu/packages/patches/tcsh-fix-autotest.patch			\
diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index 0b6ee67..b61140b 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -22,7 +22,18 @@
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system gnu)
-  #:use-module (gnu packages))
+  #:use-module (gnu packages)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages imagemagick)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages video))
 
 (define-public etl
   (package
@@ -45,3 +56,75 @@ datatypes and functions which combine well with the existing types and
 functions from the C++ @dfn{Standard Template Library} (STL).")
     (license license:gpl3+)))
 
+(define-public synfig
+  (package
+    (name "synfig")
+    (version "1.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/synfig/releases/"
+                                  version "/source/synfig-" version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "1d3z2r78j3rkff47q3wl0ami69y3l4nyi5r9zclymb8ar7mgkk9l"))
+              (patches (list (search-patch "synfig-build-fix.patch")))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       ;; The Boost library path is taken from the value of BOOST_LDFLAGS.
+       (list (string-append "BOOST_LDFLAGS=-L"
+                            (assoc-ref %build-inputs "boost")
+                            "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'adapt-to-libxml++-changes
+          (lambda _
+            (substitute* "configure"
+              (("libxml\\+\\+-2\\.6") "libxml++-3.0"))
+            (substitute* (append (find-files "src/modules/" "\\.cpp$")
+                                 (find-files "src/synfig/" "\\.(cpp|h)$"))
+              (("add_child\\(") "add_child_element(")
+              (("get_child_text\\(") "get_first_child_text(")
+              (("set_child_text\\(") "set_first_child_text(")
+              (("remove_child\\(") "remove_node("))
+            (substitute* "src/modules/mod_svg/svg_parser.cpp"
+              (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
+            #t))
+         (add-before 'configure 'set-flags
+          (lambda _
+            ;; Compile with C++11, required by libsigc++.
+            (setenv "CXXFLAGS" "-D__STDC_CONSTANT_MACROS -std=gnu++11")
+            #t)))))
+    (inputs
+     `(("boost" ,boost)
+       ("ffmpeg" ,ffmpeg)
+       ("libdv" ,libdv)
+       ("libjpeg" ,libjpeg)
+       ("libpng" ,libpng)
+       ("libmng" ,libmng)
+       ("zlib" ,zlib)))
+    ;; synfig.pc lists the following as required: Magick++ freetype2
+    ;; fontconfig OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
+    ;; cairo pango pangocairo mlt++
+    (propagated-inputs
+     `(("cairo" ,cairo)
+       ("etl" ,etl)
+       ("fontconfig" ,fontconfig)
+       ("freetype" ,freetype)
+       ("glibmm" ,glibmm)
+       ("imagemagick" ,imagemagick)
+       ("libxml++" ,libxml++)
+       ("libsigc++" ,libsigc++)
+       ("mlt" ,mlt)
+       ("openexr" ,openexr)
+       ("pango" ,pango)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://www.synfig.org")
+    (synopsis "Vector-based 2D animation renderer")
+    (description
+     "Synfig is a vector-based 2D animation package.  It is designed to be
+capable of producing feature-film quality animation.  It eliminates the need
+for tweening, preventing the need to hand-draw each frame.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/synfig-build-fix.patch b/gnu/packages/patches/synfig-build-fix.patch
new file mode 100644
index 0000000..74fdafb
--- /dev/null
+++ b/gnu/packages/patches/synfig-build-fix.patch
@@ -0,0 +1,59 @@
+Taken from here:
+https://projects.archlinux.org/svntogit/community.git/plain/trunk/build-fix.patch?h=packages/synfig
+
+diff -wbBur synfig-1.0-RC5/src/modules/mod_libavcodec/mptr.cpp synfig-1.0-RC5.my/src/modules/mod_libavcodec/mptr.cpp
+--- synfig-1.0-RC5/src/modules/mod_libavcodec/mptr.cpp	2015-03-28 13:15:00.000000000 +0300
++++ synfig-1.0-RC5.my/src/modules/mod_libavcodec/mptr.cpp	2015-04-28 16:56:11.568749053 +0300
+@@ -56,8 +56,8 @@
+ /* === M E T H O D S ======================================================= */
+ 
+ 
+-Importer_LibAVCodec::Importer_LibAVCodec(const char *file):
+-	filename(file)
++Importer_LibAVCodec::Importer_LibAVCodec(const synfig::FileSystem::Identifier &identifier):
++	Importer(identifier)
+ {
+ }
+ 
+diff -wbBur synfig-1.0-RC5/src/modules/mod_libavcodec/mptr.h synfig-1.0-RC5.my/src/modules/mod_libavcodec/mptr.h
+--- synfig-1.0-RC5/src/modules/mod_libavcodec/mptr.h	2015-03-28 13:15:00.000000000 +0300
++++ synfig-1.0-RC5.my/src/modules/mod_libavcodec/mptr.h	2015-04-28 16:55:18.699192946 +0300
+@@ -46,7 +46,7 @@
+ 	synfig::String filename;
+ 
+ public:
+-	Importer_LibAVCodec(const char *filename);
++	Importer_LibAVCodec(const synfig::FileSystem::Identifier &identifier);
+ 	~Importer_LibAVCodec();
+ 
+ 	virtual bool get_frame(synfig::Surface &surface, const synfig::RendDesc &renddesc, synfig::Time time, synfig::ProgressCallback *callback);
+diff -wbBur synfig-1.0-RC5/src/modules/mod_libavcodec/trgt_av.cpp synfig-1.0-RC5.my/src/modules/mod_libavcodec/trgt_av.cpp
+--- synfig-1.0-RC5/src/modules/mod_libavcodec/trgt_av.cpp	2015-03-28 13:15:00.000000000 +0300
++++ synfig-1.0-RC5.my/src/modules/mod_libavcodec/trgt_av.cpp	2015-04-28 16:46:54.720091106 +0300
+@@ -121,14 +121,14 @@
+     picture = avcodec_alloc_frame();
+     if (!picture)
+         return NULL;
+-    size = avpicture_get_size(pix_fmt, width, height);
++    size = avpicture_get_size((::PixelFormat)pix_fmt, width, height);
+     picture_buf = (uint8_t *)malloc(size);
+     if (!picture_buf) {
+         av_free(picture);
+         return NULL;
+     }
+     avpicture_fill((AVPicture *)picture, picture_buf,
+-                   pix_fmt, width, height);
++                   (::PixelFormat)pix_fmt, width, height);
+     return picture;
+ }
+ 
+diff -wbBur synfig-1.0.2/src/synfig/time.cpp synfig-1.0.2.my/src/synfig/time.cpp
+--- synfig-1.0.2/src/synfig/time.cpp	2015-07-09 10:33:03.000000000 +0300
++++ synfig-1.0.2.my/src/synfig/time.cpp	2015-10-12 13:54:58.382313903 +0300
+@@ -319,5 +319,5 @@
+ bool
+ Time::is_valid()const
+ {
+-	return !isnan(value_);
++	return !::isnan(value_);
+ }
-- 
2.5.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-gnu-Add-Synfig-Studio.patch --]
[-- Type: text/x-patch, Size: 3110 bytes --]

From 2a89ed3fa602b66f30feec8b70ffcb52183d7f39 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Mon, 16 Nov 2015 18:36:40 +0100
Subject: [PATCH 5/5] gnu: Add Synfig Studio.

* gnu/packages/animation.scm (synfigstudio): New variable.
---
 gnu/packages/animation.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index b61140b..81f770c 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -128,3 +128,58 @@ functions from the C++ @dfn{Standard Template Library} (STL).")
 capable of producing feature-film quality animation.  It eliminates the need
 for tweening, preventing the need to hand-draw each frame.")
     (license license:gpl3+)))
+
+(define-public synfigstudio
+  (package
+    (name "synfigstudio")
+    (version "1.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/synfig/releases/"
+                                  version "/source/synfigstudio-" version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "1xa74dlgkpjn0gzdcs0x25z7wg0806v2wygvvi73f7sn1fm88ig4"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'adapt-to-libxml++-changes
+          (lambda _
+            (substitute* "src/synfigapp/pluginmanager.cpp"
+              (("xmlpp::Node\\* n =")    "const xmlpp::Node* n =")
+              (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
+            #t))
+         (add-after 'unpack 'adapt-to-libsigc++-changes
+          (lambda _
+            ;; Some files are ISO-8859-1 encoded.
+            (with-fluids ((%default-port-encoding #f))
+              (substitute* (find-files "src/" "\\.(cpp|h)$")
+                (("#include <sigc\\+\\+/retype\\.h>")
+                 "#include <sigc++/adaptors/retype.h>")
+                (("#include <sigc\\+\\+/hide\\.h>")
+                 "#include <sigc++/adaptors/hide.h>")
+                (("#include <sigc\\+\\+/object\\.h>")
+                 "#include <sigc++/trackable.h>")))
+            #t))
+         (add-before 'configure 'set-flags
+          (lambda _
+            ;; Compile with C++11, required by libsigc++.
+            (setenv "CXXFLAGS" "-D__STDC_CONSTANT_MACROS -std=gnu++11")
+            #t)))))
+    (inputs
+     `(("gtkmm" ,gtkmm)
+       ("libsigc++" ,libsigc++)
+       ("synfig" ,synfig)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("intltool" ,intltool)))
+    (home-page "http://www.synfig.org")
+    (synopsis "Vector-based 2D animation package (GUI)")
+    (description
+     "Synfig is a vector-based 2D animation package.  It is designed to
+be capable of producing feature-film quality animation.  It eliminates the
+need for tweening, preventing the need to hand-draw each frame.  This package
+contains the graphical user interface for synfig.")
+    (license license:gpl3+)))
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add Synfig Studio.
  2015-11-16 17:48 [PATCH] Add Synfig Studio Ricardo Wurmus
@ 2015-11-19 16:33 ` Ludovic Courtès
  2015-11-20 19:26   ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2015-11-19 16:33 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel@gnu.org

Ricardo Wurmus <rekado@elephly.net> skribis:

> From 14040badd5312c8e093604bd3c8ddc6287ba82b1 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Mon, 16 Nov 2015 18:28:22 +0100
> Subject: [PATCH 1/5] gnu: Add libxml++.
>
> * gnu/packages/gnome.scm (libxml++): New variable.

[...]

> +    (synopsis "C++ wrapper for XML parser library @code{libxml2}")
> +    (description
> +     "This package provides a C++ wrapper for the XML parser library
> +@code{libxml2}.")

I’d remove the @code here because that’s really the project’s name, and
because Texinfo markup is not supported in synopses (yet?).  :-)

Otherwise LGTM.

> From f0322d71271403d047f7d275277bf1b6e34603cd Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Mon, 16 Nov 2015 18:28:59 +0100
> Subject: [PATCH 2/5] gnu: Add MLT.
>
> * gnu/packages/video.scm (mlt): New variable.

OK.

> From 1e783fab150edebc15f47f55019785398d469113 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Mon, 16 Nov 2015 18:32:38 +0100
> Subject: [PATCH 3/5] gnu: Add ETL.
>
> * gnu/packages/animation.scm: New file.
> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.

[...]

> +    (description
> +     "ETL is a multi-platform class and template library designed to add new

s/multi-platform//g

Otherwise OK.

> From 44da7f71a5420260a82499bca355a784f7306236 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Mon, 16 Nov 2015 18:34:30 +0100
> Subject: [PATCH 4/5] gnu: Add Synfig.
>
> * gnu/packages/animation.scm (synfig): New variable.
> * gnu/packages/patches/synfig-build-fix.patch: New file.
> * gnu-system.am (dist_patch_DATA): Add it.

[...]

> +++ b/gnu/packages/patches/synfig-build-fix.patch
> @@ -0,0 +1,59 @@
> +Taken from here:
> +https://projects.archlinux.org/svntogit/community.git/plain/trunk/build-fix.patch?h=packages/synfig

Maybe just add “Allow Synfig to build in C++11 mode.” (?)

Otherwise LGTM.

> From 2a89ed3fa602b66f30feec8b70ffcb52183d7f39 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Mon, 16 Nov 2015 18:36:40 +0100
> Subject: [PATCH 5/5] gnu: Add Synfig Studio.
>
> * gnu/packages/animation.scm (synfigstudio): New variable.

[...]

> +         (add-after 'unpack 'adapt-to-libxml++-changes
> +          (lambda _
> +            (substitute* "src/synfigapp/pluginmanager.cpp"
> +              (("xmlpp::Node\\* n =")    "const xmlpp::Node* n =")
> +              (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
> +            #t))
> +         (add-after 'unpack 'adapt-to-libsigc++-changes
> +          (lambda _
> +            ;; Some files are ISO-8859-1 encoded.
> +            (with-fluids ((%default-port-encoding #f))
> +              (substitute* (find-files "src/" "\\.(cpp|h)$")
> +                (("#include <sigc\\+\\+/retype\\.h>")
> +                 "#include <sigc++/adaptors/retype.h>")
> +                (("#include <sigc\\+\\+/hide\\.h>")
> +                 "#include <sigc++/adaptors/hide.h>")
> +                (("#include <sigc\\+\\+/object\\.h>")
> +                 "#include <sigc++/trackable.h>")))

Maybe these should go to a ‘snippet’ since we’re really changing the
source here.  WDYT?

> +         (add-before 'configure 'set-flags
> +          (lambda _
> +            ;; Compile with C++11, required by libsigc++.
> +            (setenv "CXXFLAGS" "-D__STDC_CONSTANT_MACROS -std=gnu++11")

Am I right that this cannot go in #:configure-flags because of
whitespaces?  Otherwise that would be the preferred way, because the
effect of the environment variable could be broader.

Otherwise LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add Synfig Studio.
  2015-11-19 16:33 ` Ludovic Courtès
@ 2015-11-20 19:26   ` Ricardo Wurmus
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2015-11-20 19:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel@gnu.org


Ludovic Courtès <ludo@gnu.org> writes:

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> From 14040badd5312c8e093604bd3c8ddc6287ba82b1 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <rekado@elephly.net>
>> Date: Mon, 16 Nov 2015 18:28:22 +0100
>> Subject: [PATCH 1/5] gnu: Add libxml++.
>>
>> * gnu/packages/gnome.scm (libxml++): New variable.
>
> [...]
>
>> +    (synopsis "C++ wrapper for XML parser library @code{libxml2}")
>> +    (description
>> +     "This package provides a C++ wrapper for the XML parser library
>> +@code{libxml2}.")
>
> I’d remove the @code here because that’s really the project’s name, and
> because Texinfo markup is not supported in synopses (yet?).  :-)

Okay.

>> From 1e783fab150edebc15f47f55019785398d469113 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <rekado@elephly.net>
>> Date: Mon, 16 Nov 2015 18:32:38 +0100
>> Subject: [PATCH 3/5] gnu: Add ETL.
>>
>> * gnu/packages/animation.scm: New file.
>> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
>
> [...]
>
>> +    (description
>> +     "ETL is a multi-platform class and template library designed to add new
>
> s/multi-platform//g

Okay.

>> From 44da7f71a5420260a82499bca355a784f7306236 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <rekado@elephly.net>
>> Date: Mon, 16 Nov 2015 18:34:30 +0100
>> Subject: [PATCH 4/5] gnu: Add Synfig.
>>
>> * gnu/packages/animation.scm (synfig): New variable.
>> * gnu/packages/patches/synfig-build-fix.patch: New file.
>> * gnu-system.am (dist_patch_DATA): Add it.
>
> [...]
>
>> +++ b/gnu/packages/patches/synfig-build-fix.patch
>> @@ -0,0 +1,59 @@
>> +Taken from here:
>> +https://projects.archlinux.org/svntogit/community.git/plain/trunk/build-fix.patch?h=packages/synfig
>
> Maybe just add “Allow Synfig to build in C++11 mode.” (?)

Done.

>> From 2a89ed3fa602b66f30feec8b70ffcb52183d7f39 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <rekado@elephly.net>
>> Date: Mon, 16 Nov 2015 18:36:40 +0100
>> Subject: [PATCH 5/5] gnu: Add Synfig Studio.
>>
>> * gnu/packages/animation.scm (synfigstudio): New variable.
>
> [...]
>
>> +         (add-after 'unpack 'adapt-to-libxml++-changes
>> +          (lambda _
>> +            (substitute* "src/synfigapp/pluginmanager.cpp"
>> +              (("xmlpp::Node\\* n =")    "const xmlpp::Node* n =")
>> +              (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
>> +            #t))
>> +         (add-after 'unpack 'adapt-to-libsigc++-changes
>> +          (lambda _
>> +            ;; Some files are ISO-8859-1 encoded.
>> +            (with-fluids ((%default-port-encoding #f))
>> +              (substitute* (find-files "src/" "\\.(cpp|h)$")
>> +                (("#include <sigc\\+\\+/retype\\.h>")
>> +                 "#include <sigc++/adaptors/retype.h>")
>> +                (("#include <sigc\\+\\+/hide\\.h>")
>> +                 "#include <sigc++/adaptors/hide.h>")
>> +                (("#include <sigc\\+\\+/object\\.h>")
>> +                 "#include <sigc++/trackable.h>")))
>
> Maybe these should go to a ‘snippet’ since we’re really changing the
> source here.  WDYT?

Yes, a snippet is better here.

>> +         (add-before 'configure 'set-flags
>> +          (lambda _
>> +            ;; Compile with C++11, required by libsigc++.
>> +            (setenv "CXXFLAGS" "-D__STDC_CONSTANT_MACROS -std=gnu++11")
>
> Am I right that this cannot go in #:configure-flags because of
> whitespaces?  Otherwise that would be the preferred way, because the
> effect of the environment variable could be broader.

Oh, this was supposed to go to configure-flags.  I just rebuilt it with
this change and it works.  STDC_CONSTANT_MACROS was not needed after
all.

I pushed the patches with the above changes.  Thanks for taking the time
to review!

~~ Ricardo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-20 19:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 17:48 [PATCH] Add Synfig Studio Ricardo Wurmus
2015-11-19 16:33 ` Ludovic Courtès
2015-11-20 19:26   ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.