tkgate: rewrite expressions to get along without the broken 'libiconvOrLibc' attribute
This commit is contained in:
parent
8c75363c71
commit
c61d607340
@ -1,7 +1,9 @@
|
||||
{ stdenv, fetchurl, tcl, tk, libX11, libiconvOrLibc, which, yacc, flex, imake, xproto, gccmakedep }:
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
{ stdenv, fetchurl, tcl, tk, libX11, glibc, which, yacc, flex, imake, xproto, gccmakedep }:
|
||||
|
||||
let
|
||||
libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc}/include";
|
||||
libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc}/lib";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "tkgate-1.8.7";
|
||||
|
||||
@ -10,13 +12,13 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1pqywkidfpdbj18i03h97f4cimld4fb3mqfy8jjsxs12kihm18fs";
|
||||
};
|
||||
|
||||
buildInputs = [ tcl tk libX11 libiconvOrLibc which yacc flex imake xproto gccmakedep ];
|
||||
buildInputs = [ tcl tk libX11 which yacc flex imake xproto gccmakedep ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i config.h \
|
||||
-e 's|.*#define.*TKGATE_TCLTK_VERSIONS.*|#define TKGATE_TCLTK_VERSIONS "8.5"|' \
|
||||
-e 's|.*#define.*TKGATE_INCDIRS.*|#define TKGATE_INCDIRS "${tcl}/include ${tk}/include ${libiconvOrLibc}/include ${libX11}/include"|' \
|
||||
-e 's|.*#define.*TKGATE_LIBDIRS.*|#define TKGATE_LIBDIRS "${tcl}/lib ${tk}/lib ${libiconvOrLibc}/lib ${libX11}/lib"|' \
|
||||
-e 's|.*#define.*TKGATE_INCDIRS.*|#define TKGATE_INCDIRS "${tcl}/include ${tk}/include ${libiconvInc} ${libX11}/include"|' \
|
||||
-e 's|.*#define.*TKGATE_LIBDIRS.*|#define TKGATE_LIBDIRS "${tcl}/lib ${tk}/lib ${libiconvLib} ${libX11}/lib"|' \
|
||||
\
|
||||
-e '20 i #define TCL_LIBRARY "${tcl}/lib"' \
|
||||
-e '20 i #define TK_LIBRARY "${tk}/lib/${tk.libPrefix}"' \
|
||||
|
@ -1,7 +1,9 @@
|
||||
{ stdenv, fetchurl, tcl, tk, libX11, libiconvOrLibc }:
|
||||
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
{ stdenv, fetchurl, tcl, tk, libX11, glibc }:
|
||||
|
||||
let
|
||||
libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc}/include";
|
||||
libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc}/lib";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "tkgate-2.0-b10";
|
||||
|
||||
@ -16,8 +18,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patchPhase = ''
|
||||
sed -i configure \
|
||||
-e 's|TKGATE_INCDIRS=.*|TKGATE_INCDIRS="${tcl}/include ${tk}/include ${libiconvOrLibc}/include"|' \
|
||||
-e 's|TKGATE_LIBDIRS=.*|TKGATE_LIBDIRS="${tcl}/lib ${tk}/lib ${libiconvOrLibc}/lib"|'
|
||||
-e 's|TKGATE_INCDIRS=.*|TKGATE_INCDIRS="${tcl}/include ${tk}/include ${libiconvInc}"|' \
|
||||
-e 's|TKGATE_LIBDIRS=.*|TKGATE_LIBDIRS="${tcl}/lib ${tk}/lib ${libiconvLib}"|'
|
||||
sed -i options.h \
|
||||
-e 's|.* #define TCL_LIBRARY .*|#define TCL_LIBRARY "${tcl}/${tcl.libdir}"|' \
|
||||
-e 's|.* #define TK_LIBRARY .*|#define TK_LIBRARY "${tk}/lib/${tk.libPrefix}"|'
|
||||
|
Loading…
Reference in New Issue
Block a user