[uzbl] Fix up patches and add upstreaming links
Ben Boeckel
mathstuf at fedoraproject.org
Tue Oct 25 18:31:42 UTC 2011
commit 7699ce6d8b33a178b3cd43ea53f0d3d670df57a1
Author: Ben Boeckel <MathStuf at gmail.com>
Date: Tue Oct 25 14:28:48 2011 -0400
Fix up patches and add upstreaming links
0001-Include-glib.h.patch | 26 ----------
...iptcoregtk-3.0-is-required-for-webkitgtk3.patch | 4 +-
0002-Check-if-glib-needs-g_thread_init.patch | 49 ++++++++++++++++++++
uzbl.spec | 11 +++--
4 files changed, 58 insertions(+), 32 deletions(-)
---
diff --git a/0001-javascriptcoregtk-3.0-is-required-for-webkitgtk3.patch b/0001-javascriptcoregtk-3.0-is-required-for-webkitgtk3.patch
index 25495fa..846b824 100644
--- a/0001-javascriptcoregtk-3.0-is-required-for-webkitgtk3.patch
+++ b/0001-javascriptcoregtk-3.0-is-required-for-webkitgtk3.patch
@@ -1,7 +1,7 @@
From 6bc7b4b43d402d1ccef6d7214a5e0bbd007621d9 Mon Sep 17 00:00:00 2001
From: Ben Boeckel <MathStuf at gmail.com>
Date: Tue, 25 Oct 2011 12:51:36 -0400
-Subject: [PATCH] javascriptcoregtk-3.0 is required for webkitgtk3
+Subject: [PATCH 1/2] javascriptcoregtk-3.0 is required for webkitgtk3
---
Makefile | 2 +-
@@ -16,7 +16,7 @@ index 6c2269f..00a8f89 100644
ifeq ($(USE_GTK3),1)
- REQ_PKGS += gtk+-3.0 webkitgtk-3.0
-+ REQ_PKGS += gtk+-3.0 webkitgtk-3.0 javascriptcoregtk-3.0 gthread-2.0
++ REQ_PKGS += gtk+-3.0 webkitgtk-3.0 javascriptcoregtk-3.0
CPPFLAGS = -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
else
REQ_PKGS += gtk+-2.0 webkit-1.0
diff --git a/0002-Check-if-glib-needs-g_thread_init.patch b/0002-Check-if-glib-needs-g_thread_init.patch
new file mode 100644
index 0000000..3613444
--- /dev/null
+++ b/0002-Check-if-glib-needs-g_thread_init.patch
@@ -0,0 +1,49 @@
+From cfa68177245890a03e467412075f84e9c9647c71 Mon Sep 17 00:00:00 2001
+From: Ben Boeckel <MathStuf at gmail.com>
+Date: Tue, 25 Oct 2011 14:24:10 -0400
+Subject: [PATCH 2/2] Check if glib needs g_thread_init
+
+Newer glib versions don't need g_thread_init. Of course, there is no
+announcement or whatever, so you have to go to the docs to discover
+this. Nevermind the lack of backwards compatibility with a nice message
+about when it will be removed for a while either.
+---
+ Makefile | 5 +++++
+ src/uzbl-core.c | 3 ++-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 00a8f89..86ff7f6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -21,6 +21,11 @@ endif
+
+ REQ_PKGS += libsoup-2.4 gthread-2.0 glib-2.0
+
++# Check for a new glib version
++ifeq ($(shell pkg-config --exists "glib-2.0 >= 2.31.0"),1)
++ CPPFLAGS += -DUZBL_GTHREAD_NO_INIT
++endif
++
+ ARCH:=$(shell uname -m)
+
+ COMMIT_HASH:=$(shell ./misc/hash.sh)
+diff --git a/src/uzbl-core.c b/src/uzbl-core.c
+index f90c5dd..f756740 100644
+--- a/src/uzbl-core.c
++++ b/src/uzbl-core.c
+@@ -962,9 +962,10 @@ initialize(int argc, char** argv) {
+ if (uzbl.state.socket_id || uzbl.state.embed)
+ uzbl.state.plug_mode = TRUE;
+
++#ifndef UZBL_GTHREAD_NO_INIT
+ if (!g_thread_supported())
+ g_thread_init(NULL);
+-
++#endif
+
+ /* TODO: move the handler setup to event_buffer_timeout and disarm the
+ * handler in empty_event_buffer? */
+--
+1.7.6
+
diff --git a/uzbl.spec b/uzbl.spec
index 7aeb920..44ec476 100644
--- a/uzbl.spec
+++ b/uzbl.spec
@@ -18,12 +18,15 @@ URL: http://www.uzbl.org
# gzip -c > ../uzbl-${uzblcommit}.tar.gz
Source0: %{name}-%{uzblcommit}.tar.gz
Source1: %{name}.desktop
+# RPM handles docs for us, won't be upstreamed
Patch0: %{name}-makefile.patch
+# Fedora-specific, won't be upstreamed
Patch1: 0001-Fedora-specific-error-messages-on-no-configs.patch
# Submitted at https://github.com/Dieterbe/uzbl/pull/71
Patch2: 0001-javascriptcoregtk-3.0-is-required-for-webkitgtk3.patch
-Patch3: 0001-Get-the-click-context-all-the-time.patch
-Patch4: 0001-Include-glib.h.patch
+Patch3: 0002-Check-if-glib-needs-g_thread_init.patch
+# Submitted at https://github.com/Dieterbe/uzbl/pull/72
+Patch4: 0001-Get-the-click-context-all-the-time.patch
%if %{use_webkitgtk3}
BuildRequires: webkitgtk3-devel
@@ -108,8 +111,8 @@ Highlighting files for uzbl's configuration.
%patch0 -p1 -b .makefile
%patch1 -p1 -b .fedora
%patch2 -p1 -b .jscore
-%patch3 -p1 -b .context
-%patch4 -p1 -b .include
+%patch3 -p1 -b .gthread_init
+%patch4 -p1 -b .context
mkdir -p icons/hicolor/32x32/apps
mv examples/data/uzbl.png icons/hicolor/32x32/apps
More information about the scm-commits
mailing list