Merge gcc-9 into staging (#68029)

This commit is contained in:
Frederik Rietdijk 2019-12-30 16:38:38 +01:00
commit 6d059becd3
122 changed files with 831 additions and 1873 deletions

View File

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, libjack2, alsaLib
, freetype, libX11, libXrandr, libXinerama, libXext, libXcursor
, fetchpatch
, adlplugChip ? "-DADLplug_CHIP=OPL3"
, pname ? "ADLplug" }:
@ -15,6 +16,15 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [
(fetchpatch {
url = "https://raw.githubusercontent.com/jpcima/ADLplug/83636c55bec1b86cabf634b9a6d56d07f00ecc61/resources/patch/juce-gcc9.patch";
sha256 = "15hkdb76n9lgjsrpczj27ld9b4804bzrgw89g95cj4sc8wwkplyy";
extraPrefix = "thirdparty/JUCE/";
stripLen = 1;
})
];
cmakeFlags = [ adlplugChip ];
buildInputs = [

View File

@ -4,7 +4,7 @@
}:
let
version = "0.12.9.0";
version = "0.13.0.0";
in
stdenv.mkDerivation {
pname = "aeon";
@ -15,7 +15,7 @@ stdenv.mkDerivation {
repo = "aeon";
rev = "v${version}-aeon";
fetchSubmodules = true;
sha256 = "194nxf8c8ihkmdsxyhkhrxc2xiinipifk0ng1rmxiiyr2gjgxzga";
sha256 = "07d87n1j4dc9gfwj6xy5jdpryn45095xdh961g6xjnjzc5fivjch";
};
nativeBuildInputs = [ cmake pkgconfig git doxygen graphviz ];

View File

@ -33,6 +33,8 @@ stdenv.mkDerivation rec {
cppzmq hidapi randomx
];
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-security" ];
patches = [ ./move-log-file.patch ];
postPatch = ''

View File

@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "17ckkxfzbqvvfdnh10if4aqdcq98q3vl6dn1v6f4lhr4ifnyjdlk";
};
buildInputs = [ ncurses ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-overflow" "-Wno-error=stringop-truncation" ];
patches = [
# gcc7 compat
(fetchpatch {

View File

@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
pname = "openimageio";
version = "1.8.16";
version = "1.8.17";
src = fetchFromGitHub {
owner = "OpenImageIO";
repo = "oiio";
rev = "Release-${version}";
sha256 = "0isx137c6anvs1xfxi0z35v1cw855xvnq2ca0pakqqpdh0yivrps";
sha256 = "0zq34szprgkrrayg5sl3whrsx2l6lr8nw4hdrnwv2qhn70jbi2w2";
};
outputs = [ "bin" "out" "dev" "doc" ];

View File

@ -1,27 +1,29 @@
{stdenv, fetchurl, cmake, sword, qt4, boost, clucene_core}:
{ stdenv, fetchurl, cmake, pkgconfig, sword, boost, clucene_core
, qtbase, qttools, qtsvg, qtwebkit
}:
stdenv.mkDerivation rec {
version = "2.10.1";
version = "2.11.2";
pname = "bibletime";
src = fetchurl {
url = "mirror://sourceforge/bibletime/${pname}-${version}.tar.xz";
sha256 = "14fayy5h1ffjxin669q56fflxn4ij1irgn60cygwx2y02cwxbll6";
sha256 = "1s5bvmwbz1gyp3ml8sghpc00h8nhdvx2iyq96iri30kwx1y1jy6i";
};
prePatch = ''
patchShebangs .;
'';
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [
sword boost clucene_core
qtbase qttools qtsvg qtwebkit
];
preConfigure = ''
export CLUCENE_HOME=${clucene_core};
export SWORD_HOME=${sword};
'';
buildInputs = [ cmake sword qt4 boost clucene_core ];
cmakeFlags = [ "-DUSE_QT_WEBKIT=ON" "-DCMAKE_BUILD_TYPE=Debug" ];
meta = {

View File

@ -9,7 +9,11 @@ stdenv.mkDerivation rec {
sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" "-Wno-error=deprecated-declarations" ];
NIX_CFLAGS_COMPILE = [
"-Wno-error=format-truncation"
"-Wno-error=deprecated-declarations"
"-Wno-error=stringop-overflow"
];
buildInputs = [ openssl ];

View File

@ -33,6 +33,8 @@ stdenv.mkDerivation rec {
dontUseQmakeConfigure = true;
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated" ];
# Disable annoying update reminder
postPatch = ''
sed -i s/'^\s*initUpdater();'/'\/\/initUpdater():'/ src/app/app.cpp

View File

@ -161,7 +161,10 @@ stdenv.mkDerivation rec {
]
++ lib.optionals (!isTorBrowserLike) [
"-I${nss.dev}/include/nss"
];
]
++ lib.optional (pname == "firefox-esr" && lib.versionAtLeast ffversion "68"
&& lib.versionOlder ffversion "69")
"-Wno-error=format-security";
postPatch = lib.optionalString (lib.versionAtLeast ffversion "63.0" && !isTorBrowserLike) ''
substituteInPlace third_party/prio/prio/rand.c --replace 'nspr/prinit.h' 'prinit.h'

View File

@ -1,73 +0,0 @@
{ stdenv, glib, fetchurl, fetchpatch, cyrus_sasl, gettext, openldap, ptlib, opal, libXv, rarian, intltool
, perlPackages, evolution-data-server, gnome-doc-utils, avahi, autoreconfHook
, libsigcxx, gtk2, dbus-glib, libnotify, libXext, xorgproto, gnome3, boost, libsecret
, pkgconfig, libxml2, unixODBC, db, nspr, nss, zlib
, libXrandr, which, libxslt, libtasn1, gmp, nettle, sqlite, makeWrapper }:
stdenv.mkDerivation rec {
pname = "ekiga";
version = "4.0.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "5f4f491c9496cf65ba057a9345d6bb0278f4eca07bcda5baeecf50bfcd9a4a3b";
};
buildInputs = [ cyrus_sasl gettext openldap ptlib opal libXv rarian intltool
evolution-data-server gnome-doc-utils avahi
libsigcxx gtk2 dbus-glib libnotify libXext xorgproto sqlite
gnome3.libsoup glib gnome3.adwaita-icon-theme boost
autoreconfHook pkgconfig libxml2 unixODBC db nspr
nss zlib libsecret libXrandr which libxslt libtasn1
gmp nettle makeWrapper ]
++ (with perlPackages; [ perl XMLParser ]);
preAutoreconf = ''
substituteInPlace configure.ac --replace AM_GCONF_SOURCE_2 ""
substituteInPlace configure.ac --replace gnome-icon-theme adwaita-icon-theme
'';
configureFlags = [
"--with-ldap-dir=${openldap.dev}"
"--with-libsasl2-dir=${cyrus_sasl.dev}"
"--with-boost-libdir=${boost.out}/lib"
"--disable-gconf"
];
enableParallelBuilding = true;
patches = [
(fetchpatch { url = https://sources.debian.net/data/main/e/ekiga/4.0.1-7/debian/patches/autofoo.patch;
sha256 = "1vyagslws4mm9yfz1m5p1kv9sxmk5lls9vxpm6j72q2ahsgydzx4";
})
(fetchpatch { url = https://sources.debian.net/data/main/e/ekiga/4.0.1-7/debian/patches/boost.patch;
sha256 = "01k0rw8ibrrf9zn9lx6dzbrgy58w089hqxqxqdv9whb65cldlj5s";
})
(fetchpatch { url = https://src.fedoraproject.org/rpms/ekiga/raw/dbf5f5ba449d22bd79f0394cddb7d4d8a88ec6ac/f/ekiga-4.0.1-libresolv.patch;
sha256 = "18wc68im8422ibpa0gkrkgjq41m7hikaha3xqmjs2km45i1cwcaz";
})
];
postInstall = ''
wrapProgram "$out"/bin/ekiga \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
'';
passthru = {
updateInfo = {
downloadPage = "mirror://gnome/sources/ekiga";
};
updateScript = gnome3.updateScript {
packageName = pname;
};
};
meta = with stdenv.lib; {
description = "VOIP/Videoconferencing app with full SIP and H.323 support";
homepage = "https://www.ekiga.org/";
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
license = licenses.gpl2Plus;
};
}

View File

@ -23,9 +23,21 @@ stdenv.mkDerivation rec {
url = "https://projects.duckcorp.org/projects/bip/repository/revisions/39414f8ff9df63c8bc2e4eee34f09f829a5bf8f5/diff/src/connection.c?format=diff";
sha256 = "1hvg58vci6invh0z19wf04jjvnm8w6f6v4c4nk1j5hc3ymxdp1rb";
})
(fetchpatch {
url = "https://projects.duckcorp.org/projects/bip/repository/bip/revisions/87192685f55856d2c28021963ab2c308e21faddc/diff?format=diff";
sha256 = "0rspzp7q1lq8v0cl0c35xxpgisfk264i648vslgsjax2s0g9svx0";
})
(fetchpatch {
url = "https://projects.duckcorp.org/projects/bip/repository/bip/revisions/814d54c676d5827f6ea37c1cd2d6e846d080c13c/diff?format=diff";
sha256 = "137l77kmm6p9p4c4kvw2zc4xkr10ayyc9z5rlpwn67574h47v55i";
})
(fetchpatch {
url = "https://projects.duckcorp.org/projects/bip/repository/bip/revisions/d2dcb0adb1aa8c2c4526aa6ad650483b0e02ab7d/diff?format=diff";
sha256 = "1pvywaljdkmy4870xs6gvsk4qwg69h47qr0yjywbcdsfycrgp8aq";
})
];
NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" "-Wno-error=duplicate-decl-specifier" "-Wno-error=format-truncation" ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" "-Wno-error=duplicate-decl-specifier" ];
meta = {
description = "An IRC proxy (bouncer)";

View File

@ -156,6 +156,8 @@ stdenv.mkDerivation rec {
rm -rf obj-x86_64-pc-linux-gnu
'';
hardeningDisable = [ "format" ];
preConfigure = ''
# remove distributed configuration files
rm -f configure

View File

@ -7,8 +7,8 @@ stdenv.mkDerivation rec {
pname = "frostwire";
src = fetchurl {
url = "https://dl.frostwire.com/frostwire/${version}/frostwire-${version}.noarch.tar.gz";
sha256 = "03vxg0qas4mz5ggrmi396nkz44x1kgq8bfbhbr9mnal9ay9qmi8m";
url = "https://dl.frostwire.com/frostwire/${version}/frostwire-${version}.amd64.tar.gz";
sha256 = "0pd9akfq8cx9qkfkzravvrb8pjaxa4b0vgjdwqc1zvkng4wl8848";
};
nativeBuildInputs = [ makeWrapper ];
@ -26,6 +26,6 @@ stdenv.mkDerivation rec {
description = "BitTorrent Client and Cloud File Downloader";
license = licenses.gpl2;
maintainers = with maintainers; [ gavin ];
platforms = platforms.all;
platforms = [ "x86_64-linux"];
};
}

View File

@ -1,34 +0,0 @@
{ stdenv, fetchFromGitHub, opal, ptlib }:
stdenv.mkDerivation rec {
rev = "3090e9f";
name = "sipcmd-${rev}";
src = fetchFromGitHub {
repo = "sipcmd";
owner = "tmakkonen";
inherit rev;
sha256 = "072h9qapmz46r8pxbzkfmc4ikd7dv9g8cgrfrw21q942icbrvq2c";
};
buildInputs = [ opal ptlib ];
buildPhase = ''
make IFLAGS="-I${opal}/include/opal -I${ptlib}/include -Isrc/ -L${opal}/lib -L${ptlib}/lib"
'';
installPhase = ''
mkdir -pv $out/bin
cp sipcmd $out/bin/sipcmd
'';
meta = {
homepage = https://github.com/tmakkonen/sipcmd;
description = "The command line SIP/H.323/RTP softphone";
platforms = with stdenv.lib.platforms; linux;
license = stdenv.lib.licenses.gpl2;
};
}

View File

@ -9,13 +9,13 @@
stdenv.mkDerivation {
pname = "casync";
version = "2-152-ge4a3c5e";
version = "2-219-ga8f6c84";
src = fetchFromGitHub {
owner = "systemd";
repo = "casync";
rev = "e4a3c5efc8f11e0e99f8cc97bd417665d92b40a9";
sha256 = "0zx6zvj5a6rr3w9s207rvpfw7gwssiqmp1p3c75bsirmz4nmsdf0";
rev = "a8f6c841ccfe59ca8c68aad64df170b64042dce8";
sha256 = "1i3c9wmpabpmx2wfbcyabmwfa66vz92iq5dlbm89v5mvgavz7bws";
};
buildInputs = [ acl curl xz zstd ]

View File

@ -1,23 +1,20 @@
{ stdenv, fetchFromGitHub, zlib }:
{ stdenv, fetchFromGitHub, cmake, zlib }:
stdenv.mkDerivation rec {
pname = "megahit";
version = "1.1.4";
version = "1.2.9";
src = fetchFromGitHub {
owner = "voutcn";
repo = "megahit";
rev = "v${version}";
sha256 = "011k0776w76l03zmy70kfd3y9zjmdnspfbs9fcxmnl3bdwd36kcw";
sha256 = "1r5d9nkdmgjsbrpj43q9hy3s8jwsabaz3ji561v18hy47v58923c";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib ];
installPhase = ''
for bin in megahit_sdbg_build megahit megahit_asm_core megahit_toolkit; do
install -vD $bin $out/bin/$bin
done
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "An ultra-fast single-node solution for large and complex metagenomics assembly via succinct de Bruijn graph";

View File

@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "07v9v9s41lvw72wpb1jgh2nzanyc994779bd35p76vg8mzifmprl";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib ];
enableParallelBuilding = true;

View File

@ -14,7 +14,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib python2 ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ];
NIX_CFLAGS_COMPILE = [
"-Wno-error=maybe-uninitialized"
"-Wno-error=pessimizing-move"
];
preConfigure = ''
sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py

View File

@ -1,45 +0,0 @@
diff -aur minisat/core/SolverTypes.h minisat.clang/core/SolverTypes.h
--- minisat/core/SolverTypes.h 2010-07-10 18:07:36.000000000 +0200
+++ minisat.clang/core/SolverTypes.h 2016-05-13 12:14:50.759671959 +0200
@@ -47,7 +47,7 @@
int x;
// Use this as a constructor:
- friend Lit mkLit(Var var, bool sign = false);
+ //friend Lit mkLit(Var var, bool sign = false);
bool operator == (Lit p) const { return x == p.x; }
bool operator != (Lit p) const { return x != p.x; }
@@ -55,7 +55,7 @@
};
-inline Lit mkLit (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; }
+inline Lit mkLit (Var var, bool sign = false) { Lit p; p.x = var + var + (int)sign; return p; }
inline Lit operator ~(Lit p) { Lit q; q.x = p.x ^ 1; return q; }
inline Lit operator ^(Lit p, bool b) { Lit q; q.x = p.x ^ (unsigned int)b; return q; }
inline bool sign (Lit p) { return p.x & 1; }
diff -aur minisat/utils/Options.h minisat.clang/utils/Options.h
--- minisat/utils/Options.h 2010-07-10 18:07:36.000000000 +0200
+++ minisat.clang/utils/Options.h 2016-05-13 12:14:50.759671959 +0200
@@ -282,15 +282,15 @@
if (range.begin == INT64_MIN)
fprintf(stderr, "imin");
else
- fprintf(stderr, "%4"PRIi64, range.begin);
+ fprintf(stderr, "%4" PRIi64, range.begin);
fprintf(stderr, " .. ");
if (range.end == INT64_MAX)
fprintf(stderr, "imax");
else
- fprintf(stderr, "%4"PRIi64, range.end);
+ fprintf(stderr, "%4" PRIi64, range.end);
- fprintf(stderr, "] (default: %"PRIi64")\n", value);
+ fprintf(stderr, "] (default: %" PRIi64 ")\n", value);
if (verbose){
fprintf(stderr, "\n %s\n", description);
fprintf(stderr, "\n");
Only in minisat.clang/utils: Options.o
Only in minisat.clang/utils: System.o

View File

@ -1,26 +0,0 @@
https://github.com/fasterthanlime/homebrew-mingw/blob/master/Library/Formula/minisat.rb
diff --git a/utils/System.cc b/utils/System.cc
index a7cf53f..feeaf3c 100644
--- a/utils/System.cc
+++ b/utils/System.cc
@@ -78,16 +78,17 @@ double Minisat::memUsed(void) {
struct rusage ru;
getrusage(RUSAGE_SELF, &ru);
return (double)ru.ru_maxrss / 1024; }
-double MiniSat::memUsedPeak(void) { return memUsed(); }
+double Minisat::memUsedPeak(void) { return memUsed(); }
#elif defined(__APPLE__)
#include <malloc/malloc.h>
-double Minisat::memUsed(void) {
+double Minisat::memUsed() {
malloc_statistics_t t;
malloc_zone_statistics(NULL, &t);
return (double)t.max_size_in_use / (1024*1024); }
+double Minisat::memUsedPeak() { return memUsed(); }
#else
double Minisat::memUsed() {

View File

@ -1,27 +1,19 @@
{ stdenv, fetchurl, zlib }:
{ stdenv, fetchFromGitHub, cmake, zlib }:
stdenv.mkDerivation rec {
pname = "minisat";
version = "2.2.0";
version = "2.2.1";
src = fetchurl {
url = "http://minisat.se/downloads/${pname}-${version}.tar.gz";
sha256 = "023qdnsb6i18yrrawlhckm47q8x0sl7chpvvw3gssfyw3j2pv5cj";
src = fetchFromGitHub {
owner = "stp";
repo = pname;
rev = "releases/${version}";
sha256 = "14vcbjnlia00lpyv2fhbmw3wbc9bk9h7bln9zpyc3nwiz5cbjz4a";
};
patches =
[ ./darwin.patch ]
++ stdenv.lib.optionals stdenv.cc.isClang [ ./clang.diff ];
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib ];
preBuild = "cd simp";
makeFlags = [ "r" "MROOT=.." ];
installPhase = ''
mkdir -p $out/bin
cp minisat_release $out/bin/minisat
'';
meta = with stdenv.lib; {
description = "Compact and readable SAT solver";
maintainers = with maintainers; [ gebner raskin ];

View File

@ -1,23 +0,0 @@
{ stdenv, fetchFromGitHub, zlib, cmake }:
stdenv.mkDerivation {
name = "minisat-unstable-2013-09-25";
src = fetchFromGitHub {
owner = "niklasso";
repo = "minisat";
rev = "37dc6c67e2af26379d88ce349eb9c4c6160e8543";
sha256 = "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq";
};
buildInputs = [ zlib ];
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
description = "Compact and readable SAT solver";
maintainers = with maintainers; [ mic92 ];
platforms = platforms.unix;
license = licenses.mit;
homepage = http://minisat.se/;
};
}

View File

@ -1,4 +1,5 @@
{ stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl, python3, python3Packages, zlib, minisatUnstable, cryptominisat }:
{ stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl
, python3, python3Packages, zlib, minisat, cryptominisat }:
stdenv.mkDerivation rec {
pname = "stp";
@ -11,7 +12,7 @@ stdenv.mkDerivation rec {
sha256 = "1yg2v4wmswh1sigk47drwsxyayr472mf4i47lqmlcgn9hhbx1q87";
};
buildInputs = [ boost zlib minisatUnstable cryptominisat python3 ];
buildInputs = [ boost zlib minisat cryptominisat python3 ];
nativeBuildInputs = [ cmake bison flex perl ];
preConfigure = ''
python_install_dir=$out/${python3Packages.python.sitePackages}

View File

@ -1,4 +1,4 @@
{ mkDerivation, lib, fetchFromGitHub, cmake, boost, ceres-solver, eigen,
{ mkDerivation, lib, fetchpatch, fetchFromGitHub, cmake, boost, ceres-solver, eigen,
freeimage, glog, libGLU, glew, qtbase,
cudaSupport ? false, cudatoolkit ? null }:
@ -16,6 +16,13 @@ mkDerivation rec {
sha256 = "1vnb62p0y2bnga173wmjs0lnyqdjikv0fkcxjzxm8187khk2lly8";
};
patches = [
(fetchpatch {
url = "https://github.com/colmap/colmap/commit/6af3d8b0048cecc3b9fc6f4e78c3214dd038180b.patch";
sha256 = "1zv5girmv4hv78w1xn131v8njwhpbyylc1m15731lnhrs8bri0jq";
})
];
buildInputs = [
boost_static ceres-solver eigen
freeimage glog libGLU glew qtbase

View File

@ -2,19 +2,20 @@
stdenv.mkDerivation rec {
pname = "xfitter";
version = "2.0.0";
version = "2.0.1";
src = fetchurl {
name = "${pname}-${version}.tgz";
url = "https://www.xfitter.org/xFitter/xFitter/DownloadPage?action=AttachFile&do=get&target=${pname}-${version}.tgz";
sha256 = "0j47s8laq3aqjlgp769yicvgyzqjb738a3rqss51d9fjrihi2515";
sha256 = "0kmgc67nw5flp92yw5x6l2vsnhwsfi5z2a20404anisdgdjs8zc6";
};
patches = [
./undefined_behavior.patch
];
CXXFLAGS = "-Werror=return-type";
# patch needs to updated due to version bump
#CXXFLAGS = "-Werror=return-type";
preConfigure =
# Fix F77LD to workaround for a following build error:

View File

@ -2,7 +2,7 @@
, pkgconfig, cmake, doxygen
, libopenshot-audio, imagemagick, ffmpeg
, swig, python3
, unittest-cpp, cppzmq, czmqpp
, unittest-cpp, cppzmq, zeromq
, qtbase, qtmultimedia }:
with stdenv.lib;
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
buildInputs =
[ imagemagick ffmpeg swig python3 unittest-cpp
cppzmq czmqpp qtbase qtmultimedia ];
cppzmq zeromq qtbase qtmultimedia ];
LIBOPENSHOT_AUDIO_DIR = libopenshot-audio;
"UNITTEST++_INCLUDE_DIR" = "${unittest-cpp}/include/UnitTest++";

View File

@ -46,9 +46,15 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
# igrone glib-2.62 deprecations
# Drop in next stable release.
NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
NIX_CFLAGS_COMPILE = [
# igrone glib-2.62 deprecations
# Drop in next stable release.
"-DGLIB_DISABLE_DEPRECATION_WARNINGS"
# fix build with gcc9
"-Wno-error=address-of-packed-member"
"-Wno-error=format-overflow"
];
postInstall = ''
wrapProgram "$out/etc/vmware-tools/scripts/vmware/network" \

View File

@ -1,17 +1,18 @@
{stdenv, fetchurl, pkgconfig, alsaLib, spice-protocol, glib,
libpciaccess, libxcb, libXrandr, libXinerama, libXfixes, dbus,
libpciaccess, libxcb, libXrandr, libXinerama, libXfixes, dbus, libdrm,
systemd}:
stdenv.mkDerivation rec {
name = "spice-vdagent-0.18.0";
name = "spice-vdagent-0.19.0";
src = fetchurl {
url = "https://www.spice-space.org/download/releases/${name}.tar.bz2";
sha256 = "1bmyvapwj1x0m6y8q0r1df2q37vsnb04qkgnnrfbnzf1qzipxvl0";
sha256 = "0r9gjx1vcgb4f7g85b1ib045kqa3dqjk12m7342i5y443ihpr9v3";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ];
postPatch = ''
substituteInPlace data/spice-vdagent.desktop --replace /usr $out
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ alsaLib spice-protocol glib
buildInputs = [ alsaLib spice-protocol glib libdrm
libpciaccess libxcb libXrandr libXinerama libXfixes
dbus systemd ] ;
meta = {

View File

@ -23,6 +23,16 @@ let
# guest-additions/default.nix as well.
main = "036x2mvkk22lbg72cz6pik9z538j1ag6mmwjjmfikgrq1i7v24jy";
version = "6.0.14";
iasl' = iasl.overrideAttrs (old: rec {
inherit (old) pname;
version = "20190108";
src = fetchurl {
url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
sha256 = "0bqhr3ndchvfhxb31147z8gd81dysyz5dwkvmp56832d0js2564q";
};
NIX_CFLAGS_COMPILE = old.NIX_CFLAGS_COMPILE ++ [ "-Wno-error=stringop-truncation" ];
});
in stdenv.mkDerivation {
pname = "virtualbox";
inherit version;
@ -41,7 +51,7 @@ in stdenv.mkDerivation {
dontWrapQtApps = true;
buildInputs =
[ iasl dev86 libxslt libxml2 xorgproto libX11 libXext libXcursor libIDL
[ iasl' dev86 libxslt libxml2 xorgproto libX11 libXext libXcursor libIDL
libcap glib lvm2 alsaLib curl libvpx pam makeself perl
libXmu libpng libopus python ]
++ optional javaBindings jdk

View File

@ -156,6 +156,10 @@ callPackage (import ./generic.nix (rec {
"-Wno-error=stringop-truncation"
"-Wno-error=format-truncation"
"-Wno-error=array-bounds"
# Fix build with GCC 9
"-Wno-error=address-of-packed-member"
"-Wno-error=format-overflow"
"-Wno-error=absolute-value"
];
postPatch = ''

View File

@ -175,6 +175,10 @@ callPackage (import ./generic.nix (rec {
"-Wno-error=stringop-truncation"
"-Wno-error=format-truncation"
"-Wno-error=array-bounds"
# Fix build with GCC9
"-Wno-error=address-of-packed-member"
"-Wno-error=format-overflow"
"-Wno-error=absolute-value"
];
postPatch = ''

View File

@ -3,6 +3,7 @@
, karchive, kconfig, kconfigwidgets, kio, frameworkintegration
, kguiaddons, ki18n, kwindowsystem, kdelibs4support, kiconthemes
, libpthreadstubs, pcre, libXdmcp, libX11, libXau # X11 dependencies
, fetchpatch
}:
let
@ -15,6 +16,13 @@ in mkDerivation {
sha256 = "169gdny1cdld0qnx3nqvx568zjzdba4pwp3gxapc1hdh2cymw7r8";
};
patches = [
(fetchpatch {
url = "https://github.com/KDE/qtcurve/commit/ee2228ea2f18ac5da9b434ee6089381df815aa94.patch";
sha256 = "1vz5frsrsps93awn84gk8d7injrqfcyhc1rji6s0gsgsp5z9sl34";
})
];
enableParallelBuilding = true;
nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig ];

View File

@ -71,6 +71,8 @@ stdenv.mkDerivation rec {
systemd
];
NIX_CFLAGS_COMPILE = [ "-Wno-error=return-type" ];
configureFlags = [ "--enable-locking" "--with-systemd=yes" ];
enableParallelBuilding = true;

View File

@ -4,13 +4,13 @@ with builtins;
stdenv.mkDerivation rec {
pname = "arachne-pnr";
version = "2018.09.09";
version = "2019.07.29";
src = fetchFromGitHub {
owner = "yosyshq";
repo = "arachne-pnr";
rev = "840bdfdeb38809f9f6af4d89dd7b22959b176fdd";
sha256 = "1dqvjvgvsridybishv4pnigw9gypxh7r7nrqp9z9qq92v7c5rxzl";
rev = "c40fb2289952f4f120cc10a5a4c82a6fb88442dc";
sha256 = "0lg9rccr486cvips3jf289af2b4a2j9chc8iqnkhykgi1hw4pszc";
};
enableParallelBuilding = true;

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "iasl";
version = "20190108";
version = "20191213";
src = fetchurl {
url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
sha256 = "0bqhr3ndchvfhxb31147z8gd81dysyz5dwkvmp56832d0js2564q";
sha256 = "1ip684is3dplf7snkn024vv6bg3dv5msx8v7pz6x9lrnk3gk0j9h";
};
NIX_CFLAGS_COMPILE = "-O3";

View File

@ -0,0 +1,63 @@
From 7225c7754cc3431d05df367c60f309f27586f188 Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Mon, 30 Dec 2019 01:42:52 +0100
Subject: [PATCH] Fix compilation w/gcc9
Build broken with the following errors:
```
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6078:55: error: lambda parameter 'CGF' previously declared as a capture
clang> 6078 | &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
clang> | ~~~~~~~~~~~~~~~~~^~~
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6126:53: error: lambda parameter 'CGF' previously declared as a capture
clang> 6126 | &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
clang> | ~~~~~~~~~~~~~~~~~^~~
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6191:56: error: lambda parameter 'CGF' previously declared as a capture
clang> 6191 | auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
clang> | ~~~~~~~~~~~~~~~~~^~~
```
This was due to a bug about name-collisions fixed in GCC 9.0[1].
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2211
---
lib/CodeGen/CGOpenMPRuntime.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp
index 6a0edbe..96c281c 100644
--- a/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -6073,7 +6073,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(CodeGenFunction &CGF,
// Generate the code for the opening of the data environment. Capture all the
// arguments of the runtime call by reference because they are used in the
// closing of the region.
- auto &&BeginThenGen = [&D, &CGF, &BasePointersArray, &PointersArray,
+ auto &&BeginThenGen = [&D, &BasePointersArray, &PointersArray,
&SizesArray, &MapTypesArray, Device,
&NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
// Fill up the arrays with all the mapped variables.
@@ -6121,7 +6121,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(CodeGenFunction &CGF,
};
// Generate code for the closing of the data region.
- auto &&EndThenGen = [&CGF, &BasePointersArray, &PointersArray, &SizesArray,
+ auto &&EndThenGen = [&BasePointersArray, &PointersArray, &SizesArray,
&MapTypesArray, Device,
&NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
assert(BasePointersArray && PointersArray && SizesArray && MapTypesArray &&
@@ -6188,7 +6188,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall(
"Expecting either target enter, exit data, or update directives.");
// Generate the code for the opening of the data environment.
- auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
+ auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) {
// Fill up the arrays with all the mapped variables.
MappableExprsHandler::MapValuesArrayTy BasePointers;
MappableExprsHandler::MapValuesArrayTy Pointers;
--
2.23.1

View File

@ -27,7 +27,10 @@ let
(stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}") ++
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include");
patches = [ ./purity.patch ];
patches = [
./purity.patch
./0001-Fix-compilation-w-gcc9.patch
];
postPatch = ''
sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp

View File

@ -0,0 +1,59 @@
From a2af0b02eba35d0670e3e442ff7c61b3e2304edd Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Mon, 30 Dec 2019 02:11:35 +0100
Subject: [PATCH] Fix compilation w/gcc9
Build broken with the following errors:
```
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6275:24: error: lambda parameter 'CGF' previously declared as a capture
clang> 6275 | CodeGenFunction &CGF, PrePostActionTy &) {
clang> | ~~~~~~~~~~~~~~~~~^~~
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6321:62: error: lambda parameter 'CGF' previously declared as a capture
clang> 6321 | auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF,
clang> | ~~~~~~~~~~~~~~~~~^~~
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6400:56: error: lambda parameter 'CGF' previously declared as a capture
clang> 6400 | auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
clang> | ~~~~~~~~~~~~~~~~~^~~
```
---
lib/CodeGen/CGOpenMPRuntime.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp
index 4025217..40a73ef 100644
--- a/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -6271,7 +6271,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(
// Generate the code for the opening of the data environment. Capture all the
// arguments of the runtime call by reference because they are used in the
// closing of the region.
- auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction](
+ auto &&BeginThenGen = [&D, Device, &Info, &CodeGen, &NoPrivAction](
CodeGenFunction &CGF, PrePostActionTy &) {
// Fill up the arrays with all the mapped variables.
MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
@@ -6318,7 +6318,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(
};
// Generate code for the closing of the data region.
- auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF,
+ auto &&EndThenGen = [Device, &Info](CodeGenFunction &CGF,
PrePostActionTy &) {
assert(Info.isValid() && "Invalid data environment closing arguments.");
@@ -6397,7 +6397,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall(
"Expecting either target enter, exit data, or update directives.");
// Generate the code for the opening of the data environment.
- auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
+ auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) {
// Fill up the arrays with all the mapped variables.
MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
MappableExprsHandler::MapValuesArrayTy Pointers;
--
2.23.1

View File

@ -38,7 +38,10 @@ let
++ stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}"
++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include";
patches = [ ./purity.patch ];
patches = [
./purity.patch
./0001-Fix-compilation-w-gcc9.patch
];
postPatch = ''
sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp

View File

@ -0,0 +1,33 @@
diff --git a/lib/Target/Mips/MipsFastISel.cpp b/lib/Target/Mips/MipsFastISel.cpp
index f79cb0e6..c6279046 100644
--- a/lib/Target/Mips/MipsFastISel.cpp
+++ b/lib/Target/Mips/MipsFastISel.cpp
@@ -32,6 +32,7 @@
#include "llvm/MC/MCSymbol.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Support/Debug.h"
+#include <array>
#define DEBUG_TYPE "mips-fastisel"
@@ -1268,13 +1269,13 @@ bool MipsFastISel::fastLowerArguments() {
return false;
}
- const ArrayRef<MCPhysReg> GPR32ArgRegs = {Mips::A0, Mips::A1, Mips::A2,
- Mips::A3};
- const ArrayRef<MCPhysReg> FGR32ArgRegs = {Mips::F12, Mips::F14};
- const ArrayRef<MCPhysReg> AFGR64ArgRegs = {Mips::D6, Mips::D7};
- ArrayRef<MCPhysReg>::iterator NextGPR32 = GPR32ArgRegs.begin();
- ArrayRef<MCPhysReg>::iterator NextFGR32 = FGR32ArgRegs.begin();
- ArrayRef<MCPhysReg>::iterator NextAFGR64 = AFGR64ArgRegs.begin();
+ std::array<MCPhysReg, 4> GPR32ArgRegs = {{Mips::A0, Mips::A1, Mips::A2,
+ Mips::A3}};
+ std::array<MCPhysReg, 2> FGR32ArgRegs = {{Mips::F12, Mips::F14}};
+ std::array<MCPhysReg, 2> AFGR64ArgRegs = {{Mips::D6, Mips::D7}};
+ auto NextGPR32 = GPR32ArgRegs.begin();
+ auto NextFGR32 = FGR32ArgRegs.begin();
+ auto NextAFGR64 = AFGR64ArgRegs.begin();
struct AllocatedReg {
const TargetRegisterClass *RC;

View File

@ -53,6 +53,13 @@ stdenv.mkDerivation ({
url = "https://bugzilla.redhat.com/attachment.cgi?id=1389687";
sha256 = "0ga2123aclq3x9w72d0rm0az12m8c1i4r1106vh701hf4cghgbch";
})
./fix-gcc9.patch
(fetchpatch {
name = "llvm4-avoid-undefined-behavior-in-unittest.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/D32089-Avoid-undefined-behavior-in-unittest.patch?h=llvm40&id=f459b0bad8aa3b94bc2733d79d176071a32846a6";
sha256 = "0x5q6a8lk6xg4ns4qh75fxvvmfnifwvyrq17ck85q8c0753i1irf";
extraPrefix = "";
})
];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks

View File

@ -0,0 +1,33 @@
diff --git a/lib/Target/Mips/MipsFastISel.cpp b/lib/Target/Mips/MipsFastISel.cpp
index f79cb0e6..c6279046 100644
--- a/lib/Target/Mips/MipsFastISel.cpp
+++ b/lib/Target/Mips/MipsFastISel.cpp
@@ -70,6 +70,7 @@
#include <cassert>
#include <cstdint>
#include <new>
+#include <array>
#define DEBUG_TYPE "mips-fastisel"
@@ -1309,13 +1310,13 @@ bool MipsFastISel::fastLowerArguments() {
return false;
}
- const ArrayRef<MCPhysReg> GPR32ArgRegs = {Mips::A0, Mips::A1, Mips::A2,
- Mips::A3};
- const ArrayRef<MCPhysReg> FGR32ArgRegs = {Mips::F12, Mips::F14};
- const ArrayRef<MCPhysReg> AFGR64ArgRegs = {Mips::D6, Mips::D7};
- ArrayRef<MCPhysReg>::iterator NextGPR32 = GPR32ArgRegs.begin();
- ArrayRef<MCPhysReg>::iterator NextFGR32 = FGR32ArgRegs.begin();
- ArrayRef<MCPhysReg>::iterator NextAFGR64 = AFGR64ArgRegs.begin();
+ std::array<MCPhysReg, 4> GPR32ArgRegs = {{Mips::A0, Mips::A1, Mips::A2,
+ Mips::A3}};
+ std::array<MCPhysReg, 2> FGR32ArgRegs = {{Mips::F12, Mips::F14}};
+ std::array<MCPhysReg, 2> AFGR64ArgRegs = {{Mips::D6, Mips::D7}};
+ auto NextGPR32 = GPR32ArgRegs.begin();
+ auto NextFGR32 = FGR32ArgRegs.begin();
+ auto NextAFGR64 = AFGR64ArgRegs.begin();
struct AllocatedReg {
const TargetRegisterClass *RC;

View File

@ -50,6 +50,13 @@ stdenv.mkDerivation ({
name = "llvm-gcc8-type-mismatch.patch";
sha256 = "0ga2123aclq3x9w72d0rm0az12m8c1i4r1106vh701hf4cghgbch";
})
./fix-gcc9.patch
#(fetchpatch {
# name = "llvm-fix-gcc9.patch";
# url = "https://reviews.llvm.org/file/data/zs3ck5ryvc5n672fd2kw/PHID-FILE-byoqefzwmkd7qnlip4v2/file";
# sha256 = "0injj1hqgrbcbihhwp2nbal88jfykad30r54f2cdcx7gws2fcy8i";
# stripLen = 1;
#})
];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/AddLLVM.cmake \

View File

@ -54,6 +54,8 @@ stdenv.mkDerivation ( rec {
checkTarget = "test-ci";
NIX_CFLAGS_COMPILE = [ "-Wno-error=redundant-move" ];
preCheck = ''
export PONYPATH="$out/lib:${stdenv.lib.makeLibraryPath [ pcre2 libressl ]}"
'';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, alsaLib, AudioUnit, CoreServices }:
{ stdenv, lib, fetchurl, fetchpatch, alsaLib, AudioUnit, CoreServices }:
let
@ -25,6 +25,9 @@ stdenv.mkDerivation rec {
sha256 = "0rb927zknk9kmhprd8rdr4azql4gn2dp75a36iazx2xhkbqhvind";
};
# fix build with gcc9
NIX_CFLAGS_LINK = lib.optional (stdenv.system == "i686-linux") "-lgcc";
patches = [
./gcc-6.patch
./CVE-2015-7747.patch

View File

@ -42,6 +42,9 @@ stdenv.mkDerivation rec {
] ++ lib.optional (apis != ["*"])
"-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";
# fix build with gcc9, can be removed after bumping to current version
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
preConfigure =
''
rm aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "1cxx243wyzkd4xnvpyqf97n0rjhfckpvw1vhwnbwshq3q6fra909";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-truncation" ];
meta = {
inherit version;
description = "Utilities library for Linphone";

View File

@ -1,24 +0,0 @@
{ stdenv, fetchurl, openssl, pkgconfig, libgcrypt, commoncpp2 }:
stdenv.mkDerivation {
name = "ccrtp-1.8.0";
src = fetchurl {
url = mirror://gnu/ccrtp/ccrtp-1.8.0.tar.gz;
sha256 = "0wr4dandlfajhmg90nqyvwv61ikn9vdycji001310y3c4zfysprn";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl libgcrypt commoncpp2 ];
patches = [ ./gcc-4.6-fix.patch ];
meta = {
description = "GNU ccRTP is an implementation of RTP, the real-time transport protocol from the IETF";
homepage = https://www.gnu.org/software/ccrtp/;
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.marcweber ];
platforms = stdenv.lib.platforms.linux;
broken = true; # fails to compile with libgcrypt >= 1.6
};
}

View File

@ -1,20 +0,0 @@
diff -ubr ccrtp-1.8.0-orig/src/ccrtp/sources.h ccrtp-1.8.0/src/ccrtp/sources.h
--- ccrtp-1.8.0-orig/src/ccrtp/sources.h 2010-04-18 20:51:49.000000000 +0200
+++ ccrtp-1.8.0/src/ccrtp/sources.h 2012-07-07 11:42:50.961179016 +0200
@@ -45,6 +45,7 @@
#define CCXX_RTP_SOURCES_H_
#include <string>
+#include <cstddef>
#include <ccrtp/rtcppkt.h>
#ifdef CCXX_NAMESPACES
@@ -406,7 +407,7 @@
public:
typedef std::forward_iterator_tag iterator_category;
typedef Participant value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef const Participant* pointer;
typedef const Participant& reference;

View File

@ -1,38 +0,0 @@
{ fetchurl, stdenv }:
stdenv.mkDerivation rec {
name = "commoncpp2-1.8.1";
src = fetchurl {
url = "mirror://gnu/commoncpp/${name}.tar.gz";
sha256 = "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk";
};
doCheck = true;
preBuild = ''
echo '#include <sys/stat.h>' >> inc/cc++/config.h
'';
meta = {
description = "GNU Common C++, a portable, highly optimized C++ class framework";
longDescription =
'' GNU Common C++ and GNU uCommon are very portable and highly
optimized class framework for writing C++ applications that need to
use threads and support concurrent sychronization, and that use
sockets, XML parsing, object serialization, thread-optimized String
and data structure classes, etc. This framework offers a class
foundation that hides platform differences from your C++ application
so that you need not write platform specific code. GNU Common C++
has been ported to compile nativily on most platforms which support
either posix threads, or on maybe be used with Debian hosted mingw32
to build native threading applications for Microsoft Windows.
'';
homepage = https://www.gnu.org/software/commoncpp/;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.marcweber ];
platforms = with stdenv.lib.platforms; linux;
};
}

View File

@ -1,26 +0,0 @@
{ stdenv, fetchurl, zeromq }:
stdenv.mkDerivation rec {
version = "3.0.2";
pname = "czmq";
src = fetchurl {
url = "http://download.zeromq.org/${pname}-${version}.tar.gz";
sha256 = "16k9awrhdsymx7dnmvqcnkaq8lz8x8zppy6sh7ls8prpd6mkkjlb";
};
patches = [ ./czmq3-gcc7.patch ];
# Fix build on Glibc 2.24.
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
# Needs to be propagated for the .pc file to work
propagatedBuildInputs = [ zeromq ];
meta = with stdenv.lib; {
homepage = http://czmq.zeromq.org/;
description = "High-level C Binding for ZeroMQ";
license = licenses.mpl20;
platforms = platforms.all;
};
}

View File

@ -1,26 +0,0 @@
diff --git a/src/zgossip_engine.inc b/src/zgossip_engine.inc
index 37dbb4eb..727aaa9b 100644
--- a/src/zgossip_engine.inc
+++ b/src/zgossip_engine.inc
@@ -258,7 +258,7 @@ engine_set_log_prefix (client_t *client, const char *string)
{
if (client) {
s_client_t *self = (s_client_t *) client;
- snprintf (self->log_prefix, sizeof (self->log_prefix) - 1,
+ snprintf (self->log_prefix, sizeof (self->log_prefix),
"%6d:%-33s", self->unique_id, string);
}
}
diff --git a/src/zsys.c b/src/zsys.c
index 4d0bb8a1..f07db9c8 100644
--- a/src/zsys.c
+++ b/src/zsys.c
@@ -1071,7 +1071,7 @@ zsys_run_as (const char *lockfile, const char *group, const char *user)
}
}
// We record the current process id in the lock file
- char pid_buffer [10];
+ char pid_buffer [32];
snprintf (pid_buffer, sizeof (pid_buffer), "%6d\n", getpid ());
if (write (handle, pid_buffer, strlen (pid_buffer)) != strlen (pid_buffer)) {
zsys_error ("cannot write to lockfile: %s", strerror (errno));

View File

@ -1,28 +0,0 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, czmq }:
stdenv.mkDerivation rec {
pname = "czmqpp";
version = "1.2.0";
src = fetchFromGitHub {
owner = "zeromq";
repo = "czmqpp";
rev = "v${version}";
sha256 = "0z8lwq53yk4h7pgibicx3q9idz15qb95r0pjpz0j5vql6qh46rja";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
propagatedBuildInputs = [ czmq ];
# https://github.com/zeromq/czmqpp/issues/42
patches = [ ./socket.patch ];
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "C++ wrapper for czmq. Aims to be minimal, simple and consistent";
license = licenses.lgpl3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ chris-martin ];
};
}

View File

@ -1,17 +0,0 @@
--- /src/socket.cpp
+++ /src/socket.cpp
@@ -60,12 +60,12 @@
int socket::bind(const std::string& address)
{
// format-security: format not a string literal and no format arguments.
- return zsocket_bind(self_, address.c_str());
+ return zsocket_bind(self_, "%s", address.c_str());
}
int socket::connect(const std::string& address)
{
// format-security: format not a string literal and no format arguments.
- return zsocket_connect(self_, address.c_str());
+ return zsocket_connect(self_, "%s", address.c_str());
}
bool operator==(const socket& sock_a, const socket& sock_b)

View File

@ -1,31 +0,0 @@
{ stdenv, fetchurl, doxygen }:
stdenv.mkDerivation rec {
version = "1.0.2";
pname = "dirac";
src = fetchurl {
url = "mirror://sourceforge/dirac/${pname}-${version}.tar.gz";
sha256 = "1z803yzp17cj69wn11iyb13swqdd9xdzr58dsk6ghpr3ipqicsw1";
};
buildInputs = [ doxygen ];
enableParallelBuilding = true;
patches = [ ./dirac-1.0.2.patch ];
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
postInstall = ''
# keep only necessary binaries
find $out/bin \( -name '*RGB*' -or -name '*YUV*' -or -name create_dirac_testfile.pl \) -delete
'';
meta = with stdenv.lib; {
homepage = https://sourceforge.net/projects/dirac;
description = "A general-purpose video codec based on wavelets";
platforms = platforms.linux;
license = with licenses; [ mpl11 gpl2 lgpl21 ];
maintainers = [ maintainers.igsha ];
};
}

View File

@ -1,362 +0,0 @@
diff -aur dirac-1.0.2/libdirac_byteio/parseunit_byteio.cpp dirac-1.0.2-modif/libdirac_byteio/parseunit_byteio.cpp
--- dirac-1.0.2/libdirac_byteio/parseunit_byteio.cpp 2008-05-02 09:57:19.000000000 +0400
+++ dirac-1.0.2-modif/libdirac_byteio/parseunit_byteio.cpp 2016-02-10 19:39:09.838443767 +0300
@@ -124,12 +124,9 @@
if(prefix==PU_PREFIX)
{
- unsigned char next_parse_code;
-
- next_parse_code = InputUnByte();
+ (void)InputUnByte();
// input next unit parse-offsets
- int next_unit_next_parse_offset;
- next_unit_next_parse_offset = ReadUintLit(PU_NEXT_PARSE_OFFSET_SIZE);
+ (void)ReadUintLit(PU_NEXT_PARSE_OFFSET_SIZE);
int next_unit_previous_parse_offset;
next_unit_previous_parse_offset = ReadUintLit(PU_PREVIOUS_PARSE_OFFSET_SIZE);
diff -aur dirac-1.0.2/libdirac_common/mot_comp.cpp dirac-1.0.2-modif/libdirac_common/mot_comp.cpp
--- dirac-1.0.2/libdirac_common/mot_comp.cpp 2008-10-01 05:26:47.000000000 +0400
+++ dirac-1.0.2-modif/libdirac_common/mot_comp.cpp 2016-02-10 19:50:18.453051800 +0300
@@ -1064,10 +1064,10 @@
// We're doing bounds checking because we'll fall off the edge of the reference otherwise.
//weights for doing linear interpolation, calculated from the remainder values
- const ValueType linear_wts[4] = { (2 - rmdr.x) * (2 - rmdr.y), //tl
- rmdr.x * (2 - rmdr.y), //tr
- (2 - rmdr.x) * rmdr.y, //bl
- rmdr.x * rmdr.y }; //br
+ const ValueType linear_wts[4] = { ValueType((2 - rmdr.x) * (2 - rmdr.y)), //tl
+ ValueType(rmdr.x * (2 - rmdr.y)), //tr
+ ValueType((2 - rmdr.x) * rmdr.y), //bl
+ ValueType(rmdr.x * rmdr.y) }; //br
for(int c = 0, uY = ref_start.y,BuY=BChk(uY,trueRefYlen),BuY1=BChk(uY+1,trueRefYlen);
@@ -1116,10 +1116,10 @@
const ImageCoords ref_start( ( start_pos.x<<1 ) + roundvec.x ,( start_pos.y<<1 ) + roundvec.y );
//weights for doing linear interpolation, calculated from the remainder values
- const ValueType linear_wts[4] = { (4 - rmdr.x) * (4 - rmdr.y), //tl
- rmdr.x * (4 - rmdr.y), //tr
- (4 - rmdr.x) * rmdr.y, //bl
- rmdr.x * rmdr.y }; //br
+ const ValueType linear_wts[4] = { ValueType((4 - rmdr.x) * (4 - rmdr.y)), //tl
+ ValueType(rmdr.x * (4 - rmdr.y)), //tr
+ ValueType((4 - rmdr.x) * rmdr.y), //bl
+ ValueType(rmdr.x * rmdr.y) }; //br
//An additional stage to make sure the block to be copied does not fall outside
//the reference image.
diff -aur dirac-1.0.2/libdirac_common/mot_comp_mmx.cpp dirac-1.0.2-modif/libdirac_common/mot_comp_mmx.cpp
--- dirac-1.0.2/libdirac_common/mot_comp_mmx.cpp 2008-01-09 13:50:23.000000000 +0300
+++ dirac-1.0.2-modif/libdirac_common/mot_comp_mmx.cpp 2016-02-10 19:59:51.792793538 +0300
@@ -244,10 +244,10 @@
// We're 2doing bounds checking because we'll fall off the edge of the reference otherwise.
//weights for doing linear interpolation, calculated from the remainder values
- const ValueType linear_wts[4] = { (2 - rmdr.x) * (2 - rmdr.y), //tl
- rmdr.x * (2 - rmdr.y), //tr
- (2 - rmdr.x) * rmdr.y, //bl
- rmdr.x * rmdr.y }; //br
+ const ValueType linear_wts[4] = { ValueType((2 - rmdr.x) * (2 - rmdr.y)), //tl
+ ValueType(rmdr.x * (2 - rmdr.y)), //tr
+ ValueType((2 - rmdr.x) * rmdr.y), //bl
+ ValueType(rmdr.x * rmdr.y) }; //br
ValueType act_cols1[4], act_cols2[4];
int uX, uY, c, l;
diff -aur dirac-1.0.2/libdirac_common/mv_codec.cpp dirac-1.0.2-modif/libdirac_common/mv_codec.cpp
--- dirac-1.0.2/libdirac_common/mv_codec.cpp 2008-10-01 05:26:47.000000000 +0400
+++ dirac-1.0.2-modif/libdirac_common/mv_codec.cpp 2016-02-10 19:51:57.634838245 +0300
@@ -159,7 +159,7 @@
// Main code function
void PredModeCodec::DoWorkCode( MvData& in_data )
{
- int step,max;
+ int step;
int split_depth;
for (m_sb_yp = 0, m_sb_tlb_y = 0; m_sb_yp < in_data.SBSplit().LengthY(); ++m_sb_yp, m_sb_tlb_y += 4)
@@ -169,7 +169,7 @@
split_depth = in_data.SBSplit()[m_sb_yp][m_sb_xp];
step = 4 >> (split_depth);
- max = (1 << split_depth);
+ //max = (1 << split_depth);
//now do all the block modes and mvs in the mb
for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp += step)
@@ -334,7 +334,7 @@
// Main code function
void VectorElementCodec::DoWorkCode( MvData& in_data )
{
- int step,max;
+ int step;
int split_depth;
for (m_sb_yp = 0, m_sb_tlb_y = 0; m_sb_yp < in_data.SBSplit().LengthY(); ++m_sb_yp, m_sb_tlb_y += 4)
@@ -344,7 +344,7 @@
split_depth = in_data.SBSplit()[m_sb_yp][m_sb_xp];
step = 4 >> (split_depth);
- max = (1 << split_depth);
+ //max = (1 << split_depth);
//now do all the block modes and mvs in the mb
for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp += step)
@@ -500,7 +500,7 @@
// Main code function
void DCCodec::DoWorkCode( MvData& in_data )
{
- int step,max;
+ int step;
int split_depth;
for (m_sb_yp = 0, m_sb_tlb_y = 0; m_sb_yp < in_data.SBSplit().LengthY(); ++m_sb_yp, m_sb_tlb_y += 4)
@@ -510,7 +510,7 @@
split_depth = in_data.SBSplit()[m_sb_yp][m_sb_xp];
step = 4 >> (split_depth);
- max = (1 << split_depth);
+ //max = (1 << split_depth);
//now do all the block modes and mvs in the mb
for (m_b_yp = m_sb_tlb_y; m_b_yp < m_sb_tlb_y+4; m_b_yp += step)
diff -aur dirac-1.0.2/libdirac_common/wavelet_utils.cpp dirac-1.0.2-modif/libdirac_common/wavelet_utils.cpp
--- dirac-1.0.2/libdirac_common/wavelet_utils.cpp 2008-10-20 08:21:02.000000000 +0400
+++ dirac-1.0.2-modif/libdirac_common/wavelet_utils.cpp 2016-02-10 19:58:16.205006445 +0300
@@ -198,7 +198,6 @@
const bool field_coding = encparams.FieldCoding();
const ChromaFormat cformat = pparams.CFormat();
const float cpd = encparams.CPD()*cpd_scale_factor;
- const PictureSort psort = pparams.PicSort();
int xlen, ylen, xl, yl, xp, yp;
float xfreq, yfreq;
diff -aur dirac-1.0.2/libdirac_encoder/picture_compress.cpp dirac-1.0.2-modif/libdirac_encoder/picture_compress.cpp
--- dirac-1.0.2/libdirac_encoder/picture_compress.cpp 2009-01-21 08:20:57.000000000 +0300
+++ dirac-1.0.2-modif/libdirac_encoder/picture_compress.cpp 2016-02-10 20:08:17.935731263 +0300
@@ -413,14 +413,12 @@
const int depth=m_encparams.TransformDepth();
- PicArray* comp_data[3];
CoeffArray* coeff_data[3];
OneDArray<unsigned int>* est_bits[3];
float lambda[3];
// Construction and definition of objects
for (int c=0;c<3;++c){
- comp_data[c] = &my_picture.Data((CompSort) c );
coeff_data[c] = &my_picture.WltData((CompSort) c );
est_bits[c] = new OneDArray<unsigned int>( Range( 1, 3*depth+1 ) );
}// c
diff -aur dirac-1.0.2/libdirac_encoder/quant_chooser.cpp dirac-1.0.2-modif/libdirac_encoder/quant_chooser.cpp
--- dirac-1.0.2/libdirac_encoder/quant_chooser.cpp 2009-01-21 08:22:05.000000000 +0300
+++ dirac-1.0.2-modif/libdirac_encoder/quant_chooser.cpp 2016-02-10 20:15:43.792954708 +0300
@@ -340,7 +340,7 @@
{
for (int i=cblock.Xstart(); i<cblock.Xend(); ++i )
{
- if ( (std::abs(m_coeff_data[j][i])<<2) >= u_threshold )
+ if ( (int(std::abs(m_coeff_data[j][i]))<<2) >= u_threshold )
can_skip = false;
}
}
@@ -349,13 +349,13 @@
CoeffType QuantChooser::BlockAbsMax( const Subband& node )
{
- int val( 0 );
+ CoeffType val( 0 );
for (int j=node.Yp() ; j<node.Yp()+node.Yl(); ++j)
{
for (int i=node.Xp() ; i<node.Xp()+node.Xl(); ++i)
{
- val = std::max( val , std::abs(m_coeff_data[j][i]) );
+ val = std::max( val , CoeffType(std::abs(m_coeff_data[j][i])) );
}// i
}// j
diff -aur dirac-1.0.2/libdirac_encoder/seq_compress.cpp dirac-1.0.2-modif/libdirac_encoder/seq_compress.cpp
--- dirac-1.0.2/libdirac_encoder/seq_compress.cpp 2008-10-29 05:42:06.000000000 +0300
+++ dirac-1.0.2-modif/libdirac_encoder/seq_compress.cpp 2016-02-10 20:16:24.108885403 +0300
@@ -663,7 +663,6 @@
int FrameSequenceCompressor::CodedToDisplay( const int cnum )
{
- int div;
if (m_L1_sep>0)
{
@@ -672,7 +671,6 @@
return 0;
else if ((cnum-1)% m_L1_sep==0)
{//we have L1 or subsequent I pictures
- div=(cnum-1)/m_L1_sep;
return cnum+m_L1_sep-1;
}
else//we have L2 pictures
diff -aur dirac-1.0.2/libdirac_motionest/me_utils.cpp dirac-1.0.2-modif/libdirac_motionest/me_utils.cpp
--- dirac-1.0.2/libdirac_motionest/me_utils.cpp 2008-10-21 08:55:46.000000000 +0400
+++ dirac-1.0.2-modif/libdirac_motionest/me_utils.cpp 2016-02-10 20:04:40.068175649 +0300
@@ -684,10 +684,10 @@
// We're doing bounds checking because we'll fall off the edge of the reference otherwise.
// weights for doing linear interpolation, calculated from the remainder values
- const ValueType linear_wts[4] = { (2 - rmdr.x) * (2 - rmdr.y), //tl
- rmdr.x * (2 - rmdr.y), //tr
- (2 - rmdr.x) * rmdr.y, //bl
- rmdr.x * rmdr.y }; //br
+ const ValueType linear_wts[4] = { ValueType((2 - rmdr.x) * (2 - rmdr.y)), //tl
+ ValueType(rmdr.x * (2 - rmdr.y)), //tr
+ ValueType((2 - rmdr.x) * rmdr.y), //bl
+ ValueType(rmdr.x * rmdr.y) }; //br
const int refXlen( m_ref_data.LengthX() );
const int refYlen( m_ref_data.LengthY() );
@@ -848,10 +848,10 @@
// We're doing bounds checking because we'll fall off the edge of the reference otherwise.
// weights for doing linear interpolation, calculated from the remainder values
- const ValueType linear_wts[4] = { (2 - rmdr.x) * (2 - rmdr.y), //tl
- rmdr.x * (2 - rmdr.y), //tr
- (2 - rmdr.x) * rmdr.y, //bl
- rmdr.x * rmdr.y }; //br
+ const ValueType linear_wts[4] = { ValueType((2 - rmdr.x) * (2 - rmdr.y)), //tl
+ ValueType(rmdr.x * (2 - rmdr.y)), //tr
+ ValueType((2 - rmdr.x) * rmdr.y), //bl
+ ValueType(rmdr.x * rmdr.y) }; //br
const int refXlen( m_ref_data.LengthX() );
const int refYlen( m_ref_data.LengthY() );
@@ -908,10 +908,10 @@
const int pic_next( m_pic_data.LengthX() - dparams.Xl() );// go down a row and back up
//weights for doing linear interpolation, calculated from the remainder values
- const ValueType linear_wts[4] = { (4 - rmdr.x) * (4 - rmdr.y), //tl
- rmdr.x * (4 - rmdr.y), //tr
- (4 - rmdr.x) * rmdr.y, //bl
- rmdr.x * rmdr.y }; //br
+ const ValueType linear_wts[4] = { ValueType((4 - rmdr.x) * (4 - rmdr.y)), //tl
+ ValueType(rmdr.x * (4 - rmdr.y)), //tr
+ ValueType((4 - rmdr.x) * rmdr.y), //bl
+ ValueType(rmdr.x * rmdr.y) }; //br
bool bounds_check( false );
@@ -1039,10 +1039,10 @@
const int pic_next( m_pic_data.LengthX() - dparams.Xl() );// go down a row and back up
//weights for doing linear interpolation, calculated from the remainder values
- const ValueType linear_wts[4] = { (4 - rmdr.x) * (4 - rmdr.y), //tl
- rmdr.x * (4 - rmdr.y), //tr
- (4 - rmdr.x) * rmdr.y, //bl
- rmdr.x * rmdr.y }; //br
+ const ValueType linear_wts[4] = { ValueType((4 - rmdr.x) * (4 - rmdr.y)), //tl
+ ValueType(rmdr.x * (4 - rmdr.y)), //tr
+ ValueType((4 - rmdr.x) * rmdr.y), //bl
+ ValueType(rmdr.x * rmdr.y) }; //br
bool bounds_check( false );
@@ -1403,10 +1403,10 @@
}
else
{
- const ValueType linear_wts[4] = { (2 - rmdr1.x) * (2 - rmdr1.y), //tl
- rmdr1.x * (2 - rmdr1.y), //tr
- (2 - rmdr1.x) * rmdr1.y, //bl
- rmdr1.x * rmdr1.y }; //br
+ const ValueType linear_wts[4] = { ValueType((2 - rmdr1.x) * (2 - rmdr1.y)), //tl
+ ValueType(rmdr1.x * (2 - rmdr1.y)), //tr
+ ValueType((2 - rmdr1.x) * rmdr1.y), //bl
+ ValueType(rmdr1.x * rmdr1.y) }; //br
// We're doing bounds checking because we'll fall off the edge of the reference otherwise.
for( int y=dparams.Yl(), ry=ref_start1.y, by=BChk(ry,m_ref_data1.LengthY()), by1=BChk(ry+1,m_ref_data1.LengthY());
@@ -1513,10 +1513,10 @@
}
else
{
- const ValueType linear_wts[4] = { (2 - rmdr2.x) * (2 - rmdr2.y), //tl
- rmdr2.x * (2 - rmdr2.y), //tr
- (2 - rmdr2.x) * rmdr2.y, //bl
- rmdr2.x * rmdr2.y }; //br
+ const ValueType linear_wts[4] = { ValueType((2 - rmdr2.x) * (2 - rmdr2.y)), //tl
+ ValueType(rmdr2.x * (2 - rmdr2.y)), //tr
+ ValueType((2 - rmdr2.x) * rmdr2.y), //bl
+ ValueType(rmdr2.x * rmdr2.y) }; //br
// We're doing bounds checking because we'll fall off the edge of the reference otherwise.
for( int y=dparams.Yl(), ry=ref_start2.y, by=BChk(ry,m_ref_data2.LengthY()),by1=BChk(ry+1,m_ref_data2.LengthY());
@@ -1564,14 +1564,14 @@
const MVector rmdr2( mv2.x & 3 , mv2.y & 3 );
//weights for doing linear interpolation, calculated from the remainder values
- const ValueType linear_wts1[4] = { (4 - rmdr1.x) * (4 - rmdr1.y), //tl
- rmdr1.x * (4 - rmdr1.y), //tr
- (4 - rmdr1.x) * rmdr1.y, //bl
- rmdr1.x * rmdr1.y }; //br
- const ValueType linear_wts2[4] = { (4 - rmdr2.x) * (4 - rmdr2.y), //tl
- rmdr2.x * (4 - rmdr2.y), //tr
- (4 - rmdr2.x) * rmdr2.y, //bl
- rmdr2.x * rmdr2.y }; //br
+ const ValueType linear_wts1[4] = { ValueType((4 - rmdr1.x) * (4 - rmdr1.y)), //tl
+ ValueType(rmdr1.x * (4 - rmdr1.y)), //tr
+ ValueType((4 - rmdr1.x) * rmdr1.y), //bl
+ ValueType(rmdr1.x * rmdr1.y) }; //br
+ const ValueType linear_wts2[4] = { ValueType((4 - rmdr2.x) * (4 - rmdr2.y)), //tl
+ ValueType(rmdr2.x * (4 - rmdr2.y)), //tr
+ ValueType((4 - rmdr2.x) * rmdr2.y), //bl
+ ValueType(rmdr2.x * rmdr2.y) }; //br
//Where to start in the upconverted images
const ImageCoords ref_start1( ( dparams.Xp()<<1 ) + roundvec1.x ,( dparams.Yp()<<1 ) + roundvec1.y );
diff -aur dirac-1.0.2/util/conversion/common/bitmap.cpp dirac-1.0.2-modif/util/conversion/common/bitmap.cpp
--- dirac-1.0.2/util/conversion/common/bitmap.cpp 2004-06-30 20:44:52.000000000 +0400
+++ dirac-1.0.2-modif/util/conversion/common/bitmap.cpp 2016-02-10 20:19:58.355494888 +0300
@@ -142,14 +142,9 @@
char signature[2];
int fileSize;
int dataOffset;
- int size;
int planes;
int bitCount;
int compression;
- int imageSize;
- int xPixelsPerM, yPixelsPerM;
- int coloursUsed;
- int coloursImportant;
//Define buffer to read bytes into.
const int bufferSize = 54;
char buffer[bufferSize];
@@ -175,7 +170,7 @@
//Reposition input buffer to skip over extra header data if necessary
//Should check success of operation (see The C++ Stand Lib, Josuttis, p665)
if (dataOffset>54) inbuf.pubseekoff(dataOffset-54, std::ios_base::cur, std::ios_base::in);
- size = read4bytes(buffer+14);
+ (void)read4bytes(buffer+14); // size
w = read4bytes(buffer+18);
h = read4bytes(buffer+22);
if ( fileSize != (dataOffset + height()*lineBufferSize()) ) input.setstate(std::ios::failbit);
@@ -185,11 +180,11 @@
if ( bitCount != 24 ) input.setstate(std::ios::failbit);
compression = read4bytes(buffer+30);
if ( compression != 0 ) input.setstate(std::ios::failbit);
- imageSize = read4bytes(buffer+34);
- xPixelsPerM = read4bytes(buffer+38);
- yPixelsPerM = read4bytes(buffer+42);
- coloursUsed = read4bytes(buffer+46);
- coloursImportant = read4bytes(buffer+50);
+ (void)read4bytes(buffer+34); // imageSize
+ (void)read4bytes(buffer+38); // xPixelsPerM
+ (void)read4bytes(buffer+42); // yPixelsPerM
+ (void)read4bytes(buffer+46); // coloursUsed
+ (void)read4bytes(buffer+50); // coloursImportant
return input; }
} // end namespace dirac_vu

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "flatbuffers";
version = "1.10.0";
version = "1.11.0";
src = fetchFromGitHub {
owner = "google";
repo = "flatbuffers";
rev = "v${version}";
sha256 = "1b32kc5jp83l43w2gs1dkw2vqm2j0wi7xfxqa86m18n3l41ca734";
sha256 = "1gl8pnykzifh7pnnvl80f5prmj5ga60dp44inpv9az2k9zaqx3qr";
};
preConfigure = stdenv.lib.optional stdenv.buildPlatform.isDarwin ''

View File

@ -5,6 +5,14 @@
, buildPackages
}:
let
gdCflags = [
"-Wno-error=stringop-truncation"
"-Wno-error=missing-attributes"
"-Wno-error=array-bounds"
];
in
callPackage ./common.nix { inherit stdenv; } {
name = "glibc" + stdenv.lib.optionalString withGd "-gd";
@ -47,10 +55,10 @@ callPackage ./common.nix { inherit stdenv; } {
# musl-specific flags below.
# At next change to non-musl glibc builds, remove this `then`
# and the above condition, instead keeping only the `else` below.
then (stdenv.lib.optionalString withGd "-Wno-error=stringop-truncation")
then (if withGd then gdCflags else null)
else
builtins.toString (builtins.concatLists [
(stdenv.lib.optional withGd "-Wno-error=stringop-truncation")
(builtins.concatLists [
(stdenv.lib.optionals withGd gdCflags)
# Fix -Werror build failure when building glibc with musl with GCC >= 8, see:
# https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798
(stdenv.lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias")

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, cmake, libX11, libuuid, xz, vtk }:
stdenv.mkDerivation rec {
name = "itk-4.13.1";
name = "itk-4.13.2";
src = fetchurl {
url = mirror://sourceforge/itk/InsightToolkit-4.13.1.tar.xz;
sha256 = "0p4cspgbnjsnkjz8nfg092yaxz8qkqi2nkxjdv421d0zrmi0i2al";
url = mirror://sourceforge/itk/InsightToolkit-4.13.2.tar.xz;
sha256 = "19cgfpd63gqrvc3m27m394gy2d7w79g5y6lvznb5qqr49lihbgns";
};
cmakeFlags = [

View File

@ -11,7 +11,12 @@ stdenv.mkDerivation rec {
owner = "puppetlabs";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=ignored-qualifiers" "-Wno-error=class-memaccess" "-Wno-error=catch-value" ];
NIX_CFLAGS_COMPILE = [
"-Wno-error=ignored-qualifiers"
"-Wno-error=class-memaccess"
"-Wno-error=catch-value"
"-Wno-error=deprecated-copy"
];
nativeBuildInputs = [ cmake ];
buildInputs = [ boost curl ruby ];

View File

@ -16,13 +16,14 @@ stdenv.mkDerivation {
"-DDYND_BUILD_BENCHMARKS=OFF"
];
# added to fix build with gcc7
# added to fix build with gcc7+
NIX_CFLAGS_COMPILE = [
"-Wno-error=implicit-fallthrough"
"-Wno-error=nonnull"
"-Wno-error=tautological-compare"
"-Wno-error=class-memaccess"
"-Wno-error=parentheses"
"-Wno-error=deprecated-copy"
];
buildInputs = [ cmake ];

View File

@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
"-DGIT_VERSION=\"v${version}\""
"-Wno-error=deprecated-declarations"
"-Wno-error=cast-function-type"
"-Wno-error=stringop-truncation"
"-Wno-error=stringop-overflow"
];
NIX_LDFLAGS = "-lXext";

View File

@ -20,6 +20,11 @@ stdenv.mkDerivation rec {
doCheck = false;
NIX_CFLAGS_COMPILE = [
"-Wno-error=format-truncation"
"-Wno-error=address-of-packed-member"
];
nativeBuildInputs = [ cmake doxygen perl python2Packages.sphinx ];
buildInputs = [ libuuid json_c python2 ];

View File

@ -1,43 +0,0 @@
{ stdenv, fetchurl, pkgconfig, ptlib, srtp, libtheora, speex, gnome3
, ffmpeg, x264, cyrus_sasl, openldap, openssl, expat, unixODBC }:
stdenv.mkDerivation rec {
pname = "opal";
version = "3.10.10";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "f208985003461b2743575eccac13ad890b3e5baac35b68ddef17162460aff864";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ptlib srtp libtheora speex
ffmpeg x264 cyrus_sasl openldap openssl expat unixODBC ];
propagatedBuildInputs = [ speex ];
configureFlags = [ "--enable-h323" ];
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = "-D__STDC_CONSTANT_MACROS=1 -std=gnu++98";
patches = [ ./disable-samples-ftbfs.diff ./libav9.patch ./libav10.patch ];
meta = with stdenv.lib; {
description = "VoIP library";
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
homepage = "http://www.opalvoip.org/";
license = with licenses; [ bsdOriginal mpl10 gpl2Plus lgpl21 ];
};
passthru = {
updateInfo = {
downloadPage = "http://ftp.gnome.org/pub/GNOME/sources/opal";
};
updateScript = gnome3.updateScript {
packageName = pname;
};
};
}

View File

@ -1,14 +0,0 @@
Index: opal-3.10.4~dfsg/Makefile.in
===================================================================
--- opal-3.10.4~dfsg.orig/Makefile.in 2012-02-22 10:08:36.000000000 +1100
+++ opal-3.10.4~dfsg/Makefile.in 2012-03-08 08:32:44.000000000 +1100
@@ -45,8 +45,7 @@
samples/codectest \
samples/callgen \
samples/opalecho \
- samples/faxopal \
- samples/c_api
+ samples/faxopal
ifeq ($(OPAL_IVR),yes)
SUBDIRS += samples/opalmcu \
samples/ivropal \

View File

@ -1,208 +0,0 @@
Description: Fix compilation against libav10
Author: Reinhard Tartler <siretart@tauware.de>
Bug-Debian: http://bugs.debian.org/739439
--- a/plugins/video/H.263-1998/h263-1998.cxx
+++ b/plugins/video/H.263-1998/h263-1998.cxx
@@ -94,7 +94,7 @@ static struct StdSizes {
{ CIF16_WIDTH, CIF16_HEIGHT, PLUGINCODEC_CIF16_MPI },
};
-static FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H263P);
+static FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_H263P);
/////////////////////////////////////////////////////////////////////////////
@@ -203,7 +203,7 @@ H263_Base_EncoderContext::~H263_Base_Enc
PTRACE(4, m_prefix, "Encoder closed");
}
-bool H263_Base_EncoderContext::Init(CodecID codecId)
+bool H263_Base_EncoderContext::Init(AVCodecID codecId)
{
PTRACE(5, m_prefix, "Opening encoder");
@@ -589,7 +589,7 @@ void H263_RFC2190_EncoderContext::RTPCal
bool H263_RFC2190_EncoderContext::Init()
{
- if (!H263_Base_EncoderContext::Init(CODEC_ID_H263))
+ if (!H263_Base_EncoderContext::Init(AV_CODEC_ID_H263))
return false;
#if LIBAVCODEC_RTP_MODE
@@ -632,7 +632,7 @@ H263_RFC2429_EncoderContext::~H263_RFC24
bool H263_RFC2429_EncoderContext::Init()
{
- return H263_Base_EncoderContext::Init(CODEC_ID_H263P);
+ return H263_Base_EncoderContext::Init(AV_CODEC_ID_H263P);
}
@@ -656,7 +656,7 @@ H263_Base_DecoderContext::H263_Base_Deco
if (!FFMPEGLibraryInstance.Load())
return;
- if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H263)) == NULL) {
+ if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_H263)) == NULL) {
PTRACE(1, m_prefix, "Codec not found for decoder");
return;
}
--- a/plugins/video/H.264/h264-x264.cxx
+++ b/plugins/video/H.264/h264-x264.cxx
@@ -105,7 +105,7 @@ static struct PluginCodec_information Li
///////////////////////////////////////////////////////////////////////////////
-FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H264);
+FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_H264);
PLUGINCODEC_CONTROL_LOG_FUNCTION_DEF
@@ -1065,17 +1065,17 @@ class MyDecoder : public PluginCodec<MY_
allows you to fail the create operation (return false), which cannot
be done in the normal C++ constructor. */
- if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H264)) == NULL)
+ if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_H264)) == NULL)
return false;
if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext(m_codec)) == NULL)
return false;
m_context->workaround_bugs = FF_BUG_AUTODETECT;
- m_context->idct_algo = FF_IDCT_H264;
+ m_context->idct_algo = FF_IDCT_AUTO;
m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
- m_context->flags2 = CODEC_FLAG2_SKIP_RD |
+ m_context->flags2 =
#ifdef CODEC_FLAG2_DROP_FRAME_TIMECODE
CODEC_FLAG2_DROP_FRAME_TIMECODE |
#endif
--- a/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
+++ b/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
@@ -205,7 +205,7 @@ const static struct mpeg4_resolution {
{ 0 }
};
-FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_MPEG4);
+FFMPEGLibrary FFMPEGLibraryInstance(AV_CODEC_ID_MPEG4);
static bool mpeg4IsIframe (BYTE * frameBuffer, unsigned int frameLen )
@@ -688,7 +688,7 @@ void MPEG4EncoderContext::ResizeEncoding
bool MPEG4EncoderContext::OpenCodec()
{
- if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){
+ if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(AV_CODEC_ID_MPEG4)) == NULL){
PTRACE(1, "MPEG4", "Encoder not found");
return false;
}
@@ -1390,7 +1390,7 @@ void MPEG4DecoderContext::ResizeDecoding
bool MPEG4DecoderContext::OpenCodec()
{
- if ((m_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_MPEG4)) == NULL) {
+ if ((m_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(AV_CODEC_ID_MPEG4)) == NULL) {
PTRACE(1, "MPEG4", "Decoder not found for encoder");
return false;
}
--- a/plugins/video/H.263-1998/h263-1998.h
+++ b/plugins/video/H.263-1998/h263-1998.h
@@ -115,7 +115,7 @@ class H263_Base_EncoderContext
virtual ~H263_Base_EncoderContext();
virtual bool Init() = 0;
- virtual bool Init(CodecID codecId);
+ virtual bool Init(AVCodecID codecId);
virtual bool SetOptions(const char * const * options);
virtual void SetOption(const char * option, const char * value);
--- a/plugins/video/common/dyna.cxx
+++ b/plugins/video/common/dyna.cxx
@@ -217,14 +217,14 @@ static void logCallbackFFMPEG(void * avc
#endif
-FFMPEGLibrary::FFMPEGLibrary(CodecID codec)
+FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec)
{
m_codec = codec;
- if (m_codec==CODEC_ID_H264)
+ if (m_codec==AV_CODEC_ID_H264)
snprintf( m_codecString, sizeof(m_codecString), "H264");
- if (m_codec==CODEC_ID_H263P)
+ if (m_codec==AV_CODEC_ID_H263P)
snprintf( m_codecString, sizeof(m_codecString), "H263+");
- if (m_codec==CODEC_ID_MPEG4)
+ if (m_codec==AV_CODEC_ID_MPEG4)
snprintf( m_codecString, sizeof(m_codecString), "MPEG4");
m_isLoadedOK = false;
}
@@ -268,12 +268,12 @@ bool FFMPEGLibrary::Load()
return true;
}
-AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
+AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id)
{
return avcodec_find_encoder(id);
}
-AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
+AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id)
{
WaitAndSignal m(processLock);
@@ -308,13 +308,18 @@ int FFMPEGLibrary::AvcodecClose(AVCodecC
return avcodec_close(ctx);
}
+#undef FFMAX
+#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
int FFMPEGLibrary::AvcodecEncodeVideo(AVCodecContext *ctx, BYTE *buf, int buf_size, const AVFrame *pict)
{
+ AVPacket pkt = { 0 };
+ int ret, got_output;
int res;
- res = avcodec_encode_video(ctx, buf, buf_size, pict);
+ ret = avcodec_encode_video2(ctx, &pkt, pict, &got_output);
- PTRACE(6, m_codecString, "DYNA\tEncoded into " << res << " bytes, max " << buf_size);
+ PTRACE(6, m_codecString, "DYNA\tEncoded into " << ret << " bytes, max " << buf_size);
+ memcpy(buf, pkt.data, FFMAX(pkt.size, buf_size));
return res;
}
--- a/plugins/video/common/dyna.h
+++ b/plugins/video/common/dyna.h
@@ -88,13 +88,13 @@ class DynaLink
class FFMPEGLibrary
{
public:
- FFMPEGLibrary(CodecID codec);
+ FFMPEGLibrary(AVCodecID codec);
~FFMPEGLibrary();
bool Load();
- AVCodec *AvcodecFindEncoder(enum CodecID id);
- AVCodec *AvcodecFindDecoder(enum CodecID id);
+ AVCodec *AvcodecFindEncoder(enum AVCodecID id);
+ AVCodec *AvcodecFindDecoder(enum AVCodecID id);
AVCodecContext *AvcodecAllocContext(AVCodec*);
AVFrame *AvcodecAllocFrame(void);
int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
@@ -117,7 +117,7 @@ class FFMPEGLibrary
DynaLink m_libAvcodec;
DynaLink m_libAvutil;
- CodecID m_codec;
+ AVCodecID m_codec;
char m_codecString[32];
bool m_isLoadedOK;

View File

@ -1,543 +0,0 @@
Description: Backport changes for the libav 9 API
Also replace loading of libavcodec and libavutil via dlopen by linking against
it.
Author: Sebastian Ramacher <sramacher@debian.org>
Bug-Debian: http://bugs.debian.org/720824
Last-Update: 2013-09-12
--- a/plugins/video/H.263-1998/h263-1998.cxx
+++ b/plugins/video/H.263-1998/h263-1998.cxx
@@ -216,7 +216,7 @@
return false;
}
- m_context = FFMPEGLibraryInstance.AvcodecAllocContext();
+ m_context = FFMPEGLibraryInstance.AvcodecAllocContext(m_codec);
if (m_context == NULL) {
PTRACE(1, m_prefix, "Failed to allocate context for encoder");
return false;
@@ -312,6 +312,7 @@
return;
}
+#ifdef CODEC_FLAG_H263P_UMV
if (STRCMPI(option, H263_ANNEX_D) == 0) {
// Annex D: Unrestructed Motion Vectors
// Level 2+
@@ -322,6 +323,7 @@
m_context->flags &= ~CODEC_FLAG_H263P_UMV;
return;
}
+#endif
#if 0 // DO NOT ENABLE THIS FLAG. FFMPEG IS NOT THREAD_SAFE WHEN THIS FLAG IS SET
if (STRCMPI(option, H263_ANNEX_F) == 0) {
@@ -356,6 +358,7 @@
return;
}
+#ifdef CODEC_FLAG_H263P_SLICE_STRUCT
if (STRCMPI(option, H263_ANNEX_K) == 0) {
// Annex K: Slice Structure
// does not work with eyeBeam
@@ -365,7 +368,9 @@
m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT;
return;
}
+#endif
+#ifdef CODEC_FLAG_H263P_AIV
if (STRCMPI(option, H263_ANNEX_S) == 0) {
// Annex S: Alternative INTER VLC mode
// does not work with eyeBeam
@@ -375,6 +380,7 @@
m_context->flags &= ~CODEC_FLAG_H263P_AIV;
return;
}
+#endif
if (STRCMPI(option, PLUGINCODEC_MEDIA_PACKETIZATION) == 0 ||
STRCMPI(option, PLUGINCODEC_MEDIA_PACKETIZATIONS) == 0) {
@@ -450,15 +456,6 @@
PTRACE(5, m_prefix, "qmax set to " << m_context->qmax);
PTRACE(5, m_prefix, "payload size set to " << m_context->rtp_payload_size);
- #define CODEC_TRACER_FLAG(tracer, flag) \
- PTRACE(4, m_prefix, #flag " is " << ((m_context->flags & flag) ? "enabled" : "disabled"));
- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_UMV);
- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_OBMC);
- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_AC_PRED);
- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_SLICE_STRUCT)
- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_LOOP_FILTER);
- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_AIV);
-
return FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec) == 0;
}
@@ -521,7 +518,7 @@
// Need to copy to local buffer to guarantee 16 byte alignment
memcpy(m_inputFrame->data[0], OPAL_VIDEO_FRAME_DATA_PTR(header), header->width*header->height*3/2);
- m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? FF_I_TYPE : AV_PICTURE_TYPE_NONE;
+ m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_NONE;
/*
m_inputFrame->pts = (int64_t)srcRTP.GetTimestamp()*m_context->time_base.den/m_context->time_base.num/VIDEO_CLOCKRATE;
@@ -603,13 +600,19 @@
m_context->rtp_callback = &H263_RFC2190_EncoderContext::RTPCallBack;
m_context->opaque = this; // used to separate out packets from different encode threads
+#ifdef CODEC_FLAG_H263P_UMV
m_context->flags &= ~CODEC_FLAG_H263P_UMV;
+#endif
m_context->flags &= ~CODEC_FLAG_4MV;
#if LIBAVCODEC_RTP_MODE
m_context->flags &= ~CODEC_FLAG_H263P_AIC;
#endif
+#ifdef CODEC_FLAG_H263P_AIV
m_context->flags &= ~CODEC_FLAG_H263P_AIV;
+#endif
+#ifdef CODEC_FLAG_H263P_SLICE_STRUCT
m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT;
+#endif
return true;
}
@@ -658,7 +661,7 @@
return;
}
- m_context = FFMPEGLibraryInstance.AvcodecAllocContext();
+ m_context = FFMPEGLibraryInstance.AvcodecAllocContext(m_codec);
if (m_context == NULL) {
PTRACE(1, m_prefix, "Failed to allocate context for decoder");
return;
--- a/plugins/video/H.264/h264-x264.cxx
+++ b/plugins/video/H.264/h264-x264.cxx
@@ -48,6 +48,7 @@
#include "shared/h264frame.h"
#include "shared/x264wrap.h"
+#include <cstdio>
#define MY_CODEC x264 // Name of codec (use C variable characters)
#define MY_CODEC_LOG "x264"
@@ -1067,18 +1068,17 @@
if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H264)) == NULL)
return false;
- if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext()) == NULL)
+ if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext(m_codec)) == NULL)
return false;
m_context->workaround_bugs = FF_BUG_AUTODETECT;
- m_context->error_recognition = FF_ER_AGGRESSIVE;
m_context->idct_algo = FF_IDCT_H264;
m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
- m_context->flags2 = CODEC_FLAG2_BRDO |
- CODEC_FLAG2_MEMC_ONLY |
+ m_context->flags2 = CODEC_FLAG2_SKIP_RD |
+#ifdef CODEC_FLAG2_DROP_FRAME_TIMECODE
CODEC_FLAG2_DROP_FRAME_TIMECODE |
- CODEC_FLAG2_SKIP_RD |
+#endif
CODEC_FLAG2_CHUNKS;
if ((m_picture = FFMPEGLibraryInstance.AvcodecAllocFrame()) == NULL)
--- a/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
+++ b/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
@@ -589,17 +589,14 @@
m_avpicture->quality = m_videoQMin;
#ifdef USE_ORIG
- m_avcontext->flags |= CODEC_FLAG_PART; // data partitioning
m_avcontext->flags |= CODEC_FLAG_4MV; // 4 motion vectors
#else
m_avcontext->max_b_frames=0; /*don't use b frames*/
m_avcontext->flags|=CODEC_FLAG_AC_PRED;
- m_avcontext->flags|=CODEC_FLAG_H263P_UMV;
/*c->flags|=CODEC_FLAG_QPEL;*/ /*don't enable this one: this forces profile_level to advanced simple profile */
m_avcontext->flags|=CODEC_FLAG_4MV;
m_avcontext->flags|=CODEC_FLAG_GMC;
m_avcontext->flags|=CODEC_FLAG_LOOP_FILTER;
- m_avcontext->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
#endif
m_avcontext->opaque = this; // for use in RTP callback
}
@@ -691,7 +688,12 @@
bool MPEG4EncoderContext::OpenCodec()
{
- m_avcontext = FFMPEGLibraryInstance.AvcodecAllocContext();
+ if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){
+ PTRACE(1, "MPEG4", "Encoder not found");
+ return false;
+ }
+
+ m_avcontext = FFMPEGLibraryInstance.AvcodecAllocContext(m_avcodec);
if (m_avcontext == NULL) {
PTRACE(1, "MPEG4", "Encoder failed to allocate context for encoder");
return false;
@@ -703,11 +705,6 @@
return false;
}
- if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){
- PTRACE(1, "MPEG4", "Encoder not found");
- return false;
- }
-
#if PLUGINCODEC_TRACING
// debugging flags
if (PTRACE_CHECK(4)) {
@@ -804,7 +801,7 @@
// Should the next frame be an I-Frame?
if ((flags & PluginCodec_CoderForceIFrame) || (m_frameNum == 0))
{
- m_avpicture->pict_type = FF_I_TYPE;
+ m_avpicture->pict_type = AV_PICTURE_TYPE_I;
}
else // No IFrame requested, let avcodec decide what to do
{
@@ -1325,7 +1322,6 @@
void MPEG4DecoderContext::SetStaticDecodingParams() {
m_avcontext->flags |= CODEC_FLAG_4MV;
- m_avcontext->flags |= CODEC_FLAG_PART;
m_avcontext->workaround_bugs = 0; // no workaround for buggy implementations
}
@@ -1399,7 +1395,7 @@
return false;
}
- m_avcontext = FFMPEGLibraryInstance.AvcodecAllocContext();
+ m_avcontext = FFMPEGLibraryInstance.AvcodecAllocContext(m_avcodec);
if (m_avcontext == NULL) {
PTRACE(1, "MPEG4", "Decoder failed to allocate context");
return false;
--- a/plugins/video/common/dyna.cxx
+++ b/plugins/video/common/dyna.cxx
@@ -38,6 +38,13 @@
* Matthias Schneider (ma30002000@yahoo.de)
*/
#include "dyna.h"
+#include <cstdio>
+#include <cstdarg>
+
+extern "C" {
+#include <libavcodec/avcodec.h>
+#include <libavutil/mem.h>
+}
bool DynaLink::Open(const char *name)
{
@@ -228,101 +235,15 @@
m_libAvutil.Close();
}
-#define CHECK_AVUTIL(name, func) \
- (seperateLibAvutil ? \
- m_libAvutil.GetFunction(name, (DynaLink::Function &)func) : \
- m_libAvcodec.GetFunction(name, (DynaLink::Function &)func) \
- ) \
-
-
bool FFMPEGLibrary::Load()
{
WaitAndSignal m(processLock);
if (IsLoaded())
return true;
- bool seperateLibAvutil = false;
-
-#ifdef LIBAVCODEC_LIB_NAME
- if (m_libAvcodec.Open(LIBAVCODEC_LIB_NAME))
- seperateLibAvutil = true;
- else
-#endif
- if (m_libAvcodec.Open("libavcodec"))
- seperateLibAvutil = false;
- else if (m_libAvcodec.Open("avcodec-" AV_STRINGIFY(LIBAVCODEC_VERSION_MAJOR)))
- seperateLibAvutil = true;
- else {
- PTRACE(1, m_codecString, "Failed to load FFMPEG libavcodec library");
- return false;
- }
-
- if (seperateLibAvutil &&
- !(
-#ifdef LIBAVUTIL_LIB_NAME
- m_libAvutil.Open(LIBAVUTIL_LIB_NAME) ||
-#endif
- m_libAvutil.Open("libavutil") ||
- m_libAvutil.Open("avutil-" AV_STRINGIFY(LIBAVUTIL_VERSION_MAJOR))
- ) ) {
- PTRACE(1, m_codecString, "Failed to load FFMPEG libavutil library");
- return false;
- }
-
- strcpy(m_libAvcodec.m_codecString, m_codecString);
- strcpy(m_libAvutil.m_codecString, m_codecString);
-
- if (!m_libAvcodec.GetFunction("avcodec_init", (DynaLink::Function &)Favcodec_init))
- return false;
-
- if (!m_libAvcodec.GetFunction("av_init_packet", (DynaLink::Function &)Fav_init_packet))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_register_all", (DynaLink::Function &)Favcodec_register_all))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_find_encoder", (DynaLink::Function &)Favcodec_find_encoder))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_find_decoder", (DynaLink::Function &)Favcodec_find_decoder))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_alloc_context", (DynaLink::Function &)Favcodec_alloc_context))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_alloc_frame", (DynaLink::Function &)Favcodec_alloc_frame))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_open", (DynaLink::Function &)Favcodec_open))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_close", (DynaLink::Function &)Favcodec_close))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_encode_video", (DynaLink::Function &)Favcodec_encode_video))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_decode_video2", (DynaLink::Function &)Favcodec_decode_video))
- return false;
-
- if (!m_libAvcodec.GetFunction("avcodec_set_dimensions", (DynaLink::Function &)Favcodec_set_dimensions))
- return false;
-
- if (!CHECK_AVUTIL("av_free", Favcodec_free))
- return false;
-
- if(!m_libAvcodec.GetFunction("avcodec_version", (DynaLink::Function &)Favcodec_version))
- return false;
-
- if (!CHECK_AVUTIL("av_log_set_level", FAv_log_set_level))
- return false;
-
- if (!CHECK_AVUTIL("av_log_set_callback", FAv_log_set_callback))
- return false;
-
// must be called before using avcodec lib
- unsigned libVer = Favcodec_version();
+ unsigned libVer = avcodec_version();
if (libVer != LIBAVCODEC_VERSION_INT) {
PTRACE(2, m_codecString, "Warning: compiled against libavcodec headers from version "
<< LIBAVCODEC_VERSION_MAJOR << '.' << LIBAVCODEC_VERSION_MINOR << '.' << LIBAVCODEC_VERSION_MICRO
@@ -334,8 +255,7 @@
<< (libVer >> 16) << ((libVer>>8) & 0xff) << (libVer & 0xff));
}
- Favcodec_init();
- Favcodec_register_all ();
+ avcodec_register_all();
#if PLUGINCODEC_TRACING
AvLogSetLevel(AV_LOG_DEBUG);
@@ -350,49 +270,49 @@
AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
{
- return Favcodec_find_encoder(id);
+ return avcodec_find_encoder(id);
}
AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
{
WaitAndSignal m(processLock);
- return Favcodec_find_decoder(id);
+ return avcodec_find_decoder(id);
}
-AVCodecContext *FFMPEGLibrary::AvcodecAllocContext(void)
+AVCodecContext *FFMPEGLibrary::AvcodecAllocContext(AVCodec *codec)
{
WaitAndSignal m(processLock);
- return Favcodec_alloc_context();
+ return avcodec_alloc_context3(codec);
}
AVFrame *FFMPEGLibrary::AvcodecAllocFrame(void)
{
WaitAndSignal m(processLock);
- return Favcodec_alloc_frame();
+ return avcodec_alloc_frame();
}
int FFMPEGLibrary::AvcodecOpen(AVCodecContext *ctx, AVCodec *codec)
{
WaitAndSignal m(processLock);
- return Favcodec_open(ctx, codec);
+ return avcodec_open2(ctx, codec, NULL);
}
int FFMPEGLibrary::AvcodecClose(AVCodecContext *ctx)
{
WaitAndSignal m(processLock);
- return Favcodec_close(ctx);
+ return avcodec_close(ctx);
}
int FFMPEGLibrary::AvcodecEncodeVideo(AVCodecContext *ctx, BYTE *buf, int buf_size, const AVFrame *pict)
{
int res;
- res = Favcodec_encode_video(ctx, buf, buf_size, pict);
+ res = avcodec_encode_video(ctx, buf, buf_size, pict);
PTRACE(6, m_codecString, "DYNA\tEncoded into " << res << " bytes, max " << buf_size);
return res;
@@ -401,35 +321,35 @@
int FFMPEGLibrary::AvcodecDecodeVideo(AVCodecContext *ctx, AVFrame *pict, int *got_picture_ptr, BYTE *buf, int buf_size)
{
AVPacket avpkt;
- Fav_init_packet(&avpkt);
+ av_init_packet(&avpkt);
avpkt.data = buf;
avpkt.size = buf_size;
- return Favcodec_decode_video(ctx, pict, got_picture_ptr, &avpkt);
+ return avcodec_decode_video2(ctx, pict, got_picture_ptr, &avpkt);
}
void FFMPEGLibrary::AvcodecFree(void * ptr)
{
WaitAndSignal m(processLock);
- Favcodec_free(ptr);
+ av_free(ptr);
}
void FFMPEGLibrary::AvSetDimensions(AVCodecContext *s, int width, int height)
{
WaitAndSignal m(processLock);
- Favcodec_set_dimensions(s, width, height);
+ avcodec_set_dimensions(s, width, height);
}
void FFMPEGLibrary::AvLogSetLevel(int level)
{
- FAv_log_set_level(level);
+ av_log_set_level(level);
}
void FFMPEGLibrary::AvLogSetCallback(void (*callback)(void*, int, const char*, va_list))
{
- FAv_log_set_callback(callback);
+ av_log_set_callback(callback);
}
bool FFMPEGLibrary::IsLoaded()
--- a/plugins/video/common/dyna.h
+++ b/plugins/video/common/dyna.h
@@ -95,7 +95,7 @@
AVCodec *AvcodecFindEncoder(enum CodecID id);
AVCodec *AvcodecFindDecoder(enum CodecID id);
- AVCodecContext *AvcodecAllocContext(void);
+ AVCodecContext *AvcodecAllocContext(AVCodec*);
AVFrame *AvcodecAllocFrame(void);
int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
int AvcodecClose(AVCodecContext *ctx);
@@ -120,26 +120,6 @@
CodecID m_codec;
char m_codecString[32];
- void (*Favcodec_init)(void);
- void (*Fav_init_packet)(AVPacket *pkt);
-
- void (*Favcodec_register_all)(void);
- AVCodec *(*Favcodec_find_encoder)(enum CodecID id);
- AVCodec *(*Favcodec_find_decoder)(enum CodecID id);
- AVCodecContext *(*Favcodec_alloc_context)(void);
- AVFrame *(*Favcodec_alloc_frame)(void);
- int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec);
- int (*Favcodec_close)(AVCodecContext *ctx);
- int (*Favcodec_encode_video)(AVCodecContext *ctx, BYTE *buf, int buf_size, const AVFrame *pict);
- int (*Favcodec_decode_video)(AVCodecContext *ctx, AVFrame *pict, int *got_picture_ptr, AVPacket *avpkt);
- unsigned (*Favcodec_version)(void);
- void (*Favcodec_set_dimensions)(AVCodecContext *ctx, int width, int height);
-
- void (*Favcodec_free)(void *);
-
- void (*FAv_log_set_level)(int level);
- void (*FAv_log_set_callback)(void (*callback)(void*, int, const char*, va_list));
-
bool m_isLoadedOK;
};
--- a/plugins/video/common/ffmpeg.h
+++ b/plugins/video/common/ffmpeg.h
@@ -45,11 +45,13 @@
#include "platform.h"
-#include "libavcodec/avcodec.h"
+extern "C" {
+#include <libavcodec/avcodec.h>
// AVPacket was declared in avformat.h before April 2009
#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(52, 25, 0)
-#include "libavformat/avformat.h"
+#include <libavformat/avformat.h>
#endif
+}
#ifndef LIBAVCODEC_VERSION_INT
#error Libavcodec include is not correct
--- a/plugins/video/H.263-1998/Makefile.in
+++ b/plugins/video/H.263-1998/Makefile.in
@@ -34,8 +34,8 @@
$(COMMONDIR)/mpi.cxx \
$(COMMONDIR)/dyna.cxx
-CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR)
-LIBS += @DL_LIBS@
+CFLAGS += @LIBAVCODEC_CFLAGS@ @LIBAVUTIL_CFLAGS@ -I$(COMMONDIR)
+LIBS += @DL_LIBS@ @LIBAVCODEC_LIBS@ @LIBAVUTIL_LIBS@
HAVE_LIBAVCODEC_RTP_MODE=@HAVE_LIBAVCODEC_RTP_MODE@
ifeq ($(HAVE_LIBAVCODEC_RTP_MODE),yes)
--- a/plugins/video/H.264/Makefile.in
+++ b/plugins/video/H.264/Makefile.in
@@ -34,8 +34,8 @@
$(SHAREDDIR)/x264wrap.cxx \
$(COMMONDIR)/dyna.cxx \
-CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) -DLIB_DIR='"$(libdir)"' -DVC_PLUGIN_DIR='"@VC_PLUGIN_DIR@"'
-LIBS += @DL_LIBS@
+CFLAGS += @LIBAVCODEC_CFLAGS@ @LIBAVUTIL_CFLAGS@ -I$(COMMONDIR) -DLIB_DIR='"$(libdir)"' -DVC_PLUGIN_DIR='"@VC_PLUGIN_DIR@"'
+LIBS += @DL_LIBS@ @LIBAVCODEC_LIBS@ @LIBAVUTIL_LIBS@
IS_H264_LICENSED:=@IS_H264_LICENSED@
ifeq ($(IS_H264_LICENSED),yes)
--- a/plugins/video/MPEG4-ffmpeg/Makefile.in
+++ b/plugins/video/MPEG4-ffmpeg/Makefile.in
@@ -30,8 +30,8 @@
SRCDIR := .
SRCS := mpeg4.cxx $(COMMONDIR)/dyna.cxx
-CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR)
-LIBS += @DL_LIBS@
+CFLAGS += @LIBAVCODEC_CFLAGS@ @LIBAVUTIL_CFLAGS@ -I$(COMMONDIR)
+LIBS += @DL_LIBS@ @LIBAVCODEC_LIBS@ @LIBAVUTIL_LIBS@
# Add LIBAVCODEC_SOURCE_DIR to the include path so we can #include <libavcodec/...h>
# Also add libavutil, so ffmpeg headers can #include "log.h".

View File

@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "12cwv593bsdnxs0zfcp07vwyk7ghlz2wv7vdbs1ksv293w3vj2rv";
};
NIX_CFLAGS_COMPILE = "-Wno-error=stringop-truncation";
buildInputs = [ bctoolbox ];
nativeBuildInputs = [ cmake ];

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "QCDNUM";
version = "17-01-13";
version = "17-01-15";
src = fetchurl {
url = "http://www.nikhef.nl/user/h24/qcdnum-files/download/qcdnum${builtins.replaceStrings ["-"] [""] version}.tar.gz";
sha256 = "0568rjviwvjkfihq2ka7g91vmialr31ryn7c69iqf13rcv5vzcw7";
sha256 = "0ibk1sppss45qh0g8i2c99alkx82xdbss3p55f5367bxjx4iqvvg";
};
nativeBuildInputs = [ gfortran ];

