diff mbox series

[bug#44768,v3,2/2] gnu: Add lightspark.

Message ID 20201125171857.28120-2-monego@posteo.net
State Changes Requested
Headers show
Series [bug#44768,v3,1/2] gnu: Add gnash. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Nov. 25, 2020, 5:18 p.m. UTC
* gnu/packages/animation.scm (lightspark): New variable.
---
Rebased on the previous commit

 gnu/packages/animation.scm | 64 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

Comments

Christopher Baines Nov. 28, 2020, 4:15 p.m. UTC | #1
Vinicius Monego <monego@posteo.net> writes:

> * gnu/packages/animation.scm (lightspark): New variable.
> ---
> Rebased on the previous commit

Thanks for the patch, the main thing I noticed with this is that there's
some bundled code, at least I spotted pugixml included in the lightspark
code, and Guix already has a package for pugixml.

If possible, lightspark should be built with pugixml from Guix.

>  gnu/packages/animation.scm | 64 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
>
> diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
> index 102b0f47f7..9b94c1d214 100644
> --- a/gnu/packages/animation.scm
> +++ b/gnu/packages/animation.scm
> @@ -25,9 +25,11 @@
>    #:use-module (guix git-download)
>    #:use-module (guix utils)
>    #:use-module ((guix licenses) #:prefix license:)
> +  #:use-module (guix build-system cmake)
>    #:use-module (guix build-system gnu)
>    #:use-module (gnu packages)
>    #:use-module (gnu packages algebra)
> +  #:use-module (gnu packages assembly)
>    #:use-module (gnu packages autotools)
>    #:use-module (gnu packages boost)
>    #:use-module (gnu packages compression)
> @@ -43,6 +45,8 @@
>    #:use-module (gnu packages image)
>    #:use-module (gnu packages imagemagick)
>    #:use-module (gnu packages jemalloc)
> +  #:use-module (gnu packages networking)
> +  #:use-module (gnu packages pcre)
>    #:use-module (gnu packages perl)
>    #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages pulseaudio)
> @@ -397,3 +401,63 @@ audio or video backends, ensuring good performance.")
>        (home-page "https://www.gnu.org/software/gnash/")
>        (license license:gpl3+))))
>  
> +(define-public lightspark
> +  (package
> +    (name "lightspark")
> +    (version "0.8.3")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/lightspark/lightspark")
> +             (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0rgqqppnv4n3kv623sgr1zpc2fdsnrqzfiqgk4clcmfl5ipklg6f"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:tests? #f ;requires Adobe Flex SDK, see README.tests
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'relative-etc-dir
> +           ;; Write default config file to ./etc instead of /etc.
> +           (lambda _
> +             (substitute* "CMakeLists.txt" (("\\/etc") "etc"))
> +             #t))
> +         (replace 'check
> +           (lambda* (#:key tests? #:allow-other-keys)
> +             (if tests?
> +                 (begin
> +                   (invoke "./tests"))
> +                 #t))))))

I'd normally write this as:

  (when tests?
    (invoke "./tests"))
  #t

> +    (native-inputs
> +     `(("gettext" ,gettext-minimal)
> +       ("glib:bin" ,glib "bin")
> +       ("nasm" ,nasm)
> +       ("perl" ,perl)
> +       ("pkg-config" ,pkg-config)
> +       ("python" ,python-wrapper)))
> +    (inputs
> +     `(("cairo" ,cairo)
> +       ("curl" ,curl)
> +       ("ffmpeg" ,ffmpeg)
> +       ("freeglut" ,freeglut)
> +       ("glew" ,glew)
> +       ("glibmm" ,glibmm)
> +       ("gnash" ,gnash)
> +       ("libjpeg" ,libjpeg-turbo)
> +       ("openssl" ,openssl)
> +       ("pango" ,pango)
> +       ("pcre2" ,pcre2)
> +       ("rtmpdump" ,rtmpdump)
> +       ("sdl2" ,sdl2)
> +       ("sdl2-mixer" ,sdl2-mixer)
> +       ("zlib" ,zlib)))
> +    (home-page "https://lightspark.github.io/")
> +    (synopsis "Flash player implementation")
> +    (description
> +     "Lightspark is a Flash player implementation for playing files in the SWF
> +format.  Lightspark can run as a web browser plugin or as a standalone
> +application.  Lightspark supports SWF files written on all versions of the
> +ActionScript language.")
> +    (license license:lgpl3+)))
Vinicius Monego Feb. 2, 2021, 5:10 p.m. UTC | #2
Christopher Baines writes:

> Vinicius Monego <monego@posteo.net> writes:
>
>> * gnu/packages/animation.scm (lightspark): New variable.
>> ---
>> Rebased on the previous commit
>
> Thanks for the patch, the main thing I noticed with this is that there's
> some bundled code, at least I spotted pugixml included in the lightspark
> code, and Guix already has a package for pugixml.
>
> If possible, lightspark should be built with pugixml from Guix.
>

Hello,

Sorry for the late response. I noticed that jxrlib is also in Guix, and
tried to unbundle both jxrlib and pugixml unsuccesfully.

In the case of jxrlib, JXRGlue fails to include JXRMeta:

 #include <JXRMeta.h>
          ^~~~~~~~~~~

IIUC the include syntax is jxrlib/JXRMeta.h. It also fails in the Debian
package from where Guix pulls from.

In the case of pugixml the build fails with undefined references. I also
found this comment in the changelog:

* switch to internal xml parsing (based on pugixml)

which implies that the bundled pugixml is a fork and not a snapshot.

>>  gnu/packages/animation.scm | 64 ++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 64 insertions(+)
>>
>> diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
>> index 102b0f47f7..9b94c1d214 100644
>> --- a/gnu/packages/animation.scm
>> +++ b/gnu/packages/animation.scm
>> @@ -25,9 +25,11 @@
>>    #:use-module (guix git-download)
>>    #:use-module (guix utils)
>>    #:use-module ((guix licenses) #:prefix license:)
>> +  #:use-module (guix build-system cmake)
>>    #:use-module (guix build-system gnu)
>>    #:use-module (gnu packages)
>>    #:use-module (gnu packages algebra)
>> +  #:use-module (gnu packages assembly)
>>    #:use-module (gnu packages autotools)
>>    #:use-module (gnu packages boost)
>>    #:use-module (gnu packages compression)
>> @@ -43,6 +45,8 @@
>>    #:use-module (gnu packages image)
>>    #:use-module (gnu packages imagemagick)
>>    #:use-module (gnu packages jemalloc)
>> +  #:use-module (gnu packages networking)
>> +  #:use-module (gnu packages pcre)
>>    #:use-module (gnu packages perl)
>>    #:use-module (gnu packages pkg-config)
>>    #:use-module (gnu packages pulseaudio)
>> @@ -397,3 +401,63 @@ audio or video backends, ensuring good performance.")
>>        (home-page "https://www.gnu.org/software/gnash/")
>>        (license license:gpl3+))))
>>  
>> +(define-public lightspark
>> +  (package
>> +    (name "lightspark")
>> +    (version "0.8.3")
>> +    (source
>> +     (origin
>> +       (method git-fetch)
>> +       (uri (git-reference
>> +             (url "https://github.com/lightspark/lightspark")
>> +             (commit version)))
>> +       (file-name (git-file-name name version))
>> +       (sha256
>> +        (base32 "0rgqqppnv4n3kv623sgr1zpc2fdsnrqzfiqgk4clcmfl5ipklg6f"))))
>> +    (build-system cmake-build-system)
>> +    (arguments
>> +     `(#:tests? #f ;requires Adobe Flex SDK, see README.tests
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'unpack 'relative-etc-dir
>> +           ;; Write default config file to ./etc instead of /etc.
>> +           (lambda _
>> +             (substitute* "CMakeLists.txt" (("\\/etc") "etc"))
>> +             #t))
>> +         (replace 'check
>> +           (lambda* (#:key tests? #:allow-other-keys)
>> +             (if tests?
>> +                 (begin
>> +                   (invoke "./tests"))
>> +                 #t))))))
>
> I'd normally write this as:
>
>   (when tests?
>     (invoke "./tests"))
>   #t
>

Ok, I will send an update soon with this change and an update to the
license list because I initially overlooked the 3rd party bundles.

>> +    (native-inputs
>> +     `(("gettext" ,gettext-minimal)
>> +       ("glib:bin" ,glib "bin")
>> +       ("nasm" ,nasm)
>> +       ("perl" ,perl)
>> +       ("pkg-config" ,pkg-config)
>> +       ("python" ,python-wrapper)))
>> +    (inputs
>> +     `(("cairo" ,cairo)
>> +       ("curl" ,curl)
>> +       ("ffmpeg" ,ffmpeg)
>> +       ("freeglut" ,freeglut)
>> +       ("glew" ,glew)
>> +       ("glibmm" ,glibmm)
>> +       ("gnash" ,gnash)
>> +       ("libjpeg" ,libjpeg-turbo)
>> +       ("openssl" ,openssl)
>> +       ("pango" ,pango)
>> +       ("pcre2" ,pcre2)
>> +       ("rtmpdump" ,rtmpdump)
>> +       ("sdl2" ,sdl2)
>> +       ("sdl2-mixer" ,sdl2-mixer)
>> +       ("zlib" ,zlib)))
>> +    (home-page "https://lightspark.github.io/")
>> +    (synopsis "Flash player implementation")
>> +    (description
>> +     "Lightspark is a Flash player implementation for playing files in the SWF
>> +format.  Lightspark can run as a web browser plugin or as a standalone
>> +application.  Lightspark supports SWF files written on all versions of the
>> +ActionScript language.")
>> +    (license license:lgpl3+)))
diff mbox series

Patch

diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index 102b0f47f7..9b94c1d214 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -25,9 +25,11 @@ 
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
@@ -43,6 +45,8 @@ 
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages networking)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
@@ -397,3 +401,63 @@  audio or video backends, ensuring good performance.")
       (home-page "https://www.gnu.org/software/gnash/")
       (license license:gpl3+))))
 
+(define-public lightspark
+  (package
+    (name "lightspark")
+    (version "0.8.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/lightspark/lightspark")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0rgqqppnv4n3kv623sgr1zpc2fdsnrqzfiqgk4clcmfl5ipklg6f"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ;requires Adobe Flex SDK, see README.tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'relative-etc-dir
+           ;; Write default config file to ./etc instead of /etc.
+           (lambda _
+             (substitute* "CMakeLists.txt" (("\\/etc") "etc"))
+             #t))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (if tests?
+                 (begin
+                   (invoke "./tests"))
+                 #t))))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("nasm" ,nasm)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("curl" ,curl)
+       ("ffmpeg" ,ffmpeg)
+       ("freeglut" ,freeglut)
+       ("glew" ,glew)
+       ("glibmm" ,glibmm)
+       ("gnash" ,gnash)
+       ("libjpeg" ,libjpeg-turbo)
+       ("openssl" ,openssl)
+       ("pango" ,pango)
+       ("pcre2" ,pcre2)
+       ("rtmpdump" ,rtmpdump)
+       ("sdl2" ,sdl2)
+       ("sdl2-mixer" ,sdl2-mixer)
+       ("zlib" ,zlib)))
+    (home-page "https://lightspark.github.io/")
+    (synopsis "Flash player implementation")
+    (description
+     "Lightspark is a Flash player implementation for playing files in the SWF
+format.  Lightspark can run as a web browser plugin or as a standalone
+application.  Lightspark supports SWF files written on all versions of the
+ActionScript language.")
+    (license license:lgpl3+)))