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
|
{ stdenv, lib, fetchurl
|
||||||
, zlib, xz, python2, findXMLCatalogs, libiconv
|
, zlib, xz, python2, findXMLCatalogs
|
||||||
, buildPlatform, hostPlatform
|
, buildPlatform, hostPlatform
|
||||||
, pythonSupport ? buildPlatform == hostPlatform
|
, pythonSupport ? buildPlatform == hostPlatform
|
||||||
, icuSupport ? false, icu ? null
|
, icuSupport ? false, icu ? null
|
||||||
, enableStatic ? false
|
, enableShared ? hostPlatform.libc != "msvcrt"
|
||||||
|
, enableStatic ? !enableShared,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -35,22 +36,14 @@ in stdenv.mkDerivation rec {
|
|||||||
lib.optional pythonSupport "--with-python=${python}"
|
lib.optional pythonSupport "--with-python=${python}"
|
||||||
++ lib.optional icuSupport "--with-icu"
|
++ lib.optional icuSupport "--with-icu"
|
||||||
++ [ "--exec_prefix=$dev" ]
|
++ [ "--exec_prefix=$dev" ]
|
||||||
++ lib.optional enableStatic "--enable-static";
|
++ lib.optional enableStatic "--enable-static"
|
||||||
|
++ lib.optional (!enableShared) "--disable-shared";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin &&
|
doCheck = (stdenv.hostPlatform == stdenv.buildPlatform) && !stdenv.isDarwin &&
|
||||||
hostPlatform.libc != "musl";
|
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
|
preInstall = lib.optionalString pythonSupport
|
||||||
''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
|
''substituteInPlace python/libxml2mod.la --replace "${python}" "$py"'';
|
||||||
installFlags = lib.optionalString pythonSupport
|
installFlags = lib.optionalString pythonSupport
|
||||||
|
@ -22,9 +22,10 @@ stdenv.mkDerivation rec {
|
|||||||
unset CPP
|
unset CPP
|
||||||
'';
|
'';
|
||||||
|
|
||||||
crossAttrs = {
|
# Use `lib.optionalString` next mass rebuild.
|
||||||
makeFlags = "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
|
makeFlags = if stdenv.buildPlatform == stdenv.hostPlatform
|
||||||
};
|
then null
|
||||||
|
else "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://fedorahosted.org/newt/;
|
homepage = https://fedorahosted.org/newt/;
|
||||||
|
@ -15,8 +15,6 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ];
|
nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ];
|
||||||
buildInputs = [ xz ];
|
buildInputs = [ xz ];
|
||||||
# HACK until BUG issue #21191 is addressed
|
|
||||||
crossAttrs.preUnpack = ''PATH="${buildPackages.xz}/bin''${PATH:+:}$PATH"'';
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
|
@ -34,10 +34,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
crossAttrs = {
|
|
||||||
patches = [ ./sharutils-4.11.1-cross-binary-mode-popen.patch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Tools for remote synchronization and `shell archives'";
|
description = "Tools for remote synchronization and `shell archives'";
|
||||||
longDescription =
|
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" )
|
( if brotliSupport then "--with-brotli" else "--without-brotli" )
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
|
++ 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++";
|
CXX = "${stdenv.cc.targetPrefix}c++";
|
||||||
CXXCPP = "${stdenv.cc.targetPrefix}c++ -E";
|
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
|
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 = {
|
passthru = {
|
||||||
inherit sslSupport openssl;
|
inherit sslSupport openssl;
|
||||||
};
|
};
|
||||||
|
@ -78,7 +78,10 @@ stdenv.mkDerivation rec {
|
|||||||
( if brotliSupport then "--with-brotli" else "--without-brotli" )
|
( if brotliSupport then "--with-brotli" else "--without-brotli" )
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
|
++ 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++";
|
CXX = "${stdenv.cc.targetPrefix}c++";
|
||||||
CXXCPP = "${stdenv.cc.targetPrefix}c++ -E";
|
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
|
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 = {
|
passthru = {
|
||||||
inherit sslSupport openssl;
|
inherit sslSupport openssl;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user