View File

@ -1,59 +0,0 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, bison, flex, unixODBC, gnome3
, openssl, openldap, cyrus_sasl, kerberos, expat, SDL, libdv, libv4l, alsaLib }:
stdenv.mkDerivation rec {
pname = "ptlib";
version = "2.10.11";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1jf27mjz8vqnclhrhrpn7niz4c177kcjbd1hc7vn65ihcqfz05rs";
};
NIX_CFLAGS_COMPILE = "-std=gnu++98";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ bison flex unixODBC openssl openldap
cyrus_sasl kerberos expat SDL libdv libv4l alsaLib ];
enableParallelBuilding = true;
patches = [
(fetchpatch { url = http://sources.debian.net/data/main/p/ptlib/2.10.11~dfsg-2.1/debian/patches/bison-fix;
sha256 = "0vzv9kyn9s628z8wy2gva380gi1rmhxilwlg5pikl5a0wn8p46nw";
})
(fetchpatch { url = http://sources.debian.net/data/main/p/ptlib/2.10.11~dfsg-2.1/debian/patches/no-sslv3;
sha256 = "172s1dnnrl54p9sf1nl7s475sm78rpw3p8jxi0pdx6izzl8hcdr0";
})
(fetchpatch {
name = "openssl-1.1.patch";
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/openssl-1.1.0.patch?h=packages/ptlib&id=1dfa9f55e7e030d261228fca27dda82979ca7f30";
sha256 = "11hdgyyibycg0wf5ls0wk9hksa4jd434i86xqiccbyg17n4l6lc1";
})
./ptlib-2.10.11-glibc-2.26.patch
];
# fix typedef clashes with unixODBC>=2.3.5
postPatch = ''
substituteInPlace include/ptlib/unix/ptlib/contain.h \
--replace "typedef uintptr_t UINT" "typedef unsigned int UINT" \
--replace "typedef wchar_t WCHAR" "typedef unsigned short WCHAR"
'';
meta = with stdenv.lib; {
description = "Portable Tools from OPAL VoIP";
maintainers = [ maintainers.raskin ];
homepage = "http://www.opalvoip.org/";
platforms = platforms.linux;
license = with licenses; [ beerware bsdOriginal mpl10 ];
};
passthru = {
updateInfo = {
downloadPage = "http://ftp.gnome.org/sources/ptlib/";
};
updateScript = gnome3.updateScript {
packageName = pname;
};
};
}

