3
0
Fork 0
forked from mirrors/nixpkgs

subsurface: 4.5.97 -> 4.6.0 (#22615)

We do a few more things:

 - libmarble and libdivecomputer with the subsurface patches have both been
   inlined for 2 reasons:
   a) nobody else is using these forks
   b) they need to be updated in lockstep with subsurface

 - instead of building libmarble against qtquick1, we now build using
   qtquickcontrols (qtquick2)

 - getting rid of qtquick1 also allows us to use the default qt (currently 5.6)

 - we get rid of some hacks to deal with library dependencies

 - instead of manually overriding various phases, we simply use cmakeFlags to
   pass proper parameters
This commit is contained in:
Peter Hoeg 2017-02-11 22:48:18 +08:00 committed by Joachim F
parent e2834ca611
commit 9550686be8
4 changed files with 76 additions and 93 deletions

View file

@ -1,49 +1,97 @@
{
stdenv,
cmake,
cmake, doxygen, pkgconfig, autoreconfHook,
curl,
fetchgit,
grantlee,
libdivecomputer,
libgit2,
libmarble-ssrf,
libusb,
libssh2,
libxml2,
libxslt,
libzip,
pkgconfig,
qtbase,
qtconnectivity,
qttools,
qtwebkit,
qtbase, qtconnectivity, qtquickcontrols, qtscript, qtsvg, qttools, qtwebkit,
sqlite
}:
stdenv.mkDerivation rec {
version = "4.5.97";
let
version = "4.6.0";
libmarble = stdenv.mkDerivation rec {
name = "libmarble-ssrf-${version}";
src = fetchgit {
url = "git://git.subsurface-divelog.org/marble";
rev = "refs/tags/v${version}";
sha256 = "1dm2hdk6y36ls7pxbzkqmyc46hdy2cd5f6pkxa6nfrbhvk5f31zd";
};
buildInputs = [ qtbase qtquickcontrols qtscript qtwebkit ];
nativeBuildInputs = [ doxygen pkgconfig cmake ];
enableParallelBuilding = true;
cmakeFlags = [
"-DQTONLY=TRUE"
"-DQT5BUILD=ON"
"-DBUILD_MARBLE_TESTS=NO"
"-DWITH_DESIGNER_PLUGIN=NO"
"-DBUILD_MARBLE_APPS=NO"
];
meta = with stdenv.lib; {
description = "Qt library for a slippy map with patches from the Subsurface project";
homepage = http://subsurface-divelog.org;
license = licenses.lgpl21;
maintainers = with maintainers; [ mguentner ];
platforms = platforms.all;
};
};
libdc = stdenv.mkDerivation rec {
name = "libdivecomputer-ssrf-${version}";
src = fetchgit {
url = "git://subsurface-divelog.org/libdc";
rev = "refs/tags/v${version}";
sha256 = "0s82c8bvqph9c9chwzd76iwrw968w7lgjm3pj4hmad1jim67bs6n";
};
nativeBuildInputs = [ autoreconfHook ];
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = http://www.libdivecomputer.org;
description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
maintainers = with maintainers; [ mguentner ];
license = licenses.lgpl21;
platforms = platforms.all;
};
};
in stdenv.mkDerivation rec {
name = "subsurface-${version}";
src = fetchgit {
sha256 = "035ywhicadmr9sh7zhfxsvpchwa9sywccacbspfam39n2hpyqnmm";
url = "git://git.subsurface-divelog.org/subsurface";
rev = "72bcb6481f3b935444d7868a74599dda133f9b43";
branchName = "master";
url = "git://git.subsurface-divelog.org/subsurface";
rev = "refs/tags/v${version}";
sha256 = "1rk5n52p6cnyjrgi7ybhmvh7y31zxrjny0mqpnc1wql69f90h94c";
};
buildInputs = [ qtbase libdivecomputer libmarble-ssrf libxslt
libzip libxml2 grantlee qtwebkit qttools
qtconnectivity libgit2 libssh2 curl ];
nativeBuildInputs = [ pkgconfig cmake ];
buildInputs = [
libdc libmarble
curl grantlee libgit2 libssh2 libusb libxml2 libxslt libzip
qtbase qtconnectivity qtsvg qttools qtwebkit
];
nativeBuildInputs = [ cmake pkgconfig ];
#enableParallelBuilding = true; # fatal error: ui_mainwindow.h: No such file or directory
enableParallelBuilding = true;
# hack incoming...
preConfigure = ''
marble_libs=$(echo $(echo $CMAKE_LIBRARY_PATH | grep -o "/nix/store/[[:alnum:]]*-libmarble-ssrf-[a-zA-Z0-9\-]*/lib")/libssrfmarblewidget.so)
cmakeFlags="$cmakeFlags -DCMAKE_BUILD_TYPE=Debug \
-DMARBLE_LIBRARIES=$marble_libs \
-DNO_PRINTING=OFF"
'';
cmakeFlags = [
"-DMARBLE_LIBRARIES=${libmarble}/lib/libssrfmarblewidget.so"
"-DNO_PRINTING=OFF"
];
meta = with stdenv.lib; {
description = "Subsurface is an open source divelog program that runs on Windows, Mac and Linux";
@ -55,8 +103,7 @@ stdenv.mkDerivation rec {
'';
homepage = https://subsurface-divelog.org;
license = licenses.gpl2;
maintainers = [ maintainers.mguentner ];
maintainers = with maintainers; [ mguentner ];
platforms = platforms.all;
};
}

View file

@ -1,25 +0,0 @@
{ stdenv, fetchgit, autoreconfHook }:
stdenv.mkDerivation rec {
name = "libdivecomputer-${version}";
version = "ssrf-0.5.0";
src = fetchgit {
url = "git://subsurface-divelog.org/libdc";
rev = "534dd2f34b8271b2a1cac0e3151bfdc81da40e47";
branchName = "Subsurface-branch";
sha256 = "0iw9pczmwqlfjlgrik79b2pd4lmipxhjzj60ysk8qzl3axadjycp";
};
nativeBuildInputs = [ autoreconfHook ];
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = http://www.libdivecomputer.org;
description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
maintainers = [ maintainers.mguentner ];
license = licenses.lgpl21;
platforms = platforms.all;
};
}

