<commit_before>#!/bin/sh
#
# install_ossim.sh
#
# Created by <NAME> on 07/12/09.
# Copyright (c) 2009 The Open Source Geospatial Foundation.
# Licensed under the GNU LGPL version >= 2.1.
#

./diskspace_probe.sh "`basename $0`" begin
BUILD_DIR=`pwd`
####


if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"

TMP_DIR=/tmp/build_ossim
APP_DATA_DIR="$BUILD_DIR/../app-data/ossim"
DATA_FOLDER="/usr/local/share/data"
OSSIM_VERSION=1.8.16
BUILD_DATE=20140202

#CAUTION: UbuntuGIS should be enabled only through setup.sh
#Add repositories
#wget -nv https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/sources.list.d/ubuntugis.list \
#     --output-document=/etc/apt/sources.list.d/ubuntugis.list

#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160

apt-get -q update

apt-get install --assume-yes ossim-core libgdal1-1.10.1-grass

# install main dependencies
apt-get install --assume-yes libtiff5 libgeotiff2 \
  libfreetype6 libcurl3 libopenscenegraph99 libqt4-opengl \
  libexpat1 libpng3 libfftw3-3 \
  libopenmpi1.6 libqt4-qt3support python-pip

# python-pandas python-netcdf spyder

apt-get install --assume-yes krb5-multidev libexpat-ocaml libfindlib-ocaml \
  libgnutls-openssl27 libopenjpeg2 libpodofo0.9.0 \
  libqt4-sql-sqlite libtiffxx5 ocaml-base-nox \
  ocaml-findlib ocaml-interp ocaml-nox pkg-config \
  libqt4-core

#FIXME: does not exist in ubu 14.04: libqt3-mt libpthread-stubs0


# for planetsasha:
# qt4-dev-tools qt4-linguist-tools qt4-qmake xorg-sgml-doctools


# fragile @ ubuntugis
#apt-get install --assume-yes libgdal1h  libgdal1-1.10.1-grass


## update for next release ##
# apt-get install --assume-yes python-dev  # python-mpltoolkits.basemap # 170 mb!!! 
# pip install --upgrade pandas
# pip install bottleneck
# pip install oct2py


if [ $? -ne 0 ] ; then
   echo 'ERROR: Package install failed! Aborting.'
   "$BUILD_DIR"/diskspace_probe.sh "`basename $0`" end
   exit 1
fi


#### download ossim
mkdir -p /tmp/build_ossim
cd /tmp/build_ossim

# OSSIM Qt apps built on live dvd
wget -c --progress=dot:mega \
  "http://download.osgeo.org/livedvd/data/ossim/ossim-qt_1.8.16.tar.gz"

tar -x -z --no-same-owner -C / -f ossim-qt_1.8.16.tar.gz

ldconfig

mkdir -p /usr/share/ossim/

wget -N --progress=dot:mega \
   "http://download.osgeo.org/livedvd/data/ossim/ossim_settings.tar.gz"

tar xzf ossim_settings.tar.gz