View File

@ -1,13 +0,0 @@
diff --git a/src/ptlib/unix/channel.cxx b/src/ptlib/unix/channel.cxx
index 3b17dda..2dcaa18 100644
--- a/src/ptlib/unix/channel.cxx
+++ b/src/ptlib/unix/channel.cxx
@@ -36,7 +36,7 @@
#include <ptlib.h>
#include <sys/ioctl.h>
-
+#include <sys/uio.h>
#include "../common/pchannel.cxx"

View File

@ -93,6 +93,12 @@ stdenv.mkDerivation rec {
#})
./qt4-gcc6.patch
./qt4-openssl-1.1.patch
(fetchpatch {
name = "gcc9-foreach.patch";
url = "https://salsa.debian.org/qt-kde-team/qt/qt4-x11/raw/"
+ "0d4a3dd61ccb156dee556c214dbe91c04d44a717/debian/patches/gcc9-qforeach.patch";
sha256 = "0dzn6qxrgxb75rvck9kmy5gspawdn970wsjw56026dhkih8cp3pg";
})
]
++ lib.optional gtkStyle (substituteAll ({
src = ./dlopen-gtkstyle.diff;

View File

@ -5,7 +5,7 @@
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 5*|4*|3.4*)
+ 8*|7*|6*|5*|4*|3.4*)
+ 9*|8*|7*|6*|5*|4*|3.4*)
;;
3.3*)
canBuildWebKit="no"
@ -14,7 +14,7 @@
COMPILER_VERSION="3.*"
;;
- 5*|4.*)
+ 8*|7*|6*|5*|4.*)
+ 9*|8*|7*|6*|5*|4.*)
COMPILER_VERSION="4"
;;
*)

