From 5c09abea7d63c9864b8b4c261837826c531bbf4a Mon Sep 17 00:00:00 2001 From: Eelco Visser Date: Mon, 18 Aug 2003 20:56:59 +0000 Subject: [PATCH] * pkgs/strategoxt/pkg-build.sh: generic build script for packages with the standard untar; bootstrap; configure; make; make install interface. The script is parameterized with arguments for configure. That is, all arguments are passed verbatim to configure. * asfix-tools, gpp, sc, srts, stratego-front, xtc: Fix expressions and (trivial) build script for basic strategoxt packages. All packages are abstracted on subversion revision. svn path=/nixpkgs/trunk/; revision=319 --- ChangeLog | 12 +++++++++ pkgs/asfix-tools/asfix-tools-build.sh | 3 +++ pkgs/asfix-tools/asfix-tools.fix | 19 +++++++++++++ pkgs/autoxt/autoxt-build.sh | 19 ++----------- pkgs/autoxt/autoxt.fix | 9 +++---- pkgs/gpp/gpp-build.sh | 4 +++ pkgs/gpp/gpp.fix | 21 +++++++++++++++ pkgs/sc/sc-build.sh | 3 +++ pkgs/sc/sc.fix | 19 +++++++++++++ pkgs/srts/srts-build.sh | 21 +-------------- pkgs/srts/srts.fix | 9 +++---- pkgs/stratego-front/stratego-front-build.sh | 5 ++++ pkgs/stratego-front/stratego-front.fix | 19 +++++++++++++ pkgs/strategoxt/fetchsvn.fix | 8 ++++++ pkgs/strategoxt/pkg-build.sh | 21 +++++++++++++++ pkgs/strategoxt/pkg.fix | 16 +++++++++++ pkgs/strategoxt/sdf-import-build.sh | 3 +++ pkgs/strategoxt/sdf-import.fix | 18 +++++++++++++ pkgs/strategoxt/strategoxt-head.fix | 2 +- pkgs/strategoxt/strategoxt.fix | 30 +++++++++++++++++---- pkgs/xtc/xtc-build.sh | 13 +-------- pkgs/xtc/xtc.fix | 9 +++---- 22 files changed, 210 insertions(+), 73 deletions(-) create mode 100644 ChangeLog create mode 100755 pkgs/asfix-tools/asfix-tools-build.sh create mode 100644 pkgs/asfix-tools/asfix-tools.fix create mode 100755 pkgs/gpp/gpp-build.sh create mode 100644 pkgs/gpp/gpp.fix create mode 100755 pkgs/sc/sc-build.sh create mode 100644 pkgs/sc/sc.fix create mode 100755 pkgs/stratego-front/stratego-front-build.sh create mode 100644 pkgs/stratego-front/stratego-front.fix create mode 100644 pkgs/strategoxt/fetchsvn.fix create mode 100755 pkgs/strategoxt/pkg-build.sh create mode 100644 pkgs/strategoxt/pkg.fix create mode 100755 pkgs/strategoxt/sdf-import-build.sh create mode 100644 pkgs/strategoxt/sdf-import.fix diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000000..d4e731eb6432 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,12 @@ +2003-08-18 Eelco Visser + + * pkgs/strategoxt/pkg-build.sh: generic build script for packages + with the standard untar; bootstrap; configure; make; make install + interface. The script is parameterized with arguments for + configure. That is, all arguments are passed verbatim to + configure. + + * asfix-tools, gpp, sc, srts, stratego-front, xtc: Fix expressions + and (trivial) build script for basic strategoxt packages. All + packages are abstracted on subversion revision. + diff --git a/pkgs/asfix-tools/asfix-tools-build.sh b/pkgs/asfix-tools/asfix-tools-build.sh new file mode 100755 index 000000000000..3887279b74c8 --- /dev/null +++ b/pkgs/asfix-tools/asfix-tools-build.sh @@ -0,0 +1,3 @@ +#! /bin/sh +set -e +$pkgbuild --with-aterm=$aterm --with-sdf=$sdf2 --with-srts=$srts --with-xtc=$xtc diff --git a/pkgs/asfix-tools/asfix-tools.fix b/pkgs/asfix-tools/asfix-tools.fix new file mode 100644 index 000000000000..c4a3ba7fee9a --- /dev/null +++ b/pkgs/asfix-tools/asfix-tools.fix @@ -0,0 +1,19 @@ +Function(["rev"], + Package( + [ ("name", "asfix-tools") + + , ("build", Relative("asfix-tools/asfix-tools-build.sh")) + , ("pkgbuild", Relative("strategoxt/pkg-build.sh")) + + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", "asfix-tools"), ("rev", Var("rev"))])) + + , ("stdenv", IncludeFix("stdenv/stdenv.fix")) + , ("aterm", IncludeFix("aterm/aterm.fix")) + , ("sdf2", IncludeFix("sdf2/sdf2.fix")) + , ("autoxt", App(IncludeFix("autoxt/autoxt.fix"),[("rev",Var("rev"))])) + , ("srts", App(IncludeFix("srts/srts.fix"),[("rev",Var("rev"))])) + , ("xtc", App(IncludeFix("xtc/xtc.fix"),[("rev",Var("rev"))])) + ] + ) +) diff --git a/pkgs/autoxt/autoxt-build.sh b/pkgs/autoxt/autoxt-build.sh index 609f0d166449..465f9c5c196f 100755 --- a/pkgs/autoxt/autoxt-build.sh +++ b/pkgs/autoxt/autoxt-build.sh @@ -1,18 +1,3 @@ #! /bin/sh - -. $stdenv/setup || exit 1 - -echo "out: $out" -echo "pwd: `pwd`" -echo "src: $src" -ls $src - -cp -r $src autoxt -ls - -cd autoxt || exit 1 -./bootstrap || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 - +set -e +$pkgbuild diff --git a/pkgs/autoxt/autoxt.fix b/pkgs/autoxt/autoxt.fix index 1a58dd01cfac..ef6812a38a2d 100644 --- a/pkgs/autoxt/autoxt.fix +++ b/pkgs/autoxt/autoxt.fix @@ -2,13 +2,10 @@ Function(["rev"], Package( [ ("name", "autoxt") - , ("build", Relative("autoxt/autoxt-build.sh")) + , ("build", Relative("strategoxt/pkg-build.sh")) - , ("src", App(IncludeFix("fetchsvn/fetchsvn.fix"), - [ ("url", "http://losser.st-lab.cs.uu.nl:12080/repos/StrategoXT/trunk/StrategoXT/autoxt") - , ("name", "autoxt") - , ("rev", Var("rev")) - ])) + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", "autoxt"), ("rev", Var("rev"))])) , ("stdenv", IncludeFix("stdenv/stdenv.fix")) ] diff --git a/pkgs/gpp/gpp-build.sh b/pkgs/gpp/gpp-build.sh new file mode 100755 index 000000000000..78cedd70c329 --- /dev/null +++ b/pkgs/gpp/gpp-build.sh @@ -0,0 +1,4 @@ +#! /bin/sh +set -e +$pkgbuild --with-aterm=$aterm --with-sdf=$sdf2 --with-srts=$srts --with-xtc=$xtc \ + --with-stratego-front=$stratego_front diff --git a/pkgs/gpp/gpp.fix b/pkgs/gpp/gpp.fix new file mode 100644 index 000000000000..e019fde7f0cb --- /dev/null +++ b/pkgs/gpp/gpp.fix @@ -0,0 +1,21 @@ +Function(["rev"], + Package( + [ ("name", "gpp") + + , ("build", Relative("gpp/gpp-build.sh")) + , ("pkgbuild", Relative("strategoxt/pkg-build.sh")) + + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", "gpp"), ("rev", Var("rev"))])) + + , ("stdenv", IncludeFix("stdenv/stdenv.fix")) + , ("aterm", IncludeFix("aterm/aterm.fix")) + , ("sdf2", IncludeFix("sdf2/sdf2.fix")) + , ("autoxt", App(IncludeFix("autoxt/autoxt.fix"),[("rev",Var("rev"))])) + , ("srts", App(IncludeFix("srts/srts.fix"),[("rev",Var("rev"))])) + , ("xtc", App(IncludeFix("xtc/xtc.fix"),[("rev",Var("rev"))])) + , ("stratego_front", + App(IncludeFix("stratego-front/stratego-front.fix"),[("rev",Var("rev"))])) + ] + ) +) diff --git a/pkgs/sc/sc-build.sh b/pkgs/sc/sc-build.sh new file mode 100755 index 000000000000..3887279b74c8 --- /dev/null +++ b/pkgs/sc/sc-build.sh @@ -0,0 +1,3 @@ +#! /bin/sh +set -e +$pkgbuild --with-aterm=$aterm --with-sdf=$sdf2 --with-srts=$srts --with-xtc=$xtc diff --git a/pkgs/sc/sc.fix b/pkgs/sc/sc.fix new file mode 100644 index 000000000000..b12bbbb11436 --- /dev/null +++ b/pkgs/sc/sc.fix @@ -0,0 +1,19 @@ +Function(["rev"], + Package( + [ ("name", "sc") + + , ("build", Relative("sc/sc-build.sh")) + , ("pkgbuild", Relative("strategoxt/pkg-build.sh")) + + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", "sc"), ("rev", Var("rev"))])) + + , ("stdenv", IncludeFix("stdenv/stdenv.fix")) + , ("aterm", IncludeFix("aterm/aterm.fix")) + , ("sdf2", IncludeFix("sdf2/sdf2.fix")) + , ("autoxt", App(IncludeFix("autoxt/autoxt.fix"),[("rev",Var("rev"))])) + , ("srts", App(IncludeFix("srts/srts.fix"),[("rev",Var("rev"))])) + , ("xtc", App(IncludeFix("xtc/xtc.fix"),[("rev",Var("rev"))])) + ] + ) +) diff --git a/pkgs/srts/srts-build.sh b/pkgs/srts/srts-build.sh index 784cf555f6b5..03ad3ee35c1d 100755 --- a/pkgs/srts/srts-build.sh +++ b/pkgs/srts/srts-build.sh @@ -1,22 +1,3 @@ #! /bin/sh - set -e - -. $stdenv/setup - -export PATH=$autoxt/bin:$PATH - -echo "out: $out" -echo "pwd: `pwd`" -echo "src: $src" -ls $src - -cp -r $src srts -ls - -cd srts -./bootstrap -./configure --prefix=$out --with-aterm=$aterm -make -make install - +$pkgbuild --with-aterm=$aterm diff --git a/pkgs/srts/srts.fix b/pkgs/srts/srts.fix index 0808a5709257..dc121c28b47a 100644 --- a/pkgs/srts/srts.fix +++ b/pkgs/srts/srts.fix @@ -3,13 +3,10 @@ Function(["rev"], [ ("name", "srts") , ("build", Relative("srts/srts-build.sh")) + , ("pkgbuild", Relative("strategoxt/pkg-build.sh")) - , ("src", App(IncludeFix("fetchsvn/fetchsvn.fix"), - [ ("url", "http://losser.st-lab.cs.uu.nl:12080/repos/StrategoXT/trunk/StrategoXT/srts") - , ("name", "srts") - , ("rev", Var("rev")) - ]) - ) + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", "srts"), ("rev", Var("rev"))])) , ("stdenv", IncludeFix("stdenv/stdenv.fix")) , ("aterm", IncludeFix("aterm/aterm.fix")) diff --git a/pkgs/stratego-front/stratego-front-build.sh b/pkgs/stratego-front/stratego-front-build.sh new file mode 100755 index 000000000000..286d2c51da79 --- /dev/null +++ b/pkgs/stratego-front/stratego-front-build.sh @@ -0,0 +1,5 @@ +#! /bin/sh +set -e +$pkgbuild --with-aterm=$aterm --with-sdf=$sdf2 --with-srts=$srts --with-xtc=$xtc + +$xtc/bin/xtc -r $(REPOSITORY) import \ No newline at end of file diff --git a/pkgs/stratego-front/stratego-front.fix b/pkgs/stratego-front/stratego-front.fix new file mode 100644 index 000000000000..d5538024c6d0 --- /dev/null +++ b/pkgs/stratego-front/stratego-front.fix @@ -0,0 +1,19 @@ +Function(["rev"], + Package( + [ ("name", "stratego-front") + + , ("build", Relative("stratego-front/stratego-front-build.sh")) + , ("pkgbuild", Relative("strategoxt/pkg-build.sh")) + + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", "stratego-front"), ("rev", Var("rev"))])) + + , ("stdenv", IncludeFix("stdenv/stdenv.fix")) + , ("aterm", IncludeFix("aterm/aterm.fix")) + , ("sdf2", IncludeFix("sdf2/sdf2.fix")) + , ("autoxt", App(IncludeFix("autoxt/autoxt.fix"),[("rev",Var("rev"))])) + , ("srts", App(IncludeFix("srts/srts.fix"),[("rev",Var("rev"))])) + , ("xtc", App(IncludeFix("xtc/xtc.fix"),[("rev",Var("rev"))])) + ] + ) +) diff --git a/pkgs/strategoxt/fetchsvn.fix b/pkgs/strategoxt/fetchsvn.fix new file mode 100644 index 000000000000..5bcbad45dc34 --- /dev/null +++ b/pkgs/strategoxt/fetchsvn.fix @@ -0,0 +1,8 @@ +Function(["name", "rev"], + App(IncludeFix("fetchsvn/fetchsvn.fix"), + [ ("name", Var("name")) + , ("url", "http://losser.labs.cs.uu.nl:12080/repos/StrategoXT/trunk/StrategoXT") + , ("dir", Var("name")) + , ("rev", Var("rev")) + ]) +) \ No newline at end of file diff --git a/pkgs/strategoxt/pkg-build.sh b/pkgs/strategoxt/pkg-build.sh new file mode 100755 index 000000000000..988553d2364f --- /dev/null +++ b/pkgs/strategoxt/pkg-build.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +set -e + +export NIX_LDFLAGS=-Wl,-s + +. $stdenv/setup + +export PATH=$autoxt/bin:$PATH + +ls -l +pwd + +gtar zxf $src/$name.tar.gz + +cd $name +./bootstrap +./configure --prefix=$out $* +make +make install + diff --git a/pkgs/strategoxt/pkg.fix b/pkgs/strategoxt/pkg.fix new file mode 100644 index 000000000000..db0a4721e3a0 --- /dev/null +++ b/pkgs/strategoxt/pkg.fix @@ -0,0 +1,16 @@ +Function(["name","rev"], + Package( + [ ("name", Var("name")) + + , ("build", Relative("pkg/pkg-build.sh")) + + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", Var("name")), ("rev", Var("rev"))])) + + , ("stdenv", IncludeFix("stdenv/stdenv.fix")) + , ("aterm", IncludeFix("aterm/aterm.fix")) + , ("autoxt", App(IncludeFix("autoxt/autoxt.fix"),[("rev",Var("rev"))])) + , ("srts", App(IncludeFix("srts/srts.fix"),[("rev",Var("rev"))])) + ] + ) +) \ No newline at end of file diff --git a/pkgs/strategoxt/sdf-import-build.sh b/pkgs/strategoxt/sdf-import-build.sh new file mode 100755 index 000000000000..5f8a29dda208 --- /dev/null +++ b/pkgs/strategoxt/sdf-import-build.sh @@ -0,0 +1,3 @@ +#! /bin/sh -v +set -e +$pkgbuild --with-aterm=$aterm --with-xtc=$xtc --with-sdf=$sdf2 \ No newline at end of file diff --git a/pkgs/strategoxt/sdf-import.fix b/pkgs/strategoxt/sdf-import.fix new file mode 100644 index 000000000000..0615418800e8 --- /dev/null +++ b/pkgs/strategoxt/sdf-import.fix @@ -0,0 +1,18 @@ +Function(["rev"], + Package( + [ ("name", "sdf-import") + + , ("build", Relative("strategoxt/sdf-import-build.sh")) + , ("pkgbuild", Relative("strategoxt/pkg-build.sh")) + + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", "sdf-import"), ("rev", Var("rev"))])) + + , ("stdenv", IncludeFix("stdenv/stdenv.fix")) + , ("aterm", IncludeFix("aterm/aterm.fix")) + , ("sdf2", IncludeFix("sdf2/sdf2.fix")) + , ("autoxt", App(IncludeFix("autoxt/autoxt.fix"),[("rev",Var("rev"))])) + , ("xtc", App(IncludeFix("xtc/xtc.fix"),[("rev",Var("rev"))])) + ] + ) +) diff --git a/pkgs/strategoxt/strategoxt-head.fix b/pkgs/strategoxt/strategoxt-head.fix index d5c9210bb11d..9ac72ab32bf8 100644 --- a/pkgs/strategoxt/strategoxt-head.fix +++ b/pkgs/strategoxt/strategoxt-head.fix @@ -1,4 +1,4 @@ App( IncludeFix("strategoxt/strategoxt.fix") - , [("rev", "3385")] + , [("rev", "3395")] ) \ No newline at end of file diff --git a/pkgs/strategoxt/strategoxt.fix b/pkgs/strategoxt/strategoxt.fix index dbd0a8b83d2e..8c24a1538abf 100644 --- a/pkgs/strategoxt/strategoxt.fix +++ b/pkgs/strategoxt/strategoxt.fix @@ -2,15 +2,35 @@ Function(["rev"], Package( [ ("name", "strategoxt") - , ("build", Relative("system/populate-linkdirs.pl")) + , ("build", Relative("system/populate-linkdirs.pl")) - , ("actAterm", IncludeFix("aterm/aterm.fix")) + , ("act-sdf2", + IncludeFix("sdf2/sdf2.fix")) - , ("actAutoxt", App(IncludeFix("autoxt/autoxt.fix"), [("rev",Var("rev"))])) + , ("act-autoxt", + App(IncludeFix("autoxt/autoxt.fix"), [("rev",Var("rev"))])) - , ("actSrts", App(IncludeFix("srts/srts.fix"), [("rev", Var("rev"))])) + , ("act-srts", + App(IncludeFix("srts/srts.fix"), [("rev", Var("rev"))])) + + , ("act-xtc", + App(IncludeFix("xtc/xtc.fix"),[("rev", Var("rev"))])) + + , ("act-sdf-import", + App(IncludeFix("strategoxt/sdf-import.fix"),[("rev", Var("rev"))])) + + , ("act-stratego-front", + App(IncludeFix("stratego-front/stratego-front.fix"),[("rev", Var("rev"))])) + + , ("act-asfix-tools", + App(IncludeFix("asfix-tools/asfix-tools.fix"),[("rev", Var("rev"))])) + + , ("act-sc", + App(IncludeFix("sc/sc.fix"),[("rev", Var("rev"))])) + + , ("act-gpp", + App(IncludeFix("gpp/gpp.fix"),[("rev", Var("rev"))])) - , ("actXtc", App(IncludeFix("xtc/xtc.fix"),[("rev", Var("rev"))])) ] ) ) diff --git a/pkgs/xtc/xtc-build.sh b/pkgs/xtc/xtc-build.sh index ef70164c305d..89d2e1a319bc 100755 --- a/pkgs/xtc/xtc-build.sh +++ b/pkgs/xtc/xtc-build.sh @@ -1,14 +1,3 @@ #! /bin/sh - set -e - -. $stdenv/setup - -export PATH=$autoxt/bin:$PATH - -cp -r $src $name -cd $name -./bootstrap -./configure --prefix=$out --with-aterm=$aterm --with-srts=$srts -make -make install +$pkgbuild --with-aterm=$aterm --with-srts=$srts diff --git a/pkgs/xtc/xtc.fix b/pkgs/xtc/xtc.fix index e7b54871d9c3..fbe1933906f3 100755 --- a/pkgs/xtc/xtc.fix +++ b/pkgs/xtc/xtc.fix @@ -3,13 +3,10 @@ Function(["rev"], [ ("name", "xtc") , ("build", Relative("xtc/xtc-build.sh")) + , ("pkgbuild", Relative("strategoxt/pkg-build.sh")) - , ("src", App(IncludeFix("fetchsvn/fetchsvn.fix"), - [ ("url", "http://losser.st-lab.cs.uu.nl:12080/repos/StrategoXT/trunk/StrategoXT/xtc") - , ("name", "xtc") - , ("rev", Var("rev")) - ]) - ) + , ("src", App(IncludeFix("strategoxt/fetchsvn.fix"), + [ ("name", "xtc"), ("rev", Var("rev"))])) , ("stdenv", IncludeFix("stdenv/stdenv.fix")) , ("aterm", IncludeFix("aterm/aterm.fix"))