From df2917a39e0b6559a3077baa70063a11f4a1e81b Mon Sep 17 00:00:00 2001 From: Stefano Cotta Ramusino Date: Sat, 6 Jan 2024 05:59:02 +0100 Subject: [PATCH] fix build for x86_64 architecture [release 1.1.6-6mamba;Thu Feb 20 2014] --- README.md | 3 + libunique-1.1.6-glib-2.32.patch | 136 ++++++++++++++++++++++++++++++++ libunique1.spec | 113 ++++++++++++++++++++++++++ 3 files changed, 252 insertions(+) create mode 100644 libunique-1.1.6-glib-2.32.patch create mode 100644 libunique1.spec diff --git a/README.md b/README.md index 7d6a040..aecef02 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # libunique1 +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. +Unique makes it easy to write this kind of applications, by providing a base class, taking care of all the IPC machinery needed to send messages to a running instance, and also handling the startup notification side. + diff --git a/libunique-1.1.6-glib-2.32.patch b/libunique-1.1.6-glib-2.32.patch new file mode 100644 index 0000000..ac8fa71 --- /dev/null +++ b/libunique-1.1.6-glib-2.32.patch @@ -0,0 +1,136 @@ +diff -ru libunique-1.1.6/unique/uniqueapp.c libunique-1.1.6.patched/unique/uniqueapp.c +--- libunique-1.1.6/unique/uniqueapp.c 2009-11-01 19:33:13.000000000 +0100 ++++ libunique-1.1.6.patched/unique/uniqueapp.c 2012-06-08 15:12:16.922173107 +0200 +@@ -781,7 +781,7 @@ + } + + +-G_CONST_RETURN gchar * ++const gchar * + unique_command_to_string (UniqueApp *app, + gint command) + { +@@ -863,7 +863,7 @@ + return retval; + } + +-G_CONST_RETURN gchar * ++const gchar * + unique_response_to_string (UniqueResponse response) + { + GEnumClass *enum_class; +Solo in libunique-1.1.6.patched/unique: uniqueapp.lo +Solo in libunique-1.1.6.patched/unique: uniqueapp.o +diff -ru libunique-1.1.6/unique/uniquebackend.c libunique-1.1.6.patched/unique/uniquebackend.c +--- libunique-1.1.6/unique/uniquebackend.c 2009-11-09 12:02:06.000000000 +0100 ++++ libunique-1.1.6.patched/unique/uniquebackend.c 2012-06-08 15:12:39.836928820 +0200 +@@ -111,7 +111,7 @@ + * + * 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 @@ + * + * 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 -ru libunique-1.1.6/unique/uniquebackend.h libunique-1.1.6.patched/unique/uniquebackend.h +--- libunique-1.1.6/unique/uniquebackend.h 2009-09-21 14:31:14.000000000 +0200 ++++ libunique-1.1.6.patched/unique/uniquebackend.h 2012-06-08 15:10:42.170183223 +0200 +@@ -94,10 +94,10 @@ + + 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); +Solo in libunique-1.1.6.patched/unique: uniquebackend.lo +Solo in libunique-1.1.6.patched/unique: uniquebackend.o +Solo in libunique-1.1.6.patched/unique: uniqueenumtypes.lo +Solo in libunique-1.1.6.patched/unique: uniqueenumtypes.o +diff -ru libunique-1.1.6/unique/uniqueinternals.h libunique-1.1.6.patched/unique/uniqueinternals.h +--- libunique-1.1.6/unique/uniqueinternals.h 2009-09-21 14:31:14.000000000 +0200 ++++ libunique-1.1.6.patched/unique/uniqueinternals.h 2012-06-08 15:11:34.974620293 +0200 +@@ -44,11 +44,11 @@ + * 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 +Solo in libunique-1.1.6.patched/unique: uniquemarshal.lo +Solo in libunique-1.1.6.patched/unique: uniquemarshal.o +diff -ru libunique-1.1.6/unique/uniquemessage.c libunique-1.1.6.patched/unique/uniquemessage.c +--- libunique-1.1.6/unique/uniquemessage.c 2009-11-09 12:02:06.000000000 +0100 ++++ libunique-1.1.6.patched/unique/uniquemessage.c 2012-06-08 15:13:39.156296439 +0200 +@@ -146,7 +146,7 @@ + void + unique_message_data_set (UniqueMessageData *message_data, + const guchar *data, +- gsize length) ++ gssize length) + { + g_return_if_fail (message_data != NULL); + +@@ -185,7 +185,7 @@ + * + * Since: 1.0.2 + */ +-G_CONST_RETURN guchar * ++const guchar * + unique_message_data_get (UniqueMessageData *message_data, + gsize *length) + { +@@ -525,7 +525,7 @@ + * 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 -ru libunique-1.1.6/unique/uniquemessage.h libunique-1.1.6.patched/unique/uniquemessage.h +--- libunique-1.1.6/unique/uniquemessage.h 2009-09-21 14:31:14.000000000 +0200 ++++ libunique-1.1.6.patched/unique/uniquemessage.h 2012-06-08 15:09:32.697148369 +0200 +@@ -47,8 +47,8 @@ + + void unique_message_data_set (UniqueMessageData *message_data, + const guchar *data, +- gsize length); +-G_CONST_RETURN guchar *unique_message_data_get (UniqueMessageData *message_data, ++ gssize length); ++const guchar * unique_message_data_get (UniqueMessageData *message_data, + gsize *length); + + gboolean unique_message_data_set_text (UniqueMessageData *message_data, +@@ -63,7 +63,7 @@ + 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 diff --git a/libunique1.spec b/libunique1.spec new file mode 100644 index 0000000..bc0bea0 --- /dev/null +++ b/libunique1.spec @@ -0,0 +1,113 @@ +%define majver %(echo %version | cut -d. -f1-2) + +Name: libunique1 +Version: 1.1.6 +Release: 6mamba +Summary: A library for writing single instance application +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://live.gnome.org/LibUnique +Source: http://ftp.gnome.org/pub/GNOME/sources/libunique/%{majver}/libunique-%{version}.tar.bz2 +Patch0: libunique-1.1.6-glib-2.32.patch +License: LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libX11-devel +BuildRequires: libXau-devel +BuildRequires: libXdmcp-devel +BuildRequires: libatk-devel +BuildRequires: libbzip2-devel +BuildRequires: libcairo-devel +BuildRequires: libdbus-devel +BuildRequires: libdbus-glib-devel +BuildRequires: libexpat-devel +BuildRequires: libffi-devel +BuildRequires: libfontconfig-devel +BuildRequires: libfreetype-devel +BuildRequires: libgdk-pixbuf-devel +BuildRequires: libglib-devel +BuildRequires: libgraphite2-devel +BuildRequires: libgtk2-devel +BuildRequires: libharfbuzz-devel +BuildRequires: libpango-devel +BuildRequires: libpng-devel +BuildRequires: libselinux-devel +BuildRequires: libxcb-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +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. +Unique makes it easy to write this kind of applications, by providing a base class, taking care of all the IPC machinery needed to send messages to a running instance, and also handling the startup notification side. + +%package devel +Summary: Devel package for %{name} +Group: Development/Libraries +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +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. +Unique makes it easy to write this kind of applications, by providing a base class, taking care of all the IPC machinery needed to send messages to a running instance, and also handling the startup notification side. + +This package contains static libraries and header files need for development. + +%prep +%setup -q -n libunique-%{version} +%patch0 -p1 + +%build +%configure +%make\ + CFLAGS="${CFLAGS} -Wno-deprecated-declarations -Wno-unused-but-set-variable" + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_libdir}/libunique-1.0.so.* +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +%{_libdir}/libunique-1.0.a +%{_libdir}/libunique-1.0.la +%{_libdir}/libunique-1.0.so +%{_libdir}/girepository-1.0/Unique-1.0.typelib +%{_datadir}/gir-1.0/Unique-1.0.gir +%{_includedir}/unique-1.0/unique/unique*.h +%{_datadir}/gtk-doc/html/unique/* +%{_libdir}/pkgconfig/*.pc +%doc ChangeLog NEWS README + +%changelog +* Thu Feb 20 2014 Stefano Cotta Ramusino 1.1.6-6mamba +- fix build for x86_64 architecture + +* Fri Jun 08 2012 Silvan Calarco 1.1.6-5mamba +- added glib 2.32 build patch + +* Mon Jul 25 2011 Silvan Calarco 1.1.6-4mamba +- rebuilt as legacy package + +* Thu Oct 28 2010 Automatic Build System 1.1.6-3mamba +- automatic rebuild by autodist + +* Sat Jun 26 2010 Automatic Build System 1.1.6-2mamba +- automatic rebuild by autodist + +* Thu Jun 03 2010 Automatic Build System 1.1.6-1mamba +- automatic update by autodist + +* Sun Sep 27 2009 Silvan Calarco 1.1.2-1mamba +- update to 1.1.2 + +* Mon Mar 30 2009 Silvan Calarco 1.0.8-1mamba +- package created by autospec