libiconv: add "enableShared" option
When false, shared libraries will be disabled. also adds patch to *really* disable shared libiconv.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ fetchurl, stdenv, lib
|
||||
, buildPlatform, hostPlatform
|
||||
, enableStatic ? stdenv.hostPlatform.useAndroidPrebuilt
|
||||
, enableShared ? !stdenv.hostPlatform.useAndroidPrebuilt
|
||||
}:
|
||||
|
||||
# assert !stdenv.isLinux || hostPlatform != buildPlatform; # TODO: improve on cross
|
||||
@@ -23,10 +24,14 @@ stdenv.mkDerivation rec {
|
||||
lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc)
|
||||
''
|
||||
sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h
|
||||
'';
|
||||
''
|
||||
+ lib.optionalString (!enableShared) ''
|
||||
sed -i -e '/preload/d' Makefile.in
|
||||
'';
|
||||
|
||||
configureFlags = lib.optional stdenv.isFreeBSD "--with-pic"
|
||||
++ lib.optional enableStatic "--enable-static";
|
||||
++ lib.optional enableStatic "--enable-static"
|
||||
++ lib.optional (!enableShared) "--disable-shared";
|
||||
|
||||
meta = {
|
||||
description = "An iconv(3) implementation";
|
||||
|
||||
Reference in New Issue
Block a user