init
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Intended to be run from linux-install_dependencies.pl
|
||||
#
|
||||
# Variables are wrt that parent scope
|
||||
#
|
||||
|
||||
# Installation of packages not available in the apt database or PPA
|
||||
# Eigen installation
|
||||
|
||||
if (!$no_install && $distribution eq 'Fedora') {
|
||||
#if (1) {
|
||||
|
||||
my $old_dir = Cwd::getcwd();
|
||||
|
||||
my $itpp_build_dir = $dependencies_dir . "/itpp-build";
|
||||
my $itppe_src_dir = $dependencies_arch_dir . "/itpp-external-3.0.0";
|
||||
my $itpp_src_dir = $dependencies_arch_dir . "/itpp-4.0.7";
|
||||
|
||||
if (! -e $itpp_build_dir) {
|
||||
mkdir($itpp_build_dir) or die("Failed to create directory [$itpp_build_dir]");
|
||||
}
|
||||
|
||||
# fetch the packages
|
||||
chdir "$dependencies_arch_dir";
|
||||
if (! -e "itpp-external-3.0.0.tar.bz2") {
|
||||
system('wget "http://openvibe.inria.fr/dependencies/linux-x86/itpp-external-3.0.0.tar.bz2"');
|
||||
($CHILD_ERROR != 0) and die ("Could not download the itpp external sources [$CHILD_ERROR]");
|
||||
}
|
||||
if (! -e $itppe_src_dir) {
|
||||
system('tar -xjf "itpp-external-3.0.0.tar.bz2"');
|
||||
($CHILD_ERROR != 0) and die ("Could not extract the itpp external archive");
|
||||
}
|
||||
|
||||
if (! -e "itpp-4.0.7.tar.bz2") {
|
||||
system('wget "http://openvibe.inria.fr/dependencies/linux-x86/itpp-4.0.7.tar.bz2"');
|
||||
($CHILD_ERROR != 0) and die ("Could not download the itpp sources [$CHILD_ERROR]");
|
||||
}
|
||||
if (! -e $itpp_src_dir) {
|
||||
system('tar -xjf "itpp-4.0.7.tar.bz2"');
|
||||
($CHILD_ERROR != 0) and die ("Could not extract the itpp archive");
|
||||
}
|
||||
|
||||
# compile
|
||||
|
||||
# external
|
||||
print "Compiling itpp external ...\n";
|
||||
chdir $itppe_src_dir;
|
||||
|
||||
system('sed -i "s/_EXT_ETIME/_INT_ETIME/g" patches/lapack-3.1.1-autotools.patch');
|
||||
system('sed -i "s/_EXT_ETIME/_INT_ETIME/g" src/lapack-lite-3.1.1/SRC/Makefile.in');
|
||||
system('sed -i "s/_EXT_ETIME/_INT_ETIME/g" src/lapack-lite-3.1.1/SRC/Makefile.am');
|
||||
|
||||
system("./configure --prefix=$dependencies_dir/ >$itpp_build_dir/itppe-configure.log 2>&1");
|
||||
system("make >$itpp_build_dir/itpp-external-build.log 2>&1");
|
||||
($CHILD_ERROR != 0) and die("Failed to run make for itpp-external [$CHILD_ERROR]");
|
||||
system('make install');
|
||||
($CHILD_ERROR != 0) and die("Failed to run make install for itpp-external [$CHILD_ERROR]");
|
||||
|
||||
# main pkg
|
||||
print "Compiling itpp ...\n";
|
||||
chdir $itpp_src_dir;
|
||||
|
||||
system("./configure --prefix=$dependencies_dir/ CPPFLAGS=\"-I$dependencies_dir/include\" LDFLAGS=\"-L$dependencies_dir/lib -L$dependencies_dir/lib64\" >$itpp_build_dir/itpp-configure.log 2>&1");
|
||||
system("make >$itpp_build_dir/itpp-build.log 2>&1");
|
||||
($CHILD_ERROR != 0) and die("Failed to run make for itpp [$CHILD_ERROR]");
|
||||
system("make install");
|
||||
($CHILD_ERROR != 0) and die("Failed to run make install for itpp [$CHILD_ERROR]");
|
||||
|
||||
chdir $old_dir
|
||||
};
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Intended to be run from linux-install_dependencies.pl
|
||||
#
|
||||
# Variables are wrt that parent scope
|
||||
#
|
||||
|
||||
# Installation of packages not available in the apt database or PPA
|
||||
# Eigen installation
|
||||
|
||||
if (!$no_install) {
|
||||
|
||||
my $old_dir = Cwd::getcwd();
|
||||
|
||||
my $lsl_src_dir = $dependencies_arch_dir . "/LSL";
|
||||
|
||||
# fetch the packages
|
||||
chdir "$dependencies_arch_dir";
|
||||
if (! -e "liblsl-1.12.ov1-src.tar.bz2") {
|
||||
system('wget "http://openvibe.inria.fr/dependencies/linux-x86/liblsl-1.12.ov1-src.tar.bz2"');
|
||||
($CHILD_ERROR != 0) and die ("Could not download the lsl sources [$CHILD_ERROR]");
|
||||
}
|
||||
if (! -e $lsl_src_dir) {
|
||||
system('tar xjf "liblsl-1.12.ov1-src.tar.bz2"');
|
||||
($CHILD_ERROR != 0) and die ("Could not extract the lsl archive");
|
||||
}
|
||||
|
||||
# compile
|
||||
|
||||
# external
|
||||
print "Compiling lsl ...\n";
|
||||
|
||||
chdir($lsl_src_dir);
|
||||
mkdir("liblsl/build");
|
||||
system("cd liblsl/build && cmake .. >cmake-liblsl.log 2>&1");
|
||||
system("cd liblsl/build && make >make-liblsl.log 2>&1");
|
||||
|
||||
mkdir("$dependencies_dir/lib");
|
||||
mkdir("$dependencies_dir/include");
|
||||
|
||||
system("cp liblsl/build/src/liblsl.so $dependencies_dir/lib");
|
||||
system("cp -R liblsl/include/* $dependencies_dir/include");
|
||||
|
||||
|
||||
chdir $old_dir
|
||||
};
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Intended to be run from linux-install_dependencies.pl
|
||||
#
|
||||
# Variables are wrt that parent scope
|
||||
#
|
||||
|
||||
if (!$no_install) {
|
||||
|
||||
my $old_dir = Cwd::getcwd();
|
||||
|
||||
my $vrpn_src_dir = $dependencies_arch_dir . "/vrpn";
|
||||
|
||||
# fetch the packages
|
||||
chdir "$dependencies_arch_dir";
|
||||
if (! -e "vrpn_07_31-ov.zip") {
|
||||
system('wget "http://openvibe.inria.fr/dependencies/linux-x86/vrpn_07_31-ov.zip"');
|
||||
($CHILD_ERROR != 0) and die ("Could not download the itpp external sources [$CHILD_ERROR]");
|
||||
}
|
||||
if (! -e $vrpn_src_dir) {
|
||||
system('unzip "vrpn_07_31-ov.zip"');
|
||||
($CHILD_ERROR != 0) and die ("Could not extract the itpp external archive");
|
||||
}
|
||||
|
||||
# compile
|
||||
|
||||
print "Compiling vrpn ...\n";
|
||||
|
||||
my $bitness = `uname -m`;
|
||||
chomp($bitness);
|
||||
|
||||
my $bitness_token = "";
|
||||
if($bitness == "x86_64") {
|
||||
# 64bit
|
||||
$bitness_token = "pc_linux64";
|
||||
|
||||
system('sed -i "s/#HW_OS := pc_linux$/HW_OS := pc_linux64/g" vrpn/quat/Makefile');
|
||||
system('sed -i "s/#HW_OS := pc_linux$/HW_OS := pc_linux64/g" vrpn/Makefile');
|
||||
} else {
|
||||
$bitness_token = "pc_linux";
|
||||
|
||||
system('sed -i "s/#HW_OS := pc_linux$/HW_OS := pc_linux/g" vrpn/quat/Makefile');
|
||||
system('sed -i "s/CC := gcc/CC := gcc -fPIC/g" vrpn/quat/Makefile');
|
||||
system('sed -i "s/#HW_OS := pc_linux$/HW_OS := pc_linux/g" vrpn/Makefile');
|
||||
system('sed -i "s/CC := gcc/CC := gcc -fPIC/g" vrpn/Makefile');
|
||||
system('sed -i "s/CC := g++/CC := g++ -fPIC/g" vrpn/Makefile');
|
||||
}
|
||||
|
||||
system("cd vrpn/quat && make >make-quat.log 2>&1");
|
||||
system("cd vrpn && make >make-vrpn.log 2>&1");
|
||||
|
||||
mkdir("$dependencies_dir/include");
|
||||
mkdir("$dependencies_dir/lib");
|
||||
|
||||
system("chmod a-x vrpn/quat/*.h vrpn/*.h");
|
||||
system("cp vrpn/quat/*.h vrpn/*.h $dependencies_dir/include");
|
||||
system("cp vrpn/quat/$bitness_token/*.a vrpn/$bitness_token/*.a $dependencies_dir/lib");
|
||||
|
||||
chdir $old_dir
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user