pakcs: update to version 1.11.2
This commit is contained in:
parent
5e4a456e6f
commit
5c95ebf300
44
pkgs/development/compilers/pakcs/adjust-buildsystem.patch
Normal file
44
pkgs/development/compilers/pakcs/adjust-buildsystem.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
diff -Naur pakcs-1.11.2-upstream/Makefile pakcs-1.11.2/Makefile
|
||||||
|
--- pakcs-1.11.2-upstream/Makefile 2013-03-21 04:58:38.000000000 -0430
|
||||||
|
+++ pakcs-1.11.2/Makefile 2013-05-09 15:04:48.035646127 -0430
|
||||||
|
@@ -55,7 +55,6 @@
|
||||||
|
#
|
||||||
|
.PHONY: install
|
||||||
|
install: installscripts
|
||||||
|
- $(MAKE) frontend
|
||||||
|
# pre-compile all libraries:
|
||||||
|
@cd lib && $(MAKE) fcy
|
||||||
|
# install the Curry2Prolog compiler as a saved system:
|
||||||
|
@@ -66,11 +65,6 @@
|
||||||
|
@cd lib && $(MAKE) acy
|
||||||
|
# prepare for separate compilation by compiling all librariers to Prolog code:
|
||||||
|
@if [ -r bin/pakcs ] ; then cd lib && $(MAKE) pl ; fi
|
||||||
|
- # compile the Curry Port Name Server demon:
|
||||||
|
- @if [ -r bin/pakcs ] ; then cd cpns && $(MAKE) ; fi
|
||||||
|
- # compile the event handler demon for dynamic web pages:
|
||||||
|
- @if [ -r bin/pakcs ] ; then cd www && $(MAKE) ; fi
|
||||||
|
- $(MAKE) tools
|
||||||
|
$(MAKE) docs
|
||||||
|
chmod -R go+rX .
|
||||||
|
|
||||||
|
diff -Naur pakcs-1.11.2-upstream/scripts/pakcs.sh pakcs-1.11.2/scripts/pakcs.sh
|
||||||
|
--- pakcs-1.11.2-upstream/scripts/pakcs.sh 2013-03-21 04:52:59.000000000 -0430
|
||||||
|
+++ pakcs-1.11.2/scripts/pakcs.sh 2013-05-09 03:14:23.500876628 -0430
|
||||||
|
@@ -16,7 +16,7 @@
|
||||||
|
# use readline wrapper rlwrap if it is installed and we have tty as stdin:
|
||||||
|
USERLWRAP=no
|
||||||
|
if tty -s ; then
|
||||||
|
- RLWRAP=`which rlwrap`
|
||||||
|
+ RLWRAP=`type -P rlwrap`
|
||||||
|
if [ -x "$RLWRAP" ] ; then
|
||||||
|
USERLWRAP=yes
|
||||||
|
fi
|
||||||
|
@@ -29,7 +29,7 @@
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $USERLWRAP = yes ] ; then
|
||||||
|
- exec rlwrap -c -f "$PAKCSHOME/tools/rlwrap" "$REPL" ${1+"$@"}
|
||||||
|
+ exec rlwrap -a -c -f "$PAKCSHOME/tools/rlwrap" "$REPL" ${1+"$@"}
|
||||||
|
else
|
||||||
|
exec "$REPL" ${1+"$@"}
|
||||||
|
fi
|
@ -1,62 +1,101 @@
|
|||||||
{ stdenv, fetchurl, ghc, swiProlog, syb, mtl, makeWrapper, rlwrap, tk }:
|
{ stdenv, fetchurl, cabal, swiProlog, mtl, syb, makeWrapper, rlwrap, tk }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
let
|
||||||
name = "pakcs-1.10.0";
|
fname = "pakcs-1.11.2";
|
||||||
|
|
||||||
src = fetchurl {
|
fsrc = fetchurl {
|
||||||
url = "http://www.informatik.uni-kiel.de/~pakcs/download/pakcs_src.tar.gz";
|
url = "http://www.informatik.uni-kiel.de/~pakcs/download/${fname}-src.tar.gz";
|
||||||
sha256 = "6a4a45c9f3d0b61cfec8414943c2a852bec3665a7e2638b039193dd43e9802c4";
|
sha256 = "1x23kn91v44my4rd8j3247pj8i2myz82rzgbq07asi1x21bpvvmy";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ ghc swiProlog syb mtl makeWrapper rlwrap tk ];
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
prePatch = ''
|
name = fname;
|
||||||
# Remove copying pakcsrc into $HOME.
|
|
||||||
sed -i '/update-pakcsrc/d' Makefile
|
|
||||||
|
|
||||||
# Remove copying pakcsinitrc into $HOME
|
curryBase = cabal.mkDerivation(self: {
|
||||||
sed -i '68d' configure-pakcs
|
pname = "curryBase";
|
||||||
|
version = "local";
|
||||||
|
src = fsrc;
|
||||||
|
sourceRoot = "${name}/frontend/curry-base";
|
||||||
|
isLibrary = true;
|
||||||
|
buildDepends = [ mtl syb ];
|
||||||
|
});
|
||||||
|
|
||||||
|
curryFront = cabal.mkDerivation(self: {
|
||||||
|
pname = "curryFront";
|
||||||
|
version = "local";
|
||||||
|
src = fsrc;
|
||||||
|
sourceRoot = "${name}/frontend/curry-frontend";
|
||||||
|
isLibrary = true;
|
||||||
|
isExecutable = true;
|
||||||
|
buildDepends = [ mtl syb curryBase ];
|
||||||
|
});
|
||||||
|
|
||||||
|
src = fsrc;
|
||||||
|
|
||||||
|
buildInputs = [ swiProlog makeWrapper rlwrap tk ];
|
||||||
|
|
||||||
|
patches = [ ./adjust-buildsystem.patch ];
|
||||||
|
|
||||||
|
configurePhase = ''
|
||||||
|
# Phony HOME.
|
||||||
|
mkdir phony-home
|
||||||
|
export HOME=$(pwd)/phony-home
|
||||||
|
|
||||||
|
# SWI Prolog
|
||||||
|
sed -i 's@SWIPROLOG=@SWIPROLOG='${swiProlog}/bin/swipl'@' pakcsinitrc
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = [ ./pakcs-ghc741.patch ];
|
preBuild = ''
|
||||||
|
# Set up link to cymake, which has been built already.
|
||||||
preConfigure = ''
|
ensureDir bin/.local
|
||||||
# Path to GHC and SWI Prolog
|
ln -s ${curryFront}/bin/cymake bin/.local/
|
||||||
sed -i 's@GHC=@GHC=${ghc}/bin/ghc@' bin/.pakcs_variables
|
|
||||||
sed -i 's@SWIPROLOG=@SWIPROLOG=${swiProlog}/bin/swipl@' bin/.pakcs_variables
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
installPhase = ''
|
||||||
cp pakcsrc $out/
|
# Prepare PAKCSHOME directory.
|
||||||
cp update-pakcsrc $out/
|
ensureDir $out/pakcs
|
||||||
cp -r bin/ $out/
|
for d in bin curry2prolog currytools lib tools cpns include www examples docs ; do
|
||||||
cp -r cpns/ $out/
|
cp -r $d $out/pakcs ;
|
||||||
cp -r curry2prolog/ $out/
|
done
|
||||||
cp -r docs/ $out/
|
cp pakcsrc.default $out/pakcs
|
||||||
cp -r examples/ $out/
|
cp pakcsinitrc $out/pakcs
|
||||||
cp -r include/ $out/
|
|
||||||
cp -r lib/ $out/
|
|
||||||
cp -r mccparser/ $out/
|
|
||||||
cp -r tools/ $out/
|
|
||||||
cp -r www/ $out/
|
|
||||||
|
|
||||||
# The Prolog sources must be built in their final directory.
|
# Fixing PAKCSHOME and related paths.
|
||||||
(cd $out/curry2prolog/ ; make)
|
sed -i 's@PAKCSHOME=/tmp/.*@PAKCSHOME='$out/pakcs'@' $out/pakcs/bin/{pakcs,makecurrycgi,parsecurry,.makesavedstate}
|
||||||
|
|
||||||
mkdir -p $out/share/emacs/site-lisp/curry-pakcs
|
# Fix symbolic links into the tmp build dir.
|
||||||
for e in "$out/tools/emacs/"*.el ; do
|
ln -s ../currytools/CASS/cass $out/pakcs/bin/cass
|
||||||
ln -s $e $out/share/emacs/site-lisp/curry-pakcs/;
|
ln -s ../currytools/currydoc/CurryDoc $out/pakcs/bin/currydoc
|
||||||
|
|
||||||
|
# The Prolog sources must be rebuilt in their final directory,
|
||||||
|
# to switch the embedded references to the tmp build directory.
|
||||||
|
export TEMP=/tmp
|
||||||
|
(cd $out/pakcs/curry2prolog/ ; rm c2p.state ; make)
|
||||||
|
cp Makefile $out/pakcs
|
||||||
|
(cd $out/pakcs ; make tools)
|
||||||
|
(cd $out/pakcs/cpns ; make)
|
||||||
|
(cd $out/pakcs/www ; make)
|
||||||
|
|
||||||
|
# Install bin.
|
||||||
|
ensureDir $out/bin
|
||||||
|
for b in makecurrycgi .makesavedstate pakcs parsecurry cleancurry \
|
||||||
|
addtypes cass currybrowse currycreatemake currydoc currytest \
|
||||||
|
dataToXml erd2curry ; do
|
||||||
|
ln -s $out/pakcs/bin/$b $out/bin/ ;
|
||||||
done
|
done
|
||||||
|
|
||||||
sed -i 's@which@type -P@' $out/bin/.pakcs_wrapper
|
# Place emacs lisp files in expected locations.
|
||||||
|
ensureDir $out/share/emacs/site-lisp/curry-pakcs
|
||||||
|
for e in "tools/emacs/"*.el ; do
|
||||||
|
cp $e $out/share/emacs/site-lisp/curry-pakcs/ ;
|
||||||
|
done
|
||||||
|
|
||||||
# Get the program name from the environment instead of the calling wrapper (for rlwrap).
|
# Wrap for rlwrap and tk support.
|
||||||
sed -i 's@progname=`basename "$0"`@progname=$PAKCS_PROGNAME@' $out/bin/.pakcs_wrapper
|
wrapProgram $out/pakcs/bin/pakcs \
|
||||||
|
|
||||||
wrapProgram $out/bin/.pakcs_wrapper \
|
|
||||||
--prefix PATH ":" "${rlwrap}/bin" \
|
--prefix PATH ":" "${rlwrap}/bin" \
|
||||||
--prefix PATH ":" "${tk}/bin" \
|
--prefix PATH ":" "${tk}/bin" \
|
||||||
--run 'export PAKCS_PROGNAME=`basename "$0"`'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
@ -77,6 +116,6 @@ stdenv.mkDerivation {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
maintainers = [ stdenv.lib.maintainers.kkallio ];
|
maintainers = [ stdenv.lib.maintainers.kkallio ];
|
||||||
#platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user