diff options
author | Christof Douma <wizztick@douma.eu.org> | 2006-02-02 17:07:07 +0000 |
---|---|---|
committer | Christof Douma <wizztick@douma.eu.org> | 2006-02-02 17:07:07 +0000 |
commit | 1fa4c66b73e65a9d88261e43de136b0be2ad6a72 (patch) | |
tree | c95f3dcdbb97cfa1cb7c1a1e0ce3f0fa21dd2ab2 /pkgs/development/compilers/qcmm | |
parent | 951754b034482695a8848ad0d6b2775bbb40c824 (diff) | |
download | nixpkgs-1fa4c66b73e65a9d88261e43de136b0be2ad6a72.tar nixpkgs-1fa4c66b73e65a9d88261e43de136b0be2ad6a72.tar.gz nixpkgs-1fa4c66b73e65a9d88261e43de136b0be2ad6a72.tar.bz2 nixpkgs-1fa4c66b73e65a9d88261e43de136b0be2ad6a72.tar.lz nixpkgs-1fa4c66b73e65a9d88261e43de136b0be2ad6a72.tar.xz nixpkgs-1fa4c66b73e65a9d88261e43de136b0be2ad6a72.tar.zst nixpkgs-1fa4c66b73e65a9d88261e43de136b0be2ad6a72.zip |
added version to uuagc
added: noweb, lua-5.x, lua-4.x, mk, qc-- (as qcmm) svn path=/nixpkgs/trunk/; revision=4681
Diffstat (limited to 'pkgs/development/compilers/qcmm')
-rw-r--r-- | pkgs/development/compilers/qcmm/builder.sh | 22 | ||||
-rw-r--r-- | pkgs/development/compilers/qcmm/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/compilers/qcmm/qcmm.patch | 109 |
3 files changed, 143 insertions, 0 deletions
diff --git a/pkgs/development/compilers/qcmm/builder.sh b/pkgs/development/compilers/qcmm/builder.sh new file mode 100644 index 00000000000..c1850306cc2 --- /dev/null +++ b/pkgs/development/compilers/qcmm/builder.sh @@ -0,0 +1,22 @@ +source $stdenv/setup + +configureFlags="--with-lua=$lua" + +MKFLAGS="-w$lua/include/lauxlib.h,$lua/include/luadebug.h,$lua/include/lua.h,$lua/include/lualib.h" + +buildPhase() { + mk timestamps + mk $MKFLAGS all all.opt +} + +installPhase() { +mk $MKFLAGS install install.opt +find $out -name \*.a -exec echo stripping {} \; \ + -exec strip -S {} \; || fail +patchELF $out +} + +buildPhase=buildPhase +installPhase=installPhase + +genericBuild diff --git a/pkgs/development/compilers/qcmm/default.nix b/pkgs/development/compilers/qcmm/default.nix new file mode 100644 index 00000000000..09807f22a97 --- /dev/null +++ b/pkgs/development/compilers/qcmm/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl, mk, ocaml, noweb, lua, groff }: +stdenv.mkDerivation { + name = "qcmm-2006-01-31"; + src = fetchurl { + url = http://losser.st-lab.cs.uu.nl/~cddouma/dist/qc--20060131.tar.gz; + md5 = "9097830775bcf22c9bad54f389f5db23"; + }; + buildInputs = [ mk ocaml noweb groff ]; + patches = [ ./qcmm.patch ]; + builder = ./builder.sh; + inherit lua; +} diff --git a/pkgs/development/compilers/qcmm/qcmm.patch b/pkgs/development/compilers/qcmm/qcmm.patch new file mode 100644 index 00000000000..570d87d5fee --- /dev/null +++ b/pkgs/development/compilers/qcmm/qcmm.patch @@ -0,0 +1,109 @@ +diff -ur qc--20060131.orig/configure qc--20060131/configure +--- qc--20060131.orig/configure 2005-11-05 22:15:24.000000000 +0100 ++++ qc--20060131/configure 2006-02-02 14:29:07.000000000 +0100 +@@ -93,7 +93,22 @@ + # for file in dirs and return, full path, if found, and "" otherwise. + # + +-sub search { search_with( sub($) { return (-f shift) }, @_) } ++sub combine { ++ my $base = shift; ++ my $file = shift; ++ return ("$base/$file") ++}; ++ ++sub search { search_with( sub($) { return (-f shift) }, \&combine, @_) } ++ ++sub search_suffix { ++ my $f = sub($) { ++ my $suffix = shift; ++ my $base = shift; ++ return ($base . $suffix); ++ }; ++ search_with(sub($) { return (-f shift) }, $f, @_) ++} + + sub searchx { + my $f = sub($) { +@@ -105,16 +120,17 @@ + } + return (1==2); # how do you write false in perl? + }; +- search_with($f, @_) ++ search_with($f, \&combine, @_) + } + + sub search_with { + my $p = shift; ++ my $com = shift; + my $file = shift; + +- printf(LOG "searching for %-20s", $file); ++ printf(LOG "searching for %-20s ", $file); + while ($f = shift (@_)) { +- my $x = "$f/$file"; ++ my $x = &$com($f, $file); + if (&$p($x)) { + print LOG "found $x\n"; + return $x +@@ -124,6 +140,20 @@ + return ""; + } + ++#configure lua based on some known installation prefix ++sub config_lua { ++ my $base = shift; ++ @libsuffix = ( ".so", "40.so", ".a", "40.a" ); ++ ++ $x{lua_h} = "$base/include/lua.h"; ++ $x{lualib_h} = "$base/include/lualib.h"; ++ $x{liblua} = search_suffix("$base/lib/liblua", @libsuffix); ++ $x{liblualib} = search_suffix("$base/lib/liblualib", @libsuffix); ++ $x{lua_inc} = "-I$base/include"; ++ $x{lua_lib} = "-L$base/lib/"; ++ $x{lua_libs} = "-llua -llualib"; ++} ++ + + # + # compile and run a small C program to find out about architecture +@@ -183,6 +213,8 @@ + + ./configure [options] + ++ --with-lua=/lua/path lua is installed in /lua/path the default ++ is to search for standard locations + --prefix=/usr/local install into the /usr/local hierarchy which + is also the default + -h, --help this summary +@@ -224,15 +256,15 @@ + # We start from here with reading the command line + # ------------------------------------------------------------------ + ++open (LOG, ">$configure_log") || die "cannot write configure.log: $!"; ++ + foreach (@ARGV) { + if (/^--?prefix=(.*)$/) { $x{prefix}=$1 } + elsif (/^--?h(elp?)$/) { usage(); exit 0 } ++ elsif (/^--?with-lua=(.*)$/) { config_lua($1) } + else { usage(); exit 1 } + } + +- +-open (LOG, ">$configure_log") || die "cannot write configure.log: $!"; +- + # check for various executables and versions. Only update variable if + # it is not already set. + # +diff -ur qc--20060131.orig/doc/mkfile qc--20060131/doc/mkfile +--- qc--20060131.orig/doc/mkfile 2005-11-07 01:41:21.000000000 +0100 ++++ qc--20060131/doc/mkfile 2006-02-02 00:38:00.000000000 +0100 +@@ -92,7 +92,7 @@ + # and accessible from Lua as This.manual. + + qc--.man:D: qc--.1 +- GROFF_NO_SGR=1 nroff -man -Tascii qc--.1 | ul -t dump > $target ++ GROFF_NO_SGR=1 nroff -man -Tascii qc--.1 > $target + + release.tex:D: release.nw + noweave -delay $prereq > $target |