View File

@ -0,0 +1,179 @@
/*
# Updates
Before a major version update, make a copy of this directory. (We like to
keep the old version around for a short time after major updates.) Add a
top-level attribute to `top-level/all-packages.nix`.
1. Update the URL in `pkgs/development/libraries/qt-5/$VERSION/fetch.sh`.
2. From the top of the Nixpkgs tree, run
`./maintainers/scripts/fetch-kde-qt.sh > pkgs/development/libraries/qt-5/$VERSION/srcs.nix`.
3. Check that the new packages build correctly.
4. Commit the changes and open a pull request.
*/
{
newScope,
stdenv, fetchurl, fetchFromGitHub, fetchpatch, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, libGL, perl,
gstreamer, gst-plugins-base, gtk3, dconf,
llvmPackages_5,
# options
developerBuild ? false,
decryptSslTraffic ? false,
debug ? false,
}:
with stdenv.lib;
let
qtCompatVersion = srcs.qtbase.version;
stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
mirror = "https://download.qt.io";
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // {
# Community port of the now unmaintained upstream qtwebkit.
qtwebkit = {
src = fetchFromGitHub {
owner = "annulen";
repo = "webkit";
rev = "4ce8ebc4094512b9916bfa5984065e95ac97c9d8";
sha256 = "05h1xnxzbf7sp3plw5dndsvpf6iigh0bi4vlj4svx0hkf1giakjf";
};
version = "5.212-alpha-01-26-2018";
};
};
patches = {
qtbase = [
./qtbase.patch
./qtbase-fixguicmake.patch
(fetchpatch {
url = "https://code.qt.io/cgit/qt/qtbase.git/patch/?id=a52d7861edfb5956";
sha256 = "0as047qybh6w9xz2wd569kixwsibj3qid5nkd3l5w5v3lk80af3v";
})
];
qtdeclarative = [ ./qtdeclarative.patch ];
qtscript = [
./qtscript.patch
# needed due to changes in gcc 8.3, see https://bugreports.qt.io/browse/QTBUG-74196
# fixed in qtscript 5.12.2
(fetchpatch {
url = "https://github.com/qt/qtscript/commit/97ec1d1882a83c23c91f0f7daea48e05858d8c32.diff";
sha256 = "0khrapq13xzvxckzc9l7gqyjwibyd98vyqy6gmyhvsbm2kq8n6wi";
})
];
qtserialport = [ ./qtserialport.patch ];
qttools = [ ./qttools.patch ];
qtwebengine = [
./qtwebengine-no-build-skip.patch
./qtwebengine-darwin-no-platform-check.patch
# https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/707
# https://bugreports.qt.io/browse/QTBUG-77037
(fetchpatch {
name = "fix-build-with-pulseaudio-13.0.patch";
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/qtbug-77037-workaround.patch?h=packages/qt5-webengine&id=fc77d6b3d5ec74e421b58f199efceb2593cbf951";
sha256 = "1gv733qfdn9746nbqqxzyjx4ijjqkkb7zb71nxax49nna5bri3am";
})
];
qtwebkit = [ ./qtwebkit.patch ];
};
qtModule =
import ../qtModule.nix
{
inherit perl;
inherit (stdenv) lib;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
stdenvActual.mkDerivation;
}
{ inherit self srcs patches; };
addPackages = self: with self;
let
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; };
in {
mkDerivationWith =
import ../mkDerivation.nix
{ inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };
mkDerivation = mkDerivationWith stdenvActual.mkDerivation;
qtbase = callPackage ../modules/qtbase.nix {
inherit (srcs.qtbase) src version;
patches = patches.qtbase;
inherit bison cups harfbuzz libGL;
withGtk3 = true; inherit dconf gtk3;
inherit developerBuild decryptSslTraffic;
};
qtcharts = callPackage ../modules/qtcharts.nix {};
qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
qtdoc = callPackage ../modules/qtdoc.nix {};
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
qtimageformats = callPackage ../modules/qtimageformats.nix {};
qtlocation = callPackage ../modules/qtlocation.nix { };
qtmacextras = callPackage ../modules/qtmacextras.nix {};
qtmultimedia = callPackage ../modules/qtmultimedia.nix {
inherit gstreamer gst-plugins-base;
};
qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {};
qtquick1 = null;
qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {};
qtscript = callPackage ../modules/qtscript.nix {};
qtsensors = callPackage ../modules/qtsensors.nix {};
qtserialport = callPackage ../modules/qtserialport.nix {};
qtspeech = callPackage ../modules/qtspeech.nix {};
qtsvg = callPackage ../modules/qtsvg.nix {};
qttools = callPackage ../modules/qttools.nix {};
qttranslations = callPackage ../modules/qttranslations.nix {};
qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {};
qtwayland = callPackage ../modules/qtwayland.nix {};
qtwebchannel = callPackage ../modules/qtwebchannel.nix {};
qtwebengine = callPackage ../modules/qtwebengine.nix {};
qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
qtwebkit = callPackage ../modules/qtwebkit.nix {};
qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
qtwebview = callPackage ../modules/qtwebview.nix {};
qtx11extras = callPackage ../modules/qtx11extras.nix {};
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
env = callPackage ../qt-env.nix {};
full = env "qt-full-${qtbase.version}" ([
qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
qtscript qtsensors qtserialport qtsvg qttools qttranslations
qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets
qtwebview qtx11extras qtxmlpatterns
] ++ optional (!stdenv.isDarwin) qtwayland
++ optional (stdenv.isDarwin) qtmacextras);
qmake = makeSetupHook {
deps = [ self.qtbase.dev ];
substitutions = {
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
};
} ../hooks/qmake-hook.sh;
wrapQtAppsHook = makeSetupHook {
deps =
[ self.qtbase.dev makeWrapper ]
++ optional stdenv.isLinux self.qtwayland.dev;
} ../hooks/wrap-qt-apps-hook.sh;
};
self = makeScope newScope addPackages;
in self

