Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: gnome-extra/yelp/, gnome-extra/yelp/files/
Date: Mon, 30 May 2011 18:40:08
Message-Id: ac57e7aac285837744e6f7c67236f7c1e92cb07b.nirbheek@gentoo
1 commit: ac57e7aac285837744e6f7c67236f7c1e92cb07b
2 Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
3 AuthorDate: Fri May 27 07:20:09 2011 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Mon May 30 18:10:08 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=ac57e7aa
7
8 gnome-extra/yelp: 3.0.2 → 3.0.3 + sys-apps/man compatibility
9
10 * Add a patch for compatibility with sys-apps/man (without this patch,
11 yelp only worked with sys-apps/man-db); see upstream bug 648854
12 * Remove patches that have been applied upstream.
13
14 Signed-off-by: Nirbheek Chauhan <nirbheek <AT> gentoo.org>
15
16 ---
17 ...ication-Remove-C-style-comment-bug-648771.patch | 25 ----
18 ...2-Fix-untranslated-UI-elements-bug-648840.patch | 28 -----
19 ...reakage-caused-by-the-fix-to-https-bugzil.patch | 26 -----
20 .../yelp/files/yelp-3.0.3-man-compatibility.patch | 117 ++++++++++++++++++++
21 .../yelp/{yelp-3.0.2.ebuild => yelp-3.0.3.ebuild} | 5 +-
22 5 files changed, 120 insertions(+), 81 deletions(-)
23
24 diff --git a/gnome-extra/yelp/files/0001-yelp-application-Remove-C-style-comment-bug-648771.patch b/gnome-extra/yelp/files/0001-yelp-application-Remove-C-style-comment-bug-648771.patch
25 deleted file mode 100644
26 index 798faa9..0000000
27 --- a/gnome-extra/yelp/files/0001-yelp-application-Remove-C-style-comment-bug-648771.patch
28 +++ /dev/null
29 @@ -1,25 +0,0 @@
30 -From a1e49faa0b4873c3f3c5b949ebe96186dc2e2813 Mon Sep 17 00:00:00 2001
31 -From: Shaun McCance <shaunm@×××××.org>
32 -Date: Wed, 27 Apr 2011 11:18:49 -0400
33 -Subject: [PATCH 1/3] yelp-application: Remove C++-style comment, bug #648771
34 -
35 ----
36 - src/yelp-application.c | 2 +-
37 - 1 files changed, 1 insertions(+), 1 deletions(-)
38 -
39 -diff --git a/src/yelp-application.c b/src/yelp-application.c
40 -index ddf5a19..94f13ae 100644
41 ---- a/src/yelp-application.c
42 -+++ b/src/yelp-application.c
43 -@@ -350,7 +350,7 @@ yelp_application_new (void)
44 - return app;
45 - }
46 -
47 --// consumes the uri
48 -+/* consumes the uri */
49 - static void
50 - open_uri (YelpApplication *app,
51 - YelpUri *uri,
52 ---
53 -1.7.5.rc3
54 -
55
56 diff --git a/gnome-extra/yelp/files/0002-Fix-untranslated-UI-elements-bug-648840.patch b/gnome-extra/yelp/files/0002-Fix-untranslated-UI-elements-bug-648840.patch
57 deleted file mode 100644
58 index 099c582..0000000
59 --- a/gnome-extra/yelp/files/0002-Fix-untranslated-UI-elements-bug-648840.patch
60 +++ /dev/null
61 @@ -1,28 +0,0 @@
62 -From b2d172d904c1cbd67ac227241d9e15caba2c866f Mon Sep 17 00:00:00 2001
63 -From: Matthias Clasen <mclasen@××××××.com>
64 -Date: Thu, 28 Apr 2011 09:40:52 -0400
65 -Subject: [PATCH 2/3] Fix untranslated UI elements, bug #648840
66 -
67 ----
68 - src/yelp.c | 5 +++++
69 - 1 files changed, 5 insertions(+), 0 deletions(-)
70 -
71 -diff --git a/src/yelp.c b/src/yelp.c
72 -index e5726aa..5c37b2a 100644
73 ---- a/src/yelp.c
74 -+++ b/src/yelp.c
75 -@@ -38,6 +38,11 @@ main (int argc, char **argv)
76 - g_thread_init (NULL);
77 - g_type_init ();
78 -
79 -+ setlocale (LC_ALL, "");
80 -+ textdomain (GETTEXT_PACKAGE);
81 -+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
82 -+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
83 -+
84 - app = yelp_application_new ();
85 -
86 - return g_application_run (G_APPLICATION (app), argc, argv);
87 ---
88 -1.7.5.rc3
89 -
90
91 diff --git a/gnome-extra/yelp/files/0003-Fix-build-breakage-caused-by-the-fix-to-https-bugzil.patch b/gnome-extra/yelp/files/0003-Fix-build-breakage-caused-by-the-fix-to-https-bugzil.patch
92 deleted file mode 100644
93 index d65b74a..0000000
94 --- a/gnome-extra/yelp/files/0003-Fix-build-breakage-caused-by-the-fix-to-https-bugzil.patch
95 +++ /dev/null
96 @@ -1,26 +0,0 @@
97 -From 5ba4aefb6d0c8b292d59833963070383cb539168 Mon Sep 17 00:00:00 2001
98 -From: Gabor Kelemen <kelemeng@×××××.hu>
99 -Date: Fri, 29 Apr 2011 10:10:35 +0200
100 -Subject: [PATCH 3/3] Fix build breakage caused by the fix to
101 - https://bugzilla.gnome.org/show_bug.cgi?id=648840
102 -
103 ----
104 - src/yelp.c | 2 ++
105 - 1 files changed, 2 insertions(+), 0 deletions(-)
106 -
107 -diff --git a/src/yelp.c b/src/yelp.c
108 -index 5c37b2a..6cf425b 100644
109 ---- a/src/yelp.c
110 -+++ b/src/yelp.c
111 -@@ -24,6 +24,8 @@
112 - #include <config.h>
113 - #endif
114 -
115 -+#include <locale.h>
116 -+
117 - #include <glib.h>
118 - #include <glib/gi18n.h>
119 - #include <gtk/gtk.h>
120 ---
121 -1.7.5.rc3
122 -
123
124 diff --git a/gnome-extra/yelp/files/yelp-3.0.3-man-compatibility.patch b/gnome-extra/yelp/files/yelp-3.0.3-man-compatibility.patch
125 new file mode 100644
126 index 0000000..b57591c
127 --- /dev/null
128 +++ b/gnome-extra/yelp/files/yelp-3.0.3-man-compatibility.patch
129 @@ -0,0 +1,117 @@
130 +From 7e181e8d74f7e67b8b3acb8524fc85157ed39c8e Mon Sep 17 00:00:00 2001
131 +From: Alexandre Rostovtsev <tetromino@×××××.com>
132 +Date: Sun, 1 May 2011 22:52:14 -0400
133 +Subject: [PATCH] Enable compatibility with traditional man (#648854)
134 +
135 +As of commit 46a82ade3e6f0fac8f08b18e7fc23d8665f6f728, Yelp runs
136 +"man -Z -Tutf8 -EUTF-8 [FILE]" to obtain the groff intermediate format
137 +of the man page. However, the only implementation of man that accepts
138 +these options is man-db (used by Debian, Fedora, SUSE & Ubuntu).
139 +The traditional Linux man used by other distros and man implementations
140 +on non-Linux Unixes (FreeBSD, Solaris) do not have command-line options
141 +for outputting groff intermediate format.
142 +Therefore, on systems that do not use man-db, we need to manually
143 +uncompress the nroff source file and feed it to groff. This is best done
144 +using a small shell script (/usr/libexec/yelp-groff), both for for
145 +clarity and for ease of modification on systems with weird man setups.
146 +
147 +Signed-off-by: Alexandre Rostovtsev <tetromino@×××××.com>
148 +---
149 + libyelp/Makefile.am | 2 +
150 + libyelp/yelp-groff | 49 +++++++++++++++++++++++++++++++++++++++++++++
151 + libyelp/yelp-man-parser.c | 4 +-
152 + 3 files changed, 53 insertions(+), 2 deletions(-)
153 + create mode 100755 libyelp/yelp-groff
154 +
155 +diff --git a/libyelp/Makefile.am b/libyelp/Makefile.am
156 +index a4dd68b..5d55bf1 100644
157 +--- a/libyelp/Makefile.am
158 ++++ b/libyelp/Makefile.am
159 +@@ -1,4 +1,5 @@
160 + lib_LTLIBRARIES = libyelp.la
161 ++libexec_SCRIPTS = yelp-groff
162 +
163 + libyelp_la_SOURCES = \
164 + yelp-bookmarks.c \
165 +@@ -49,6 +50,7 @@ endif
166 + libyelp_la_CFLAGS = \
167 + $(YELP_CFLAGS) \
168 + -DDATADIR=\""$(datadir)"\" \
169 ++ -DLIBEXECDIR=\"$(libexecdir)\" \
170 + -DYELP_ICON_PATH=\"$(YELP_ICON_PATH)\"
171 +
172 + libyelp_la_LIBADD = $(YELP_LIBS)
173 +diff --git a/libyelp/yelp-groff b/libyelp/yelp-groff
174 +new file mode 100755
175 +index 0000000..5348024
176 +--- /dev/null
177 ++++ b/libyelp/yelp-groff
178 +@@ -0,0 +1,49 @@
179 ++#!/bin/sh
180 ++#
181 ++# Copyright (c) 2011 Alexandre Rostovtsev <tetromino@×××××.com>
182 ++#
183 ++# This program is free software; you can redistribute it and/or
184 ++# modify it under the terms of the GNU General Public License as
185 ++# published by the Free Software Foundation; either version 2 of the
186 ++# License, or (at your option) any later version.
187 ++#
188 ++# This program is distributed in the hope that it will be useful,
189 ++# but WITHOUT ANY WARRANTY; without even the implied warranty of
190 ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
191 ++# General Public License for more details.
192 ++#
193 ++# You should have received a copy of the GNU General Public
194 ++# License along with this program; if not, write to the
195 ++# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
196 ++# Boston, MA 02110-1301, USA.
197 ++#
198 ++###
199 ++#
200 ++# Process the requested compressed source nroff file and output groff
201 ++# intermediate format.
202 ++#
203 ++
204 ++filename=$1
205 ++
206 ++if [ -z ${filename} ] ; then
207 ++ echo "Usage: yelp-groff [FILE]" >&2
208 ++ echo "Process a man FILE and output groff intermediate format."
209 ++ exit 1
210 ++fi
211 ++
212 ++# If "man -Z -Tutf8 -EUTF-8" works (i.e. if man is man-db), use that.
213 ++man -Z -Tutf8 -EUTF-8 ${filename} 2>/dev/null && exit 0
214 ++
215 ++# Otherwise, manually uncompress the file ...
216 ++cat="cat"
217 ++case ${filename} in
218 ++ *.bz2) cat="bzip2 -c -d" ;;
219 ++ *.gz) cat="gunzip -c" ;;
220 ++ *.lzma) cat="unlzma -c -d" ;;
221 ++ *.xz) cat="unxz -c" ;;
222 ++ *.Z) cat="zcat" ;;
223 ++esac
224 ++
225 ++# ... and run groff to get the intermediate format; preprocess with tbl
226 ++# unless MANROFFSEQ is defined.
227 ++${cat} ${filename} | groff -${MANROFFSEQ:-t} -man -Z -Tutf8
228 +diff --git a/libyelp/yelp-man-parser.c b/libyelp/yelp-man-parser.c
229 +index 4001d38..9818803 100644
230 +--- a/libyelp/yelp-man-parser.c
231 ++++ b/libyelp/yelp-man-parser.c
232 +@@ -371,9 +371,9 @@ get_troff (gchar *path, GError **error)
233 + {
234 + gint stdout;
235 + GError *err = NULL;
236 +- gchar *argv[] = { "man", "-Z", "-Tutf8", "-EUTF-8", NULL, NULL };
237 ++ gchar *argv[] = { LIBEXECDIR "/yelp-groff", NULL, NULL };
238 +
239 +- argv[4] = path;
240 ++ argv[1] = path;
241 +
242 + if (!g_spawn_async_with_pipes (NULL, argv, NULL,
243 + G_SPAWN_SEARCH_PATH, NULL, NULL,
244 +--
245 +1.7.5.rc3
246 +
247
248 diff --git a/gnome-extra/yelp/yelp-3.0.2.ebuild b/gnome-extra/yelp/yelp-3.0.3.ebuild
249 similarity index 87%
250 rename from gnome-extra/yelp/yelp-3.0.2.ebuild
251 rename to gnome-extra/yelp/yelp-3.0.3.ebuild
252 index 96cd8bf..4503d28 100644
253 --- a/gnome-extra/yelp/yelp-3.0.2.ebuild
254 +++ b/gnome-extra/yelp/yelp-3.0.3.ebuild
255 @@ -47,6 +47,7 @@ pkg_setup() {
256 src_prepare() {
257 gnome2_src_prepare
258
259 - # Fix various issues fixed upstream since 3.0.2 release
260 - epatch "${FILESDIR}"/*.patch
261 + # Fix compatibility with Gentoo's sys-apps/man
262 + # https://bugzilla.gnome.org/show_bug.cgi?id=648854
263 + epatch "${FILESDIR}/${PN}-3.0.3-man-compatibility.patch"
264 }