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 ]; nativeBuildInputs = [ cmake flex bison makeWrapper ];
buildInputs = [ openssl libedit qt4 nettools iproute ]; 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 = '' configurePhase = ''
mkdir -p $out/{bin,sbin,lib} mkdir -p $out/{bin,sbin,lib}
cmake -DQTGUI=YES -DETCDIR=$out/etc -DLIBDIR=$out/lib -DSBINDIR=$out/sbin -DBINDIR=$out/bin \ 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; with stdenv.lib;
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
}; };
makeFlags = [ "DESTDIR= BINDIR=$(out)/bin" ]; makeFlags = [ "DESTDIR= BINDIR=$(out)/bin" ];
buildInputs = [ bison2 flex ]; buildInputs = [ bison flex ];
meta = { meta = {
homepage = http://pcalc.sourceforge.net/; homepage = http://pcalc.sourceforge.net/;

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, gtk2, gettext, libxml2, intltool, libart_lgpl { stdenv, fetchurl, fetchpatch, pkgconfig, gtk2, gettext, libxml2, intltool, libart_lgpl
, libgnomecups, bison2, flex }: , libgnomecups, bison, flex }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libgnomeprint-2.18.8"; name = "libgnomeprint-2.18.8";
@ -9,10 +9,17 @@ stdenv.mkDerivation rec {
sha256 = "1034ec8651051f84d2424e7a1da61c530422cc20ce5b2d9e107e1e46778d9691"; 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 ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gtk2 gettext intltool libart_lgpl libgnomecups bison2 flex ]; buildInputs = [ gtk2 gettext intltool libart_lgpl libgnomecups bison flex ];
propagatedBuildInputs = [ libxml2 ]; propagatedBuildInputs = [ libxml2 ];

View File

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

View File

@ -2,7 +2,7 @@
, qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel , qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel
, fontconfig, gtk2, libwebp, libxml2, libxslt , fontconfig, gtk2, libwebp, libxml2, libxslt
, sqlite, systemd, glib, gst_all_1, cmake , sqlite, systemd, glib, gst_all_1, cmake
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby , bison, flex, gdb, gperf, perl, pkgconfig, python2, ruby
, darwin , darwin
, flashplayerFix ? false , flashplayerFix ? false
}: }:
@ -31,7 +31,7 @@ qtModule {
++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ ICU OpenGL ]) ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ ICU OpenGL ])
++ optional usingAnnulenWebkitFork hyphen; ++ optional usingAnnulenWebkitFork hyphen;
nativeBuildInputs = [ nativeBuildInputs = [
bison2 flex gdb gperf perl pkgconfig python2 ruby bison flex gdb gperf perl pkgconfig python2 ruby
] ++ optional usingAnnulenWebkitFork cmake; ] ++ optional usingAnnulenWebkitFork cmake;
cmakeFlags = optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ] 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 { 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 , libpng, perl, python, ruby, sqlite, qtwebkit, qmake, qtbase
, darwin, writeScriptBin, cups, makeWrapper , darwin, writeScriptBin, cups, makeWrapper
}: }:
@ -27,7 +27,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ qmake ]; nativeBuildInputs = [ qmake ];
buildInputs = [ buildInputs = [
bison2 flex fontconfig freetype gperf icu openssl bison flex fontconfig freetype gperf icu openssl
libjpeg libpng perl python ruby sqlite qtwebkit qtbase libjpeg libpng perl python ruby sqlite qtwebkit qtbase
makeWrapper makeWrapper
] ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ] ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, glibc { 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 , ncurses, openssl, pcre, pcre2, perl, rabbitmq-c, sqlite, tcl
, libaio, libedit, libtool, libui, libuuid, zlib , libaio, libedit, libtool, libui, libuuid, zlib
}: }:
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ 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 ncurses openssl pcre pcre2 perl rabbitmq-c sqlite tcl
libaio libedit libtool libui libuuid zlib libaio libedit libtool libui libuuid zlib
]; ];

View File

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