Skip to content

Commit fd5e8ee

Browse files
committed
Fix Vagrant
1 parent 5a6f8e8 commit fd5e8ee

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

Vagrantfile

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ require 'socket'
66
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
77
VAGRANTFILE_API_VERSION = "2"
88

9+
$set_environment_variables = <<SCRIPT
10+
tee "/etc/profile.d/myvars.sh" > "/dev/null" <<EOF
11+
export LD_LIBRARY_PATH=/vagrant/install-vagrant-proj-6/lib
12+
EOF
13+
SCRIPT
14+
915
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
1016
vm_ram = ENV['VAGRANT_VM_RAM'] || 2048
1117
vm_cpu = ENV['VAGRANT_VM_CPU'] || 2
@@ -37,4 +43,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
3743
config.vm.provision "shell", path: "scripts/vagrant/proj6.sh"
3844
config.vm.provision "shell", path: "scripts/vagrant/mapserver.sh"
3945

46+
config.vm.provision "shell", inline: $set_environment_variables, run: "always"
47+
4048
end
49+
50+

scripts/vagrant/packages.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ apt-get update
88
apt-get install -y python-software-properties
99
add-apt-repository -y ppa:ubuntugis/ppa
1010
add-apt-repository -y ppa:ubuntugis/ubuntugis-testing
11+
add-apt-repository -y ppa:dluxen/cmake-backports
1112
apt-get update
1213
apt-get -y upgrade
1314

1415
# install packages we need
15-
apt-get install -q -y git build-essential pkg-config cmake libgeos-dev rake \
16+
apt-get install -q -y git build-essential pkg-config cmake3 libgeos-dev rake \
1617
libpq-dev python-all-dev libproj-dev libxml2-dev postgis php5-dev \
1718
postgresql-server-dev-9.3 postgresql-9.3-postgis-2.2 vim bison flex swig \
1819
librsvg2-dev libpng12-dev libjpeg-dev libgif-dev \
@@ -21,4 +22,6 @@ apt-get install -q -y git build-essential pkg-config cmake libgeos-dev rake \
2122
libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler libharfbuzz-dev gdal-bin \
2223
curl sqlite3
2324

25+
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
26+
python get-pip.py
2427
pip install -U -r /vagrant/msautotest/requirements.txt

scripts/vagrant/proj6.sh

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cd /vagrant
99
curl -s http://download.osgeo.org/proj/proj-6.1.1.tar.gz > proj-6.1.1.tar.gz
1010
tar xzf proj-6.1.1.tar.gz
1111
rm -rf vagrant-proj
12+
rm -rf /vagrant/install-vagrant-proj-6
1213
mv proj-6.1.1 vagrant-proj
1314
(cd vagrant-proj/data && curl -s http://download.osgeo.org/proj/proj-datumgrid-1.8.tar.gz > proj-datumgrid-1.8.tar.gz && tar xvzf proj-datumgrid-1.8.tar.gz)
1415
(cd vagrant-proj; CFLAGS='-DPROJ_RENAME_SYMBOLS -O2' CXXFLAGS='-DPROJ_RENAME_SYMBOLS -O2' ./configure --disable-static --prefix=/vagrant/install-vagrant-proj-6 && make -j $NUMTHREADS && make -j $NUMTHREADS install)

0 commit comments

Comments
 (0)