chown -R root.root ossim_settings/
#FIXME: "cannot move: Directory not empty"
mv ossim_settings/* /usr/share/ossim/


#patch for ticket https://trac.osgeo.org/osgeo/ticket/647 
sed -i -e 's/OsssimPlanet/OssimPlanet/g' /usr/share/ossim/ossimplanet.desktop

mv /usr/share/ossim/images/ossimPlanet.xpm /usr/share/pixmaps/ossimPlanet.xpm
mv /usr/share/ossim/images/ossim.xpm /usr/share/pixmaps/ossim.xpm

mv /usr/share/ossim/imagelinker.desktop /usr/share/applications/imagelinker.desktop
mv /usr/share/ossim/ossimplanet.desktop /usr/share/applications/ossimplanet.desktop

OSSIM_PREFS_FILE="/usr/share/ossim/ossim_preference"
export OSSIM_PREFS_FILE

BRCFILE="/etc/skel/.bashrc"
echo 'export OSSIM_PREFS_FILE="/usr/share/ossim/ossim_preference"' >> "$BRCFILE"
echo 'export OSSIM_PREFS_FILE="/usr/share/ossim/ossim_preference"' >> "$USER_HOME/.bashrc"

apt-get install --assume-yes grass-core qgis python-pysqlite2 \
   python-scipy python-serial python-psycopg2 proj-bin python-lxml \<commit_msg>try for ossimplanet lib fix (#1359)<commit_after>#!/bin/sh
#
# install_ossim.sh
#
# Created by <NAME> on 07/12/09.
# Copyright (c) 2009 The Open Source Geospatial Foundation.
# Licensed under the GNU LGPL version >= 2.1.
#

./diskspace_probe.sh "`basename $0`" begin
BUILD_DIR=`pwd`
####


if [ -z "$USER_NAME" ] ; then
   USER_NAME="user"
fi
USER_HOME="/home/$USER_NAME"

TMP_DIR=/tmp/build_ossim
APP_DATA_DIR="$BUILD_DIR/../app-data/ossim"
DATA_FOLDER="/usr/local/share/data"
OSSIM_VERSION=1.8.16
BUILD_DATE=20140202

#CAUTION: UbuntuGIS should be enabled only through setup.sh
#Add repositories
#wget -nv https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/sources.list.d/ubuntugis.list \
#     --output-document=/etc/apt/sources.list.d/ubuntugis.list

#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160

apt-get -q update

apt-get install --assume-yes ossim-core libgdal1-1.10.1-grass

# install main dependencies
apt-get install --assume-yes libtiff5 libgeotiff2 \
  libfreetype6 libcurl3 libopenscenegraph99 libqt4-opengl \
  libexpat1 libpng3 libfftw3-3 \
  libopenmpi1.6 libqt4-qt3support python-pip

# python-pandas python-netcdf spyder

apt-get install --assume-yes krb5-multidev libexpat-ocaml libfindlib-ocaml \
  libgnutls-openssl27 libopenjpeg2 libpodofo0.9.0 \
  libqt4-sql-sqlite libtiffxx5 ocaml-base-nox \
  ocaml-findlib ocaml-interp ocaml-nox pkg-config \
  libqt4-core

#FIXME: does not exist in ubu 14.04: libqt3-mt libpthread-stubs0


# for planetsasha:
# qt4-dev-tools qt4-linguist-tools qt4-qmake xorg-sgml-doctools


# fragile @ ubuntugis
#apt-get install --assume-yes libgdal1h  libgdal1-1.10.1-grass


## update for next release ##
# apt-get install --assume-yes python-dev  # python-mpltoolkits.basemap # 170 mb!!! 
# pip install --upgrade pandas
# pip install bottleneck
# pip install oct2py


if [ $? -ne 0 ] ; then
   echo 'ERROR: Package install failed! Aborting.'
   "$BUILD_DIR"/diskspace_probe.sh "`basename $0`" end
   exit 1
fi


#### download ossim
mkdir -p /tmp/build_ossim
cd /tmp/build_ossim

# OSSIM Qt apps built on live dvd
wget -c --progress=dot:mega \
  "http://download.osgeo.org/livedvd/data/ossim/ossim-qt_1.8.16.tar.gz"

tar -x -z --no-same-owner -C / -f ossim-qt_1.8.16.tar.gz

# copy in old OSG libraries (trac #1359)
wget -c --progress=dot:mega \
  "http://download.osgeo.org/livedvd/data/ossim/libosg3.0.1_libs.tgz"

mkdir libosg
cd libosg
tar xzf ../libosg3.0.1_libs.tgz
for file in libosg*.3.0.1 ; do
   cp "$file" /usr/local/lib/
   ALTNAME=`basename "$file" .3.0.1`.80
   ln -s "/usr/local/lib/$file" "/usr/local/lib/$ALTNAME"
done
cd ..

ldconfig

mkdir -p /usr/share/ossim/

wget -N --progress=dot:mega \
   "http://download.osgeo.org/livedvd/data/ossim/ossim_settings.tar.gz"

tar xzf ossim_settings.tar.gz

chown -R root.root ossim_settings/
#FIXME: "cannot move: Directory not empty"
mv ossim_settings/* /usr/share/ossim/

#patch for ticket https://trac.osgeo.org/osgeo/ticket/647 
sed -i -e 's/OsssimPlanet/OssimPlanet/g' /usr/share/ossim/ossimplanet.desktop

mv /usr/share/ossim/images/ossimPlanet.xpm /usr/share/pixmaps/ossimPlanet.xpm
mv /usr/share/ossim/images/ossim.xpm /usr/share/pixmaps/ossim.xpm

mv /usr/share/ossim/imagelinker.desktop /usr/share/applications/imagelinker.desktop
mv /usr/share/ossim/ossimplanet.desktop /usr/share/applications/ossimplanet.desktop

OSSIM_PREFS_FILE="/usr/share/ossim/ossim_preference"
export OSSIM_PREFS_FILE

BRCFILE="/etc/skel/.bashrc"
echo 'export OSSIM_PREFS_FILE="/usr/share/ossim/ossim_preference"' >> "$BRCFILE"
echo 'export OSSIM_PREFS_FILE="/usr/share/ossim/ossim_preference"' >> "$USER_HOME/.bashrc"

apt-get install --assume-yes grass-core qgis python-pysqlite2 \
   python-scipy python-serial python-psycopg2 proj-bin python-lxml \
{'fraction_non_alphanumeric': 0.13622985283812195, 'fraction_numerical': 0.029992992291520672, 'mean_word_length': 3.8876712328767122, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3057510', 'n_tokens_mistral': 3097, 'n_tokens_neox': 2866, 'n_words': 558}