Merge pull request #77051 from lblasc/bison2

Remove bison2
This commit is contained in:
Jan Tojnar 2020-01-13 22:47:16 +01:00 committed by GitHub
commit eb90191e9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 35 additions and 80 deletions

View file

@ -28,6 +28,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake flex bison makeWrapper ];
buildInputs = [ openssl libedit qt4 nettools iproute ];
postPatch = ''
# fix build with bison3
sed -i 's/define "parser_class_name"/define parser_class_name/' source/iked/conf.parse.yy
'';
configurePhase = ''
mkdir -p $out/{bin,sbin,lib}
cmake -DQTGUI=YES -DETCDIR=$out/etc -DLIBDIR=$out/lib -DSBINDIR=$out/sbin -DBINDIR=$out/bin \

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, bison2, flex }:
{ stdenv, fetchgit, bison, flex }:
with stdenv.lib;
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
};
makeFlags = [ "DESTDIR= BINDIR=$(out)/bin" ];
buildInputs = [ bison2 flex ];
buildInputs = [ bison flex ];
meta = {
homepage = http://pcalc.sourceforge.net/;

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, gtk2, gettext, libxml2, intltool, libart_lgpl
, libgnomecups, bison2, flex }:
{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk2, gettext, libxml2, intltool, libart_lgpl
, libgnomecups, bison, flex }:
stdenv.mkDerivation rec {
name = "libgnomeprint-2.18.8";
@ -9,10 +9,17 @@ stdenv.mkDerivation rec {
sha256 = "1034ec8651051f84d2424e7a1da61c530422cc20ce5b2d9e107e1e46778d9691";
};
patches = [ ./bug653388.patch ];
patches = [
./bug653388.patch
# Fix compatibility with bison 3
(fetchpatch {
url = "https://github.com/pld-linux/libgnomeprint/raw/54c0f9c3675b86c53f6d77a5bc526ce9ef0e38cd/bison3.patch";
sha256 = "1sp04jbv34i1gcwf377hhmwdsmqzig70dd06rjz1isb6zwh4y01l";
})
];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gtk2 gettext intltool libart_lgpl libgnomecups bison2 flex ];
buildInputs = [ gtk2 gettext intltool libart_lgpl libgnomecups bison flex ];
propagatedBuildInputs = [ libxml2 ];

View file

