Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnash: fix build with pangox-compat #79385

Closed
wants to merge 4 commits into from
Closed

Conversation

rnhmjoj
Copy link
Contributor

@rnhmjoj rnhmjoj commented Feb 6, 2020

Motivation for this change

So, this is far from ideal but it's the only way to fix the build.
Right know gnash is really the only viable solution to play swf files, so I think it's worth keeping it around.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change (pangox-compat, gnash)
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

We should probably mark pango with meta.knownVulnerabilities = [ "unmainatained" ];.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

I do not even see any pango mentions in the source code itself.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

It looks like they added pango in the past for static linking against GTK but forgot to make the check static only. And it should be unnecessary with pkg-config anyway.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

The following patch seems to be sufficient:

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

Probably easier than cleaning up the build system of the pango cruft.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 6, 2020

  • pango_pkg=pango

I don't know how I missed that. I even modified that script to print more information...

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

--- a/pkgs/misc/gnash/default.nix
+++ b/pkgs/misc/gnash/default.nix
@@ -100,6 +100,13 @@ stdenv.mkDerivation {
       url = "https://savannah.gnu.org/patch/download.php?file_id=47859";
       sha256 = "0aimayzgi5065gkcfcr8d5lkd9c0471q7dqmln42hjzq847n6d5y";
     })
+
+    # Fix build with modern Pango
+    # https://savannah.gnu.org/bugs/index.php?57759
+    (fetchpatch {
+      url = "https://savannah.gnu.org/file/0001-Do-not-depend-on-pangox.patch?file_id=48366";
+      sha256 = "02x7sl5zwd1ld2n4b6bp16c5gk91qsap0spfbb5iwpglq3galv2l";
+    })
   ];
 
   configureFlags = with stdenv.lib; [

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

Fixed in 0c5502e.

@jtojnar jtojnar closed this Feb 6, 2020
@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 7, 2020

Thank you!

@rnhmjoj rnhmjoj deleted the gnash branch April 7, 2020 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants