Unverified Commit 6468e01d authored by Johannes Kirschbauer's avatar Johannes Kirschbauer Committed by GitHub
Browse files

{gpredict, goocanvas3}: modernize, gpredict-unstable: init at 2.4.0-unstable-2024-09-17 (#374429)

parents 444aae9b 62e8f9d7
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  goocanvas3,
  nix-update-script,
  gpredict,
}:

(gpredict.override {
  goocanvas2 = goocanvas3;
}).overrideAttrs
  (finalAttrs: {
    # Next version is 2.4.0
    version = "2.4.0-unstable-2024-09-17";

    src = fetchFromGitHub {
      owner = "csete";
      repo = "gpredict";
      rev = "91a4a3fb15e7eab0374d1bb7c859d386818b48ee";
      hash = "sha256-/XCJ+jCSY4o0OLVVY6OGvnmMw6aI/iQOhjyLYWPj7Ec=";
    };

    patches = [ ];

    passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
  })
+7 −6
Original line number Diff line number Diff line
@@ -11,18 +11,18 @@
  curl,
  goocanvas2,
  gpsd,
  hamlib,
  hamlib_4,
  wrapGAppsHook3,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "gpredict";
  version = "2.2.1";

  src = fetchFromGitHub {
    owner = "csete";
    repo = "gpredict";
    rev = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-+hgjImfT3nWMBYwde7+KC/hzd84pwQbpoJvaJSNG4E8=";
  };

@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
    gtk3
    goocanvas2
    gpsd
    hamlib
    hamlib_4
  ];

  meta = {
@@ -69,12 +69,13 @@ stdenv.mkDerivation rec {
      well. Gpredict uses the SGP4/SDP4 algorithms, which are compatible with the
      NORAD Keplerian elements.
    '';
    license = lib.licenses.gpl2Only;
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.linux;
    homepage = "http://gpredict.oz9aec.net/";
    maintainers = with lib.maintainers; [
      markuskowa
      cmcdragonkai
      pandapip1
    ];
  };
}
})
+24 −9
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  pkg-config,
  gettext,
  gobject-introspection,
@@ -13,7 +14,7 @@
  gnome,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "goocanvas";
  version = "3.0.0";

@@ -24,10 +25,21 @@ stdenv.mkDerivation rec {
  ];

  src = fetchurl {
    url = "mirror://gnome/sources/goocanvas/${lib.versions.majorMinor version}/goocanvas-${version}.tar.xz";
    url = "mirror://gnome/sources/goocanvas/${lib.versions.majorMinor finalAttrs.version}/goocanvas-${finalAttrs.version}.tar.xz";
    sha256 = "06j05g2lmwvklmv51xsb7gm7rszcarhm01sal41jfp0qzrbpa2k7";
  };

  patches = [
    # This broke due to the introduction of anubis
    /*
      (fetchpatch {
        url = "https://gitlab.gnome.org/Archive/goocanvas/-/commit/d025d0eeae1c5266063bdc1476dbdff121bcfa57.patch";
        hash = "sha256-9uqqC1uKZF9TDz5dfDTKSRCmjEiuvqkLnZ9w6U+q2TI=";
      })
    */
    ./gcc14-fix.patch
  ];

  nativeBuildInputs = [
    pkg-config
    gettext
@@ -47,17 +59,20 @@ stdenv.mkDerivation rec {

  passthru = {
    updateScript = gnome.updateScript {
      attrPath = "${pname}${lib.versions.major version}";
      packageName = pname;
      attrPath = "${finalAttrs.pname}${lib.versions.major finalAttrs.version}";
      packageName = finalAttrs.pname;
      versionPolicy = "odd-unstable";
    };
  };

  meta = with lib; {
  meta = {
    description = "Canvas widget for GTK based on the the Cairo 2D library";
    homepage = "https://gitlab.gnome.org/Archive/goocanvas";
    license = licenses.lgpl2; # https://gitlab.gnome.org/GNOME/goocanvas/-/issues/12
    maintainers = with maintainers; [ bobby285271 ];
    platforms = platforms.unix;
    license = lib.licenses.lgpl2Plus; # The license contains the "or later" clause
    maintainers = with lib.maintainers; [
      bobby285271
      pandapip1
    ];
    platforms = lib.platforms.unix;
  };
}
})
+36 −0
Original line number Diff line number Diff line
From d025d0eeae1c5266063bdc1476dbdff121bcfa57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 31 Jan 2024 17:44:59 +0100
Subject: [PATCH] Fix building with GCC 14

GCC 14 becomes stricter regarging pointer types:

goocanvasitemsimple.c: In function 'goo_canvas_item_simple_set_model':
goocanvasitemsimple.c:1539:15: error: assignment to 'GooCanvasItemModelSimple *' {aka 'struct _GooCanvasItemModelSimple *'} from incompatible pointer type 'GooCanvasItemModel *' {aka 'struct _GooCanvasItemModel *'} [-Wincompatible-pointer-types]
 1539 |   item->model = g_object_ref (model);
      |               ^
make[3]: *** [Makefile:595: goocanvasitemsimple.lo] Error 1

It looks like missing a pointer cast.

<https://bugzilla.redhat.com/show_bug.cgi?id=2261209>
---
 src/goocanvasitemsimple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/goocanvasitemsimple.c b/src/goocanvasitemsimple.c
index 19b3424..28edc77 100644
--- a/src/goocanvasitemsimple.c
+++ b/src/goocanvasitemsimple.c
@@ -1536,7 +1536,7 @@ goo_canvas_item_simple_set_model (GooCanvasItemSimple  *item,
   goo_canvas_item_simple_free_data (item->simple_data);
   g_slice_free (GooCanvasItemSimpleData, item->simple_data);
 
-  item->model = g_object_ref (model);
+  item->model = (GooCanvasItemModelSimple *) g_object_ref (model);
   item->simple_data = &item->model->simple_data;
 
   if (accessibility_enabled)
-- 
GitLab
+0 −4
Original line number Diff line number Diff line
@@ -3643,10 +3643,6 @@ with pkgs;
    inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
  };
  gpredict = callPackage ../applications/science/astronomy/gpredict {
    hamlib = hamlib_4;
  };
  gprof2dot = with python3Packages; toPythonApplication gprof2dot;
  grails = callPackage ../development/web/grails { jdk = null; };