summaryrefslogtreecommitdiff
path: root/dev-libs/libunique
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/libunique
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/libunique')
-rw-r--r--dev-libs/libunique/Manifest12
-rw-r--r--dev-libs/libunique/files/libunique-1.1.6-G_CONST_RETURN.patch143
-rw-r--r--dev-libs/libunique/files/libunique-1.1.6-compiler-warnings.patch50
-rw-r--r--dev-libs/libunique/files/libunique-1.1.6-fix-test.patch26
-rw-r--r--dev-libs/libunique/files/libunique-1.1.6-include-terminator.patch37
-rw-r--r--dev-libs/libunique/files/run-tests18
-rw-r--r--dev-libs/libunique/libunique-1.1.6-r2.ebuild63
-rw-r--r--dev-libs/libunique/libunique-3.0.2-r1.ebuild45
-rw-r--r--dev-libs/libunique/metadata.xml11
9 files changed, 405 insertions, 0 deletions
diff --git a/dev-libs/libunique/Manifest b/dev-libs/libunique/Manifest
new file mode 100644
index 000000000000..2df3a724a3ca
--- /dev/null
+++ b/dev-libs/libunique/Manifest
@@ -0,0 +1,12 @@
+AUX libunique-1.1.6-G_CONST_RETURN.patch 6055 SHA256 69cce7257d144e9a6ed9f402196d79ff52013d710e40101f8ef20481876692b2 SHA512 b1df46be67911e2ddc8cb99f0dbf785121e1c4818f1327c03047d577a3ba2a845166c138873b4f5fde35682831cd099a88e28586db9b3db516facc851723bd7b WHIRLPOOL 77c43ef375360f9d9577123aace62bf2275d79ff9577d321f27d9389d87d5c82055dec4ac1b2f0d2345dd79836fa55c5a63b7fa98fd94924d40bb7d521c874c7
+AUX libunique-1.1.6-compiler-warnings.patch 1651 SHA256 1365451d30af820ba14b54ab27becdbba4cec3ade29e63e2cdecdc23d404bfc6 SHA512 83ea201fa0ec4b010cc1bdd7d5b0b7018460173f16f448579d159d571c0e51a7abb081943763f4cd9856cf76b9a838c2baa9459f3441457120d3c6ff0a7740c7 WHIRLPOOL b0732b03cecc6e035b7e85db0cd2e28592f6a06173658556727ef08a763c5d4d6d5222cdc46a6b2e81a96bb449367065fc774600f1e0ace832b452f8bc60f3e2
+AUX libunique-1.1.6-fix-test.patch 1041 SHA256 1e9fcc4189fb4080c6eae1dd97a68a9dc46f8e1a71be1a348ed6c39f9f02f67e SHA512 648712d084fd1d4cbdac873dbedfed9693f07329ceea0d55db62a4cf2bf2faf305a44e33ca1332264618a7ea69bd01bba965d96bf87402ef364cf2794df0ee27 WHIRLPOOL 81aa251bc15ebcbd0d3471ca1d3098e9a2352e3c1efabd5da43c8b4c1f06fc05d5d38114296993f25e28dc59dd84818e3d012249b0bbd6f46d03fc664c633f37
+AUX libunique-1.1.6-include-terminator.patch 1150 SHA256 32ade6dbddac23e3ff181d14bc1e59e6dbff14f9a7c0ac0afc0a657850714d4d SHA512 d83bdea0e79634a233350ca9d81d7cf72b4a957753165e939c95678b26eff9b6c8e41c3e37c8ffe0ebf49c75a01e682a0f0266dfeeccf10f7bd29e868c6ae033 WHIRLPOOL 54ce4c1d13f2df7ea18cefc978b98eccdcfae33765ddf1e838a3292a1ec963dbd1f220e64ae695fa09dedb5d368211bb7c5b58f80938768a7fbb83e581886a22
+AUX run-tests 500 SHA256 586a7bea8db8c69761549d4d27024d08d68c4e2dafd59e50efb35bfc42a9afc2 SHA512 2ff3662e87cb00f33e68a342740c56ae8294e3cae069f1191156fb58077e7a7c1a1aad75018673b494b0be71f9c7cb15c9e2c5b826fd733a72baa761b4994547 WHIRLPOOL d5dbe0064706f56a5ee006d5616812a14dfce41b5ec4c7a5861b1d1b9513bffe68f2a6c2071fa1f062dcaed4a81205c888dd1e8c0ad248ccae07ea9c68e6f08e
+DIST libunique-1.1.6.tar.bz2 335534 SHA256 e5c8041cef8e33c55732f06a292381cb345db946cf792a4ae18aa5c66cdd4fbb SHA512 82893e1d51a553b3c1413498e48a3a132e2c05779b4442c3732b5429d698e133741615657432a3d05c82a05c79bb59acc13df500bb08010212155db5e4ee6bde WHIRLPOOL ed5305ebf2e1e052c94c575e035c636ed4f80137c5a1d6cf57a80bbe74cdf55274e9ae29562c31f8dbb1c8aab665d39acfadfeeeac29af6d5fe8d8db33243b0d
+DIST libunique-3.0.2.tar.xz 294712 SHA256 a8f02ce073e2b920cca8ac45d418e7cb64438ad0814780c5912c6d63f8a4e038 SHA512 b053b9f265c751bd581d15bf73246fb087075eaf75760565671c09a4ab80db342b4d2185050a877c4e25276d24f7895f4325ca60b918a7c4acd9d1591e97a8b4 WHIRLPOOL 81d8ccdc22c27221525d59e0e7186aff632e2fdaa53ed4b05e38af814b889e3b1d470f7c9b3a8dcf98322145b92f8759f02b82771db4908a6aacb6e1bd761744
+EBUILD libunique-1.1.6-r2.ebuild 1575 SHA256 9f1b1be1ff3335b37cea2ae5b73075551bd7112568ed02c5b68e04d8c7b43aeb SHA512 6bbe8d63b9b6124195fe7cb6570d6d2ec85eae96c1c1b8f32a5388968a575e403b7a4b0e677021ceb77e3e8114b627329a6378fbffcd2b0090e0af81c0c8e6ab WHIRLPOOL 29386162cc66fcf2276f012ff5c7c49a8d4a3440f271c90869ca3c95e374faf9e142d4a4b4549183d9d6eae766d5798311e2492ad34c4e4ab78175629e4a62e9
+EBUILD libunique-3.0.2-r1.ebuild 1134 SHA256 2a746adb13e6e691881da2cdd5b32b5a0d98c726c43d351a3a3666142443d69b SHA512 433ede24a80795a93f5299dd0ad6dbcd5961665881ceaac91a2d6444305db7afff039a5e2c449da05842f7f14e0617bfe8919f4b3da898d002cd84356a428c98 WHIRLPOOL 38464c5c288cc827c1134a8ab5ef014caed917d8e15987b62e8eb84f50b9a922ced29b66f8302ea5ac886dcba7966dc85c954ffd4137cb37d6beb2007ba633a2
+MISC ChangeLog 4249 SHA256 d34abd979774792a9be06d302b9368dfa347d83f77d42f73abcd1c5bf63f183c SHA512 657eee8593e7aad08fe8cf95bce284e0ee6e9671c751c95852643d03d887c97a046e09cc4cd933428d71c790b35ec6a97bfe7c3616c89f4ccc50398754b303f1 WHIRLPOOL 3431abfcf028bc9259e8862d4b1f4f6a102e911947a3276692beacca5e22866e5ca79a3c021db23db7ae71dc1baa5df71bece95845bc066447afd29f5bfa8490
+MISC ChangeLog-2015 8292 SHA256 6662184b8c5f734251f39dc9c0b30509ded9e10a3ab4c1071b6ee25807637b7e SHA512 28dc5bc0141cc2849aebb5bdefca9086fb2ecfb2428451f198f3edd37075a634fb3a2679543bd4d478e079eeb6544d57a67969a4b7fb753292ca0fdb49b2699e WHIRLPOOL 3c965616fd53ff6d1221fee3b0869aaaf95d49820f326cf60f1234e663a31fd029dbfb5099ca44968c854ab735fe4572f0f6ce721429cdd8fdf62e28d8b4defb
+MISC metadata.xml 500 SHA256 49b2d1aea4fe0b9da792d70d915789dcc404f874566e7c20244f2e88f10cf068 SHA512 bcdaa87134abaef8a3490e11fb9716a20594a0dc862f5b07b446c266f39d4954e0fe3f7f89d6412687bc7a126387d469454d7d1b7ba46684e8cf174a8f78c169 WHIRLPOOL a5f1b58709422982d9c99bbd924e60a14cc41a937c466820aff2003929ddb55611f1d31b4225f522003e333a342afc6635004931e91a21bfc58f7f75f5917217
diff --git a/dev-libs/libunique/files/libunique-1.1.6-G_CONST_RETURN.patch b/dev-libs/libunique/files/libunique-1.1.6-G_CONST_RETURN.patch
new file mode 100644
index 000000000000..1cc5b6e01be4
--- /dev/null
+++ b/dev-libs/libunique/files/libunique-1.1.6-G_CONST_RETURN.patch
@@ -0,0 +1,143 @@
+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
+
diff --git a/dev-libs/libunique/files/libunique-1.1.6-compiler-warnings.patch b/dev-libs/libunique/files/libunique-1.1.6-compiler-warnings.patch
new file mode 100644
index 000000000000..f47e66267d50
--- /dev/null
+++ b/dev-libs/libunique/files/libunique-1.1.6-compiler-warnings.patch
@@ -0,0 +1,50 @@
+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
diff --git a/dev-libs/libunique/files/libunique-1.1.6-fix-test.patch b/dev-libs/libunique/files/libunique-1.1.6-fix-test.patch
new file mode 100644
index 000000000000..b2e85e4d71a5
--- /dev/null
+++ b/dev-libs/libunique/files/libunique-1.1.6-fix-test.patch
@@ -0,0 +1,26 @@
+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
diff --git a/dev-libs/libunique/files/libunique-1.1.6-include-terminator.patch b/dev-libs/libunique/files/libunique-1.1.6-include-terminator.patch
new file mode 100644
index 000000000000..927771e7311b
--- /dev/null
+++ b/dev-libs/libunique/files/libunique-1.1.6-include-terminator.patch
@@ -0,0 +1,37 @@
+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
diff --git a/dev-libs/libunique/files/run-tests b/dev-libs/libunique/files/run-tests
new file mode 100644
index 000000000000..db9bcd4f0860
--- /dev/null
+++ b/dev-libs/libunique/files/run-tests
@@ -0,0 +1,18 @@
+BINARY = ./test-unique
+TESTS = --new --activate --open-uri=http://localhost --foo
+
+all:
+ for test in $(TESTS); do \
+ rm -f test_result; \
+ $(BINARY) > test_result & \
+ main_pid=$$!; \
+ sleep 5; \
+ $(BINARY) $$test & \
+ test_pid=$$!; \
+ sleep 5; \
+ while ! test -s test_result; do sleep 0.5; done; \
+ sleep 5; \
+ kill $${test_pid} || exit 1; \
+ kill $${main_pid} || exit 1; \
+ grep -q 'Message received from.*' test_result || { echo "Test failed at $$test"; exit 1; }; \
+ done
diff --git a/dev-libs/libunique/libunique-1.1.6-r2.ebuild b/dev-libs/libunique/libunique-1.1.6-r2.ebuild
new file mode 100644
index 000000000000..be83f6a510cd
--- /dev/null
+++ b/dev-libs/libunique/libunique-1.1.6-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_LA_PUNT="yes"
+GNOME_TARBALL_SUFFIX="bz2"
+
+inherit gnome2 virtualx
+
+DESCRIPTION="A library for writing single instance application"
+HOMEPAGE="https://wiki.gnome.org/Attic/LibUnique"
+
+LICENSE="LGPL-2.1"
+SLOT="1"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="debug dbus +introspection"
+
+RDEPEND="
+ >=dev-libs/glib-2.12:2
+ >=x11-libs/gtk+-2.11:2[introspection?]
+ x11-libs/libX11
+ dbus? (
+ >=dev-libs/dbus-glib-0.70
+ sys-apps/dbus[X] )
+ introspection? ( >=dev-libs/gobject-introspection-0.6.3:= )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.11
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+# For eautoreconf
+# dev-util/gtk-doc-am
+
+PATCHES=(
+ # Include NUL terminator in unique_message_data_get_filename()
+ "${FILESDIR}/${P}-include-terminator.patch"
+
+ # test-unique: Resolve format string issues
+ "${FILESDIR}/${P}-fix-test.patch"
+
+ # Remove compiler warnings
+ "${FILESDIR}/${P}-compiler-warnings.patch"
+
+ # Remove G_CONST_RETURN usage, now that its gone in glib
+ "${FILESDIR}/${PN}-1.1.6-G_CONST_RETURN.patch"
+)
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ --disable-static \
+ --enable-bacon \
+ $(use_enable introspection) \
+ $(usex debug --enable-debug=yes ' ') \
+ $(use_enable dbus)
+}
+
+src_test() {
+ cd "${S}/tests"
+ cp "${FILESDIR}/run-tests" . || die "Unable to cp \${FILESDIR}/run-tests"
+ virtx emake -f run-tests || die "Tests failed"
+}
diff --git a/dev-libs/libunique/libunique-3.0.2-r1.ebuild b/dev-libs/libunique/libunique-3.0.2-r1.ebuild
new file mode 100644
index 000000000000..1688d8bfa665
--- /dev/null
+++ b/dev-libs/libunique/libunique-3.0.2-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2 virtualx
+
+DESCRIPTION="A library for writing single instance application"
+HOMEPAGE="https://wiki.gnome.org/Attic/LibUnique"
+
+LICENSE="LGPL-2.1"
+SLOT="3"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="debug +introspection"
+
+RDEPEND="
+ >=dev-libs/glib-2.25.7:2
+ sys-apps/dbus[X]
+ >=x11-libs/gtk+-2.90.0:3[introspection?]
+ x11-libs/libX11
+ introspection? ( >=dev-libs/gobject-introspection-0.9.0:= )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.11
+ virtual/pkgconfig
+"
+# For eautoreconf
+# dev-util/gtk-doc-am
+
+src_configure() {
+ # --disable-dbus means gdbus is used instead of dbus-glib
+ gnome2_src_configure \
+ --disable-static \
+ --disable-maintainer-flags \
+ --disable-dbus \
+ $(usex debug --enable-debug=yes ' ') \
+ $(use_enable introspection)
+}
+
+src_test() {
+ cd "${S}/tests"
+ cp "${FILESDIR}/run-tests" . || die "Unable to cp \${FILESDIR}/run-tests"
+ virtx emake -f run-tests || die "Tests failed"
+}
diff --git a/dev-libs/libunique/metadata.xml b/dev-libs/libunique/metadata.xml
new file mode 100644
index 000000000000..b89a42c7196e
--- /dev/null
+++ b/dev-libs/libunique/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+</maintainer>
+<longdescription lang="en">
+Unique is a library for writing single instance application. If you launch a single instance application twice, the second instance will either just quit or will send a message to the running instance.
+</longdescription>
+</pkgmetadata>