Merge pull request #39027 from mpickering/qgis-darwin-liblas

grass: Compile with libLAS
This commit is contained in:
Daiderd Jordan 2018-04-17 20:57:51 +02:00 committed by GitHub
commit d020809398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw { stdenv, fetchurl, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw
, cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas , cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages , proj, gdal, geos, sqlite, postgresql, mysql, python2Packages, libLAS
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -12,7 +12,8 @@ stdenv.mkDerivation {
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo
readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas ] readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas
libLAS ]
++ (with python2Packages; [ python dateutil wxPython30 numpy ]); ++ (with python2Packages; [ python dateutil wxPython30 numpy ]);
# On Darwin the installer tries to symlink the help files into a system # On Darwin the installer tries to symlink the help files into a system
@ -33,6 +34,7 @@ stdenv.mkDerivation {
"--with-mysql-includes=${mysql.connector-c}/include/mysql" "--with-mysql-includes=${mysql.connector-c}/include/mysql"
"--with-mysql-libs=${mysql.connector-c}/lib/mysql" "--with-mysql-libs=${mysql.connector-c}/lib/mysql"
"--with-blas" "--with-blas"
"--with-liblas=${libLAS}/bin/liblas-config"
]; ];
# Otherwise a very confusing "Can't load GDAL library" error # Otherwise a very confusing "Can't load GDAL library" error

View File

@ -16,6 +16,6 @@ stdenv.mkDerivation rec {
homepage = http://www.laszip.org; homepage = http://www.laszip.org;
license = stdenv.lib.licenses.lgpl2; license = stdenv.lib.licenses.lgpl2;
maintainers = [ stdenv.lib.maintainers.michelk ]; maintainers = [ stdenv.lib.maintainers.michelk ];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, boost, cmake, gdal, libgeotiff, libtiff, LASzip }: { stdenv, fetchurl, boost, cmake, gdal, libgeotiff, libtiff, LASzip, fixDarwinDylibNames }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libLAS-1.8.1"; name = "libLAS-1.8.1";
@ -9,14 +9,22 @@ stdenv.mkDerivation rec {
sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws"; sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws";
}; };
buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip ]; buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [
"-DGDAL_CONFIG=${gdal}/bin/gdal-config"
];
postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
install_name_tool -change "@rpath/liblas.3.dylib" "$out/lib/liblas.3.dylib" $out/lib/liblas_c.dylib
'';
meta = { meta = {
description = "LAS 1.0/1.1/1.2 ASPRS LiDAR data translation toolset"; description = "LAS 1.0/1.1/1.2 ASPRS LiDAR data translation toolset";
homepage = http://www.liblas.org; homepage = http://www.liblas.org;
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.michelk ]; maintainers = [ stdenv.lib.maintainers.michelk ];
}; };
} }