@ -1,5 +1,5 @@
{ fetchurl, fetchpatch, stdenv, autoreconfHook
, perl, bison2, flex, pkgconfig, glib, libxml2, libintl, libunwind
, perl, bison, flex, pkgconfig, glib, libxml2, libintl, libunwind
}:
stdenv.mkDerivation rec {
@ -15,11 +15,15 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
nativeBuildInputs = [ autoreconfHook flex perl pkgconfig libintl bison2 glib ];
nativeBuildInputs = [ autoreconfHook flex perl pkgconfig libintl bison glib ];
buildInputs = stdenv.lib.optional stdenv.isDarwin libunwind;
propagatedBuildInputs = [ glib libxml2 ];
patches = [
(fetchpatch {
url = "https://github.com/flathub/com.xnview.XnRetro/raw/fec03bbe240f45aa10d7d4eea9d6f066d9b6ac9c/gstreamer-0.10.36-bison3.patch";
sha256 = "05aarg3yzl5jx3z5838ixv392g0r3kbsi2vfqniaxmidhnfzij2y";
})
(fetchpatch {
url = "https://github.com/GStreamer/common/commit/03a0e5736761a72d4ed880e8c485bbf9e4a8ea47.patch";
sha256 = "0rin3x01yy78ky3smmhbwlph18hhym18q4x9w6ddiqajg5lk4xhm";

View file

@ -2,7 +2,7 @@
, qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel
, fontconfig, gtk2, libwebp, libxml2, libxslt
, sqlite, systemd, glib, gst_all_1, cmake
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
, bison, flex, gdb, gperf, perl, pkgconfig, python2, ruby
, darwin
, flashplayerFix ? false
}:
@ -31,7 +31,7 @@ qtModule {
++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ ICU OpenGL ])
++ optional usingAnnulenWebkitFork hyphen;
nativeBuildInputs = [
bison2 flex gdb gperf perl pkgconfig python2 ruby
bison flex gdb gperf perl pkgconfig python2 ruby
] ++ optional usingAnnulenWebkitFork cmake;
cmakeFlags = optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ]

View file

@ -1,43 +0,0 @@
{ stdenv, lib, fetchurl, m4, perl }:
stdenv.mkDerivation rec {
name = "bison-2.7.1";
src = fetchurl {
url = "mirror://gnu/bison/${name}.tar.gz";
sha256 = "0c9li3iaslzzr3zig6m3zlmb4r8i0wfvkcrvdyiqxasb09mjkqh8";
};
nativeBuildInputs = [ m4 ];
propagatedBuildInputs = [ m4 ];
checkInputs = [ perl ];
patches = lib.optional stdenv.isDarwin ./darwin-vasnprintf.patch;
doCheck = true;
# M4 = "${m4}/bin/m4";
meta = {
homepage = https://www.gnu.org/software/bison/;
description = "Yacc-compatible parser generator";
license = stdenv.lib.licenses.gpl3Plus;
longDescription = ''
Bison is a general-purpose parser generator that converts an
annotated context-free grammar into an LALR(1) or GLR parser for
that grammar. Once you are proficient with Bison, you can use
it to develop a wide range of language parsers, from those used
in simple desk calculators to complex programming languages.
Bison is upward compatible with Yacc: all properly-written Yacc
grammars ought to work with Bison with no change. Anyone
familiar with Yacc should be able to use Bison with little
trouble. You need to be fluent in C or C++ programming in order
to use Bison.
'';
platforms = stdenv.lib.platforms.unix;
};
passthru = { glrSupport = true; };
}

View file

@ -1,12 +0,0 @@
diff -ur bison-2.7-pristine/lib/vasnprintf.c bison-2.7/lib/vasnprintf.c
--- bison-2.7-pristine/lib/vasnprintf.c 2012-11-30 20:48:23.000000000 +0900
+++ bison-2.7/lib/vasnprintf.c 2018-06-28 16:55:31.000000000 +0900
@@ -4870,7 +4870,7 @@
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || (defined __APPLE__ && defined __MACH__))
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, fetchpatch
, bison2, flex, fontconfig, freetype, gperf, icu, openssl, libjpeg
, bison, flex, fontconfig, freetype, gperf, icu, openssl, libjpeg
, libpng, perl, python, ruby, sqlite, qtwebkit, qmake, qtbase
, darwin, writeScriptBin, cups, makeWrapper
}:
@ -27,7 +27,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ qmake ];
buildInputs = [
bison2 flex fontconfig freetype gperf icu openssl
bison flex fontconfig freetype gperf icu openssl
libjpeg libpng perl python ruby sqlite qtwebkit qtbase
makeWrapper
] ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, glibc
, bison2, curl, flex, gperftools, jansson, jemalloc, kerberos, lua, libmysqlclient
, bison, curl, flex, gperftools, jansson, jemalloc, kerberos, lua, libmysqlclient
, ncurses, openssl, pcre, pcre2, perl, rabbitmq-c, sqlite, tcl
, libaio, libedit, libtool, libui, libuuid, zlib
}:
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [
bison2 curl flex gperftools jansson jemalloc kerberos lua libmysqlclient
bison curl flex gperftools jansson jemalloc kerberos lua libmysqlclient
ncurses openssl pcre pcre2 perl rabbitmq-c sqlite tcl
libaio libedit libtool libui libuuid zlib
];

View file

@ -1708,9 +1708,7 @@ in
fdroidserver = python3Packages.callPackage ../development/tools/fdroidserver { };
filebench = callPackage ../tools/misc/filebench {
bison = bison2;
};
filebench = callPackage ../tools/misc/filebench { };
fileshare = callPackage ../servers/fileshare {};
@ -9717,9 +9715,7 @@ in
};
});
bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { };
bison3 = callPackage ../development/tools/parsing/bison/3.x.nix { };
bison = bison3;
bison = callPackage ../development/tools/parsing/bison { };
yacc = bison; # TODO: move to aliases.nix
blackmagic = callPackage ../development/tools/misc/blackmagic { };
@ -13731,7 +13727,7 @@ in
(import ../development/libraries/qt-5/5.12) {
inherit newScope;
inherit stdenv fetchurl fetchpatch fetchFromGitHub makeSetupHook makeWrapper;
bison = bison2; # error: too few arguments to function 'int yylex(...
inherit bison;
inherit cups;
inherit dconf;
inherit harfbuzz;
@ -19558,7 +19554,7 @@ in
stdenv = gccStdenv;
};
ike = callPackage ../applications/networking/ike { bison = bison2; };
ike = callPackage ../applications/networking/ike { };
ikiwiki = callPackage ../applications/misc/ikiwiki {
inherit (perlPackages.override { pkgs = pkgs // { imagemagick = imagemagickBig;}; }) PerlMagick;
@ -21428,9 +21424,7 @@ in
inherit (ocamlPackages) stog;
stp = callPackage ../applications/science/logic/stp {
bison = bison2;
};
stp = callPackage ../applications/science/logic/stp { };
stretchly = callPackage ../applications/misc/stretchly {
inherit (gnome2) GConf;