diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-09-30 00:22:50 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-09-30 00:22:50 +0000 |
commit | db39dd80618a95c3ecb9398befc274741254e325 (patch) | |
tree | 7ae5bf374bbf14204d2576920b07855b1cd20178 /app-doc/heirloom-doctools | |
parent | Version bump (diff) | |
download | gentoo-2-db39dd80618a95c3ecb9398befc274741254e325.tar.gz gentoo-2-db39dd80618a95c3ecb9398befc274741254e325.tar.bz2 gentoo-2-db39dd80618a95c3ecb9398befc274741254e325.zip |
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)
Diffstat (limited to 'app-doc/heirloom-doctools')
-rw-r--r-- | app-doc/heirloom-doctools/ChangeLog | 13 | ||||
-rw-r--r-- | app-doc/heirloom-doctools/files/080407.config | 6 | ||||
-rw-r--r-- | app-doc/heirloom-doctools/heirloom-doctools-080407-r1.ebuild | 150 | ||||
-rw-r--r-- | app-doc/heirloom-doctools/heirloom-doctools-080407.ebuild | 98 |
4 files changed, 165 insertions, 102 deletions
diff --git a/app-doc/heirloom-doctools/ChangeLog b/app-doc/heirloom-doctools/ChangeLog index 7c13b5ad36ea..b57f3b33daa2 100644 --- a/app-doc/heirloom-doctools/ChangeLog +++ b/app-doc/heirloom-doctools/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for app-doc/heirloom-doctools # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-doc/heirloom-doctools/ChangeLog,v 1.1 2009/09/29 10:45:23 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-doc/heirloom-doctools/ChangeLog,v 1.2 2009/09/30 00:22:49 flameeyes Exp $ + +*heirloom-doctools-080407-r1 (30 Sep 2009) + + 30 Sep 2009; Diego E. Pettenò <flameeyes@gentoo.org> files/080407.config, + -heirloom-doctools-080407.ebuild, +heirloom-doctools-080407-r1.ebuild: + 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. *heirloom-doctools-080407 (29 Sep 2009) diff --git a/app-doc/heirloom-doctools/files/080407.config b/app-doc/heirloom-doctools/files/080407.config index 90ad6f2f7383..120f6d32e2f1 100644 --- a/app-doc/heirloom-doctools/files/080407.config +++ b/app-doc/heirloom-doctools/files/080407.config @@ -1,8 +1,8 @@ INSTALL=/usr/bin/install PREFIX=/usr BINDIR=$(PREFIX)/bin -LIBDIR=$(PREFIX)/libexec/heirloom-doctools -PKGDATADIR=$(PREFIX)/share/heirloom-doctools +LIBDIR=$(PREFIX)/libexec/heirloom/doctools +PKGDATADIR=$(PREFIX)/share/heirloom PUBDIR=$(PKGDATADIR)/pub MANDIR=$(PREFIX)/share/man MACDIR=$(PKGDATADIR)/tmac @@ -10,7 +10,7 @@ FNTDIR=$(PKGDATADIR)/doctools/font PSTDIR=$(FNTDIR)/devpost/postscript TABDIR=$(PKGDATADIR)/nterm HYPDIR=$(PKGDATADIR)/hyphen -REFDIR=$(PREFIX)/libexec/reftools +REFDIR=$(PREFIX)/libexec/heirloom/reftools EUC=-DEUC diff --git a/app-doc/heirloom-doctools/heirloom-doctools-080407-r1.ebuild b/app-doc/heirloom-doctools/heirloom-doctools-080407-r1.ebuild new file mode 100644 index 000000000000..4bfa90a715bb --- /dev/null +++ b/app-doc/heirloom-doctools/heirloom-doctools-080407-r1.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $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 $ + +EAPI=2 + +inherit flag-o-matic toolchain-funcs multilib + +DESCRIPTION="Classic Unix documentation tools ported from OpenSolaris" +HOMEPAGE="http://heirloom.sourceforge.net/doctools.html" +SRC_URI="mirror://sourceforge/heirloom/${P}.tar.bz2" + +LICENSE="CDDL" + +SLOT="0" + +KEYWORDS="~amd64 ~x86" + +IUSE="cxx" + +RDEPEND="!sys-apps/groff" +DEPEND="sys-devel/flex + sys-devel/bison" + +src_prepare() { + # Make sure that C++ code is built with CXXFLAGS and not CFLAGS. + find . -name Makefile.mk -exec \ + sed -i \ + -e '/(CCC)/s:CFLAGS:CXXFLAGS:' \ + {} + + + # mpm uses C++, we'll build it explicitly if we really want to + sed -i -e 's:mpm:$(MPM):' makefile + + # Monkeypatching dependencies to avoid parallel make failure + echo "picl.o: picl.c y.tab.h" >> pic/Makefile.mk + + # Move some stuff around to better suit our filesystem layout + sed -i -e '/INSTALL.*grap\.defines/s:$(LIBDIR):/usr/share/heirloom/doctools:' \ + grap/Makefile.mk || die + sed -i -e '/GRAPDEFINES/s:LIBDIR:"/usr/share/heirloom/doctools":' \ + grap/main.c || die + + sed -i -e '/INSTALL.*eign/s:$(LIBDIR):/usr/share/heirloom/doctools:' \ + ptx/Makefile.mk || die + sed -i -e '/\/eign/s:\(LIB\|REF\)DIR:"/usr/share/heirloom/doctools":' \ + ptx/ptx.c refer/mkey3.c || die + + sed -i -e 's:$(LIBDIR)/vgrindefs:/usr/share/heirloom/doctools/vgrindefs:' \ + vgrind/Makefile.mk || die + sed -i -e '/\/vgrindefs/s:LIBDIR:"/usr/share/heirloom/doctools":' \ + vgrind/vfontedpr.c || die + + sed -i -e 's:$(REFDIR)/papers:/usr/share/heirloom/reftools/papers:g' \ + refer/Makefile.mk || die + sed -i -e '/\/papers\/Ind/s:REFDIR:"/usr/share/heirloom/reftools":' \ + refer/refer1.c || die + + # Correct paths for the installed man pages, just to be clean + find . \( -name '*.1' -or -name '*.1b' -or -name '*.7' -or -name '*.7b' \) -exec \ + sed -i \ + -e "s:/usr/ucblib/grap.defines:/usr/share/heirloom/doctools/grap.defines:" \ + -e "s:/usr/ucblib/vgrindefs:/usr/share/heirloom/doctools/vgrindefs:" \ + -e "s:/usr/ucblib/vfontedpr:/usr/libexec/heirloom/doctools/vfontedpr:" \ + -e "s:/usr/ucblib/tmac/vgrind:/usr/share/heirloom/tmac/vgrind:" \ + -e "s:/usr/ucblib/eign:/usr/share/heirloom/doctools/eign:" \ + -e "s:/usr/ucb/:/usr/bin/:g" \ + -e "s:/usr/ucblib/doctools:/usr/share/heirloom/doctools:g" \ + -e "s:/usr/ucblib/reftools/papers:/usr/share/heirloom/reftools/papers:" \ + -e "s:/usr/ucblib/reftools:/usr/libexec/heirloom/reftools:g" \ + {} + +} + +src_configure() { + append-cppflags -D_GNU_SOURCE + + sed \ + -e "s:@CFLAGS@:${CFLAGS}:" \ + -e "s:@CXXFLAGS@:${CXXFLAGS}:" \ + -e "s:@CPPFLAGS@:${CPPFLAGS}:" \ + -e "s:@LDFLAGS@:${LDFLAGS}:" \ + -e "s:@CC@:$(tc-getCC):" \ + -e "s:@CXX@:$(tc-getCXX):" \ + -e "s:@RANLIB@:$(tc-getRANLIB):" \ + -e "s:@libdir@:$(get_libdir):" \ + "${FILESDIR}"/${PV}.config \ + > "${S}"/mk.config +} + +src_compile() { + emake $(use cxx && echo MPM=mpm) || die +} + +src_install() { + dodir /usr/share/heirloom/{doc,ref}tools + + # The build system uses the ROOT variable in place of DESTIDR. + emake $(use cxx && echo MPM=mpm) ROOT="${D}" install || die + + dodoc README CHANGES || die + + # Rename ptx to avoid a collision with coreutils… maybe this + # should be made conditional to userland_GNU (somebody got to + # check on FreeBSD). + mv "${D}"/usr/bin/{,hl-}ptx || die + mv "${D}"/usr/share/man/man1/{,hl-}ptx.1 || die + + # Rename otfdump to avoid a collision with dev-libs/libotf + mv "${D}"/usr/bin/{,hl-}otfdump || die + mv "${D}"/usr/share/man/man1/{,hl-}otfdump.1 || die + + # Rename ta to avoid a collision with app-cdr/pxlinux + mv "${D}"/usr/bin/{,hl-}ta || die + + # Not sure why they install in man{1,7}b, but we don't list that + # in by default, so move all of them to man1. We don't do that in + # the Makefiles, because it's definitely more complex (even though + # faster). + pushd "${D}"/usr/share/man + for section in 1 7; do + for man in man${section}b/*.${section}b*; do + if [ -L $man ]; then + local oldlink=$(readlink $man) + rm $man + ln -s ${oldlink//${section}b/${section}} ${man//${section}b/${section}} + else + mv $man ${man//${section}b/${section}} || die "failed moving $man" + fi + done + done + rmdir man{1,7}b + popd +} + +pkg_postinst() { + elog "To make proper use of heirloom-doctools with sys-apps/man you" + elog "need to make sure that /etc/man.conf is configured properly with" + elog "the following settings:" + elog "" + elog "TROFF /usr/bin/troff -Tlocale -mg -msafe -mpadj -mandoc" + elog "NROFF /usr/bin/nroff -mg -msafe -mpadj -mandoc" + elog "EQN /usr/bin/eqn -Tps" + elog "NEQN /usr/bin/neqn -Tlatin1" + elog "TBL /usr/bin/tbl" + elog "COL /usr/bin/col" + elog "REFER /usr/bin/refer" + elog "PIC /usr/bin/pic" + elog "VGRIND /usr/bin/vgrind" + elog "GRAP /usr/bin/grap" +} diff --git a/app-doc/heirloom-doctools/heirloom-doctools-080407.ebuild b/app-doc/heirloom-doctools/heirloom-doctools-080407.ebuild deleted file mode 100644 index 02a0bfc9c68d..000000000000 --- a/app-doc/heirloom-doctools/heirloom-doctools-080407.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-doc/heirloom-doctools/heirloom-doctools-080407.ebuild,v 1.1 2009/09/29 10:45:23 flameeyes Exp $ - -EAPI=2 - -inherit flag-o-matic toolchain-funcs multilib - -DESCRIPTION="Classic Unix documentation tools ported from OpenSolaris" -HOMEPAGE="http://heirloom.sourceforge.net/doctools.html" -SRC_URI="mirror://sourceforge/heirloom/${P}.tar.bz2" - -LICENSE="CDDL" - -SLOT="0" - -KEYWORDS="~amd64" - -IUSE="cxx" - -RDEPEND="!sys-apps/groff" -DEPEND="sys-devel/flex - sys-devel/bison" - -src_prepare() { - # Make sure that C++ code is built with CXXFLAGS and not CFLAGS. - find . -name Makefile.mk -exec \ - sed -i \ - -e '/(CCC)/s:CFLAGS:CXXFLAGS:' \ - {} + - - # mpm uses C++, we'll build it explicitly if we really want to - sed -i -e 's:mpm:$(MPM):' makefile - - # Monkeypatching dependencies to avoid parallel make failure - echo "picl.o: picl.c y.tab.h" >> pic/Makefile.mk -} - -src_configure() { - append-cppflags -D_GNU_SOURCE - - sed \ - -e "s:@CFLAGS@:${CFLAGS}:" \ - -e "s:@CXXFLAGS@:${CXXFLAGS}:" \ - -e "s:@CPPFLAGS@:${CPPFLAGS}:" \ - -e "s:@LDFLAGS@:${LDFLAGS}:" \ - -e "s:@CC@:$(tc-getCC):" \ - -e "s:@CXX@:$(tc-getCXX):" \ - -e "s:@RANLIB@:$(tc-getRANLIB):" \ - -e "s:@libdir@:$(get_libdir):" \ - "${FILESDIR}"/${PV}.config \ - > "${S}"/mk.config -} - -src_compile() { - emake $(use cxx && echo MPM=mpm) || die -} - -src_install() { - # The build system uses the ROOT variable in place of DESTIDR. - emake $(use cxx && echo MPM=mpm) ROOT="${D}" install || die - - dodoc README CHANGES || die - - # Rename ptx to avoid a collision with coreutils… maybe this - # should be made conditional to userland_GNU (somebody got to - # check on FreeBSD). - mv "${D}"/usr/bin/{,hl-}ptx || die - mv "${D}"/usr/share/man/man1/{,hl-}ptx.1* || die - - # Not sure why they install in man1b, but we don't list that in by - # default, so move all of them to man1. We don't do that in the - # Makefiles, because it's definitely more complex (even though - # faster). - pushd "${D}"/usr/share/man - for man in man1b/*.1b*; do - mv $man ${man//1b/1} || die "failed moving $man" - done - rmdir man1b - popd -} - -pkg_postinst() { - elog "To make proper use of heirloom-doctools with sys-apps/man you" - elog "need to make sure that /etc/man.conf is configured properly with" - elog "the following settings:" - elog "" - elog "TROFF /usr/bin/troff -Tlocale -mg -msafe -mpadj -mandoc" - elog "NROFF /usr/bin/nroff -mg -msafe -mpadj -mandoc" - elog "EQN /usr/bin/eqn -Tps" - elog "NEQN /usr/bin/neqn -Tlatin1" - elog "TBL /usr/bin/tbl" - elog "COL /usr/bin/col" - elog "REFER /usr/bin/refer" - elog "PIC /usr/bin/pic" - elog "VGRIND /usr/bin/vgrind" - elog "GRAP /usr/bin/grap" -} |