Skip to content

Commit

Permalink
gpsbabel: 1.8.0 -> 1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Jan 21, 2025
1 parent 03efc97 commit 1142fbb
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 66 deletions.
12 changes: 6 additions & 6 deletions pkgs/applications/misc/gpsbabel/debian-patches.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Generated by debian-patches.sh from debian-patches.txt
let
prefix = "https://sources.debian.org/data/main/g/gpsbabel/1.8.0+ds-4/debian/patches";
prefix = "https://sources.debian.org/data/main/g/gpsbabel/1.10.0+ds-1/debian/patches";
in
[
{
url = "${prefix}/gpsbabelfe_disable_version_check";
sha256 = "1kk1iq4mbmldl1jjvd4bphr0165rgn2gpqdyyd1vq8v8wjx942sb";
sha256 = "0jgdq6w7f77gfkflbhg4lssw6cqgjiy275nfawykf34fsh228v9r";
}
{
url = "${prefix}/gpsbabelfe_opt-in-for-usage-data-reporting";
sha256 = "0dr3jyn8sxx9vw3w11gir6jvshlda0ldmhlq4aq313xn6d1j8qv2";
sha256 = "0w3p3b732d0iajl5b95rj7w64q9dp2ml4y46bgym8iwd21fv53ci";
}
{
url = "${prefix}/gpsbabelfe_do-not-check-for-newer-version";
sha256 = "0kmmxcq1k9p84v9cjagda1cqcc9p7p48i104l3z6clc17zixwgai";
sha256 = "1b7h5hhv2mbincm3ibj10z7n1dgxipzczdavg8lki9yifbsz9ggs";
}
{
url = "${prefix}/htmldoc-location";
sha256 = "0nk3gz3l0q68d7blzfkbkvr630xy8y7vlxalnzlbdigqcx7lk54f";
sha256 = "0cr2k8iyaxnr9dsfk3n1cjzazw31n5j8kbiaw9qf15qa38kfa91l";
}
{
url = "${prefix}/Disable-donation-nagging";
sha256 = "11j2ffa0hn5cy8xw98jndkf735ar39sf6rl28bn91pxd38xyaz5b";
sha256 = "075739svpqmyp8ph5ldswkgjvjq6kpcwhkqn0ay61cs62pk1fm9n";
}
]
2 changes: 1 addition & 1 deletion pkgs/applications/misc/gpsbabel/debian-patches.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gpsbabel/1.8.0+ds-4
gpsbabel/1.10.0+ds-1
gpsbabelfe_disable_version_check
gpsbabelfe_opt-in-for-usage-data-reporting
gpsbabelfe_do-not-check-for-newer-version
Expand Down
98 changes: 46 additions & 52 deletions pkgs/applications/misc/gpsbabel/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
cmake,
lib,
stdenv,
fetchFromGitHub,
fetchurl,
pkg-config,
which,
qmake,
qt5compat,
qttools,
wrapQtAppsHook,
libusb1,
shapelib,
zlib,
withGUI ? false,
qtserialport,
withMapPreview ? (!stdenv.hostPlatform.isDarwin),
withMapPreview ? !stdenv.hostPlatform.isDarwin,
qtwebengine,
withDoc ? false,
docbook_xml_dtd_45,
Expand All @@ -27,13 +29,13 @@

