forked from mirrors/nixpkgs
proj: build using CMake
QMapShack relies on PROJ providing a CMake configuration.
This commit is contained in:
parent
1b4dc54d40
commit
1ec7d100ef
|
@ -1,4 +1,13 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, sqlite, autoreconfHook, libtiff, curl }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, sqlite
|
||||
, libtiff
|
||||
, curl
|
||||
, gtest
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "proj";
|
||||
|
@ -11,19 +20,34 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0mymvfvs8xggl4axvlj7kc1ksd9g94kaz6w1vdv0x2y5mqk93gx9";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString (version == "7.2.1") ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "MAJOR 7 MINOR 2 PATCH 0" "MAJOR 7 MINOR 2 PATCH 1"
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev"];
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [ sqlite libtiff curl ];
|
||||
|
||||
checkInputs = [ gtest ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_EXTERNAL_GTEST=ON"
|
||||
];
|
||||
|
||||
doCheck = stdenv.is64bit;
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cartographic Projections Library";
|
||||
homepage = "https://proj4.org";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ vbgl ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ vbgl dotlambda ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue