aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorcpm <cpm@FreeBSD.org>2016-07-31 06:31:21 +0800
committercpm <cpm@FreeBSD.org>2016-07-31 06:31:21 +0800
commitde848d85a6cc0462639865e9d28817fbb2632db9 (patch)
treece5c94f8fc0a17285c054c0fbb793c0882f48fed /x11
parent1842dbbed72d14e1dd6b6cd4f5d796af5065db46 (diff)
downloadfreebsd-ports-gnome-de848d85a6cc0462639865e9d28817fbb2632db9.tar.gz
freebsd-ports-gnome-de848d85a6cc0462639865e9d28817fbb2632db9.tar.zst
freebsd-ports-gnome-de848d85a6cc0462639865e9d28817fbb2632db9.zip
- Add USES=autoreconf
- Enable compatibility with traditional man PR: 210927 Submitted by: cpm Reported by: Rares Vernica <rvernica@gmail.com> Approved by: gnome (maintainer timeout, 3 weeks) Obtained from: Gentoo (https://github.com/gentoo/gentoo/blob/master/gnome-extra/yelp/files/yelp-3.16.0-man-compatibility.patch) MFH: 2016Q3
Diffstat (limited to 'x11')
-rw-r--r--x11/yelp/Makefile9
-rw-r--r--x11/yelp/files/patch-libyelp_Makefile.am18
-rw-r--r--x11/yelp/files/patch-libyelp_yelp-man-parser.c11
-rw-r--r--x11/yelp/files/yelp-groff49
-rw-r--r--x11/yelp/pkg-plist1
5 files changed, 87 insertions, 1 deletions
diff --git a/x11/yelp/Makefile b/x11/yelp/Makefile
index 1a226a7e4e1c..c9128554eceb 100644
--- a/x11/yelp/Makefile
+++ b/x11/yelp/Makefile
@@ -3,6 +3,7 @@
PORTNAME= yelp
PORTVERSION= 3.18.1
+PORTREVISION= 1
CATEGORIES= x11 gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome3
@@ -20,7 +21,7 @@ RUN_DEPENDS= yelp-xsl>=0:textproc/yelp-xsl
PORTSCOUT= limitw:1,even
-USES= desktop-file-utils gettext gmake gnome libtool pathfix \
+USES= autoreconf desktop-file-utils gettext gmake gnome libtool pathfix \
pkgconfig tar:xz
USE_XORG= x11 ice
USE_GNOME= gtk30 intlhack libxml2 libxslt
@@ -39,4 +40,10 @@ CONFIGURE_ENV+= YELP_LZMA_CFLAGS="-I/usr/include" \
YELP_LZMA_LIBS="-L/usr/lib -llzma"
.endif
+post-patch:
+ @${CP} ${FILESDIR}/yelp-groff ${WRKSRC}/libyelp
+
+post-install:
+ ${INSTALL_SCRIPT} ${FILESDIR}/yelp-groff ${STAGEDIR}${PREFIX}/libexec
+
.include <bsd.port.mk>
diff --git a/x11/yelp/files/patch-libyelp_Makefile.am b/x11/yelp/files/patch-libyelp_Makefile.am
new file mode 100644
index 000000000000..20d8e7f4ff33
--- /dev/null
+++ b/x11/yelp/files/patch-libyelp_Makefile.am
@@ -0,0 +1,18 @@
+--- libyelp/Makefile.am.orig 2016-07-10 15:09:03 UTC
++++ libyelp/Makefile.am
+@@ -65,6 +65,7 @@ yelp-common-types.c: $(libyelpcommon_hea
+ $(libyelpcommon_headers)) > $@
+
+ lib_LTLIBRARIES = libyelp.la
++libexec_SCRIPTS = yelp-groff
+
+ libyelp_la_SOURCES = \
+ yelp-bookmarks.c \
+@@ -115,6 +116,7 @@ libyelp_la_CFLAGS =
+ $(YELP_CFLAGS) \
+ -Wno-deprecated-declarations \
+ -DDATADIR=\""$(datadir)"\" \
++ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DYELP_ICON_PATH=\"$(YELP_ICON_PATH)\"
+
+ libyelp_la_CPPFLAGS = \
diff --git a/x11/yelp/files/patch-libyelp_yelp-man-parser.c b/x11/yelp/files/patch-libyelp_yelp-man-parser.c
new file mode 100644
index 000000000000..0f2d63662c16
--- /dev/null
+++ b/x11/yelp/files/patch-libyelp_yelp-man-parser.c
@@ -0,0 +1,11 @@
+--- libyelp/yelp-man-parser.c.orig 2016-07-10 15:09:15 UTC
++++ 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 **". */
diff --git a/x11/yelp/files/yelp-groff b/x11/yelp/files/yelp-groff
new file mode 100644
index 000000000000..5348024d7970
--- /dev/null
+++ b/x11/yelp/files/yelp-groff
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2011 Alexandre Rostovtsev <tetromino@gmail.com>
+#
+# 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/x11/yelp/pkg-plist b/x11/yelp/pkg-plist
index c6579d1939f3..725859e9a7ec 100644
--- a/x11/yelp/pkg-plist
+++ b/x11/yelp/pkg-plist
@@ -26,6 +26,7 @@ lib/yelp/libyelpcommon.a
lib/yelp/libyelpcommon.so
lib/yelp/web-extensions/libyelpwebextension.a
lib/yelp/web-extensions/libyelpwebextension.so
+libexec/yelp-groff
share/applications/yelp.desktop
share/gtk-doc/html/libyelp/YelpDocument.html
share/gtk-doc/html/libyelp/YelpSettings.html