/[gentoo-x86]/app-doc/heirloom-doctools/heirloom-doctools-080407.ebuild
Gentoo

Contents of /app-doc/heirloom-doctools/heirloom-doctools-080407.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Sep 30 00:22:49 2009 UTC (10 years, 3 months ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Improvements: fix man pages installation, all of them, and symlinks; fix man pages themselves, by changing the paths; install the datafiles in /usr/share rather than /usr/libexec, and try to use a more organised tree; rename ta and otfdump commands to avoid collisions (found by tinderbox); add ~x86 keyword. The sed lines shold probably become a patchset to send upstream, but I'm leaving this for another day.
(Portage version: 2.2_rc42/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-doc/heirloom-doctools/heirloom-doctools-080407.ebuild,v 1.1 2009/09/29 10:45:23 flameeyes Exp $
4
5 EAPI=2
6
7 inherit flag-o-matic toolchain-funcs multilib
8
9 DESCRIPTION="Classic Unix documentation tools ported from OpenSolaris"
10 HOMEPAGE="http://heirloom.sourceforge.net/doctools.html"
11 SRC_URI="mirror://sourceforge/heirloom/${P}.tar.bz2"
12
13 LICENSE="CDDL"
14
15 SLOT="0"
16
17 KEYWORDS="~amd64"
18
19 IUSE="cxx"
20
21 RDEPEND="!sys-apps/groff"
22 DEPEND="sys-devel/flex
23 sys-devel/bison"
24
25 src_prepare() {
26 # Make sure that C++ code is built with CXXFLAGS and not CFLAGS.
27 find . -name Makefile.mk -exec \
28 sed -i \
29 -e '/(CCC)/s:CFLAGS:CXXFLAGS:' \
30 {} +
31
32 # mpm uses C++, we'll build it explicitly if we really want to
33 sed -i -e 's:mpm:$(MPM):' makefile
34
35 # Monkeypatching dependencies to avoid parallel make failure
36 echo "picl.o: picl.c y.tab.h" >> pic/Makefile.mk
37 }
38
39 src_configure() {
40 append-cppflags -D_GNU_SOURCE
41
42 sed \
43 -e "s:@CFLAGS@:${CFLAGS}:" \
44 -e "s:@CXXFLAGS@:${CXXFLAGS}:" \
45 -e "s:@CPPFLAGS@:${CPPFLAGS}:" \
46 -e "s:@LDFLAGS@:${LDFLAGS}:" \
47 -e "s:@CC@:$(tc-getCC):" \
48 -e "s:@CXX@:$(tc-getCXX):" \
49 -e "s:@RANLIB@:$(tc-getRANLIB):" \
50 -e "s:@libdir@:$(get_libdir):" \
51 "${FILESDIR}"/${PV}.config \
52 > "${S}"/mk.config
53 }
54
55 src_compile() {
56 emake $(use cxx && echo MPM=mpm) || die
57 }
58
59 src_install() {
60 # The build system uses the ROOT variable in place of DESTIDR.
61 emake $(use cxx && echo MPM=mpm) ROOT="${D}" install || die
62
63 dodoc README CHANGES || die
64
65 # Rename ptx to avoid a collision with coreutils… maybe this
66 # should be made conditional to userland_GNU (somebody got to
67 # check on FreeBSD).
68 mv "${D}"/usr/bin/{,hl-}ptx || die
69 mv "${D}"/usr/share/man/man1/{,hl-}ptx.1* || die
70
71 # Not sure why they install in man1b, but we don't list that in by
72 # default, so move all of them to man1. We don't do that in the
73 # Makefiles, because it's definitely more complex (even though
74 # faster).
75 pushd "${D}"/usr/share/man
76 for man in man1b/*.1b*; do
77 mv $man ${man//1b/1} || die "failed moving $man"
78 done
79 rmdir man1b
80 popd
81 }
82
83 pkg_postinst() {
84 elog "To make proper use of heirloom-doctools with sys-apps/man you"
85 elog "need to make sure that /etc/man.conf is configured properly with"
86 elog "the following settings:"
87 elog ""
88 elog "TROFF /usr/bin/troff -Tlocale -mg -msafe -mpadj -mandoc"
89 elog "NROFF /usr/bin/nroff -mg -msafe -mpadj -mandoc"
90 elog "EQN /usr/bin/eqn -Tps"
91 elog "NEQN /usr/bin/neqn -Tlatin1"
92 elog "TBL /usr/bin/tbl"
93 elog "COL /usr/bin/col"
94 elog "REFER /usr/bin/refer"
95 elog "PIC /usr/bin/pic"
96 elog "VGRIND /usr/bin/vgrind"
97 elog "GRAP /usr/bin/grap"
98 }

  ViewVC Help
Powered by ViewVC 1.1.20