[pktools] 357/375: solved problem for liblas in installer install_pktools.sh
Bas Couwenberg
sebastic at xs4all.nl
Wed Dec 3 21:54:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch upstream-master
in repository pktools.
commit aab3625b948166e83d4b37a1d5fde8e8edc3493e
Author: Pieter Kempeneers <kempenep at gmail.com>
Date: Sun Nov 16 12:33:37 2014 +0100
solved problem for liblas in installer install_pktools.sh
---
install_pktools.sh | 88 ++++++++++++++++++++++++++++--------------------------
1 file changed, 46 insertions(+), 42 deletions(-)
diff --git a/install_pktools.sh b/install_pktools.sh
index 693eb6a..e44b378 100644
--- a/install_pktools.sh
+++ b/install_pktools.sh
@@ -19,9 +19,11 @@
# along with this script. If not, see <http://www.gnu.org/licenses/>.
########################################################################################
-LAS=0
-FANN=0
-NLOPT=0
+#Set following variables to 0 if you do not want support for
+LAS=1 #pklas2img
+FANN=1 #pkann and pkfsann
+NLOPT=1 #pkoptsvm
+
CONFIGURE="./configure"
#!/bin/bash
@@ -58,43 +60,6 @@ add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
#get up to date with new repository
apt-get update
-#install LASZIP
-cd /tmp
-wget https://github.com/LASzip/LASzip/releases/download/v2.2.0/laszip-src-2.2.0.tar.gz
-tar xzvf laszip-src-2.2.0.tar.gz
-cd laszip*
-./configure
-make
-make install
-rm -rf /tmp/laszip*
-
-#include files of optional package belong in their own directory
-mkdir -p /usr/local/include/laszip
-cd /usr/local/include/laszip
-for file in ../laszip*.hpp ../lasunzip*.hpp;do sudo ln -s $file $(basename $file);done
-
-#install pre-requisites for liblas with LASZIP
-apt-get install -y cmake libboost-program-options-dev libboost-thread-dev
-
-#install liblas
-cd /tmp
-wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2
-tar xjvf libLAS-1.8.0.tar.bz2
-cd libLAS-1.8.0
-mkdir makefiles
-cd makefiles
-cmake -G "Unix Makefiles" \
- -D GEOTIFF_INCLUDE_DIR=/usr/include/geotiff \
- -D LASZIP_INCLUDE_DIR=/usr/local/include \
- -D TIFF_INCLUDE_DIR=/usr/include \
- -D WITH_GEOTIFF=ON \
- -D WITH_LASZIP=ON \
- ../
-make
-make install
-cd /tmp
-rm -rf /tmp/libLAS*
-
#Install required pre-requisites for pktools
apt-get -y install g++ make libgdal-dev libgsl0-dev libarmadillo-dev
@@ -105,8 +70,47 @@ if [ "${FANN}" -eq 1 ];then
fi
if [ "${LAS}" -eq 1 ];then
+ #We do a manual installation of liblas to allow support for LAZ
+
+ #install LASZIP
+ cd /tmp
+ wget https://github.com/LASzip/LASzip/releases/download/v2.2.0/laszip-src-2.2.0.tar.gz
+ tar xzvf laszip-src-2.2.0.tar.gz
+ cd laszip*
+ ./configure
+ make
+ make install
+ rm -rf /tmp/laszip*
+
+ #hack: include files of optional package belong in their own directory
+ mkdir -p /usr/local/include/laszip
+ cd /usr/local/include/laszip
+ for file in ../laszip*.hpp ../lasunzip*.hpp;do sudo ln -s $file $(basename $file);done
+
+ #install liblas
+ #The following packages need to be installed to support LASZIP within liblas
+ apt-get install -y cmake libgeotiff-dev libboost-program-options-dev libboost-dev libboost-thread-dev libboost-iostreams-dev libboost-filesystem-dev
+
+ #get liblas 1.8.0 and install using cmake
+ cd /tmp
+ wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2
+ tar xjvf libLAS-1.8.0.tar.bz2
+ cd libLAS-1.8.0
+ mkdir makefiles
+ cd makefiles
+ cmake -G "Unix Makefiles" \
+ -D GEOTIFF_INCLUDE_DIR=/usr/include/geotiff \
+ -D LASZIP_INCLUDE_DIR=/usr/local/include \
+ -D TIFF_INCLUDE_DIR=/usr/include \
+ -D WITH_GEOTIFF=ON \
+ -D WITH_LASZIP=ON \
+ ../
+ make
+ make install
+ cd /tmp
+ rm -rf /tmp/libLAS*
#Install optional pre-requisites for libLAS support
- apt-get -y install libboost-dev liblas-dev liblas-c-dev liblas1 liblas2 liblas-c2 python-liblas
+ #apt-get -y install libboost-dev liblas-dev liblas-c-dev liblas1 liblas2 liblas-c2 python-liblas
CONFIGURE="$CONFIGURE --enable-las"
fi
@@ -125,8 +129,8 @@ if [ "${NLOPT}" -eq 1 ];then
CONFIGURE="$CONFIGURE --enable-nlopt"
fi
-cd /tmp
#Install pktools
+cd /tmp
#todo: use package manager once pktools in repository
#Manual installation
wget --progress=dot:mega "download.savannah.gnu.org/releases/pktools/pktools-latest.tar.gz"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pktools.git
More information about the Pkg-grass-devel
mailing list