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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jan 20 04:42:43 2011 UTC (9 years, 1 month ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove packages slated for removal.

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-r1.ebuild,v 1.1 2009/09/30 00:22:49 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 ~x86"
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 # Move some stuff around to better suit our filesystem layout
39 sed -i -e '/INSTALL.*grap\.defines/s:$(LIBDIR):/usr/share/heirloom/doctools:' \
40 grap/Makefile.mk || die
41 sed -i -e '/GRAPDEFINES/s:LIBDIR:"/usr/share/heirloom/doctools":' \
42 grap/main.c || die
43
44 sed -i -e '/INSTALL.*eign/s:$(LIBDIR):/usr/share/heirloom/doctools:' \
45 ptx/Makefile.mk || die
46 sed -i -e '/\/eign/s:\(LIB\|REF\)DIR:"/usr/share/heirloom/doctools":' \
47 ptx/ptx.c refer/mkey3.c || die
48
49 sed -i -e 's:$(LIBDIR)/vgrindefs:/usr/share/heirloom/doctools/vgrindefs:' \
50 vgrind/Makefile.mk || die
51 sed -i -e '/\/vgrindefs/s:LIBDIR:"/usr/share/heirloom/doctools":' \
52 vgrind/vfontedpr.c || die
53
54 sed -i -e 's:$(REFDIR)/papers:/usr/share/heirloom/reftools/papers:g' \
55 refer/Makefile.mk || die
56 sed -i -e '/\/papers\/Ind/s:REFDIR:"/usr/share/heirloom/reftools":' \
57 refer/refer1.c || die
58
59 # Correct paths for the installed man pages, just to be clean
60 find . \( -name '*.1' -or -name '*.1b' -or -name '*.7' -or -name '*.7b' \) -exec \
61 sed -i \
62 -e "s:/usr/ucblib/grap.defines:/usr/share/heirloom/doctools/grap.defines:" \
63 -e "s:/usr/ucblib/vgrindefs:/usr/share/heirloom/doctools/vgrindefs:" \
64 -e "s:/usr/ucblib/vfontedpr:/usr/libexec/heirloom/doctools/vfontedpr:" \
65 -e "s:/usr/ucblib/tmac/vgrind:/usr/share/heirloom/tmac/vgrind:" \
66 -e "s:/usr/ucblib/eign:/usr/share/heirloom/doctools/eign:" \
67 -e "s:/usr/ucb/:/usr/bin/:g" \
68 -e "s:/usr/ucblib/doctools:/usr/share/heirloom/doctools:g" \
69 -e "s:/usr/ucblib/reftools/papers:/usr/share/heirloom/reftools/papers:" \
70 -e "s:/usr/ucblib/reftools:/usr/libexec/heirloom/reftools:g" \
71 {} +
72 }
73
74 src_configure() {
75 append-cppflags -D_GNU_SOURCE
76
77 sed \
78 -e "s:@CFLAGS@:${CFLAGS}:" \
79 -e "s:@CXXFLAGS@:${CXXFLAGS}:" \
80 -e "s:@CPPFLAGS@:${CPPFLAGS}:" \
81 -e "s:@LDFLAGS@:${LDFLAGS}:" \
82 -e "s:@CC@:$(tc-getCC):" \
83 -e "s:@CXX@:$(tc-getCXX):" \
84 -e "s:@RANLIB@:$(tc-getRANLIB):" \
85 -e "s:@libdir@:$(get_libdir):" \
86 "${FILESDIR}"/${PV}.config \
87 > "${S}"/mk.config
88 }
89
90 src_compile() {
91 emake $(use cxx && echo MPM=mpm) || die
92 }
93
94 src_install() {
95 dodir /usr/share/heirloom/{doc,ref}tools
96
97 # The build system uses the ROOT variable in place of DESTIDR.
98 emake $(use cxx && echo MPM=mpm) ROOT="${D}" install || die
99
100 dodoc README CHANGES || die
101
102 # Rename ptx to avoid a collision with coreutils… maybe this
103 # should be made conditional to userland_GNU (somebody got to
104 # check on FreeBSD).
105 mv "${D}"/usr/bin/{,hl-}ptx || die
106 mv "${D}"/usr/share/man/man1/{,hl-}ptx.1 || die
107
108 # Rename otfdump to avoid a collision with dev-libs/libotf
109 mv "${D}"/usr/bin/{,hl-}otfdump || die
110 mv "${D}"/usr/share/man/man1/{,hl-}otfdump.1 || die
111
112 # Rename ta to avoid a collision with app-cdr/pxlinux
113 mv "${D}"/usr/bin/{,hl-}ta || die
114
115 # Not sure why they install in man{1,7}b, but we don't list that
116 # in by default, so move all of them to man1. We don't do that in
117 # the Makefiles, because it's definitely more complex (even though
118 # faster).
119 pushd "${D}"/usr/share/man
120 for section in 1 7; do
121 for man in man${section}b/*.${section}b*; do
122 if [ -L $man ]; then
123 local oldlink=$(readlink $man)
124 rm $man
125 ln -s ${oldlink//${section}b/${section}} ${man//${section}b/${section}}
126 else
127 mv $man ${man//${section}b/${section}} || die "failed moving $man"
128 fi
129 done
130 done
131 rmdir man{1,7}b
132 popd
133 }
134
135 pkg_postinst() {
136 elog "To make proper use of heirloom-doctools with sys-apps/man you"
137 elog "need to make sure that /etc/man.conf is configured properly with"
138 elog "the following settings:"
139 elog ""
140 elog "TROFF /usr/bin/troff -Tlocale -mg -msafe -mpadj -mandoc"
141 elog "NROFF /usr/bin/nroff -mg -msafe -mpadj -mandoc"
142 elog "EQN /usr/bin/eqn -Tps"
143 elog "NEQN /usr/bin/neqn -Tlatin1"
144 elog "TBL /usr/bin/tbl"
145 elog "COL /usr/bin/col"
146 elog "REFER /usr/bin/refer"
147 elog "PIC /usr/bin/pic"
148 elog "VGRIND /usr/bin/vgrind"
149 elog "GRAP /usr/bin/grap"
150 }

  ViewVC Help
Powered by ViewVC 1.1.20