View file

@ -1,33 +0,0 @@
{ stdenv, fetchgit, doxygen, pkgconfig, cmake, qtbase, qtscript, qtquick1 }:
stdenv.mkDerivation rec {
name = "libmarble-ssrf-${version}";
version = "2016-11-09";
src = fetchgit {
sha256 = "1dm2hdk6y36ls7pxbzkqmyc46hdy2cd5f6pkxa6nfrbhvk5f31zd";
url = "git://git.subsurface-divelog.org/marble";
rev = "4325da93b7516abb6f93a1417adc10593dacd794";
};
buildInputs = [ qtbase qtscript qtquick1 ];
nativeBuildInputs = [ doxygen pkgconfig cmake ];
enableParallelBuilding = true;
preConfigure = ''
cmakeFlags="$cmakeFlags -DCMAKE_BUILD_TYPE=Release \
-DQTONLY=TRUE -DQT5BUILD=ON \
-DBUILD_MARBLE_TESTS=NO \
-DWITH_DESIGNER_PLUGIN=NO \
-DBUILD_MARBLE_APPS=NO"
'';
meta = with stdenv.lib; {
description = "Qt library for a slippy map with patches from the Subsurface project";
homepage = "http://subsurface-divelog.org";
license = licenses.lgpl21;
maintainers = [ maintainers.mguentner ];
platforms = platforms.all;
};
}

View file

@ -2488,8 +2488,6 @@ with pkgs;
makebootfat = callPackage ../tools/misc/makebootfat { };
libmarble-ssrf = qt55.callPackage ../development/libraries/libmarble-ssrf { };
matrix-synapse = callPackage ../servers/matrix-synapse { };
memtester = callPackage ../tools/system/memtester { };
@ -3904,9 +3902,7 @@ with pkgs;
su-exec = callPackage ../tools/security/su-exec {};
subsurface = qt55.callPackage ../applications/misc/subsurface {
libdivecomputer = libdivecomputer_ssrf;
};
subsurface = qt5.callPackage ../applications/misc/subsurface { };
sudo = callPackage ../tools/security/sudo { };
@ -8004,8 +8000,6 @@ with pkgs;
libdivecomputer = callPackage ../development/libraries/libdivecomputer { };
libdivecomputer_ssrf = callPackage ../development/libraries/libdivecomputer/subsurface.nix { };
libdivsufsort = callPackage ../development/libraries/libdivsufsort { };
libdmtx = callPackage ../development/libraries/libdmtx { };