gnash: remove

Is broken and long-abandoned by upstream.
This commit is contained in:
Zane van Iperen 2022-02-06 12:45:56 +10:00 committed by Jonathan Ringer
parent 5ab0b425f6
commit 79cb125a6d
4 changed files with 1 additions and 193 deletions

View file

@ -1,57 +0,0 @@
From cb13c20332526a4db99e7fd0818b9a75829affad Mon Sep 17 00:00:00 2001
From: Zane van Iperen <zane@zanevaniperen.com>
Date: Sun, 7 Nov 2021 15:36:02 +1000
Subject: [PATCH] fix build with ffmepg 4
---
libmedia/ffmpeg/MediaHandlerFfmpeg.cpp | 2 +-
libmedia/ffmpeg/MediaParserFfmpeg.cpp | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
index 127aaaa..216d96b 100644
--- a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
+++ b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
@@ -149,7 +149,7 @@ MediaHandlerFfmpeg::cameraNames(std::vector<std::string>& /*names*/) const
size_t
MediaHandlerFfmpeg::getInputPaddingSize() const
{
- return FF_INPUT_BUFFER_PADDING_SIZE;
+ return AV_INPUT_BUFFER_PADDING_SIZE;
}
} // gnash.media.ffmpeg namespace
diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.cpp b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
index 9ceb8b0..a27ca56 100644
--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
@@ -64,7 +64,7 @@ AVInputFormat*
MediaParserFfmpeg::probeStream()
{
const size_t probeSize = 4096;
- const size_t bufSize = probeSize + FF_INPUT_BUFFER_PADDING_SIZE;
+ const size_t bufSize = probeSize + AV_INPUT_BUFFER_PADDING_SIZE;
std::unique_ptr<std::uint8_t[]> buffer(new std::uint8_t[bufSize]);
@@ -173,7 +173,7 @@ MediaParserFfmpeg::parseVideoFrame(AVPacket& packet)
// TODO: We might avoid the copy as a whole by making EncodedVideoFrame
// virtual.
- size_t allocSize = packet.size + FF_INPUT_BUFFER_PADDING_SIZE;
+ size_t allocSize = packet.size + AV_INPUT_BUFFER_PADDING_SIZE;
std::uint8_t* data = new std::uint8_t[allocSize];
std::copy(packet.data, packet.data+packet.size, data);
std::unique_ptr<EncodedVideoFrame> frame(new EncodedVideoFrame(data, packet.size, 0, timestamp));
@@ -221,7 +221,7 @@ MediaParserFfmpeg::parseAudioFrame(AVPacket& packet)
// TODO: We might avoid the copy as a whole by making EncodedAudioFrame
// virtual.
- size_t allocSize = packet.size + FF_INPUT_BUFFER_PADDING_SIZE;
+ size_t allocSize = packet.size + AV_INPUT_BUFFER_PADDING_SIZE;
std::uint8_t* data = new std::uint8_t[allocSize];
std::copy(packet.data, packet.data+packet.size, data);
--
2.31.1

View file

@ -1,132 +0,0 @@
{ lib, stdenv, fetchgit, fetchpatch, autoreconfHook
, pkg-config, libtool, boost, SDL
, glib, pango, gettext, curl, xorg
, libpng, libjpeg, giflib, speex, atk
# renderers
, enableAGG ? true, agg ? null
, enableCairo ? false, cairo ? null
, enableOpenGL ? false
, libGLU ? null
, libGL ? null
# GUI toolkits
, enableGTK ? true, gtk2 ? null, gnome2 ? null
, enableSDL ? false
, enableQt ? false, qt4 ? null
# media
, enableFFmpeg ? true, ffmpeg ? null
# misc
, enableJemalloc ? true, jemalloc ? null
, enableHwAccel ? true
, enablePlugins ? false, xulrunner ? null, npapi_sdk ? null
}:
with lib;
let
available = x: x != null;
sound =
if enableFFmpeg then "ffmpeg" else "none";
renderers = []
++ optional enableAGG "agg"
++ optional enableCairo "cairo"
++ optional enableOpenGL "opengl";
toolkits = []
++ optional enableGTK "gtk"
++ optional enableSDL "sdl"
++ optional enableQt "qt4";
in
# renderers
assert enableAGG -> available agg;
assert enableCairo -> available cairo;
assert enableOpenGL -> all available [ libGLU libGL ];
# GUI toolkits
assert enableGTK -> all available [ gtk2 gnome2.gtkglext gnome2.GConf ];
assert enableSDL -> available SDL;
assert enableQt -> available qt4;
# media libraries
assert enableFFmpeg -> available ffmpeg ;
# misc
assert enableJemalloc -> available jemalloc;
assert enableHwAccel -> all available [ libGLU libGL ];
assert enablePlugins -> all available [ xulrunner npapi_sdk ];
assert length toolkits == 0 -> throw "at least one GUI toolkit must be enabled";
assert length renderers == 0 -> throw "at least one renderer must be enabled";
stdenv.mkDerivation {
pname = "gnash";
version = "0.8.11-2019-30-01";
src = fetchgit {
url = "git://git.sv.gnu.org/gnash.git";
rev = "583ccbc1275c7701dc4843ec12142ff86bb305b4";
sha256 = "0fh0bljn0i6ypyh6l99afi855p7ki7lm869nq1qj6k8hrrwhmfry";
};
postPatch = ''
sed -i 's|jemalloc.h|jemalloc/jemalloc.h|' libbase/jemalloc_gnash.c
'';
nativeBuildInputs = [ autoreconfHook pkg-config libtool ];
buildInputs = [
glib gettext boost curl SDL speex
xorg.libXmu xorg.libSM xorg.libXt
libpng libjpeg giflib pango atk
] ++ optional enableAGG agg
++ optional enableCairo cairo
++ optional enableQt qt4
++ optional enableFFmpeg ffmpeg
++ optional enableJemalloc jemalloc
++ optional enableHwAccel [ libGL libGLU ]
++ optionals enableOpenGL [ libGL libGLU ]
++ optionals enablePlugins [ xulrunner npapi_sdk ]
++ optionals enableGTK [ gtk2 gnome2.gtkglext gnome2.GConf ];
patches = [
(fetchpatch { # fix compilation due to bad detection of libgif version: https://savannah.gnu.org/patch/index.php?9873
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";
})
./0001-fix-build-with-ffmepg-4.patch
];
configureFlags = with lib; [
"--with-boost-incl=${boost.dev}/include"
"--with-boost-lib=${boost.out}/lib"
"--enable-renderer=${concatStringsSep "," renderers}"
"--enable-gui=${concatStringsSep "," toolkits}"
"--enable-media=${sound}"
"--with-npapi-install=prefix"
(enableFeature enablePlugins "plugins")
(enableFeature enableJemalloc "jemalloc")
(optionalString enableHwAccel "--enable-device=egl")
];
meta = {
homepage = "https://savannah.gnu.org/projects/gnash";
description = "A flash (SWF) player and browser plugin";
license = licenses.gpl3;
maintainers = with maintainers; [ rnhmjoj ];
};
}

View file

@ -383,6 +383,7 @@ mapAliases ({
gmailieer = lieer; # Added 2020-04-19
gmic_krita_qt = gmic-qt-krita; # Added 2019-09-07
gmvault = throw "gmvault has been removed because it is unmaintained, mostly broken, and insecure"; # Added 2021-03-08
gnash = throw "gnash has been removed; broken and abandoned upstream."; # added 2022-02-06
gnome-passwordsafe = gnome-secrets; # added 2022-01-30
gnome-mpv = celluloid; # Added 2019-08-22
gnome-sharp = throw "gnome-sharp has been removed from nixpkgs"; # Added 2022-01-15

View file

@ -5995,10 +5995,6 @@ with pkgs;
inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav;
};
gnash = callPackage ../misc/gnash {
autoreconfHook = buildPackages.autoreconfHook269;
};
gnirehtet = callPackage ../tools/networking/gnirehtet { };
gnome-2048 = callPackage ../desktops/gnome/games/gnome-2048 { };