View File

@ -30,6 +30,8 @@ stdenv.mkDerivation rec {
substituteInPlace CMakeLists.txt --replace "find_package(zlib " "find_package(ZLIB "
'';
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=deprecated-copy -Wno-error=pessimizing-move";
cmakeFlags = [
"-DPORTABLE=1"
"-DWITH_JEMALLOC=0"

View File

@ -32,7 +32,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ zeroc_mcpp bzip2 expat openssl lmdb ]
++ lib.optionals stdenv.isDarwin [ darwin.cctools libiconv Security ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=class-memaccess" ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=class-memaccess" "-Wno-error=deprecated-copy" ];
prePatch = lib.optional stdenv.isDarwin ''
substituteInPlace Make.rules.Darwin \

View File

@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
setSourceRoot = "export sourceRoot=${zookeeper.name}/src/c";
NIX_CFLAGS_COMPILE = stdenv.lib.optionals (!stdenv.isDarwin) [ "-Wno-error=format-overflow" ];
NIX_CFLAGS_COMPILE = stdenv.lib.optionals (!stdenv.isDarwin) [ "-Wno-error=format-overflow" "-Wno-error=stringop-truncation" ];
buildInputs = [ zookeeper bash ];

View File

@ -7,6 +7,7 @@
, msgpack
, pytest
, python
, gcc8
}:
buildPythonPackage rec {
@ -21,6 +22,7 @@ buildPythonPackage rec {
nativeBuildInputs = [
setuptools_scm
cython
gcc8
];
propagatedBuildInputs = [

View File

@ -244,6 +244,7 @@ in
"-Wno-error=class-memaccess"
"-Wno-error=ignored-qualifiers"
"-Wno-error=tautological-compare"
"-Wno-error=stringop-truncation"
];
dontBuild = false;
postPatch = ''

View File

@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
patches = [ ./gcc44.patch ];
NIX_CFLAGS_COMPILE = "-fpermissive";
meta = {
homepage = https://www.gnu.org/software/ddd;
description = "Graphical front-end for command-line debuggers";

View File

@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
libXext libXv libXrandr glib bison libunwind python3 procps
gtk-doc openssl peg ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ];
preConfigure = ''
./autogen.sh
'';

View File

@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
"-Wno-format-truncation"
"-Wno-format-overflow"
"-Wno-error=tautological-compare"
"-Wno-error=array-bounds"
];
postInstall = lib.optionalString stdenv.isLinux ''

View File

@ -1,21 +1,17 @@
{stdenv, fetchFromGitHub, autoreconfHook, ncurses, libpcap }:
{stdenv, fetchurl, ncurses, libpcap }:
stdenv.mkDerivation rec {
version = "3.5.1";
version = "3.6.0";
pname = "sipp";
src = fetchFromGitHub {
owner = "SIPp";
repo = "sipp";
rev = "v${version}";
sha256 = "179a1fvqyk3jpxbi28l1xfw22cw9vgvxrn19w5f38w74x0jwqg5k";
src = fetchurl {
url = "https://github.com/SIPp/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "1fx1iy2n0m2kr91n1ii30frbscq375k3lqihdgvrqxn0zq8pnzp4";
};
patchPhase = ''
postPatch = ''
sed -i "s@pcap/\(.*\).pcap@$out/share/pcap/\1.pcap@g" src/scenario.cpp
sed -i -e "s|AC_CHECK_LIB(curses|AC_CHECK_LIB(ncurses|" configure.ac
echo "#define SIPP_VERSION \"v${version}\"" > include/version.h
'';
configureFlags = [
@ -29,8 +25,6 @@ stdenv.mkDerivation rec {
buildInputs = [ncurses libpcap];
nativeBuildInputs = [ autoreconfHook ];
meta = with stdenv.lib; {
homepage = http://sipp.sf.net;
description = "The SIPp testing tool";

View File

@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
"AVR=avr-"
];
NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-truncation" ];
nativeBuildInputs = [ which pkgconfig avrgcc ];
buildInputs = [ libelf freeglut libGLU libGL ]
++ stdenv.lib.optional stdenv.isDarwin GLUT;

View File

@ -1,9 +1,12 @@
{ stdenv, fetchFromGitHub, cmake, python3, spirv-headers }:
let
# Update spirv-headers rev in lockstep according to DEPs file
version = "2019.4";
in
stdenv.mkDerivation rec {
pname = "spirv-tools";
# Update spirv-headers rev in lockstep according to DEPs file
version = "2019.4";
inherit version;
src = fetchFromGitHub {
owner = "KhronosGroup";
@ -13,7 +16,7 @@ stdenv.mkDerivation rec {
};
enableParallelBuilding = true;
buildInputs = [ cmake python3 ];
nativeBuildInputs = [ cmake python3 ];
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];

View File

@ -25,6 +25,8 @@ stdenv.mkDerivation (common // rec {
substituteInPlace lua/autoexec.lua --replace "/usr/share" "$out/share"
'';
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=deprecated-copy";
makeFlags = common.makeFlags ++ [
"LUA=1"
];

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
preConfigure = ''configureFlags="--with-cupsbackenddir=$out/lib/cups/backend"'';
buildInputs = [cups];
NIX_CFLAGS_COMPILE = "-include stdio.h";
NIX_CFLAGS_COMPILE = [ "-include stdio.h" "-Wno-error=stringop-truncation" ];
meta = {
description = "CUPS back-end for Canon printers";

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation {
pname = "citra";
version = "2019-05-25";
version = "2019-10-05";
# Submodules
src = fetchgit {
url = "https://github.com/citra-emu/citra";
rev = "186ffc235f744dad315a603a98cce4597ef0f65f";
sha256 = "0w24an80yjmkfcxjzdvsbpahx46bmd90liq5m6qva5pgnpmxx7pn";
rev = "35690e3ac7a340d941d3bf56080cf5aa6187c5c3";
sha256 = "11a4mdjabn3qrh0nn4pjl5fxs9nhf1k27wd486csfx88q2q9jvq8";
};
enableParallelBuilding = true;

View File

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, curl, boost, eigen
, freeimage, freetype, libGLU, libGL, SDL2, alsaLib, libarchive }:
, freeimage, freetype, libGLU, libGL, SDL2, alsaLib, libarchive
, fetchpatch }:
stdenv.mkDerivation {
pname = "emulationstation";
@ -12,14 +13,22 @@ stdenv.mkDerivation {
sha256 = "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake alsaLib boost curl eigen freeimage freetype libarchive libGLU libGL SDL2 ];
patches = [
(fetchpatch {
url = "https://github.com/Aloshi/EmulationStation/commit/49ccd8fc7a7b1dfd974fc57eb13317c42842f22c.patch";
sha256 = "1v5d81l7bav0k5z4vybrc3rjcysph6lkm5pcfr6m42wlz7jmjw0p";
})
];
nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [ alsaLib boost curl eigen freeimage freetype libarchive libGLU libGL SDL2 ];
buildPhase = "cmake . && make";
installPhase = ''
install -D ../emulationstation $out/bin/emulationstation
'';
enableParallelBuilding = true;
meta = {
description = "A flexible emulator front-end supporting keyboardless navigation and custom system themes";
homepage = https://emulationstation.org;

View File

@ -13,7 +13,7 @@ in stdenv.mkDerivation {
./do-not-create-sharedstatedir.patch
];
NIX_CFLAGS_COMPILE = [ "-I${gnu-efi}/include/efi" ];
NIX_CFLAGS_COMPILE = [ "-I${gnu-efi}/include/efi" "-Wno-error=address-of-packed-member" ];
# TODO: Just apply the disable to the efi subdir
hardeningDisable = [ "stackprotector" ];

View File

@ -51,10 +51,7 @@ stdenv.mkDerivation {
"-Wno-error=bool-compare"
"-Wno-error=deprecated-declarations"
"-DOBJDUMP_PATH=\"${binutils}/bin/objdump\""
]
# gcc before 6 doesn't know these options
++ stdenv.lib.optionals (hasPrefix "gcc-6" stdenv.cc.cc.name) [
"-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation"
"-Wno-error=stringop-truncation"
];
doCheck = false; # requires "sparse"

View File

@ -1,16 +1,24 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "mstpd";
version = "0.0.7";
version = "0.0.8";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "01majib6d1rixngf8c8vcrj1akf8nsqpxhdfdxxi2xwg23vx8f1a";
sha256 = "1xkfydxljdnj49p5r3mirk4k146428b6imfc9bkfps9yjn64mkgb";
};
patches = [
(fetchpatch {
name = "fix-strncpy-gcc9.patch";
url = "https://github.com/mstpd/mstpd/commit/d27d7e93485d881d8ff3a7f85309b545edbe1fc6.patch";
sha256 = "19456daih8l3y6m9kphjr7pj7slrqzbj6yacnlgznpxyd8y4d86y";
})
];
nativeBuildInputs = [ autoreconfHook ];
configureFlags = [

View File

@ -1,18 +1,22 @@
{ stdenv, kernel, udev, autoconf, automake, libtool }:
{ lib, stdenv, kernel, udev, autoconf, automake, libtool }:
stdenv.mkDerivation {
name = "usbip-${kernel.name}";
src = kernel.src;
patches = [
patches = lib.optionals (lib.versionAtLeast "5.4" kernel.version) [
# fixes build with gcc8
./fix-snprintf-truncation.patch
# fixes build with gcc9
./fix-strncpy-truncation.patch
];
nativeBuildInputs = [ autoconf automake libtool ];
buildInputs = [ udev ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ];
preConfigure = ''
cd tools/usb/usbip
./autogen.sh

View File

@ -0,0 +1,37 @@
diff --git a/tools/usb/usbip/libsrc/usbip_common.c b/tools/usb/usbip/libsrc/usbip_common.c
index bb424638d75b..2fc5837e609a 100644
--- a/tools/usb/usbip/libsrc/usbip_common.c
+++ b/tools/usb/usbip/libsrc/usbip_common.c
@@ -226,8 +226,8 @@ int read_usb_device(struct udev_device *sdev, struct usbip_usb_device *udev)
path = udev_device_get_syspath(sdev);
name = udev_device_get_sysname(sdev);
- strncpy(udev->path, path, SYSFS_PATH_MAX);
- strncpy(udev->busid, name, SYSFS_BUS_ID_SIZE);
+ strncpy(udev->path, path, SYSFS_PATH_MAX-1);
+ strncpy(udev->busid, name, SYSFS_BUS_ID_SIZE-1);
sscanf(name, "%u-%u", &busnum, &devnum);
udev->busnum = busnum;
diff --git a/tools/usb/usbip/libsrc/usbip_device_driver.c b/tools/usb/usbip/libsrc/usbip_device_driver.c
index 5a3726eb44ab..95b416af8b99 100644
--- a/tools/usb/usbip/libsrc/usbip_device_driver.c
+++ b/tools/usb/usbip/libsrc/usbip_device_driver.c
@@ -91,7 +91,7 @@ int read_usb_vudc_device(struct udev_device *sdev, struct usbip_usb_device *dev)
copy_descr_attr16(dev, &descr, idProduct);
copy_descr_attr16(dev, &descr, bcdDevice);
- strncpy(dev->path, path, SYSFS_PATH_MAX);
+ strncpy(dev->path, path, SYSFS_PATH_MAX-1);
dev->speed = USB_SPEED_UNKNOWN;
speed = udev_device_get_sysattr_value(sdev, "current_speed");
@@ -110,7 +110,7 @@ int read_usb_vudc_device(struct udev_device *sdev, struct usbip_usb_device *dev)
dev->busnum = 0;
name = udev_device_get_sysname(plat);
- strncpy(dev->busid, name, SYSFS_BUS_ID_SIZE);
+ strncpy(dev->busid, name, SYSFS_BUS_ID_SIZE-1);
return 0;
err:
fclose(fd);

View File

@ -2,11 +2,11 @@
let
name = "qpid-cpp-${version}";
version = "1.38.0";
version = "1.39.0";
src = fetchurl {
url = "mirror://apache/qpid/cpp/${version}/${name}.tar.gz";
sha256 = "1q7nsl9g8xv81ymhpkdp9mlw3gkzba62gggp3b72f0ywpc3kc3cz";
sha256 = "088dx1l6myrksbhpr15bs09j6qm8vdliqwjp2ja5amym47md103r";
};
meta = with stdenv.lib; {
@ -40,6 +40,8 @@ let
"-Wno-error=unused-function"
"-Wno-error=ignored-qualifiers"
"-Wno-error=catch-value"
] ++ stdenv.lib.optionals stdenv.cc.isGNU [
"-Wno-error=deprecated-copy"
];
};

View File

@ -20,10 +20,11 @@ stdenv.mkDerivation rec {
sed -i 's:READMEDIR = $(PREFIX):READMEDIR = '$out'/share/doc/archiveopteryx:' ./Jamsettings
'';
# fix build on gcc7
# fix build on gcc7+
NIX_CFLAGS_COMPILE = [
"-Wno-error=builtin-declaration-mismatch"
"-Wno-error=implicit-fallthrough"
"-Wno-error=deprecated-copy"
];
buildPhase = ''jam "-j$NIX_BUILD_CORES" '';

View File

@ -15,7 +15,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoconf automake libtool ];
buildInputs = [ openssl zlib ];
NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation";
NIX_CFLAGS_COMPILE = [
"-Wno-error=format-truncation"
"-Wno-error=address-of-packed-member"
"-Wno-error=format-overflow"
"-Wno-error=stringop-truncation"
];
preBuild = ''
patchShebangs build/gen_version

View File

@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "1m4hf26mgfvvx9z37qww8v8w4mhzyfl554ymdnzl99pr5ild093s";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=pessimizing-move" "-Wno-error=redundant-move" ];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ bzip2 libxml2 libzip boost lua luabind tbb expat ];

View File

@ -13,15 +13,17 @@ let
in
buildGoPackage rec {
pname = "cockroach";
version = "19.1.4";
version = "19.1.5";
goPackagePath = "github.com/cockroachdb/cockroach";
src = fetchurl {
url = "https://binaries.cockroachdb.com/cockroach-v${version}.src.tgz";
sha256 = "1bqzs844ildvyh4332vapsqhfkwcvjmgkkmn3i8ndd89q5yic6fq";
sha256 = "1pnzzmxxb7qxiiy8qpl2sifk4qrijjbhmzy47bnjj5ssdsjjjcqy";
};
NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isGNU [ "-Wno-error=deprecated-copy" "-Wno-error=redundant-move" "-Wno-error=pessimizing-move" ];
inherit nativeBuildInputs buildInputs;
buildPhase = ''

Some files were not shown because too many files have changed in this diff Show More