1 https://gitlab.gnome.org/GNOME/yelp/-/issues/50
3 --- yelp-42.2/Makefile.am.orig
4 +++ yelp-42.2/Makefile.am
7 lib_LTLIBRARIES = libyelp/libyelp.la
9 +libexec_SCRIPTS = libyelp/yelp-groff
11 libyelp_libyelp_la_SOURCES = \
12 libyelp/yelp-bookmarks.c \
13 libyelp/yelp-debug.c \
16 libyelp_libyelp_la_CPPFLAGS = \
17 -DDATADIR=\""$(datadir)"\" \
18 + -DLIBEXECDIR=\"$(libexecdir)\" \
19 -DYELP_ICON_PATH=\"$(YELP_ICON_PATH)\" \
20 -DYELP_WEB_EXTENSIONS_DIR=\""$(pkglibdir)/"web-extensions\" \
21 -I$(top_builddir)/libyelp
23 +++ yelp-42.2/libyelp/yelp-groff
27 +# Copyright (c) 2011 Alexandre Rostovtsev <tetromino@gmail.com>
29 +# This program is free software; you can redistribute it and/or
30 +# modify it under the terms of the GNU General Public License as
31 +# published by the Free Software Foundation; either version 2 of the
32 +# License, or (at your option) any later version.
34 +# This program is distributed in the hope that it will be useful,
35 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
36 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
37 +# General Public License for more details.
39 +# You should have received a copy of the GNU General Public
40 +# License along with this program; if not, write to the
41 +# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
42 +# Boston, MA 02110-1301, USA.
46 +# Process the requested compressed source nroff file and output groff
47 +# intermediate format.
52 +if [ -z ${filename} ] ; then
53 + echo "Usage: yelp-groff [FILE]" >&2
54 + echo "Process a man FILE and output groff intermediate format."
58 +# If "man -Z -Tutf8 -EUTF-8" works (i.e. if man is man-db), use that.
59 +#man -Z -Tutf8 -EUTF-8 ${filename} 2>/dev/null && exit 0
61 +# Otherwise, manually uncompress the file ...
64 + *.bz2) cat="bzip2 -c -d" ;;
65 + *.gz) cat="gunzip -c" ;;
66 + *.lzma) cat="unlzma -c -d" ;;
67 + *.xz) cat="unxz -c" ;;
71 +# ... and run groff to get the intermediate format; preprocess with tbl
72 +# unless MANROFFSEQ is defined.
73 +${cat} ${filename} | groff -${MANROFFSEQ:-t} -man -Z -Tutf8
74 --- yelp-42.2/libyelp/yelp-man-parser.c.orig
75 +++ yelp-42.2/libyelp/yelp-man-parser.c
80 - const gchar *argv[] = { "man", "-Z", "-Tutf8", "-EUTF-8", path, NULL };
81 + const gchar *argv[] = { LIBEXECDIR "/yelp-groff", path, NULL };
84 /* g_strdupv() should accept a "const gchar **". */