unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 44768@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#44768] [PATCH 1/2] gnu: Add gnash.
Date: Fri, 20 Nov 2020 17:05:51 -0300	[thread overview]
Message-ID: <20201120200551.19145-1-monego@posteo.net> (raw)

* gnu/packages/animation.scm (gnash): New variable.
* gnu/packages/patches/gnash-do-not-depend-on-pangox: New file.
* gnu/packages/patches/gnash-fix-giflib-version: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
Patch sources:

https://savannah.gnu.org/patch/download.php?file_id=48366
https://savannah.gnu.org/patch/download.php?file_id=47859

 gnu/local.mk                                  |  3 +
 gnu/packages/animation.scm                    | 94 ++++++++++++++++++-
 .../gnash-do-not-depend-on-pangox.patch       | 35 +++++++
 .../patches/gnash-fix-giflib-version.patch    | 13 +++
 4 files changed, 144 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gnash-do-not-depend-on-pangox.patch
 create mode 100644 gnu/packages/patches/gnash-fix-giflib-version.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3a8f1e30fc..94ff78a3d4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -38,6 +38,7 @@
 # Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
 # Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 # Copyright © 2020 Malte Frank Gerdes <mate.f.gerdes@gmail.com>
+# Copyright © 2020 Vinicius Monego <monego@posteo.net>
 #
 # This file is part of GNU Guix.
 #
@@ -1083,6 +1084,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/glibc-supported-locales.patch     	\
   %D%/packages/patches/gmp-arm-asm-nothumb.patch		\
   %D%/packages/patches/gmp-faulty-test.patch			\
+  %D%/packages/patches/gnash-do-not-depend-on-pangox.patch	\
+  %D%/packages/patches/gnash-fix-giflib-version.patch	        \
   %D%/packages/patches/gnome-shell-theme.patch			\
   %D%/packages/patches/gnome-shell-disable-test.patch		\
   %D%/packages/patches/gnome-settings-daemon-gc.patch		\
diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index 3176a1237a..3df3ce3eba 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
+;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,19 +28,27 @@
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gl)
   #: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 perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages qt)
-  #:use-module (gnu packages video))
+  #:use-module (gnu packages sdl)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages xiph))
 
 ;; ETL, synfig, and Synfig Studio are updated in tandem.
 (define synfig-version "1.2.2")
@@ -301,3 +310,86 @@ waveform until they line up with the proper sounds.")
 lets you create traditional hand-drawn animations (cartoons) using both bitmap
 and vector graphics.")
     (license license:gpl2)))
