Merge staging and PR #35021

It's the last staging commit (mostly) built on Hydra,
and a minimal fix for Darwin regression in pysqlite.
This commit is contained in:
Vladimír Čunát
2018-02-16 09:13:12 +01:00
181 changed files with 3126 additions and 592 deletions

View File

@@ -83,11 +83,25 @@ stdenv.mkDerivation rec {
configureFlags = [ "--docdir=share/doc/${name}" ]
++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
++ optional (useQt4 || withQt5) "--qt-gui"
++ optionals (!useNcurses) [ "--" "-DBUILD_CursesDialog=OFF" ];
++ ["--"]
++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ]
++ optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++"
"-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc"
"-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
"-DCMAKE_RANLIB=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
"-DCMAKE_STRIP=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
# TODO: Why are ar and friends not provided by the bintools wrapper?
];
dontUseCmakeConfigure = true;
enableParallelBuilding = true;
# This isn't an autoconf configure script; triples are passed via
# CMAKE_SYSTEM_NAME, etc.
configurePlatforms = [ ];
meta = with stdenv.lib; {
homepage = http://www.cmake.org/;
description = "Cross-Platform Makefile Generator";

View File

@@ -33,7 +33,15 @@ cmakeConfigurePhase() {
# By now it supports linux builds only. We should set the proper
# CMAKE_SYSTEM_NAME otherwise.
# http://www.cmake.org/Wiki/CMake_Cross_Compiling
cmakeFlags="-DCMAKE_CXX_COMPILER=$crossConfig-g++ -DCMAKE_C_COMPILER=$crossConfig-gcc $cmakeFlags"
#
# Unfortunately cmake seems to expect absolute paths for ar, ranlib, and
# strip. Otherwise they are taken to be relative to the source root of
# the package being built.
cmakeFlags="-DCMAKE_CXX_COMPILER=$crossConfig-c++ $cmakeFlags"
cmakeFlags="-DCMAKE_C_COMPILER=$crossConfig-cc $cmakeFlags"
cmakeFlags="-DCMAKE_AR=$(command -v $crossConfig-ar) $cmakeFlags"
cmakeFlags="-DCMAKE_RANLIB=$(command -v $crossConfig-ranlib) $cmakeFlags"
cmakeFlags="-DCMAKE_STRIP=$(command -v $crossConfig-strip) $cmakeFlags"
fi
# This installs shared libraries with a fully-specified install

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation {
./pselect.patch
];
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ];
buildInputs = stdenv.lib.optionals guileSupport [ guile ];
configureFlags = stdenv.lib.optional guileSupport "--with-guile";

View File

@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4";
};
buildInputs = [ m4 perl ];
nativeBuildInputs = [ m4 perl ];
buildInputs = [ m4 ];
# Work around a known issue in Cygwin. See
# http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, which, pkgconfig, perl, guile, libxml2 }:
{ stdenv, buildPackages, fetchurl, which, pkgconfig, texinfo, perl, guile, libxml2 }:
stdenv.mkDerivation rec {
name = "autogen-${version}";
@@ -11,8 +11,21 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "lib" "out" "man" "info" ];
nativeBuildInputs = [ which pkgconfig perl ];
buildInputs = [ guile libxml2 ];
nativeBuildInputs = [ which pkgconfig perl ]
# autogen needs a build autogen when cross-compiling
++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
buildPackages.autogen buildPackages.texinfo ];
buildInputs = [
guile libxml2
];
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--with-libxml2=${libxml2.dev}"
"--with-libxml2-cflags=-I${libxml2.dev}/include/libxml2"
# the configure check for regcomp wants to run a host program
"libopts_cv_with_libregex=yes"
#"MAKEINFO=${buildPackages.texinfo}/bin/makeinfo"
];
postPatch = ''
# Fix a broken sed expression used for detecting the minor

View File

@@ -30,6 +30,10 @@ stdenv.mkDerivation rec {
patches = [ ./dfile.patch ];
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace dialects/linux/dlsof.h --replace "defined(__UCLIBC__)" 1
'';
# Stop build scripts from searching global include paths
LSOF_INCLUDE = "${stdenv.cc.libc}/include";
configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}";

View File

@@ -10,6 +10,12 @@ stdenv.mkDerivation rec {
sha256 = "1f1s8q3as3nrhcc1a8qc2z7imm644jfz44msn9sfv4mdynp2m2yb";
};
# Drop test that fails on musl (?)
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace tests/Makefile.am \
--replace "set-rpath-library.sh" ""
'';
setupHook = [ ./setup-hook.sh ];
nativeBuildInputs = [ autoreconfHook ];