mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
dev-libs/libgee: update EAPI 7 -> 8, backport Vala (-> C99) fixes
In this case, it appears the Vala itself was wrong, which meant the generated C was wrong, rather than the Vala being right, but valac generating junk. Bug: https://bugs.gentoo.org/915015 Closes: https://bugs.gentoo.org/894376 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
55
dev-libs/libgee/files/libgee-0.20.6-c99-2.patch
Normal file
55
dev-libs/libgee/files/libgee-0.20.6-c99-2.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
https://bugs.gentoo.org/894376
|
||||
https://gitlab.gnome.org/GNOME/libgee/-/commit/2f0bbe8987e5eb1390b23ac531c971b202c2ef77
|
||||
|
||||
From 2f0bbe8987e5eb1390b23ac531c971b202c2ef77 Mon Sep 17 00:00:00 2001
|
||||
From: Rico Tzschichholz <ricotz@ubuntu.com>
|
||||
Date: Thu, 13 Apr 2023 23:43:03 +0200
|
||||
Subject: [PATCH] Implementations of "G List.get()" should use non-nullable
|
||||
return as defined
|
||||
|
||||
--- a/gee/abstractlist.vala
|
||||
+++ b/gee/abstractlist.vala
|
||||
@@ -39,7 +39,7 @@ public abstract class Gee.AbstractList<G> : Gee.AbstractCollection<G>, List<G> {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
- public abstract new G? get (int index);
|
||||
+ public abstract new G get (int index);
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
--- a/gee/concurrentlist.vala
|
||||
+++ b/gee/concurrentlist.vala
|
||||
@@ -170,7 +170,7 @@ public class Gee.ConcurrentList<G> : AbstractList<G> {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
- public override G? get (int index) {
|
||||
+ public override G get (int index) {
|
||||
HazardPointer.Context ctx = new HazardPointer.Context ();
|
||||
Utils.Misc.unused (ctx);
|
||||
assert (index >= 0);
|
||||
--- a/gee/readonlylist.vala
|
||||
+++ b/gee/readonlylist.vala
|
||||
@@ -74,7 +74,7 @@ internal class Gee.ReadOnlyList<G> : Gee.ReadOnlyCollection<G>, List<G> {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
- public new G? get (int index) {
|
||||
+ public new G get (int index) {
|
||||
return ((Gee.List<G>) _collection).get (index);
|
||||
}
|
||||
|
||||
--- a/gee/unrolledlinkedlist.vala
|
||||
+++ b/gee/unrolledlinkedlist.vala
|
||||
@@ -158,7 +158,7 @@ public class Gee.UnrolledLinkedList<G> : AbstractBidirList<G>, Queue<G>, Deque<G
|
||||
return new Iterator<G> (this);
|
||||
}
|
||||
|
||||
- public override G? get (int index) {
|
||||
+ public override G get (int index) {
|
||||
assert (index >= 0);
|
||||
assert (index < this._size);
|
||||
|
||||
--
|
||||
GitLab
|
||||
43
dev-libs/libgee/files/libgee-0.20.6-c99.patch
Normal file
43
dev-libs/libgee/files/libgee-0.20.6-c99.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
https://bugs.gentoo.org/894376
|
||||
https://gitlab.gnome.org/GNOME/libgee/-/commit/b33a6627f4fc96938b6015e05849867c472160a8
|
||||
|
||||
From b33a6627f4fc96938b6015e05849867c472160a8 Mon Sep 17 00:00:00 2001
|
||||
From: Rico Tzschichholz <ricotz@ubuntu.com>
|
||||
Date: Sat, 8 Apr 2023 22:39:35 +0200
|
||||
Subject: [PATCH] Add more missing generic type arguments
|
||||
|
||||
--- a/gee/hashmap.vala
|
||||
+++ b/gee/hashmap.vala
|
||||
@@ -253,7 +253,7 @@ public class Gee.HashMap<K,V> : Gee.AbstractMap<K,V> {
|
||||
for (int i = 0; i < _array_size; i++) {
|
||||
Node<K,V> node = (owned) _nodes[i];
|
||||
while (node != null) {
|
||||
- Node next = (owned) node.next;
|
||||
+ Node<K,V> next = (owned) node.next;
|
||||
node.key = null;
|
||||
node.value = null;
|
||||
node = (owned) next;
|
||||
--- a/gee/hashset.vala
|
||||
+++ b/gee/hashset.vala
|
||||
@@ -210,7 +210,7 @@ public class Gee.HashSet<G> : AbstractSet<G> {
|
||||
for (int i = 0; i < _array_size; i++) {
|
||||
Node<G> node = (owned) _nodes[i];
|
||||
while (node != null) {
|
||||
- Node next = (owned) node.next;
|
||||
+ Node<G> next = (owned) node.next;
|
||||
node.key = null;
|
||||
node = (owned) next;
|
||||
}
|
||||
--- a/gee/linkedlist.vala
|
||||
+++ b/gee/linkedlist.vala
|
||||
@@ -233,7 +233,7 @@ public class Gee.LinkedList<G> : AbstractBidirList<G>, Queue<G>, Deque<G> {
|
||||
n.next.prev = n;
|
||||
this._head = (owned)n;
|
||||
} else {
|
||||
- weak Node prev = this._head;
|
||||
+ weak Node<G> prev = this._head;
|
||||
for (int i = 0; i < index - 1; i++) {
|
||||
prev = prev.next;
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
40
dev-libs/libgee/libgee-0.20.6-r1.ebuild
Normal file
40
dev-libs/libgee/libgee-0.20.6-r1.ebuild
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit gnome2 vala
|
||||
|
||||
DESCRIPTION="GObject-based interfaces and classes for commonly used data structures"
|
||||
HOMEPAGE="https://wiki.gnome.org/Projects/Libgee"
|
||||
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0.8/2"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x86-linux"
|
||||
IUSE="+introspection"
|
||||
|
||||
# FIXME: add doc support, requires valadoc
|
||||
RDEPEND="
|
||||
>=dev-libs/glib-2.36:2
|
||||
introspection? ( >=dev-libs/gobject-introspection-0.9.6:= )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/libgee-0.20.6-c99.patch
|
||||
"${FILESDIR}"/libgee-0.20.6-c99-2.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
vala_setup
|
||||
gnome2_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Commented out VALAC="$(type -P false)" for c99 patches
|
||||
# We can drop all the Vala wiring and use the shipped files once
|
||||
# a new release is made.
|
||||
gnome2_src_configure \
|
||||
$(use_enable introspection)
|
||||
}
|
||||
Reference in New Issue
Block a user