Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-doc/heirloom-doctools: ChangeLog heirloom-doctools-080407-r1.ebuild heirloom-doctools-080407.ebuild
Date: Wed, 30 Sep 2009 00:22:55
Message-Id: E1Msmy1-0001C1-RB@stork.gentoo.org
1 flameeyes 09/09/30 00:22:49
2
3 Modified: ChangeLog
4 Added: heirloom-doctools-080407-r1.ebuild
5 Removed: heirloom-doctools-080407.ebuild
6 Log:
7 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.
8 (Portage version: 2.2_rc42/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.2 app-doc/heirloom-doctools/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/heirloom-doctools/ChangeLog?rev=1.2&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/heirloom-doctools/ChangeLog?rev=1.2&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/heirloom-doctools/ChangeLog?r1=1.1&r2=1.2
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-doc/heirloom-doctools/ChangeLog,v
20 retrieving revision 1.1
21 retrieving revision 1.2
22 diff -u -r1.1 -r1.2
23 --- ChangeLog 29 Sep 2009 10:45:23 -0000 1.1
24 +++ ChangeLog 30 Sep 2009 00:22:49 -0000 1.2
25 @@ -1,6 +1,17 @@
26 # ChangeLog for app-doc/heirloom-doctools
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-doc/heirloom-doctools/ChangeLog,v 1.1 2009/09/29 10:45:23 flameeyes Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-doc/heirloom-doctools/ChangeLog,v 1.2 2009/09/30 00:22:49 flameeyes Exp $
30 +
31 +*heirloom-doctools-080407-r1 (30 Sep 2009)
32 +
33 + 30 Sep 2009; Diego E. Pettenò <flameeyes@g.o> files/080407.config,
34 + -heirloom-doctools-080407.ebuild, +heirloom-doctools-080407-r1.ebuild:
35 + Improvements: fix man pages installation, all of them, and symlinks; fix
36 + man pages themselves, by changing the paths; install the datafiles in
37 + /usr/share rather than /usr/libexec, and try to use a more organised tree;
38 + rename ta and otfdump commands to avoid collisions (found by tinderbox);
39 + add ~x86 keyword. The sed lines shold probably become a patchset to send
40 + upstream, but I'm leaving this for another day.
41
42 *heirloom-doctools-080407 (29 Sep 2009)
43
44
45
46
47 1.1 app-doc/heirloom-doctools/heirloom-doctools-080407-r1.ebuild
48
49 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/heirloom-doctools/heirloom-doctools-080407-r1.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/heirloom-doctools/heirloom-doctools-080407-r1.ebuild?rev=1.1&content-type=text/plain
51
52 Index: heirloom-doctools-080407-r1.ebuild
53 ===================================================================
54 # Copyright 1999-2009 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $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 $
57
58 EAPI=2
59
60 inherit flag-o-matic toolchain-funcs multilib
61
62 DESCRIPTION="Classic Unix documentation tools ported from OpenSolaris"
63 HOMEPAGE="http://heirloom.sourceforge.net/doctools.html"
64 SRC_URI="mirror://sourceforge/heirloom/${P}.tar.bz2"
65
66 LICENSE="CDDL"
67
68 SLOT="0"
69
70 KEYWORDS="~amd64 ~x86"
71
72 IUSE="cxx"
73
74 RDEPEND="!sys-apps/groff"
75 DEPEND="sys-devel/flex
76 sys-devel/bison"
77
78 src_prepare() {
79 # Make sure that C++ code is built with CXXFLAGS and not CFLAGS.
80 find . -name Makefile.mk -exec \
81 sed -i \
82 -e '/(CCC)/s:CFLAGS:CXXFLAGS:' \
83 {} +
84
85 # mpm uses C++, we'll build it explicitly if we really want to
86 sed -i -e 's:mpm:$(MPM):' makefile
87
88 # Monkeypatching dependencies to avoid parallel make failure
89 echo "picl.o: picl.c y.tab.h" >> pic/Makefile.mk
90
91 # Move some stuff around to better suit our filesystem layout
92 sed -i -e '/INSTALL.*grap\.defines/s:$(LIBDIR):/usr/share/heirloom/doctools:' \
93 grap/Makefile.mk || die
94 sed -i -e '/GRAPDEFINES/s:LIBDIR:"/usr/share/heirloom/doctools":' \
95 grap/main.c || die
96
97 sed -i -e '/INSTALL.*eign/s:$(LIBDIR):/usr/share/heirloom/doctools:' \
98 ptx/Makefile.mk || die
99 sed -i -e '/\/eign/s:\(LIB\|REF\)DIR:"/usr/share/heirloom/doctools":' \
100 ptx/ptx.c refer/mkey3.c || die
101
102 sed -i -e 's:$(LIBDIR)/vgrindefs:/usr/share/heirloom/doctools/vgrindefs:' \
103 vgrind/Makefile.mk || die
104 sed -i -e '/\/vgrindefs/s:LIBDIR:"/usr/share/heirloom/doctools":' \
105 vgrind/vfontedpr.c || die
106
107 sed -i -e 's:$(REFDIR)/papers:/usr/share/heirloom/reftools/papers:g' \
108 refer/Makefile.mk || die
109 sed -i -e '/\/papers\/Ind/s:REFDIR:"/usr/share/heirloom/reftools":' \
110 refer/refer1.c || die
111
112 # Correct paths for the installed man pages, just to be clean
113 find . \( -name '*.1' -or -name '*.1b' -or -name '*.7' -or -name '*.7b' \) -exec \
114 sed -i \
115 -e "s:/usr/ucblib/grap.defines:/usr/share/heirloom/doctools/grap.defines:" \
116 -e "s:/usr/ucblib/vgrindefs:/usr/share/heirloom/doctools/vgrindefs:" \
117 -e "s:/usr/ucblib/vfontedpr:/usr/libexec/heirloom/doctools/vfontedpr:" \
118 -e "s:/usr/ucblib/tmac/vgrind:/usr/share/heirloom/tmac/vgrind:" \
119 -e "s:/usr/ucblib/eign:/usr/share/heirloom/doctools/eign:" \
120 -e "s:/usr/ucb/:/usr/bin/:g" \
121 -e "s:/usr/ucblib/doctools:/usr/share/heirloom/doctools:g" \
122 -e "s:/usr/ucblib/reftools/papers:/usr/share/heirloom/reftools/papers:" \
123 -e "s:/usr/ucblib/reftools:/usr/libexec/heirloom/reftools:g" \
124 {} +
125 }
126
127 src_configure() {
128 append-cppflags -D_GNU_SOURCE
129
130 sed \
131 -e "s:@CFLAGS@:${CFLAGS}:" \
132 -e "s:@CXXFLAGS@:${CXXFLAGS}:" \
133 -e "s:@CPPFLAGS@:${CPPFLAGS}:" \
134 -e "s:@LDFLAGS@:${LDFLAGS}:" \
135 -e "s:@CC@:$(tc-getCC):" \
136 -e "s:@CXX@:$(tc-getCXX):" \
137 -e "s:@RANLIB@:$(tc-getRANLIB):" \
138 -e "s:@libdir@:$(get_libdir):" \
139 "${FILESDIR}"/${PV}.config \
140 > "${S}"/mk.config
141 }
142
143 src_compile() {
144 emake $(use cxx && echo MPM=mpm) || die
145 }
146
147 src_install() {
148 dodir /usr/share/heirloom/{doc,ref}tools
149
150 # The build system uses the ROOT variable in place of DESTIDR.
151 emake $(use cxx && echo MPM=mpm) ROOT="${D}" install || die
152
153 dodoc README CHANGES || die
154
155 # Rename ptx to avoid a collision with coreutils… maybe this
156 # should be made conditional to userland_GNU (somebody got to
157 # check on FreeBSD).
158 mv "${D}"/usr/bin/{,hl-}ptx || die
159 mv "${D}"/usr/share/man/man1/{,hl-}ptx.1 || die
160
161 # Rename otfdump to avoid a collision with dev-libs/libotf
162 mv "${D}"/usr/bin/{,hl-}otfdump || die
163 mv "${D}"/usr/share/man/man1/{,hl-}otfdump.1 || die
164
165 # Rename ta to avoid a collision with app-cdr/pxlinux
166 mv "${D}"/usr/bin/{,hl-}ta || die
167
168 # Not sure why they install in man{1,7}b, but we don't list that
169 # in by default, so move all of them to man1. We don't do that in
170 # the Makefiles, because it's definitely more complex (even though
171 # faster).
172 pushd "${D}"/usr/share/man
173 for section in 1 7; do
174 for man in man${section}b/*.${section}b*; do
175 if [ -L $man ]; then
176 local oldlink=$(readlink $man)
177 rm $man
178 ln -s ${oldlink//${section}b/${section}} ${man//${section}b/${section}}
179 else
180 mv $man ${man//${section}b/${section}} || die "failed moving $man"
181 fi
182 done
183 done
184 rmdir man{1,7}b
185 popd
186 }
187
188 pkg_postinst() {
189 elog "To make proper use of heirloom-doctools with sys-apps/man you"
190 elog "need to make sure that /etc/man.conf is configured properly with"
191 elog "the following settings:"
192 elog ""
193 elog "TROFF /usr/bin/troff -Tlocale -mg -msafe -mpadj -mandoc"
194 elog "NROFF /usr/bin/nroff -mg -msafe -mpadj -mandoc"
195 elog "EQN /usr/bin/eqn -Tps"
196 elog "NEQN /usr/bin/neqn -Tlatin1"
197 elog "TBL /usr/bin/tbl"
198 elog "COL /usr/bin/col"
199 elog "REFER /usr/bin/refer"
200 elog "PIC /usr/bin/pic"
201 elog "VGRIND /usr/bin/vgrind"
202 elog "GRAP /usr/bin/grap"
203 }