summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-12-13 23:50:23 +0000
committerMike Frysinger <vapier@gentoo.org>2004-12-13 23:50:23 +0000
commit6ce874b0c7b2da48acbc20f4a7c1e7f70d3b350e (patch)
treeff1ae358ced173ec7bc15796d1f44ce139fea44f /sys-apps
parenttc-is-cross-compiler() (diff)
downloadgentoo-2-6ce874b0c7b2da48acbc20f4a7c1e7f70d3b350e.tar.gz
gentoo-2-6ce874b0c7b2da48acbc20f4a7c1e7f70d3b350e.tar.bz2
gentoo-2-6ce874b0c7b2da48acbc20f4a7c1e7f70d3b350e.zip
Clean up the ebuild. Add support for cross-compiling. Try to fix parallel build (works for me :D).
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/groff/ChangeLog7
-rw-r--r--sys-apps/groff/files/groff-1.19.1-parallel-make.patch41
-rw-r--r--sys-apps/groff/groff-1.19.1-r2.ebuild85
3 files changed, 94 insertions, 39 deletions
diff --git a/sys-apps/groff/ChangeLog b/sys-apps/groff/ChangeLog
index a654d5f1058d..37067f9327c2 100644
--- a/sys-apps/groff/ChangeLog
+++ b/sys-apps/groff/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/groff
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/ChangeLog,v 1.54 2004/11/05 09:32:31 hardave Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/ChangeLog,v 1.55 2004/12/13 23:50:23 vapier Exp $
+
+ 13 Dec 2004; Mike Frysinger <vapier@gentoo.org>
+ +files/groff-1.19.1-parallel-make.patch, groff-1.19.1-r2.ebuild:
+ Clean up the ebuild. Add support for cross-compiling. Try to fix parallel
+ build (works for me :D).
05 Nov 2004; Hardave Riar <hardave@gentoo.org> groff-1.19.1-r2.ebuild:
Stable on mips, bug #68404.
diff --git a/sys-apps/groff/files/groff-1.19.1-parallel-make.patch b/sys-apps/groff/files/groff-1.19.1-parallel-make.patch
new file mode 100644
index 000000000000..af8931fe4c82
--- /dev/null
+++ b/sys-apps/groff/files/groff-1.19.1-parallel-make.patch
@@ -0,0 +1,41 @@
+--- groff-1.19.1/Makefile.in.orig 2004-12-13 17:08:22.845281534 -0500
++++ groff-1.19.1/Makefile.in 2004-12-13 17:11:14.903873176 -0500
+@@ -541,3 +541,3 @@
+
+-$(LIBDIRS): FORCE
++$(LIBDIRS): FORCE $(INCDIRS) $(PROGDEPDIRS)
+ @$(ENVSETUP); \
+@@ -557,3 +557,3 @@
+
+-$(CPROGDIRS): FORCE
++$(CPROGDIRS): FORCE $(LIBDIRS)
+ @$(ENVSETUP); \
+@@ -573,3 +573,3 @@
+
+-$(CCPROGDIRS): FORCE
++$(CCPROGDIRS): FORCE $(LIBDIRS)
+ @$(ENVSETUP); \
+@@ -589,3 +589,3 @@
+
+-$(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE
++$(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS): FORCE $(PROGDIRS)
+ @$(ENVSETUP); \
+@@ -603,3 +603,17 @@
+
+-$(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE
++$(OTHERDIRS): FORCE $(PROGDIRS)
++ @$(ENVSETUP); \
++ if test $(srcdir) = .; then \
++ srcdir=.; \
++ else \
++ srcdir=`cd $(srcdir); pwd`/$@; \
++ fi; \
++ test -d $@ || $(mkinstalldirs) $@; \
++ cd $@; \
++ $(MAKE) $(MDEFINES) srcdir=$$srcdir VPATH=$$srcdir \
++ -f $(top_srcdir)/Makefile.comm \
++ -f $$srcdir/Makefile.sub \
++ -f $(top_srcdir)/Makefile.man $(do)
++
++$(INCDIRS) $(PROGDEPDIRS): FORCE
+ @$(ENVSETUP); \
diff --git a/sys-apps/groff/groff-1.19.1-r2.ebuild b/sys-apps/groff/groff-1.19.1-r2.ebuild
index cd2783898bea..ae1a29ee7d24 100644
--- a/sys-apps/groff/groff-1.19.1-r2.ebuild
+++ b/sys-apps/groff/groff-1.19.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/groff-1.19.1-r2.ebuild,v 1.9 2004/11/12 14:28:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/groff-1.19.1-r2.ebuild,v 1.10 2004/12/13 23:50:23 vapier Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -40,14 +40,31 @@ src_unpack() {
# Fix tempfile usage #68404
epatch ${FILESDIR}/${P}-tmpfile.patch
+
+ # Fix make dependencies so we can build in parallel
+ epatch ${FILESDIR}/${P}-parallel-make.patch
+
+ # Make sure we can cross-compile this puppy
+ if tc-is-cross-compiler ; then
+ sed -i \
+ -e '/^GROFFBIN=/s:=.*:=/usr/bin/groff:' \
+ -e '/^TROFFBIN=/s:=.*:=/usr/bin/troff:' \
+ -e '/^GROFF_BIN_PATH=/s:=.*:=:' \
+ contrib/mom/Makefile.sub \
+ doc/Makefile.in \
+ doc/Makefile.sub || die "cross-compile sed failed"
+ touch .dont-build-X
+ fi
+ # Only build X stuff if we have X installed, but do
+ # not depend on it, else we get circular deps :(
+ if ! use X || [ ! -x /usr/X11R6/bin/xmkmf ] ; then
+ touch .dont-build-X
+ fi
}
src_compile() {
- local myconf=
-
# Fix problems with not finding g++
- export CC="$(tc-getCC)"
- export CXX="$(tc-getCXX)"
+ tc-export CC CXX
# -Os causes segfaults, -O is probably a fine replacement
# (fixes bug 36008, 06 Jan 2004 agriffis)
@@ -56,26 +73,19 @@ src_compile() {
# -march=2.0 makes groff unable to finish the compile process
use hppa && replace-cpu-flags 2.0 1.0
-# myconf="${myconf} `use_enable cjk multibyte`"
-
- # this is incredibly broken, i have no idea why people are trying to use
- # it... even the documentation on it states that -fnew-ra is "meant only
- # for testing. Users should not specify this option, since it is not yet
- # ready for production use."
- filter-flags -fnew-ra
+ # CJK doesnt work yet with groff-1.19
+ # $(use_enable cjk multibyte)
# many fun sandbox errors with econf
- myconf="${myconf} --host=${CHOST} --prefix=/usr \
- --mandir=/usr/share/man --infodir=\${inforoot}"
- ./configure ${myconf} || die
-
- # Parallel build doesn't work. Patched wanted.
- emake -j1 || die
-
- # Only build X stuff if we have X installed, but do
- # not depend on it, else we get circular deps.
- if use X && [ -x /usr/X11R6/bin/xmkmf ]
- then
+ ./configure \
+ --host=${CHOST} \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=\${inforoot} \
+ || die
+ emake || die
+
+ if [ ! -f .dont-build-X ] ; then
cd ${S}/src/xditview
xmkmf || die
make depend all || die
@@ -84,28 +94,27 @@ src_compile() {
src_install() {
dodir /usr /usr/share/doc/${PF}/{examples,html}
- make prefix=${D}/usr \
- manroot=${D}/usr/share/man \
- inforoot=${D}/usr/share/info \
- docdir=${D}/usr/share/doc/${PF} \
+ make \
+ prefix="${D}"/usr \
+ manroot="${D}"/usr/share/man \
+ inforoot="${D}"/usr/share/info \
+ docdir="${D}"/usr/share/doc/${PF} \
install || die
- if use X && [ -x /usr/X11R6/bin/xmkmf ]
- then
- cd ${S}/src/xditview
- make DESTDIR=${D} \
- BINDIR=/usr/bin \
- MANPATH=/usr/share/man \
- install \
- install.man || die
- fi
-
# The following links are required for xman
dosym eqn /usr/bin/geqn
dosym tbl /usr/bin/gtbl
dosym soelim /usr/bin/zsoelim
- cd ${S}
dodoc BUG-REPORT ChangeLog FDL MORE.STUFF NEWS \
PROBLEMS PROJECTS README REVISION TODO VERSION
+
+ if [ ! -f .dont-build-X ] ; then
+ cd ${S}/src/xditview
+ make DESTDIR="${D}" \
+ BINDIR=/usr/bin \
+ MANPATH=/usr/share/man \
+ install \
+ install.man || die
+ fi
}