Merge pull request #44066 from Ericson2314/no-crossAttrs-master
treewide: Remove some more crossAttrs
This commit is contained in:
commit
46b03cd5b2
@ -1,9 +1,10 @@
|
||||
{ stdenv, lib, fetchurl
|
||||
, zlib, xz, python2, findXMLCatalogs, libiconv
|
||||
, zlib, xz, python2, findXMLCatalogs
|
||||
, buildPlatform, hostPlatform
|
||||
, pythonSupport ? buildPlatform == hostPlatform
|
||||
, icuSupport ? false, icu ? null
|
||||
, enableStatic ? false
|
||||
, enableShared ? hostPlatform.libc != "msvcrt"
|
||||
, enableStatic ? !enableShared,
|
||||
}:
|
||||
|
||||
let
|
||||
@ -35,22 +36,14 @@ in stdenv.mkDerivation rec {
|
||||
lib.optional pythonSupport "--with-python=${python}"
|
||||
++ lib.optional icuSupport "--with-icu"
|
||||
++ [ "--exec_prefix=$dev" ]
|
||||
++ lib.optional enableStatic "--enable-static";
|
||||
++ lib.optional enableStatic "--enable-static"
|
||||
++ lib.optional (!enableShared) "--disable-shared";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin &&
|
||||
hostPlatform.libc != "musl";
|
||||
|
||||
crossAttrs = lib.optionalAttrs (hostPlatform.libc == "msvcrt") {
|
||||
# creating the DLL is broken ATM
|
||||
dontDisableStatic = true;
|
||||
configureFlags = configureFlags ++ [ "--disable-shared" ];
|
||||
|
||||
# libiconv is a header dependency - propagating is enough
|
||||
propagatedBuildInputs = [ findXMLCatalogs libiconv ];
|
||||
};
|
||||
|
||||
preInstall = lib.optionalString pythonSupport
|
||||
''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
|
||||
installFlags = lib.optionalString pythonSupport
|
||||
|
@ -22,9 +22,10 @@ stdenv.mkDerivation rec {
|
||||
unset CPP
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
makeFlags = "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
|
||||
};
|
||||
# Use `lib.optionalString` next mass rebuild.
|
||||
makeFlags = if stdenv.buildPlatform == stdenv.hostPlatform
|
||||
then null
|
||||
else "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://fedorahosted.org/newt/;
|
||||
|
@ -15,8 +15,6 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ];
|
||||
buildInputs = [ xz ];
|
||||
# HACK until BUG issue #21191 is addressed
|
||||
crossAttrs.preUnpack = ''PATH="${buildPackages.xz}/bin''${PATH:+:}$PATH"'';
|
||||
|
||||
configureFlags = [
|
||||
"--sysconfdir=/etc"
|
||||
|
@ -34,10 +34,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = true;
|
||||
|
||||
crossAttrs = {
|
||||
patches = [ ./sharutils-4.11.1-cross-binary-mode-popen.patch ];
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Tools for remote synchronization and `shell archives'";
|
||||
longDescription =
|
||||
|
@ -1,63 +0,0 @@
|
||||
diff -Naur sharutils-4.11.1.orig/configure sharutils-4.11.1/configure
|
||||
--- sharutils-4.11.1.orig/configure 2011-06-20 11:07:40.000000000 -0400
|
||||
+++ sharutils-4.11.1/configure 2011-06-20 11:09:30.000000000 -0400
|
||||
@@ -26962,33 +26962,33 @@
|
||||
CATALOGS="$new_CATALOGS"
|
||||
fi
|
||||
|
||||
-if test "$cross_compiling" = yes; then :
|
||||
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
-as_fn_error $? "cannot run test program while cross compiling
|
||||
-See \`config.log' for more details" "$LINENO" 5; }
|
||||
-else
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
- FILE * fp = popen ("date", "rb");
|
||||
- exit (fp == NULL);
|
||||
- ;
|
||||
- return 0;
|
||||
-}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_run "$LINENO"; then :
|
||||
-
|
||||
+#if test "$cross_compiling" = yes; then :
|
||||
+# { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
+#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
+#as_fn_error $? "cannot run test program while cross compiling
|
||||
+#See \`config.log' for more details" "$LINENO" 5; }
|
||||
+#else
|
||||
+# cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+#/* end confdefs.h. */
|
||||
+#
|
||||
+#int
|
||||
+#main ()
|
||||
+#{
|
||||
+# FILE * fp = popen ("date", "rb");
|
||||
+# exit (fp == NULL);
|
||||
+# ;
|
||||
+# return 0;
|
||||
+#}
|
||||
+#_ACEOF
|
||||
+#if ac_fn_c_try_run "$LINENO"; then :
|
||||
+#
|
||||
$as_echo "#define BINARY_MODE_POPEN 1" >>confdefs.h
|
||||
-
|
||||
-
|
||||
-fi
|
||||
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
-fi
|
||||
+#
|
||||
+#
|
||||
+#fi
|
||||
+#rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
+# conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
+#fi
|
||||
|
||||
|
||||
|
@ -74,7 +74,10 @@ stdenv.mkDerivation rec {
|
||||
( if brotliSupport then "--with-brotli" else "--without-brotli" )
|
||||
]
|
||||
++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
|
||||
++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}";
|
||||
++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}"
|
||||
# For the 'urandom', maybe it should be a cross-system option
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
"--with-random=/dev/urandom";
|
||||
|
||||
CXX = "${stdenv.cc.targetPrefix}c++";
|
||||
CXXCPP = "${stdenv.cc.targetPrefix}c++ -E";
|
||||
@ -90,16 +93,6 @@ stdenv.mkDerivation rec {
|
||||
ln $out/lib/libcurl.so $out/lib/libcurl-gnutls.so.4.4.0
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
# We should refer to the cross built openssl
|
||||
# For the 'urandom', maybe it should be a cross-system option
|
||||
configureFlags = [
|
||||
( if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl" )
|
||||
( if gnutlsSupport then "--with-gnutls=${gnutls.crossDrv}" else "--without-gnutls" )
|
||||
"--with-random /dev/urandom"
|
||||
];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
inherit sslSupport openssl;
|
||||
};
|
||||
|
@ -78,7 +78,10 @@ stdenv.mkDerivation rec {
|
||||
( if brotliSupport then "--with-brotli" else "--without-brotli" )
|
||||
]
|
||||
++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
|
||||
++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}";
|
||||
++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}"
|
||||
# For the 'urandom', maybe it should be a cross-system option
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
"--with-random=/dev/urandom";
|
||||
|
||||
CXX = "${stdenv.cc.targetPrefix}c++";
|
||||
CXXCPP = "${stdenv.cc.targetPrefix}c++ -E";
|
||||
@ -94,16 +97,6 @@ stdenv.mkDerivation rec {
|
||||
ln $out/lib/libcurl.so $out/lib/libcurl-gnutls.so.4.4.0
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
# We should refer to the cross built openssl
|
||||
# For the 'urandom', maybe it should be a cross-system option
|
||||
configureFlags = [
|
||||
( if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl" )
|
||||
( if gnutlsSupport then "--with-gnutls=${gnutls.crossDrv}" else "--without-gnutls" )
|
||||
"--with-random=/dev/urandom"
|
||||
];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
inherit sslSupport openssl;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user