+
+;; This package provides a standalone (no browser plugin) version of Gnash.
+(define-public gnash
+  ;; The last tagged release of Gnash was in 2012.
+  (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
+        (revision "0"))
+    (package
+      (name "gnash")
+      (version (git-version "0.8.11" ;upstream has no version number
+                            revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://git.savannah.gnu.org/git/gnash.git/")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (patches (search-patches "gnash-do-not-depend-on-pangox.patch"
+                                  "gnash-fix-giflib-version.patch"))
+         (sha256
+          (base32 "0fh0bljn0i6ypyh6l99afi855p7ki7lm869nq1qj6k8hrrwhmfry"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:configure-flags
+         (list "--disable-static"
+               ;; Plugins are based on XULRunner and NPAPI only.  Disable.
+               "--disable-plugins"
+               "--disable-jemalloc" ;FIXME: not found by pkg-config
+               "--enable-gui=gtk"
+               "--enable-media=ffmpeg"
+               (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-ffmpeg-incl="
+                              (assoc-ref %build-inputs "ffmpeg")
+                              "/include/libavcodec")
+               (string-append "--with-speex-incl="
+                              (assoc-ref %build-inputs "speex") "/include")
+               (string-append "--with-speex-lib="
+                              (assoc-ref %build-inputs "speex") "/lib")
+               (string-append "--with-jpeg-incl="
+                              (assoc-ref %build-inputs "libjpeg") "/include")
+               (string-append "--with-zlib-incl="
+                              (assoc-ref %build-inputs "zlib") "/include")
+               (string-append "--with-png-incl="
+                              (assoc-ref %build-inputs "libpng")
+                              "/include"))))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("dejagnu" ,dejagnu) ;for tests
+         ("gettext" ,gettext-minimal)
+         ("libtool" ,libtool)
+         ("perl" ,perl)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("agg" ,agg)
+         ("atk" ,atk)
+         ("boost" ,boost)
+         ("curl" ,curl)
+         ("ffmpeg" ,ffmpeg-2.8)
+         ("freeglut" ,freeglut)
+         ("gconf" ,gconf)
+         ("giflib" ,giflib)
+         ("glib" ,glib)
+         ("gtk+" ,gtk+-2)
+         ("gtkglext" ,gtkglext)
+         ;;("jemalloc" ,jemalloc)
+         ("libjpeg" ,libjpeg-turbo)
+         ("libltdl" ,libltdl)
+         ("libpng" ,libpng)
+         ("pango" ,pango)
+         ("sdl" ,sdl)
+         ("speex" ,speex)))
+      (synopsis "Flash movie player")
+      (description
+       "Gnash is a Flash movie player.  It supports SWF version v7 and some
+of v8 and v9.  It is possible to configure Gnash to use several differemt
+audio or video backends, ensuring good performance.")
+      (home-page "https://www.gnu.org/software/gnash/")
+      (license license:gpl3+))))
+
diff --git a/gnu/packages/patches/gnash-do-not-depend-on-pangox.patch b/gnu/packages/patches/gnash-do-not-depend-on-pangox.patch
new file mode 100644
index 0000000000..489baa089c
--- /dev/null
+++ b/gnu/packages/patches/gnash-do-not-depend-on-pangox.patch
@@ -0,0 +1,35 @@
+From c63b5843ca1bb56bb825ba0521c3df81861f88c4 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Thu, 6 Feb 2020 23:59:49 +0100
+Subject: [PATCH] Do not depend on pangox
+
+pangox has been removed from Pango years ago breaking the build
+on modern distros.
+
+Gnash does not actually use pango directly at all. It looks like
+it was added for static linking against GTK when not using pkg-config
+but it was not updated or limited to non-pkg-config GTK builds
+(pkg-config would provide the necessary transitive dependencies automatically).
+
+The proper solution would be removing all the pango checks and relying
+on pkg-config but as a quick hack this should suffice.
+---
+ macros/pango.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/macros/pango.m4 b/macros/pango.m4
+index 96f0457e2..6f24eb2a2 100644
+--- a/macros/pango.m4
++++ b/macros/pango.m4
+@@ -34,7 +34,7 @@ AC_DEFUN([GNASH_PATH_PANGO],
+   if test x$windows = xyes; then
+     pango_pkg=pangowin32
+   else
+-    pango_pkg=pangox
++    pango_pkg=pango
+   fi
+ 
+   if test x$cross_compiling = xno; then
+-- 
+2.25.0
+
diff --git a/gnu/packages/patches/gnash-fix-giflib-version.patch b/gnu/packages/patches/gnash-fix-giflib-version.patch
new file mode 100644
index 0000000000..37213dac9b
--- /dev/null
+++ b/gnu/packages/patches/gnash-fix-giflib-version.patch
@@ -0,0 +1,13 @@
+diff --git a/libbase/GnashImageGif.cpp b/libbase/GnashImageGif.cpp
+index 2ae5ddb..b87b1e7 100644
+--- a/libbase/GnashImageGif.cpp
++++ b/libbase/GnashImageGif.cpp
+@@ -120,7 +120,7 @@ GifInput::GifInput(std::shared_ptr<IOChannel> in)
+ GifInput::~GifInput()
+ {
+     // Clean up allocated data.
+-#if GIFLIB_MAJOR==5 && GIFLIB_MINOR==1
++#if GIFLIB_MAJOR==5 && GIFLIB_MINOR!=0
+ 	DGifCloseFile(_gif, 0);
+ #else
+ 	DGifCloseFile(_gif);
-- 
2.20.1





             reply	other threads:[~2020-11-20 20:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20 20:05 Vinicius Monego [this message]
2020-11-20 20:07 ` [bug#44768] [PATCH 2/2] gnu: Add lightspark Vinicius Monego
2020-11-24 23:04 ` [bug#44768] [PATCH v2] gnu: Add gnash Vinicius Monego
2020-11-25 13:17   ` Mathieu Othacehe
2020-11-25 17:18 ` [bug#44768] [PATCH v3 1/2] " Vinicius Monego
2020-11-25 17:18   ` [bug#44768] [PATCH v3 2/2] gnu: Add lightspark Vinicius Monego
2020-11-28 16:15     ` Christopher Baines
2021-02-02 17:10       ` Vinicius Monego
2020-11-28 16:12   ` [bug#44768] [PATCH v3 1/2] gnu: Add gnash Christopher Baines
2021-02-02 17:29 ` [bug#44768] [PATCH v4] gnu: Add lightspark Vinicius Monego
2021-04-30  0:22 ` [bug#44768] [PATCH v5] " Vinicius Monego
2021-05-26 13:34   ` bug#44768: " Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201120200551.19145-1-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=44768@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).