Gentoo Archives: gentoo-commits

From: Ole Reifschneider <tranquility@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: gnome-extra/yelp/, gnome-extra/yelp/files/
Date: Sun, 27 Mar 2016 21:24:56
Message-Id: 1459112757.5a1ca17b922368498440bb9346726a75ae89f4f0.tranquility@gentoo
1 commit: 5a1ca17b922368498440bb9346726a75ae89f4f0
2 Author: Ole Reifschneider <tranquility <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 26 23:49:23 2016 +0000
4 Commit: Ole Reifschneider <tranquility <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 27 21:05:57 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/gnome.git/commit/?id=5a1ca17b
7
8 gnome-extra/yelp: Bump version to 3.20.0
9
10 Package-Manager: portage-2.2.28
11 Manifest-Sign-Key: 0xE9E568677E8B4D42
12
13 .../yelp/files/yelp-3.20.0-man-compatibility.patch | 117 +++++++++++++++++++++
14 gnome-extra/yelp/yelp-3.20.0.ebuild | 58 ++++++++++
15 2 files changed, 175 insertions(+)
16
17 diff --git a/gnome-extra/yelp/files/yelp-3.20.0-man-compatibility.patch b/gnome-extra/yelp/files/yelp-3.20.0-man-compatibility.patch
18 new file mode 100644
19 index 0000000..b756b67
20 --- /dev/null
21 +++ b/gnome-extra/yelp/files/yelp-3.20.0-man-compatibility.patch
22 @@ -0,0 +1,117 @@
23 +From b7f00d9fc5f4c948b3b412fa22488517e71a2987 Mon Sep 17 00:00:00 2001
24 +From: Alexandre Rostovtsev <tetromino@×××××.com>
25 +Date: Sun, 27 Mar 2016 17:11:59 +0200
26 +Subject: [PATCH] Enable compatibility with traditional man (#648854)
27 +
28 +As of commit 46a82ade3e6f0fac8f08b18e7fc23d8665f6f728, Yelp runs
29 +"man -Z -Tutf8 -EUTF-8 [FILE]" to obtain the groff intermediate format
30 +of the man page. However, the only implementation of man that accepts
31 +these options is man-db (used by Debian, Fedora, SUSE & Ubuntu).
32 +The traditional Linux man used by other distros and man implementations
33 +on non-Linux Unixes (FreeBSD, Solaris) do not have command-line options
34 +for outputting groff intermediate format.
35 +Therefore, on systems that do not use man-db, we need to manually
36 +uncompress the nroff source file and feed it to groff. This is best done
37 +using a small shell script (/usr/libexec/yelp-groff), both for for
38 +clarity and for ease of modification on systems with weird man setups.
39 +
40 +Signed-off-by: Alexandre Rostovtsev <tetromino@×××××.com>
41 +Signed-off-by: Ole Reifschneider <tranquility@g.o>
42 +---
43 + Makefile.am | 2 ++
44 + libyelp/yelp-groff | 49 +++++++++++++++++++++++++++++++++++++++++++++++
45 + libyelp/yelp-man-parser.c | 2 +-
46 + 3 files changed, 52 insertions(+), 1 deletion(-)
47 + create mode 100755 libyelp/yelp-groff
48 +
49 +diff --git a/Makefile.am b/Makefile.am
50 +index 30eba2c..b87f2b2 100644
51 +--- a/Makefile.am
52 ++++ b/Makefile.am
53 +@@ -6,6 +6,7 @@ BUILT_SOURCES = \
54 + $(nodist_libyelp_libyelp_la_SOURCES)
55 +
56 + lib_LTLIBRARIES = libyelp/libyelp.la
57 ++libexec_SCRIPTS = libyelp/yelp-groff
58 +
59 + libyelp_libyelp_la_SOURCES = \
60 + libyelp/yelp-bookmarks.c \
61 +@@ -58,6 +59,7 @@ libyelp_libyelp_la_CFLAGS = \
62 +
63 + libyelp_libyelp_la_CPPFLAGS = \
64 + -DDATADIR=\""$(datadir)"\" \
65 ++ -DLIBEXECDIR=\"$(libexecdir)\" \
66 + -DYELP_ICON_PATH=\"$(YELP_ICON_PATH)\" \
67 + -DYELP_WEB_EXTENSIONS_DIR=\""$(pkglibdir)/"web-extensions\" \
68 + -I$(top_builddir)/libyelp
69 +diff --git a/libyelp/yelp-groff b/libyelp/yelp-groff
70 +new file mode 100755
71 +index 0000000..5348024
72 +--- /dev/null
73 ++++ b/libyelp/yelp-groff
74 +@@ -0,0 +1,49 @@
75 ++#!/bin/sh
76 ++#
77 ++# Copyright (c) 2011 Alexandre Rostovtsev <tetromino@×××××.com>
78 ++#
79 ++# This program is free software; you can redistribute it and/or
80 ++# modify it under the terms of the GNU General Public License as
81 ++# published by the Free Software Foundation; either version 2 of the
82 ++# License, or (at your option) any later version.
83 ++#
84 ++# This program is distributed in the hope that it will be useful,
85 ++# but WITHOUT ANY WARRANTY; without even the implied warranty of
86 ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
87 ++# General Public License for more details.
88 ++#
89 ++# You should have received a copy of the GNU General Public
90 ++# License along with this program; if not, write to the
91 ++# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
92 ++# Boston, MA 02110-1301, USA.
93 ++#
94 ++###
95 ++#
96 ++# Process the requested compressed source nroff file and output groff
97 ++# intermediate format.
98 ++#
99 ++
100 ++filename=$1
101 ++
102 ++if [ -z ${filename} ] ; then
103 ++ echo "Usage: yelp-groff [FILE]" >&2
104 ++ echo "Process a man FILE and output groff intermediate format."
105 ++ exit 1
106 ++fi
107 ++
108 ++# If "man -Z -Tutf8 -EUTF-8" works (i.e. if man is man-db), use that.
109 ++man -Z -Tutf8 -EUTF-8 ${filename} 2>/dev/null && exit 0
110 ++
111 ++# Otherwise, manually uncompress the file ...
112 ++cat="cat"
113 ++case ${filename} in
114 ++ *.bz2) cat="bzip2 -c -d" ;;
115 ++ *.gz) cat="gunzip -c" ;;
116 ++ *.lzma) cat="unlzma -c -d" ;;
117 ++ *.xz) cat="unxz -c" ;;
118 ++ *.Z) cat="zcat" ;;
119 ++esac
120 ++
121 ++# ... and run groff to get the intermediate format; preprocess with tbl
122 ++# unless MANROFFSEQ is defined.
123 ++${cat} ${filename} | groff -${MANROFFSEQ:-t} -man -Z -Tutf8
124 +diff --git a/libyelp/yelp-man-parser.c b/libyelp/yelp-man-parser.c
125 +index 46073a2..792e695 100644
126 +--- a/libyelp/yelp-man-parser.c
127 ++++ b/libyelp/yelp-man-parser.c
128 +@@ -369,7 +369,7 @@ get_troff (gchar *path, GError **error)
129 + {
130 + gint ystdout;
131 + GError *err = NULL;
132 +- const gchar *argv[] = { "man", "-Z", "-Tutf8", "-EUTF-8", path, NULL };
133 ++ const gchar *argv[] = { LIBEXECDIR "/yelp-groff", path, NULL };
134 + gchar **my_argv;
135 +
136 + /* g_strdupv() should accept a "const gchar **". */
137 +--
138 +2.7.4
139 +
140
141 diff --git a/gnome-extra/yelp/yelp-3.20.0.ebuild b/gnome-extra/yelp/yelp-3.20.0.ebuild
142 new file mode 100644
143 index 0000000..67d18c9
144 --- /dev/null
145 +++ b/gnome-extra/yelp/yelp-3.20.0.ebuild
146 @@ -0,0 +1,58 @@
147 +# Copyright 1999-2016 Gentoo Foundation
148 +# Distributed under the terms of the GNU General Public License v2
149 +# $Id$
150 +
151 +EAPI="5"
152 +GNOME2_LA_PUNT="yes"
153 +GCONF_DEBUG="no"
154 +
155 +inherit autotools eutils gnome2
156 +
157 +DESCRIPTION="Help browser for GNOME"
158 +HOMEPAGE="https://wiki.gnome.org/Apps/Yelp"
159 +
160 +LICENSE="GPL-2+"
161 +SLOT="0"
162 +IUSE=""
163 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
164 +
165 +RDEPEND="
166 + app-arch/bzip2:=
167 + >=app-arch/xz-utils-4.9:=
168 + dev-db/sqlite:3=
169 + >=dev-libs/glib-2.38:2
170 + >=dev-libs/libxml2-2.6.5:2
171 + >=dev-libs/libxslt-1.1.4
172 + >=gnome-extra/yelp-xsl-3.12
173 + >=net-libs/webkit-gtk-2.7.2:4
174 + >=x11-libs/gtk+-3.13.3:3
175 + x11-themes/gnome-icon-theme-symbolic
176 +"
177 +DEPEND="${RDEPEND}
178 + >=dev-util/gtk-doc-am-1.13
179 + >=dev-util/intltool-0.41.0
180 + dev-util/itstool
181 + >=sys-devel/gettext-0.17
182 + virtual/pkgconfig
183 +"
184 +
185 +src_prepare() {
186 + # Fix compatibility with Gentoo's sys-apps/man
187 + # https://bugzilla.gnome.org/show_bug.cgi?id=648854
188 + epatch "${FILESDIR}"/${PN}-3.20.0-man-compatibility.patch
189 + eautoreconf
190 + gnome2_src_prepare
191 +}
192 +
193 +src_configure() {
194 + gnome2_src_configure \
195 + --disable-static \
196 + --enable-bz2 \
197 + --enable-lzma
198 +}
199 +
200 +src_install() {
201 + gnome2_src_install
202 + exeinto /usr/libexec/
203 + doexe "${S}"/libyelp/yelp-groff
204 +}