diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2013-12-10 13:00:02 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2013-12-10 13:00:02 +0100 |
commit | 089da3ee5c25f5d36d660d6c679cb0c963617fa7 (patch) | |
tree | c21e0b5ec1b1daa2cb08d2a9fdb460aa13d10c7f /pkgs/development/tools/build-managers/gnumake/3.81 | |
parent | db32c7ca8bf7daad6792c3e9597c68768aafd271 (diff) | |
parent | 393dcd9c84e104ab7ff7e35f5612dc221e58d29b (diff) | |
download | nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.gz nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.bz2 nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.lz nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.xz nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.tar.zst nixlib-089da3ee5c25f5d36d660d6c679cb0c963617fa7.zip |
Merge master into x-updates
Conflicts (simple): pkgs/top-level/all-packages.nix
Diffstat (limited to 'pkgs/development/tools/build-managers/gnumake/3.81')
3 files changed, 206 insertions, 0 deletions
diff --git a/pkgs/development/tools/build-managers/gnumake/3.81/default.nix b/pkgs/development/tools/build-managers/gnumake/3.81/default.nix new file mode 100644 index 000000000000..56d2326c916b --- /dev/null +++ b/pkgs/development/tools/build-managers/gnumake/3.81/default.nix @@ -0,0 +1,47 @@ +{stdenv, fetchurl}: + +let version = "3.81"; in +stdenv.mkDerivation { + name = "gnumake-${version}"; + + src = fetchurl { + url = "mirror://gnu/make/make-${version}.tar.bz2"; + md5 = "354853e0b2da90c527e35aabb8d6f1e6"; + }; + + doCheck = true; + + patches = + [ + # Provide nested log output for subsequent pretty-printing by + # nix-log2xml. + ./log-3.81.patch + + # Purity: don't look for library dependencies (of the form + # `-lfoo') in /lib and /usr/lib. It's a stupid feature anyway. + # Likewise, when searching for included Makefiles, don't look in + # /usr/include and friends. + ./impure-dirs.patch + ]; + patchFlags = "-p0"; + + meta = { + description = "GNU Make, a program controlling the generation of non-source files from sources"; + + longDescription = + '' Make is a tool which controls the generation of executables and + other non-source files of a program from the program's source files. + + Make gets its knowledge of how to build your program from a file + called the makefile, which lists each of the non-source files and + how to compute it from other files. When you write a program, you + should write a makefile for it, so that it is possible to use Make + to build and install the program. + ''; + + homepage = http://www.gnu.org/software/make/; + + license = "GPLv2+"; + maintainers = [ stdenv.lib.maintainers.ludo ]; + }; +} diff --git a/pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch new file mode 100644 index 000000000000..f6646f1d0126 --- /dev/null +++ b/pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch @@ -0,0 +1,34 @@ +diff -rc read.c read.c +*** read.c 2006-03-17 15:24:20.000000000 +0100 +--- read.c 2007-05-24 17:16:31.000000000 +0200 +*************** +*** 99,107 **** +--- 99,109 ---- + #endif + INCLUDEDIR, + #ifndef _AMIGA ++ #if 0 + "/usr/gnu/include", + "/usr/local/include", + "/usr/include", ++ #endif + #endif + 0 + }; +diff -rc reremake.c +*** remake.c 2006-03-20 03:36:37.000000000 +0100 +--- remake.c 2007-05-24 17:06:54.000000000 +0200 +*************** +*** 1452,1460 **** +--- 1452,1462 ---- + static char *dirs[] = + { + #ifndef _AMIGA ++ #if 0 + "/lib", + "/usr/lib", + #endif ++ #endif + #if defined(WINDOWS32) && !defined(LIBDIR) + /* + * This is completely up to the user at product install time. Just define diff --git a/pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch b/pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch new file mode 100644 index 000000000000..b98d85a08265 --- /dev/null +++ b/pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch @@ -0,0 +1,125 @@ +diff -rc job.c job.c +*** job.c 2006-03-20 04:03:04.000000000 +0100 +--- job.c 2009-01-19 19:37:28.000000000 +0100 +*************** +*** 1083,1089 **** + appear. */ + + message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag)) +! ? "%s" : (char *) 0, p); + + /* Tell update_goal_chain that a command has been started on behalf of + this target. It is important that this happens here and not in +--- 1083,1089 ---- + appear. */ + + message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag)) +! ? (enable_nested_output ? "\e[3s\e[a%s\e[b" : "%s") : (char *) 0, p); + + /* Tell update_goal_chain that a command has been started on behalf of + this target. It is important that this happens here and not in +diff -rc main.c main.c +*** main.c 2006-03-20 03:36:37.000000000 +0100 +--- main.c 2009-01-19 19:41:41.000000000 +0100 +*************** +*** 886,891 **** +--- 886,900 ---- + } + + ++ static void close_nesting() ++ { ++ while (stdout_nesting_level--) ++ printf("\e[q"); ++ while (stderr_nesting_level--) ++ fprintf(stderr, "\e[q"); ++ } ++ ++ + #ifdef _AMIGA + int + main (int argc, char **argv) +*************** +*** 931,936 **** +--- 940,950 ---- + atexit (close_stdout); + #endif + ++ atexit(close_nesting); ++ ++ if (getenv("NIX_INDENT_MAKE")) ++ enable_nested_output = 1; ++ + /* Needed for OS/2 */ + initialize_main(&argc, &argv); + +*************** +*** 3095,3100 **** +--- 3109,3120 ---- + + /* Use entire sentences to give the translators a fighting chance. */ + ++ if (entering && enable_nested_output) ++ { ++ printf("\e[p"); ++ stdout_nesting_level++; ++ } ++ + if (makelevel == 0) + if (starting_directory == 0) + if (entering) +*************** +*** 3124,3129 **** +--- 3144,3159 ---- + printf (_("%s[%u]: Leaving directory `%s'\n"), + program, makelevel, starting_directory); + ++ if (!entering && enable_nested_output) ++ { ++ printf("\e[q"); ++ stdout_nesting_level--; ++ } ++ + /* Flush stdout to be sure this comes before any stderr output. */ + fflush (stdout); + } ++ ++ int enable_nested_output = 0; ++ int stdout_nesting_level = 0; ++ int stderr_nesting_level = 0; +diff -rc make.h +*** make.h 2006-02-16 00:54:43.000000000 +0100 +--- make.h 2009-01-19 19:32:03.000000000 +0100 +*************** +*** 609,611 **** +--- 609,614 ---- + #define ENULLLOOP(_v,_c) do{ errno = 0; \ + while (((_v)=_c)==0 && errno==EINTR); }while(0) + ++ extern int enable_nested_output; ++ extern int stdout_nesting_level; ++ extern int stderr_nesting_level; +diff -rc reremake.c +*** remake.c 2006-03-20 03:36:37.000000000 +0100 +--- remake.c 2009-01-19 19:39:40.000000000 +0100 +*************** +*** 1120,1126 **** +--- 1120,1137 ---- + /* The normal case: start some commands. */ + if (!touch_flag || file->cmds->any_recurse) + { ++ if (enable_nested_output) ++ { ++ log_working_directory (1); ++ fprintf(stderr, "\e[pbuilding %s\n", file->name); ++ stderr_nesting_level++; ++ } + execute_file_commands (file); ++ if (enable_nested_output) ++ { ++ fprintf(stderr, "\e[q"); ++ stderr_nesting_level--; ++ } + return; + } + |