From e17a19259ab8f3e19f1755db4ef3d82b487d316e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 26 Oct 2010 15:56:48 +0200 Subject: [PATCH] groff: fix issues with some UTF-8 manpages (from Arch), added -doc subpkg. --- srcpkgs/groff-doc | 1 + srcpkgs/groff/files/site.tmac | 16 ++++++++++++++++ srcpkgs/groff/groff-doc.template | 14 ++++++++++++++ srcpkgs/groff/template | 21 +++++++++++++++++++-- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 120000 srcpkgs/groff-doc create mode 100644 srcpkgs/groff/files/site.tmac create mode 100644 srcpkgs/groff/groff-doc.template diff --git a/srcpkgs/groff-doc b/srcpkgs/groff-doc new file mode 120000 index 00000000000..37831a278d9 --- /dev/null +++ b/srcpkgs/groff-doc @@ -0,0 +1 @@ +groff \ No newline at end of file diff --git a/srcpkgs/groff/files/site.tmac b/srcpkgs/groff/files/site.tmac new file mode 100644 index 00000000000..8ef1040ca4a --- /dev/null +++ b/srcpkgs/groff/files/site.tmac @@ -0,0 +1,16 @@ +. +.if n \{\ +. \" Character translations for non-keyboard +. \" characters - to make them searchable +. if '\*[.T]'utf8' \{\ +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char \' \N'39' +. \} +. +. \" Shut off SGR by default (groff colors) +. \" Require GROFF_SGR envvar defined to turn it on +. if '\V[GROFF_SGR]'' \ +. output x X tty: sgr 0 +.\} diff --git a/srcpkgs/groff/groff-doc.template b/srcpkgs/groff/groff-doc.template new file mode 100644 index 00000000000..3c9469fdcf5 --- /dev/null +++ b/srcpkgs/groff/groff-doc.template @@ -0,0 +1,14 @@ +# Template file for 'groff-doc'. +# +short_desc="${sourcepkg} documentation" +long_desc="${long_desc} + + This package contains the GNU Groff documentation." + +noarch=yes + +do_install() +{ + mkdir -p ${DESTDIR}/usr/share + mv ${SRCPKGDESTDIR}/usr/share/doc ${DESTDIR}/usr/share +} diff --git a/srcpkgs/groff/template b/srcpkgs/groff/template index 6f00d0f855e..a56af3d2ac1 100644 --- a/srcpkgs/groff/template +++ b/srcpkgs/groff/template @@ -1,10 +1,10 @@ # Template file for 'groff' pkgname=groff version=1.20.1 -revision=2 +revision=3 distfiles="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure -configure_args="--with-appresdir=/usr/lib/X11/app-defaults" +configure_args="--without-x" short_desc="The GNU troff text-formatting system" maintainer="Juan RP " checksum=b645878135cb620c6c417c5601bfe96172245af12045540d7344938b4c2cd805 @@ -17,6 +17,8 @@ long_desc=" All the standard macro packages are supported. A number of other utilities are also included together with several fonts." +subpackages="groff-doc" + Add_dependency run glibc Add_dependency run libgcc Add_dependency run libstdc++ @@ -26,3 +28,18 @@ Add_dependency build texinfo Add_dependency build zlib-devel Add_dependency full bash Add_dependency full sed + +post_install() +{ + # Remove unused stuff. + rm -rf ${DESTDIR}/usr/lib + + # From Arch: + # + # Fix some issues when encoding to utf8 man pages + # The output chars don't match keyboard chars... + for f in man mdoc; do + cat ${FILESDIR}/site.tmac >> \ + ${DESTDIR}/usr/share/groff/site-tmac/${f}.local + done +}