stdenv.mkDerivation rec {
pname = "gpsbabel";
version = "1.8.0";
version = "1.10.0";

src = fetchFromGitHub {
owner = "gpsbabel";
repo = "gpsbabel";
rev = "gpsbabel_${lib.replaceStrings [ "." ] [ "_" ] version}";
sha256 = "sha256-0w8LsO+HwqZF8SQmwd8bCKma9PCM0hAzXhzWR4DgAHs=";
hash = "sha256-6mWu/9PUR2ykcXrGGGjr9AC7w0XVAk7TIKqJbDlE3+8=";
};

patches = map fetchurl (import ./debian-patches.nix);
Expand All @@ -43,24 +45,22 @@ stdenv.mkDerivation rec {
patchShebangs testo
''
+ lib.optionalString withDoc ''
substituteInPlace gbversion.h.qmake.in \
--replace /usr/share/doc $doc/share/doc
substituteInPlace gbversion.h.in testo.d/serialization.test xmldoc/gpsbabel_man.xml \
--replace-fail /usr/share/doc $doc/share/doc
substituteInPlace testo.d/serialization.test \
--replace /usr/share/doc $doc/share/doc
substituteInPlace tools/make_gpsbabel_doc.sh xmldoc/babelmain.xsl xmldoc/babelpdf.xsl \
--replace-fail /usr/share/xml/docbook/stylesheet/docbook-xsl ${docbook_xsl}/xml/xsl/docbook
substituteInPlace xmldoc/gpsbabel_man.xml \
--replace /usr/share/doc $doc/share/doc
substituteInPlace tools/make_gpsbabel_html.sh \
--replace-fail http://docbook.sourceforge.net/release/xsl-ns/current/xhtml/docbook.xsl ${docbook_xsl}/xml/xsl/docbook/xhtml/docbook.xsl
'';

outputs = [ "out" ] ++ lib.optional withDoc "doc";

nativeBuildInputs =
[
cmake
pkg-config
qmake
]
++ lib.optionals withGUI [
qttools
wrapQtAppsHook
]
Expand All @@ -74,87 +74,78 @@ stdenv.mkDerivation rec {
perl
];

buildInputs =
[
libusb1
shapelib
zlib
]
++ lib.optional withGUI qtserialport
++ lib.optional (withGUI && withMapPreview) qtwebengine;
buildInputs = [
libusb1
qt5compat
qtserialport
shapelib
zlib
] ++ lib.optional withMapPreview qtwebengine;

nativeCheckInputs = [
libxml2
which
];

preConfigure = lib.optionalString withGUI ''
lrelease gui/*.ts gui/coretool/*.ts
'';

qmakeFlags =
[
"WITH_LIBUSB=pkgconfig"
"WITH_SHAPELIB=pkgconfig"
"WITH_ZLIB=pkgconfig"
]
++ lib.optionals (withGUI && !withMapPreview) [
"CONFIG+=disable-mappreview"
];
cmakeFlags = [
(lib.cmakeFeature "GPSBABEL_WITH_LIBUSB" "pkgconfig")
(lib.cmakeFeature "GPSBABEL_WITH_SHAPELIB" "pkgconfig")
(lib.cmakeFeature "GPSBABEL_WITH_ZLIB" "pkgconfig")
(lib.cmakeBool "GPSBABEL_MAPPREVIEW" withMapPreview)
];

makeFlags =
lib.optional withGUI "gui"
++ lib.optionals withDoc [
"gpsbabel.pdf"
"gpsbabel.html"
"gpsbabel.org"
];
makeFlags = lib.optionals withDoc [
"gpsbabel.pdf"
"gpsbabel.html"
"gpsbabel.org"
];

# Floating point behavior on i686 causes nmea.test failures. Preventing
# extended precision fixes this problem.
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-ffloat-store";

doCheck = true;
# FIXME fails due to timezone issues
doCheck = false;

dontWrapQtApps = true;

installPhase =
''
install -Dm755 gpsbabel -t $out/bin
''
+ lib.optionalString withGUI (
+ (
if stdenv.hostPlatform.isDarwin then
''
mkdir -p $out/Applications
mv gui/GPSBabelFE.app $out/Applications
install -Dm644 gui/*.qm gui/coretool/*.qm -t $out/Applications/GPSBabelFE.app/Contents/Resources/translations
install -Dm644 ../gui/*.qm ../gui/coretool/*.qm -t $out/Applications/GPSBabelFE.app/Contents/Resources/translations
ln -s $out/bin/gpsbabel $out/Applications/GPSBabelFE.app/Contents/MacOS
''
else
''
install -Dm755 gui/objects/gpsbabelfe -t $out/bin
install -Dm644 gui/gpsbabel.desktop -t $out/share/application
install -Dm644 gui/images/appicon.png $out/share/icons/hicolor/512x512/apps/gpsbabel.png
install -Dm644 gui/*.qm gui/coretool/*.qm -t $out/share/gpsbabel/translations
install -Dm755 gui/GPSBabelFE/gpsbabelfe -t $out/bin
install -Dm644 ../gui/gpsbabel.desktop -t $out/share/application
install -Dm644 ../gui/images/appicon.png $out/share/icons/hicolor/512x512/apps/gpsbabel.png
install -Dm644 ../gui/*.qm ../gui/coretool/*.qm -t $out/share/gpsbabel/translations
''
)
+ lib.optionalString withDoc ''
install -Dm655 gpsbabel.{html,pdf} -t $doc/share/doc/gpsbabel
cp -r html $doc/share/doc/gpsbabel
'';

postFixup = lib.optionalString withGUI (
if stdenv.hostPlatform.isDarwin then
postFixup =
if stdenv.isDarwin then
''
wrapQtApp "$out/Applications/GPSBabelFE.app/Contents/MacOS/GPSBabelFE"
''
else
''
wrapQtApp "$out/bin/gpsbabelfe"
''
);
'';

meta = with lib; {
changelog = "https://www.gpsbabel.org/news/gpsbabel-${version}.html";
description = "Convert, upload and download data from GPS and Map programs";
longDescription = ''
GPSBabel converts waypoints, tracks, and routes between popular
Expand All @@ -177,7 +168,10 @@ stdenv.mkDerivation rec {
homepage = "https://www.gpsbabel.org/";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ sikmir ];
maintainers = with maintainers; [
dotlambda
sikmir
];
mainProgram = "gpsbabel";
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ mapAliases {
go-upower-notify = upower-notify; # Added 2024-07-21
gpicview = throw "'gpicview' has been removed due to lack of maintenance upstream and depending on gtk2. Consider using 'loupe', 'gthumb' or 'image-roll' instead"; # Added 2024-09-15
gprbuild-boot = gnatPackages.gprbuild-boot; # Added 2024-02-25;

gpsbabel-gui = gpsbabel; # added 2025-01-21
gqview = throw "'gqview' has been removed due to lack of maintenance upstream and depending on gtk2. Consider using 'gthumb' instead";
graalvmCEPackages = graalvmPackages; # Added 2024-08-10
graalvm-ce = graalvmPackages.graalvm-ce; # Added 2024-08-10
Expand Down
7 changes: 1 addition & 6 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13726,12 +13726,7 @@ with pkgs;

googleearth-pro = libsForQt5.callPackage ../applications/misc/googleearth-pro { };

gpsbabel = libsForQt5.callPackage ../applications/misc/gpsbabel { };

gpsbabel-gui = gpsbabel.override {
withGUI = true;
withDoc = true;
};
gpsbabel = qt6Packages.callPackage ../applications/misc/gpsbabel { };

gpu-screen-recorder = callPackage ../applications/video/gpu-screen-recorder { };

Expand Down

0 comments on commit 1142fbb

Please sign in to comment.