mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 14:20:19 +00:00
libunique: drop (#551715)
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
libxml2,
|
||||
libwebpSupport ? true,
|
||||
libwebp,
|
||||
# libxmu is not used if libunique is.
|
||||
libXmuSupport ? false,
|
||||
libxmu,
|
||||
libxsltSupport ? true,
|
||||
@@ -23,8 +22,6 @@
|
||||
cfitsio,
|
||||
zlibSupport ? true,
|
||||
zlib,
|
||||
libuniqueSupport ? true,
|
||||
libunique,
|
||||
libpngSupport ? true,
|
||||
libpng,
|
||||
openglSupport ? !stdenv.hostPlatform.isDarwin,
|
||||
@@ -61,7 +58,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optional libxml2Support libxml2
|
||||
++ lib.optional libwebpSupport libwebp
|
||||
++ lib.optional zlibSupport zlib
|
||||
++ lib.optional libuniqueSupport libunique
|
||||
++ lib.optional libzipSupport libzip;
|
||||
|
||||
# This patch corrects problems with python support, but should apply cleanly
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
From 557b0e5045c9eadb556ce11e16965cf0d0787438 Mon Sep 17 00:00:00 2001
|
||||
From: Stef Walter <stefw@collabora.co.uk>
|
||||
Date: Tue, 14 Jun 2011 12:33:45 +0100
|
||||
Subject: [PATCH] Remove G_CONST_RETURN usage, now that its gone in glib.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=652545
|
||||
|
||||
[Alexandre Rostovtsev <tetromino@gmail.com>: backported to unique-1.1]
|
||||
---
|
||||
unique/uniqueapp.c | 4 ++--
|
||||
unique/uniquebackend.c | 4 ++--
|
||||
unique/uniquebackend.h | 4 ++--
|
||||
unique/uniqueinternals.h | 4 ++--
|
||||
unique/uniquemessage.c | 4 ++--
|
||||
unique/uniquemessage.h | 4 ++--
|
||||
6 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/unique/uniqueapp.c b/unique/uniqueapp.c
|
||||
index b40a86c..e8edc94 100644
|
||||
--- a/unique/uniqueapp.c
|
||||
+++ b/unique/uniqueapp.c
|
||||
@@ -781,7 +781,7 @@ unique_app_watch_window (UniqueApp *app,
|
||||
}
|
||||
|
||||
|
||||
-G_CONST_RETURN gchar *
|
||||
+const gchar *
|
||||
unique_command_to_string (UniqueApp *app,
|
||||
gint command)
|
||||
{
|
||||
@@ -863,7 +863,7 @@ unique_command_from_string (UniqueApp *app,
|
||||
return retval;
|
||||
}
|
||||
|
||||
-G_CONST_RETURN gchar *
|
||||
+const gchar *
|
||||
unique_response_to_string (UniqueResponse response)
|
||||
{
|
||||
GEnumClass *enum_class;
|
||||
diff --git a/unique/uniquebackend.c b/unique/uniquebackend.c
|
||||
index a76e42e..68e2735 100644
|
||||
--- a/unique/uniquebackend.c
|
||||
+++ b/unique/uniquebackend.c
|
||||
@@ -111,7 +111,7 @@ unique_backend_set_name (UniqueBackend *backend,
|
||||
*
|
||||
* Return value: FIXME
|
||||
*/
|
||||
-G_CONST_RETURN gchar *
|
||||
+const gchar *
|
||||
unique_backend_get_name (UniqueBackend *backend)
|
||||
{
|
||||
g_return_val_if_fail (UNIQUE_IS_BACKEND (backend), NULL);
|
||||
@@ -154,7 +154,7 @@ unique_backend_set_startup_id (UniqueBackend *backend,
|
||||
*
|
||||
* Return value: FIXME
|
||||
*/
|
||||
-G_CONST_RETURN gchar *
|
||||
+const gchar *
|
||||
unique_backend_get_startup_id (UniqueBackend *backend)
|
||||
{
|
||||
g_return_val_if_fail (UNIQUE_IS_BACKEND (backend), NULL);
|
||||
diff --git a/unique/uniquebackend.h b/unique/uniquebackend.h
|
||||
index a50ce4e..b19ad3e 100644
|
||||
--- a/unique/uniquebackend.h
|
||||
+++ b/unique/uniquebackend.h
|
||||
@@ -94,10 +94,10 @@ GType unique_backend_get_type (void) G_GNUC_CONST;
|
||||
|
||||
UniqueBackend * unique_backend_create (void);
|
||||
|
||||
-G_CONST_RETURN gchar *unique_backend_get_name (UniqueBackend *backend);
|
||||
+const gchar * unique_backend_get_name (UniqueBackend *backend);
|
||||
void unique_backend_set_name (UniqueBackend *backend,
|
||||
const gchar *name);
|
||||
-G_CONST_RETURN gchar *unique_backend_get_startup_id (UniqueBackend *backend);
|
||||
+const gchar * unique_backend_get_startup_id (UniqueBackend *backend);
|
||||
void unique_backend_set_startup_id (UniqueBackend *backend,
|
||||
const gchar *startup_id);
|
||||
GdkScreen * unique_backend_get_screen (UniqueBackend *backend);
|
||||
diff --git a/unique/uniqueinternals.h b/unique/uniqueinternals.h
|
||||
index 3cec152..ccae0cd 100644
|
||||
--- a/unique/uniqueinternals.h
|
||||
+++ b/unique/uniqueinternals.h
|
||||
@@ -44,11 +44,11 @@ UniqueResponse unique_app_emit_message_received (UniqueApp *app,
|
||||
* and then back into an id
|
||||
*/
|
||||
UniqueResponse unique_response_from_string (const gchar *response);
|
||||
-G_CONST_RETURN gchar *unique_response_to_string (UniqueResponse response);
|
||||
+const gchar * unique_response_to_string (UniqueResponse response);
|
||||
|
||||
gint unique_command_from_string (UniqueApp *app,
|
||||
const gchar *command);
|
||||
-G_CONST_RETURN gchar *unique_command_to_string (UniqueApp *app,
|
||||
+const gchar * unique_command_to_string (UniqueApp *app,
|
||||
gint command);
|
||||
|
||||
G_END_DECLS
|
||||
diff --git a/unique/uniquemessage.c b/unique/uniquemessage.c
|
||||
index c74392d..2b2a9fc 100644
|
||||
--- a/unique/uniquemessage.c
|
||||
+++ b/unique/uniquemessage.c
|
||||
@@ -185,7 +185,7 @@ unique_message_data_set (UniqueMessageData *message_data,
|
||||
*
|
||||
* Since: 1.0.2
|
||||
*/
|
||||
-G_CONST_RETURN guchar *
|
||||
+const guchar *
|
||||
unique_message_data_get (UniqueMessageData *message_data,
|
||||
gsize *length)
|
||||
{
|
||||
@@ -525,7 +525,7 @@ unique_message_data_get_screen (UniqueMessageData *message_data)
|
||||
* owned by the #UniqueMessageData structure and should not be
|
||||
* modified or freed
|
||||
*/
|
||||
-G_CONST_RETURN gchar *
|
||||
+const gchar *
|
||||
unique_message_data_get_startup_id (UniqueMessageData *message_data)
|
||||
{
|
||||
g_return_val_if_fail (message_data != NULL, NULL);
|
||||
diff --git a/unique/uniquemessage.h b/unique/uniquemessage.h
|
||||
index d3e9c3c..93eee21 100644
|
||||
--- a/unique/uniquemessage.h
|
||||
+++ b/unique/uniquemessage.h
|
||||
@@ -48,7 +48,7 @@ void unique_message_data_free (UniqueMessageData *me
|
||||
void unique_message_data_set (UniqueMessageData *message_data,
|
||||
const guchar *data,
|
||||
gsize length);
|
||||
-G_CONST_RETURN guchar *unique_message_data_get (UniqueMessageData *message_data,
|
||||
+const guchar * unique_message_data_get (UniqueMessageData *message_data,
|
||||
gsize *length);
|
||||
|
||||
gboolean unique_message_data_set_text (UniqueMessageData *message_data,
|
||||
@@ -63,7 +63,7 @@ void unique_message_data_set_filename (UniqueMessageData *me
|
||||
gchar * unique_message_data_get_filename (UniqueMessageData *message_data);
|
||||
|
||||
GdkScreen * unique_message_data_get_screen (UniqueMessageData *message_data);
|
||||
-G_CONST_RETURN gchar * unique_message_data_get_startup_id (UniqueMessageData *message_data);
|
||||
+const gchar * unique_message_data_get_startup_id (UniqueMessageData *message_data);
|
||||
guint unique_message_data_get_workspace (UniqueMessageData *message_data);
|
||||
|
||||
G_END_DECLS
|
||||
--
|
||||
1.7.6
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
From 9df132a70d54b768a8e1d0335d24b85ac9b3fb76 Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
Date: Sun, 27 Mar 2011 08:42:22 +0000
|
||||
Subject: Remove compiler warnings
|
||||
|
||||
(cherry picked from commit f791ed16b19dddc7fbaf90d8f797520e67883021)
|
||||
|
||||
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
---
|
||||
diff --git a/unique/dbus/uniquebackend-dbus.c b/unique/dbus/uniquebackend-dbus.c
|
||||
index 3ae1bed..69faa00 100644
|
||||
--- a/unique/dbus/uniquebackend-dbus.c
|
||||
+++ b/unique/dbus/uniquebackend-dbus.c
|
||||
@@ -84,7 +84,6 @@ unique_backend_dbus_register_proxy (UniqueBackendDBus *backend_dbus)
|
||||
static gboolean
|
||||
unique_backend_dbus_request_name (UniqueBackend *backend)
|
||||
{
|
||||
- UniqueBackendDBus *backend_dbus;
|
||||
const gchar *name;
|
||||
DBusGConnection *connection;
|
||||
DBusGProxy *proxy;
|
||||
@@ -97,8 +96,6 @@ unique_backend_dbus_request_name (UniqueBackend *backend)
|
||||
if (!connection)
|
||||
return FALSE;
|
||||
|
||||
- backend_dbus = UNIQUE_BACKEND_DBUS (backend);
|
||||
-
|
||||
retval = TRUE;
|
||||
name = unique_backend_get_name (backend);
|
||||
g_assert (name != NULL);
|
||||
@@ -207,10 +204,14 @@ unique_backend_dbus_send_message (UniqueBackend *backend,
|
||||
cmd, data, time_,
|
||||
&resp,
|
||||
&error);
|
||||
- if (error)
|
||||
+ if (!res)
|
||||
{
|
||||
- g_warning ("Error while sending message: %s", error->message);
|
||||
- g_error_free (error);
|
||||
+ if (error)
|
||||
+ {
|
||||
+ g_warning ("Error while sending message: %s", error->message);
|
||||
+ g_error_free (error);
|
||||
+ }
|
||||
+
|
||||
g_free (cmd);
|
||||
|
||||
return UNIQUE_RESPONSE_INVALID;
|
||||
--
|
||||
cgit v0.9
|
||||
@@ -1,26 +0,0 @@
|
||||
From caf736f4b84808393b0d7030ae6128a3322a71e2 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Mueller <tobiasmue@gnome.org>
|
||||
Date: Mon, 12 Apr 2010 13:01:42 +0000
|
||||
Subject: test-unique: Resolve format string issues
|
||||
|
||||
Provide a proper literal format string to not expose potential vulnerabilites.
|
||||
Fixes bug 615522.
|
||||
---
|
||||
diff --git a/tests/test-unique.c b/tests/test-unique.c
|
||||
index b7cde45..c9958c9 100644
|
||||
--- a/tests/test-unique.c
|
||||
+++ b/tests/test-unique.c
|
||||
@@ -82,9 +82,11 @@ app_message_cb (UniqueApp *app,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
+ "%s",
|
||||
title);
|
||||
if (message)
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
+ "%s",
|
||||
message);
|
||||
|
||||
gtk_window_set_urgency_hint (GTK_WINDOW (dialog), TRUE);
|
||||
--
|
||||
cgit v0.9
|
||||
@@ -1,37 +0,0 @@
|
||||
From 30ca2903a8ed4eed974ea744e4b9bd96198c425d Mon Sep 17 00:00:00 2001
|
||||
From: Rodney Lorrimar <r.lorrimar@fugro-fsi.com.au>
|
||||
Date: Mon, 21 Dec 2009 02:07:46 +0000
|
||||
Subject: Include NUL terminator in unique_message_data_get_filename()
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=605104
|
||||
|
||||
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
|
||||
---
|
||||
diff --git a/unique/uniqueinternals.h b/unique/uniqueinternals.h
|
||||
index ace40ed..3cec152 100644
|
||||
--- a/unique/uniqueinternals.h
|
||||
+++ b/unique/uniqueinternals.h
|
||||
@@ -13,7 +13,7 @@ G_BEGIN_DECLS
|
||||
struct _UniqueMessageData
|
||||
{
|
||||
guchar *data;
|
||||
- gint length;
|
||||
+ gint length; /* length of data not including NUL terminator */
|
||||
|
||||
GdkScreen *screen;
|
||||
gchar *startup_id;
|
||||
diff --git a/unique/uniquemessage.c b/unique/uniquemessage.c
|
||||
index 10f6df5..c74392d 100644
|
||||
--- a/unique/uniquemessage.c
|
||||
+++ b/unique/uniquemessage.c
|
||||
@@ -493,7 +493,7 @@ unique_message_data_get_filename (UniqueMessageData *message_data)
|
||||
{
|
||||
g_return_val_if_fail (message_data != NULL, NULL);
|
||||
|
||||
- return g_memdup (message_data->data, message_data->length);
|
||||
+ return g_memdup (message_data->data, message_data->length + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
cgit v0.9
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
pkg-config,
|
||||
glib,
|
||||
gtk2,
|
||||
dbus-glib,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libunique";
|
||||
version = "1.1.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75";
|
||||
};
|
||||
|
||||
# Don't make deprecated usages hard errors
|
||||
prePatch = ''
|
||||
substituteInPlace configure --replace "-Werror" "";
|
||||
'';
|
||||
|
||||
# glib-2.62 deprecations
|
||||
env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
|
||||
|
||||
# Patches from Gentoo portage
|
||||
patches = [
|
||||
./1.1.6-compiler-warnings.patch
|
||||
./1.1.6-fix-test.patch
|
||||
./1.1.6-G_CONST_RETURN.patch
|
||||
./1.1.6-include-terminator.patch
|
||||
]
|
||||
++ [ ./gcc7-bug.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
glib
|
||||
gtk2
|
||||
dbus-glib
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.gnome.org/Archive/unique";
|
||||
description = "Library for writing single instance applications";
|
||||
license = lib.licenses.lgpl21;
|
||||
platforms = with lib.platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
gcc-7 newly detects this class of bugs.
|
||||
In this particular case it's clear that the inention was
|
||||
to detect if the string is non-NULL *and* non-empty.
|
||||
|
||||
|
||||
diff --git a/unique/uniqueapp.c b/unique/uniqueapp.c
|
||||
index b40a86c..66a7226 100644
|
||||
--- a/unique/uniqueapp.c
|
||||
+++ b/unique/uniqueapp.c
|
||||
@@ -176,7 +176,7 @@ set_startup_id (UniqueBackend *backend,
|
||||
{
|
||||
gchar *id;
|
||||
|
||||
- if (startup_id && startup_id != '\0')
|
||||
+ if (startup_id && *startup_id != '\0')
|
||||
id = g_strdup (startup_id);
|
||||
else
|
||||
{
|
||||
@@ -1349,6 +1349,7 @@ mapAliases {
|
||||
libtransmission_3 = throw "libtransmission_3 has been removed in favour of libtransmission_4. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Converted to throw 2025-10-26
|
||||
libubox-wolfssl = throw "'libubox-wolfssl' has been removed, use 'libubox' or 'libubox-mbedtls'"; # Added 2026-03-29
|
||||
libuinputplus = throw "'libuinputplus' has been removed, as it was unmaintained upstream since 2021, no longer builds, and is no longer used by anything"; # Added 2025-11-02
|
||||
libunique = throw "'libunique' has been removed, as it depended on the deprecated GTK2 engine."; # Added 2026-08-11
|
||||
libva1 = throw "'libva1' has been removed, as it is no longer required. Please use libva."; # Added 2026-05-14
|
||||
libva1-minimal = throw "'libva1-minimal' has been removed, as it is no longer required. Please use libva-minimal."; # Added 2026-05-14
|
||||
libviper = throw "'libviper' was removed as it is broken and not maintained upstream"; # Added 2025-05-17
|
||||
|
||||
@@ -6078,9 +6078,6 @@ with pkgs;
|
||||
|
||||
libunistring = callPackage ../development/libraries/libunistring { };
|
||||
|
||||
libunique = callPackage ../development/libraries/libunique { };
|
||||
libunique3 = callPackage ../development/libraries/libunique/3.x.nix { };
|
||||
|
||||
libusb-compat-0_1 = callPackage ../development/libraries/libusb-compat/0.1.nix { };
|
||||
|
||||
libunwind =
|
||||
|
||||
Reference in New Issue
Block a user