commit:     dd1811b0f4183e8bea3c441bd864c26830b7a3d2
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Sat May  9 14:00:18 2015 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sat May  9 15:18:07 2015 +0000
URL:        https://gitweb.gentoo.org/proj/gnome.git/commit/?id=dd1811b0

gnome-extra/yelp: 3.14.1 → 3.16.0

 .../yelp/files/yelp-3.16.0-man-compatibility.patch | 114 +++++++++++++++++++++
 .../yelp/{yelp-9999.ebuild => yelp-3.16.0.ebuild}  |  33 ++----
 gnome-extra/yelp/yelp-9999.ebuild                  |  10 +-
 3 files changed, 124 insertions(+), 33 deletions(-)

diff --git a/gnome-extra/yelp/files/yelp-3.16.0-man-compatibility.patch 
b/gnome-extra/yelp/files/yelp-3.16.0-man-compatibility.patch
new file mode 100644
index 0000000..9df6ef4
--- /dev/null
+++ b/gnome-extra/yelp/files/yelp-3.16.0-man-compatibility.patch
@@ -0,0 +1,114 @@
+From fb83e8cea7e9e521599e73180ecff8f1374edb8d Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <[email protected]>
+Date: Sun, 1 May 2011 22:52:14 -0400
+Subject: [PATCH] Enable compatibility with traditional man (#648854)
+
+As of commit 46a82ade3e6f0fac8f08b18e7fc23d8665f6f728, Yelp runs
+"man -Z -Tutf8 -EUTF-8 [FILE]" to obtain the groff intermediate format
+of the man page. However, the only implementation of man that accepts
+these options is man-db (used by Debian, Fedora, SUSE & Ubuntu).
+The traditional Linux man used by other distros and man implementations
+on non-Linux Unixes (FreeBSD, Solaris) do not have command-line options
+for outputting groff intermediate format.
+Therefore, on systems that do not use man-db, we need to manually
+uncompress the nroff source file and feed it to groff. This is best done
+using a small shell script (/usr/libexec/yelp-groff), both for for
+clarity and for ease of modification on systems with weird man setups.
+
+Signed-off-by: Alexandre Rostovtsev <[email protected]>
+---
+ libyelp/Makefile.am       |  2 ++
+ libyelp/yelp-groff        | 49 +++++++++++++++++++++++++++++++++++++++++++++++
+ libyelp/yelp-man-parser.c |  2 +-
+ 3 files changed, 52 insertions(+), 1 deletion(-)
+ create mode 100755 libyelp/yelp-groff
+
+diff --git a/libyelp/Makefile.am b/libyelp/Makefile.am
+index 0ae9d60..0037ecd 100644
+--- a/libyelp/Makefile.am
++++ b/libyelp/Makefile.am
+@@ -1,4 +1,5 @@
+ lib_LTLIBRARIES = libyelp.la
++libexec_SCRIPTS = yelp-groff
+ 
+ libyelp_la_SOURCES =                \
+       yelp-bookmarks.c            \
+@@ -51,6 +52,7 @@ libyelp_la_CFLAGS =                             \
+       $(YELP_CFLAGS)                          \
+       -Wno-deprecated-declarations            \
+       -DDATADIR=\""$(datadir)"\"              \
++      -DLIBEXECDIR=\"$(libexecdir)\"           \
+       -DYELP_ICON_PATH=\"$(YELP_ICON_PATH)\"
+ 
+ libyelp_la_LIBADD = $(YELP_LIBS)
+diff --git a/libyelp/yelp-groff b/libyelp/yelp-groff
+new file mode 100755
+index 0000000..5348024
+--- /dev/null
++++ b/libyelp/yelp-groff
+@@ -0,0 +1,49 @@
++#!/bin/sh
++#
++# Copyright (c) 2011 Alexandre Rostovtsev <[email protected]>
++#
++# This program is free software; you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation; either version 2 of the
++# License, or (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public
++# License along with this program; if not, write to the
++# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++# Boston, MA 02110-1301, USA.
++#
++###
++#
++# Process the requested compressed source nroff file and output groff
++# intermediate format.
++#
++
++filename=$1
++
++if [ -z ${filename} ] ; then
++    echo "Usage: yelp-groff [FILE]" >&2
++    echo "Process a man FILE and output groff intermediate format."
++    exit 1
++fi
++
++# If "man -Z -Tutf8 -EUTF-8" works (i.e. if man is man-db), use that.
++man -Z -Tutf8 -EUTF-8 ${filename} 2>/dev/null && exit 0
++
++# Otherwise, manually uncompress the file ...
++cat="cat"
++case ${filename} in
++    *.bz2)      cat="bzip2 -c -d" ;;
++    *.gz)       cat="gunzip -c" ;;
++    *.lzma)     cat="unlzma -c -d" ;;
++    *.xz)       cat="unxz -c" ;;
++    *.Z)        cat="zcat" ;;
++esac
++
++# ... and run groff to get the intermediate format; preprocess with tbl
++# unless MANROFFSEQ is defined.
++${cat} ${filename} | groff -${MANROFFSEQ:-t} -man -Z -Tutf8
+diff --git a/libyelp/yelp-man-parser.c b/libyelp/yelp-man-parser.c
+index 46073a2..792e695 100644
+--- a/libyelp/yelp-man-parser.c
++++ b/libyelp/yelp-man-parser.c
+@@ -369,7 +369,7 @@ get_troff (gchar *path, GError **error)
+ {
+     gint ystdout;
+     GError *err = NULL;
+-    const gchar *argv[] = { "man", "-Z", "-Tutf8", "-EUTF-8", path, NULL };
++    const gchar *argv[] = { LIBEXECDIR "/yelp-groff", path, NULL };
+     gchar **my_argv;
+ 
+     /* g_strdupv() should accept a "const gchar **". */
+-- 
+2.3.6
+

diff --git a/gnome-extra/yelp/yelp-9999.ebuild 
b/gnome-extra/yelp/yelp-3.16.0.ebuild
similarity index 57%
copy from gnome-extra/yelp/yelp-9999.ebuild
copy to gnome-extra/yelp/yelp-3.16.0.ebuild
index 67354f8..5d66e37 100644
--- a/gnome-extra/yelp/yelp-9999.ebuild
+++ b/gnome-extra/yelp/yelp-3.16.0.ebuild
@@ -1,14 +1,11 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
 EAPI="5"
-GCONF_DEBUG="yes"
+GCONF_DEBUG="no"
 
 inherit autotools eutils gnome2
-if [[ ${PV} = 9999 ]]; then
-       inherit gnome2-live
-fi
 
 DESCRIPTION="Help browser for GNOME"
 HOMEPAGE="https://wiki.gnome.org/Apps/Yelp";
@@ -16,11 +13,7 @@ HOMEPAGE="https://wiki.gnome.org/Apps/Yelp";
 LICENSE="GPL-2+"
 SLOT="0"
 IUSE=""
-if [[ ${PV} = 9999 ]]; then
-       KEYWORDS=""
-else
-       KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 
~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
-fi
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-freebsd 
~amd64-linux ~x86-linux ~x86-solaris"
 
 RDEPEND="
        app-arch/bzip2:=
@@ -39,34 +32,20 @@ DEPEND="${RDEPEND}
        >=dev-util/intltool-0.41.0
        >=sys-devel/gettext-0.17
        virtual/pkgconfig
-       gnome-base/gnome-common
 "
-# If eautoreconf:
-#      gnome-base/gnome-common
-
-if [[ ${PV} = 9999 ]]; then
-       DEPEND="${DEPEND}
-               app-text/yelp-tools
-               dev-util/itstool
-               gnome-base/gnome-common"
-fi
 
 src_prepare() {
        # Fix compatibility with Gentoo's sys-apps/man
        # https://bugzilla.gnome.org/show_bug.cgi?id=648854
-       epatch "${FILESDIR}/${PN}-3.0.3-man-compatibility.patch"
-
-       [[ ${PV} != 9999 ]] && eautoreconf
-
+       epatch "${FILESDIR}"/${PN}-3.16.0-man-compatibility.patch
+       eautoreconf
        gnome2_src_prepare
 }
 
 src_configure() {
-       local myconf=""
-       [[ ${PV} != 9999 ]] && myconf="ITSTOOL=$(type -P true)"
        gnome2_src_configure \
                --disable-static \
                --enable-bz2 \
                --enable-lzma \
-               ${myconf}
+               ITSTOOL=$(type -P true)
 }

diff --git a/gnome-extra/yelp/yelp-9999.ebuild 
b/gnome-extra/yelp/yelp-9999.ebuild
index 67354f8..2d7f3a8 100644
--- a/gnome-extra/yelp/yelp-9999.ebuild
+++ b/gnome-extra/yelp/yelp-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
 EAPI="5"
-GCONF_DEBUG="yes"
+GCONF_DEBUG="no"
 
 inherit autotools eutils gnome2
 if [[ ${PV} = 9999 ]]; then
@@ -39,7 +39,6 @@ DEPEND="${RDEPEND}
        >=dev-util/intltool-0.41.0
        >=sys-devel/gettext-0.17
        virtual/pkgconfig
-       gnome-base/gnome-common
 "
 # If eautoreconf:
 #      gnome-base/gnome-common
@@ -47,14 +46,13 @@ DEPEND="${RDEPEND}
 if [[ ${PV} = 9999 ]]; then
        DEPEND="${DEPEND}
                app-text/yelp-tools
-               dev-util/itstool
-               gnome-base/gnome-common"
+               dev-util/itstool"
 fi
 
 src_prepare() {
        # Fix compatibility with Gentoo's sys-apps/man
        # https://bugzilla.gnome.org/show_bug.cgi?id=648854
-       epatch "${FILESDIR}/${PN}-3.0.3-man-compatibility.patch"
+       epatch "${FILESDIR}"/${PN}-3.16.0-man-compatibility.patch
 
        [[ ${PV} != 9999 ]] && eautoreconf
 

Reply via email to