From 81c6ff16dda0f3a959842a9b495cb0badda01983 Mon Sep 17 00:00:00 2001 From: Song Wenwu Date: Mon, 13 Jan 2014 20:08:20 +0800 Subject: [PATCH 1/6] tk: update to 8.5.15, enable xft support --- pkgs/development/libraries/tk/default.nix | 11 ++++++----- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/tk/default.nix b/pkgs/development/libraries/tk/default.nix index a45c4217c7b..7d55dd4c7d0 100644 --- a/pkgs/development/libraries/tk/default.nix +++ b/pkgs/development/libraries/tk/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchurl, tcl, x11, libX11 }: +{ stdenv, fetchurl, pkgconfig, tcl, libXft }: stdenv.mkDerivation { - name = "tk-8.5.7"; + name = "tk-8.5.15"; src = fetchurl { - url = "mirror://sourceforge/tcl/tk8.5.7-src.tar.gz"; - sha256 = "0c5gsy3nlwl0wn9swz4k4v7phy7nzjl317gca1jykgf4jz9nwdnr"; + url = "mirror://sourceforge/tcl/tk8.5.15-src.tar.gz"; + sha256 = "0grj0k0hljvwiz913pafqibz18fzk9xjxf0nzqrd9zdls036fp41"; }; postInstall = '' @@ -16,7 +16,7 @@ stdenv.mkDerivation { preConfigure = "cd unix"; - buildInputs = [ tcl x11 libX11 ]; + buildInputs = [ pkgconfig tcl libXft ]; inherit tcl; @@ -27,6 +27,7 @@ stdenv.mkDerivation { meta = { description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages"; homepage = http://www.tcl.tk/; + license = stdenv.lib.licenses.tcltk; maintainers = with stdenv.lib.maintainers; [ lovek323 ]; platforms = stdenv.lib.platforms.all; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ee74ee90e1..32cd77a4c36 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5621,9 +5621,7 @@ let tinyxml2 = callPackage ../development/libraries/tinyxml/2.6.2.nix { }; - tk = callPackage ../development/libraries/tk { - libX11 = xlibs.libX11; - }; + tk = callPackage ../development/libraries/tk { }; tnt = callPackage ../development/libraries/tnt { }; From a2dddb90dc056ddd8b8fd56ef3272c301580307b Mon Sep 17 00:00:00 2001 From: Song Wenwu Date: Mon, 13 Jan 2014 21:05:58 +0800 Subject: [PATCH 2/6] puredata: update to 0.45-4 --- pkgs/applications/audio/puredata/default.nix | 25 ++++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/audio/puredata/default.nix b/pkgs/applications/audio/puredata/default.nix index b1df008398d..d0394b72edd 100644 --- a/pkgs/applications/audio/puredata/default.nix +++ b/pkgs/applications/audio/puredata/default.nix @@ -1,23 +1,28 @@ -{ stdenv, fetchurl, alsaLib, autoconf, automake, fftw, gettext, glib -, jackaudio, libX11, libtool, makeWrapper, pkgconfig, tcl, tk +{ stdenv, fetchurl, autoreconfHook, gettext, makeWrapper +, alsaLib, jackaudio, tk }: stdenv.mkDerivation rec { name = "puredata-${version}"; - version = "0.44-0"; + version = "0.45-4"; src = fetchurl { url = "mirror://sourceforge/pure-data/pd-${version}.src.tar.gz"; - sha256 = "031bvqfnlpfx0y5n0l5rmslziqc6jgmk99x1prgh1rmhjhjdnijw"; + sha256 = "1ls2ap5yi2zxvmr247621g4jx0hhfds4j5704a050bn2n3l0va2p"; }; - buildInputs = [ - alsaLib autoconf automake fftw gettext glib jackaudio libX11 - libtool makeWrapper pkgconfig tcl tk - ]; + patchPhase = '' + rm portaudio/configure.in + ''; - preConfigure = '' - ./autogen.sh + nativeBuildInputs = [ autoreconfHook gettext makeWrapper ]; + + buildInputs = [ alsaLib jackaudio ]; + + configureFlags = '' + --enable-alsa + --enable-jack + --disable-portaudio ''; postInstall = '' From b6cc977580526918f8c1abe74985efec14dccbbf Mon Sep 17 00:00:00 2001 From: Song Wenwu Date: Tue, 14 Jan 2014 20:23:44 +0800 Subject: [PATCH 3/6] tcl: update to 8.5.15 --- pkgs/development/interpreters/tcl/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/tcl/default.nix b/pkgs/development/interpreters/tcl/default.nix index 48755065b99..c9a0fd7546f 100644 --- a/pkgs/development/interpreters/tcl/default.nix +++ b/pkgs/development/interpreters/tcl/default.nix @@ -1,11 +1,11 @@ -{stdenv, fetchurl}: +{ stdenv, fetchurl }: stdenv.mkDerivation { - name = "tcl-8.5.7"; + name = "tcl-8.5.15"; src = fetchurl { - url = mirror://sourceforge/tcl/tcl8.5.7-src.tar.gz; - sha256 = "1wk67qq12bdbaqsi6cxwj6ra8nc8ph1na9rh808kfk6hm18qvlk7"; + url = mirror://sourceforge/tcl/tcl8.5.15-src.tar.gz; + sha256 = "0kl8lbfwy4v4q4461wjmva95h0pgiprykislpw4nnpkrc7jalkpj"; }; preConfigure = "cd unix"; From 299af2ff45f0202067f8925913b203e4c0432f07 Mon Sep 17 00:00:00 2001 From: Song Wenwu Date: Sat, 25 Jan 2014 10:36:20 +0800 Subject: [PATCH 4/6] tk: fix issue #1479 --- pkgs/development/libraries/tk/default.nix | 2 ++ .../tk/different-prefix-with-tcl.patch | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/libraries/tk/different-prefix-with-tcl.patch diff --git a/pkgs/development/libraries/tk/default.nix b/pkgs/development/libraries/tk/default.nix index 7d55dd4c7d0..c7fe3e105d8 100644 --- a/pkgs/development/libraries/tk/default.nix +++ b/pkgs/development/libraries/tk/default.nix @@ -7,6 +7,8 @@ stdenv.mkDerivation { url = "mirror://sourceforge/tcl/tk8.5.15-src.tar.gz"; sha256 = "0grj0k0hljvwiz913pafqibz18fzk9xjxf0nzqrd9zdls036fp41"; }; + + patches = [ ./different-prefix-with-tcl.patch ]; postInstall = '' ln -s $out/bin/wish* $out/bin/wish diff --git a/pkgs/development/libraries/tk/different-prefix-with-tcl.patch b/pkgs/development/libraries/tk/different-prefix-with-tcl.patch new file mode 100644 index 00000000000..bf331b75cae --- /dev/null +++ b/pkgs/development/libraries/tk/different-prefix-with-tcl.patch @@ -0,0 +1,22 @@ +--- tk8.5.15-orig/unix/Makefile.in 2014-01-25 08:57:45.626713122 +0800 ++++ tk8.5.15/unix/Makefile.in 2014-01-25 08:59:35.315341825 +0800 +@@ -995,7 +995,8 @@ + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c + + tkWindow.o: $(GENERIC_DIR)/tkWindow.c +- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkWindow.c ++ $(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" \ ++ $(GENERIC_DIR)/tkWindow.c + + tkButton.o: $(GENERIC_DIR)/tkButton.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c +--- tk8.5.15-orig/generic/tkWindow.c 2014-01-25 10:10:03.964476436 +0800 ++++ tk8.5.15/generic/tkWindow.c 2014-01-25 10:08:06.020950933 +0800 +@@ -983,6 +983,7 @@ + + Tcl_SetVar(interp, "tk_patchLevel", TK_PATCH_LEVEL, TCL_GLOBAL_ONLY); + Tcl_SetVar(interp, "tk_version", TK_VERSION, TCL_GLOBAL_ONLY); ++ Tcl_SetVar(interp, "tk_library", TK_LIBRARY, TCL_GLOBAL_ONLY); + + tsdPtr->numMainWindows++; + return tkwin; From 0feb117c209baf1a77e90f922c7d1d98c708b2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 12 Apr 2014 10:44:17 +0200 Subject: [PATCH 5/6] tk: attempt to fix build on darwin It complained about missing fontconfig symbols. Also fix some white-space. --- pkgs/development/libraries/tk/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/tk/default.nix b/pkgs/development/libraries/tk/default.nix index c7fe3e105d8..2757a254385 100644 --- a/pkgs/development/libraries/tk/default.nix +++ b/pkgs/development/libraries/tk/default.nix @@ -1,25 +1,26 @@ -{ stdenv, fetchurl, pkgconfig, tcl, libXft }: +{ stdenv, fetchurl, pkgconfig, tcl, libXft, fontconfig }: stdenv.mkDerivation { name = "tk-8.5.15"; - + src = fetchurl { url = "mirror://sourceforge/tcl/tk8.5.15-src.tar.gz"; sha256 = "0grj0k0hljvwiz913pafqibz18fzk9xjxf0nzqrd9zdls036fp41"; }; patches = [ ./different-prefix-with-tcl.patch ]; - + postInstall = '' ln -s $out/bin/wish* $out/bin/wish ''; - + configureFlags = "--with-tcl=${tcl}/lib"; - + preConfigure = "cd unix"; - buildInputs = [ pkgconfig tcl libXft ]; - + buildInputs = [ pkgconfig tcl libXft ] + ++ stdenv.lib.optional stdenv.isDarwin fontconfig; + inherit tcl; passthru = { From 086d6c802b26c11ff7b01b4733de0e3b1b2c1c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 13 Apr 2014 14:56:54 +0200 Subject: [PATCH 6/6] tk on darwin: another attempt to fix build They add the -lfontconfig explicitly in macports, so hopefully it fixes it. https://trac.macports.org/browser/trunk/dports/x11/tk/Portfile --- pkgs/development/libraries/tk/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/tk/default.nix b/pkgs/development/libraries/tk/default.nix index 2757a254385..fd3684d189c 100644 --- a/pkgs/development/libraries/tk/default.nix +++ b/pkgs/development/libraries/tk/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation { buildInputs = [ pkgconfig tcl libXft ] ++ stdenv.lib.optional stdenv.isDarwin fontconfig; + NIX_CFLAGS_LINK = if stdenv.isDarwin then "-lfontconfig" else null; + inherit tcl; passthru = {