Added some parts of kde-4. It doesn't work yet, but I need version control

svn path=/nixpkgs/trunk/; revision=9049
This commit is contained in:
Yury G. Kudryashov
2007-08-05 13:54:42 +00:00
parent e2ad18379e
commit 67d41efde1
11 changed files with 368 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "cmake-2.4.6";
setupHook = ./setup-hook.sh;
src = fetchurl {
url = http://www.cmake.org/files/v2.4/cmake-2.4.6.tar.gz;
@@ -9,9 +10,15 @@ stdenv.mkDerivation {
buildInputs = [];
preConfigure="find Modules -type f -name '*.cmake' |
xargs sed -e 's@/usr@/FOO@g' -e 's@ /\\(bin\\|sbin\\|lib\\)@ /FOO@g' -i";
postInstall="find \$out/share -type f -name '*.cmake' |
xargs sed -e 's@/usr@/FOO@g' -e 's@ /\\(bin\\|sbin\\|lib\\)@ /FOO@g' -i;
ensureDir \$out/nix-support;
cp -p $setupHook \$out/nix-support/setup-hook";
meta = {
description = "
CMake. Make flavour used by cdrkit.
";
description = "Cross-Platform Makefile Generator";
};
}

View File

@@ -0,0 +1,54 @@
addCMakeParamsInclude()
{
if [ -d $1/include ]; then
export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH}${CMAKE_INCLUDE_PATH:+:}$1/include"
fi
}
addCMakeParamsLibs()
{
if [ -d $1/lib ]; then
export CMAKE_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}${CMAKE_LIBRARY_PATH:+:}$1/lib"
fi
}
fixCmake()
{
echo "fixing Cmake file $i"
sed -e 's@/usr@/FOO@g' -e 's@ /\(bin\|sbin\|lib\)@ /FOO@g' -i $i
}
fixCmakeFiles()
{
for i in $(find $1 -type f -name "*.cmake"); do
fixCmake $i;
done;
}
cmakePostUnpack()
{
sourceRoot=$sourceRoot/build
mkdir -v $sourceRoot
echo source root reset to $sourceRoot
if [ -z "$dontFixCmake" ]; then
fixCmakeFiles .
fi
}
cmakeTweaks()
{
postUnpack="cmakePostUnpack${postUnpack:+; }${postUnpack}"
if [ -z "$configureScript" ]; then
dontAddPrefix=1
configureScript="cmake .."
configureFlags="-DCMAKE_INSTALL_PREFIX=$out $configureFlags"
fi
}
if [ -z "$noCmakeTewaks" ]; then
cmakeTweaks
fi;
envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs)