unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add gnash.
@ 2015-03-18 10:57 Tomáš Čech
  2015-03-19 16:17 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Tomáš Čech @ 2015-03-18 10:57 UTC (permalink / raw)
  To: guix-devel

From: Tomáš Čech <sleep_walker@suse.cz>

* gnu/packages/gnash.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add the file.
---
 gnu-system.am          |   1 +
 gnu/packages/gnash.scm | 129 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 130 insertions(+)
 create mode 100644 gnu/packages/gnash.scm

diff --git a/gnu-system.am b/gnu-system.am
index 2bed50f..145a03d 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -121,6 +121,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/gkrellm.scm			\
   gnu/packages/gl.scm				\
   gnu/packages/glib.scm				\
+  gnu/packages/gnash.scm			\
   gnu/packages/gnome.scm			\
   gnu/packages/gnunet.scm			\
   gnu/packages/gnupg.scm			\
diff --git a/gnu/packages/gnash.scm b/gnu/packages/gnash.scm
new file mode 100644
index 0000000..f0306c4
--- /dev/null
+++ b/gnu/packages/gnash.scm
@@ -0,0 +1,129 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz>
+;;;
+;;; 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 gnash)
+  #:use-module ((guix licenses) #:prefix l:)
+  #:use-module (guix packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages gnuzilla)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages gstreamer)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages openssl)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages sdl)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system gnu)
+  )
+
+(define-public gnash
+  (package
+    (name "gnash")
+    (version "0.8.10+")
+    (source
+     (origin
+       ;; release is too old to be built correctly against ffmpeg, libjpeg and
+       ;; more, lets go with head containing all required fixes already
+       (method git-fetch)
+       (uri (git-reference
+             (url "git://git.sv.gnu.org/gnash.git")
+             (commit "6675d736bf4d7")))
+       (sha256
+        (base32 "0j9mvg2jdp398dfdnmxfzhiaqm79h0ic2airmvgmf22rrsx2flgw"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("libtool" ,libtool)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("bash" ,bash)))
+    (inputs
+     ;; gstreamer 0.10 is required, but not available, gstreamer-1.0 not
+     ;; supported yet - lets go with ffmpeg instead
+     `(("agg" ,agg)
+       ("boost" ,boost)
+       ("curl" ,curl) ; FIXME: compile in RTMP support
+       ("cyrus-sasl" ,cyrus-sasl)
+       ("ffmpeg" ,ffmpeg)
+       ("gconf" ,gconf)
+       ("gettext" ,gnu-gettext)
+       ("giflib" ,giflib)
+       ("gtk+-2" ,gtk+-2)
+       ("icecat" ,icecat)
+       ("libgcrypt" ,libgcrypt)
+       ("libjpeg" ,libjpeg)
+       ("libltdl" ,libltdl)
+       ("npapi-sdk" ,npapi-sdk)
+       ("nspr" ,nspr)
+       ("openssl" ,openssl)
+       ("pango" ,pango)
+       ("pangox-compat" ,pangox-compat)
+       ("perl" ,perl)
+       ("qt-4" ,qt-4)
+       ("sdl", sdl)
+       ("speex", speex)))
+    (arguments
+     `(#:configure-flags
+       (list
+        "--enable-media=ffmpeg" "--disable-jemalloc"
+        "--with-npapi-install=system"
+        (string-append "--with-npapi-plugindir=" (assoc-ref %outputs "out")
+                       "/lib/mozilla/plugins")
+        (string-append "--with-pango-incl="
+                       (assoc-ref %build-inputs "pango") "/include/pango-1.0")
+        (string-append "--with-pango-lib="
+                       (assoc-ref %build-inputs "pangox-compat") "/lib")
+        (string-append "--with-boost-incl="
+                       (assoc-ref %build-inputs "boost") "/include/")
+        (string-append "--with-boost-lib="
+                       (assoc-ref %build-inputs "boost") "/lib")
+        (string-append "--with-npapi-incl=" (assoc-ref %build-inputs "icecat")
+                       "/include/icecat-31.5.0"))
+       #:phases
+       (alist-cons-after
+        'unpack 'autoreconf
+        (lambda _
+          (zero? (system* "sh" "autogen.sh")))
+        (alist-cons-after
+         'install 'install-plugins
+         (lambda _
+           (zero? (system* "make" "install-plugins")))
+        %standard-phases))))
+    (home-page "https://www.gnu.org/software/gnash/")
+    (synopsis "GNU Flash movie player")
+    (description "GNU Gnash is the GNU Flash movie player — Flash is an
+animation file format pioneered by Macromedia which continues to be supported by
+their successor company, Adobe.  Flash has been extended to include audio and
+video content, and programs written in ActionScript, an ECMAScript-compatible
+language.  Gnash is based on GameSWF, and supports most SWF v7 features and
+some SWF v8 and v9.  SWF v10 is not supported by GNU Gnash.")
+    (license l:gpl3)))
-- 
2.2.1

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

* Re: [PATCH] gnu: Add gnash.
  2015-03-18 10:57 [PATCH] gnu: Add gnash Tomáš Čech
@ 2015-03-19 16:17 ` Ludovic Courtès
  2015-03-19 21:22   ` Tomáš Čech
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2015-03-19 16:17 UTC (permalink / raw)
  To: Tomáš Čech; +Cc: guix-devel

Tomáš Čech <sleep_walker@gnu.org> skribis:

> * gnu/packages/gnash.scm: New file.
> * gnu-system.am (GNU_SYSTEM_MODULES): Add the file.

[...]

> +(define-module (gnu packages gnash)

Maybe we could call it ‘flash’ since there may be other tools going
there (players or things like libswf)?

> +  #:use-module (guix build-system gnu)
> +  )

Move the paren to the previous line.

> +       ;; release is too old to be built correctly against ffmpeg, libjpeg and
> +       ;; more, lets go with head containing all required fixes already
> +       (method git-fetch)

We have ffmpeg-2.2 and libjpeg-8 already available.  Would that allow us
to build from the release tarball?

If yes, we should probably do that, plus the CVE-2012-1175 patch at
<http://git.savannah.gnu.org/cgit/gnash.git/patch/?id=bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527>
(don’t know if there are others.)

> +     ;; gstreamer 0.10 is required, but not available, gstreamer-1.0 not

gstreamer-0.10 is available from (gnu packages gstreamer).

> +    (synopsis "GNU Flash movie player")
> +    (description "GNU Gnash is the GNU Flash movie player — Flash is an
> +animation file format pioneered by Macromedia which continues to be supported by
> +their successor company, Adobe.  Flash has been extended to include audio and
> +video content, and programs written in ActionScript, an ECMAScript-compatible
> +language.  Gnash is based on GameSWF, and supports most SWF v7 features and
> +some SWF v8 and v9.  SWF v10 is not supported by GNU Gnash.")

Please use those suggested by ‘guix lint’.

> +    (license l:gpl3)))

l:gpl3+

Could you send an updated patch?


In the Nixpkgs recipe I had added this hack:

+    # Provide a default font.
+    sed -i "configure" \
+        -e 's|/usr/share/fonts/truetype/freefont/|${freefont_ttf}/share/fonts/truetype/|g'

Any idea if this is still needed?  IOW, does gtk-gnash manage to display
text at all without it?

Thank you!

Ludo’.

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

* Re: [PATCH] gnu: Add gnash.
  2015-03-19 16:17 ` Ludovic Courtès
@ 2015-03-19 21:22   ` Tomáš Čech
  2015-03-20 21:10     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Tomáš Čech @ 2015-03-19 21:22 UTC (permalink / raw)
  To: guix-devel

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

On Thu, Mar 19, 2015 at 05:17:10PM +0100, Ludovic Courtès wrote:
>Tomáš Čech <sleep_walker@gnu.org> skribis:
>
>> * gnu/packages/gnash.scm: New file.
>> * gnu-system.am (GNU_SYSTEM_MODULES): Add the file.
>
>[...]
>
>> +(define-module (gnu packages gnash)
>
>Maybe we could call it ‘flash’ since there may be other tools going
>there (players or things like libswf)?

Yes, that was my working name - when I got circular deps in web
module, I moved it to separate file. `flash' is good name - I'm
already working on lightspark which will go there as well...

>> +  #:use-module (guix build-system gnu)
>> +  )
>
>Move the paren to the previous line.

OK
>
>> +       ;; release is too old to be built correctly against ffmpeg, libjpeg and
>> +       ;; more, lets go with head containing all required fixes already
>> +       (method git-fetch)
>
>We have ffmpeg-2.2 and libjpeg-8 already available.  Would that allow us
>to build from the release tarball?

The problem is incompatibility between the release (2 years old) and
the versions we have in Guix (ffmpeg, libjpeg, boost, automake, gcc
and mabe more). I originally started with the release tarball and took
bunch of patches which fixed ffmpeg changes and libjpeg changes but it
was just too many so I gave up.


>If yes, we should probably do that, plus the CVE-2012-1175 patch at
><http://git.savannah.gnu.org/cgit/gnash.git/patch/?id=bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527>
>(don’t know if there are others.)
>
>> +     ;; gstreamer 0.10 is required, but not available, gstreamer-1.0 not
>
>gstreamer-0.10 is available from (gnu packages gstreamer).

In that case `guix package -s gstreamer' didn't show that to me.

Btw. I run this command several times and it's showing versions
randomly (in following case gst-plugins-base has different version):

guix package -s gstreamer | recsel -p name,version

---------%<----------------------------%<--------------------
$ guix package -s gstreamer | recsel -p name,version
name: gst-plugins-base
version: 0.10.36

name: gst-plugins-good
version: 1.4.5

name: gstreamer
version: 1.4.5

name: libcanberra
version: 0.30

$ guix package -s gstreamer | recsel -p name,version
name: gst-plugins-base
version: 1.4.5

name: gst-plugins-good
version: 1.4.5

name: gstreamer
version: 1.4.5

name: libcanberra
version: 0.30
--------->%---------------------------->%--------------------

Grep found it reliably.

>> +    (synopsis "GNU Flash movie player")
>> +    (description "GNU Gnash is the GNU Flash movie player — Flash is an
>> +animation file format pioneered by Macromedia which continues to be supported by
>> +their successor company, Adobe.  Flash has been extended to include audio and
>> +video content, and programs written in ActionScript, an ECMAScript-compatible
>> +language.  Gnash is based on GameSWF, and supports most SWF v7 features and
>> +some SWF v8 and v9.  SWF v10 is not supported by GNU Gnash.")
>
>Please use those suggested by ‘guix lint’.

Where did that text come from!? Will do.

>
>> +    (license l:gpl3)))
>
>l:gpl3+

Thanks.

>
>Could you send an updated patch?
>
>
>In the Nixpkgs recipe I had added this hack:
>
>+    # Provide a default font.
>+    sed -i "configure" \
>+        -e 's|/usr/share/fonts/truetype/freefont/|${freefont_ttf}/share/fonts/truetype/|g'
>
>Any idea if this is still needed?  IOW, does gtk-gnash manage to display
>text at all without it?

It's hard to find flash old enough, showing text and with sources to
confirm it's text. I think that this can be used for verification:

http://technoargia.free.fr/swftools/examples/button3/button3.html

And yes, works for me.

Thanks for review.

S_W

[-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH] gnu: Add gnash.
  2015-03-19 21:22   ` Tomáš Čech
@ 2015-03-20 21:10     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-03-20 21:10 UTC (permalink / raw)
  To: guix-devel

Tomáš Čech <sleep_walker@gnu.org> skribis:

> On Thu, Mar 19, 2015 at 05:17:10PM +0100, Ludovic Courtès wrote:
>>Tomáš Čech <sleep_walker@gnu.org> skribis:

[...]

>>> +       ;; release is too old to be built correctly against ffmpeg, libjpeg and
>>> +       ;; more, lets go with head containing all required fixes already
>>> +       (method git-fetch)
>>
>>We have ffmpeg-2.2 and libjpeg-8 already available.  Would that allow us
>>to build from the release tarball?
>
> The problem is incompatibility between the release (2 years old) and
> the versions we have in Guix (ffmpeg, libjpeg, boost, automake, gcc
> and mabe more). I originally started with the release tarball and took
> bunch of patches which fixed ffmpeg changes and libjpeg changes but it
> was just too many so I gave up.

OK.  Then, as discussed on IRC, I guess it’s a case where we’d rather
stick to the Git checkout as you initially proposed.

> In that case `guix package -s gstreamer' didn't show that to me.
>
> Btw. I run this command several times and it's showing versions
> randomly (in following case gst-plugins-base has different version):
>
> guix package -s gstreamer | recsel -p name,version

Indeed!  This was the combination of two bugs: first, the order in which
two same-named packages would appear was non-deterministic; second, ‘-s’
would keep only one package with a give source code location, for
dubious reasons.

Commits 9eeb3d8 and 051edc9 fix that.

>>> +    (synopsis "GNU Flash movie player")
>>> +    (description "GNU Gnash is the GNU Flash movie player — Flash is an
>>> +animation file format pioneered by Macromedia which continues to be supported by
>>> +their successor company, Adobe.  Flash has been extended to include audio and
>>> +video content, and programs written in ActionScript, an ECMAScript-compatible
>>> +language.  Gnash is based on GameSWF, and supports most SWF v7 features and
>>> +some SWF v8 and v9.  SWF v10 is not supported by GNU Gnash.")
>>
>>Please use those suggested by ‘guix lint’.
>
> Where did that text come from!? Will do.

It has super cow powers (and also it checks GNU’s canonical place for
package meta-data.)

>>In the Nixpkgs recipe I had added this hack:
>>
>>+    # Provide a default font.
>>+    sed -i "configure" \
>>+        -e 's|/usr/share/fonts/truetype/freefont/|${freefont_ttf}/share/fonts/truetype/|g'
>>
>>Any idea if this is still needed?  IOW, does gtk-gnash manage to display
>>text at all without it?
>
> It's hard to find flash old enough, showing text and with sources to
> confirm it's text. I think that this can be used for verification:
>
> http://technoargia.free.fr/swftools/examples/button3/button3.html
>
> And yes, works for me.

Sounds good then.

Thanks!

Ludo’.

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

end of thread, other threads:[~2015-03-20 21:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-18 10:57 [PATCH] gnu: Add gnash Tomáš Čech
2015-03-19 16:17 ` Ludovic Courtès
2015-03-19 21:22   ` Tomáš Čech
2015-03-20 21:10     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).