Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 134377 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/sys-apps/groff/groff-1.19.1-r2.ebuild (-16 / +43 lines)
Lines 1-21 Link Here
1
# Copyright 1999-2006 Gentoo Foundation
1
# Copyright 1999-2006 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/sys-apps/groff/groff-1.19.1-r2.ebuild,v 1.18 2006/05/08 04:14:27 vapier Exp $
3
# $Header: $
4
4
5
inherit eutils flag-o-matic toolchain-funcs
5
inherit eutils flag-o-matic toolchain-funcs autotools
6
6
7
MB_PATCH="groff_1.18.1-7" #"${P/-/_}-7"
8
DESCRIPTION="Text formatter used for man pages"
7
DESCRIPTION="Text formatter used for man pages"
9
HOMEPAGE="http://www.gnu.org/software/groff/groff.html"
8
HOMEPAGE="http://www.gnu.org/software/groff/groff.html"
10
SRC_URI="mirror://gnu/groff/${P}.tar.gz"
9
10
JP_PATCH_REV="5111"
11
SRC_URI="mirror://gnu/groff/${P}.tar.gz
12
	cjk? mirror://gentoo/${P}-japanese-r${JP_PATCH_REV}.patch.gz"
13
# FIXME:
14
# See bug #134377.
15
#
16
# Actually, that gzip-ed patch is not mrrored by gentoo official servers.
17
# For the time being, to test it requires to manually dwonload that patch
18
# as big plain diff from Momonga Linux repos.
19
#
20
# http://developer.momonga-linux.org/viewcvs/*checkout*/trunk/pkgs/groff/groff-1.19.1-japanese.patch?rev=${JP_PATCH_REV}
21
#
22
# And then, rename & manually gzip it.
23
# Then put it into distfiles dir, and re-generate its digest.
24
#
25
# Historically, the groff's patch for CJK is so big (HOW _CRAP_! :DDD).
26
# Thus, according to portage policies,
27
# such patch should be gzip-ed and put on outside of the tree.
28
# It's mentioned SpanKY and solar.
11
29
12
LICENSE="GPL-2"
30
LICENSE="GPL-2"
13
SLOT="0"
31
SLOT="0"
14
KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
32
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
15
IUSE="X"
33
IUSE="X cjk"
16
34
17
DEPEND=">=sys-apps/texinfo-4.7-r1
35
DEPEND=">=sys-apps/texinfo-4.7-r1"
18
	!app-i18n/man-pages-ja"
19
PDEPEND=">=sys-apps/man-1.5k-r1"
36
PDEPEND=">=sys-apps/man-1.5k-r1"
20
37
21
src_unpack() {
38
src_unpack() {
Lines 47-52 Link Here
47
	# Fix some headers to be compatible with gcc-4.1.0
64
	# Fix some headers to be compatible with gcc-4.1.0
48
	epatch "${FILESDIR}"/${P}-gcc-4.1.patch
65
	epatch "${FILESDIR}"/${P}-gcc-4.1.patch
49
66
67
	# CJK patch from Momonga Linux. See bug #134377.
68
	use cjk && epatch "${WORKDIR}"/${P}-japanese-r${JP_PATCH_REV}.patch
69
50
	# Make sure we can cross-compile this puppy
70
	# Make sure we can cross-compile this puppy
51
	if tc-is-cross-compiler ; then
71
	if tc-is-cross-compiler ; then
52
		sed -i \
72
		sed -i \
Lines 67-75 Link Here
67
	then
87
	then
68
		touch .dont-build-X
88
		touch .dont-build-X
69
	fi
89
	fi
90
91
	# The Big CJK patch screw up autotools, should fix.
92
	# See bug #134377.
93
	use cjk && eautoreconf || die "eautoreconf failed. :("
70
}
94
}
71
95
72
src_compile() {
96
src_compile() {
97
	# For enable japanese for CJK support.
98
	local myconf=""
99
	use cjk && myconf="--enable-japanese"
100
73
	# Fix problems with not finding g++
101
	# Fix problems with not finding g++
74
	tc-export CC CXX
102
	tc-export CC CXX
75
103
Lines 80-101 Link Here
80
	# -march=2.0 makes groff unable to finish the compile process
108
	# -march=2.0 makes groff unable to finish the compile process
81
	use hppa && replace-cpu-flags 2.0 1.0
109
	use hppa && replace-cpu-flags 2.0 1.0
82
110
83
	# CJK doesnt work yet with groff-1.19
84
	#	$(use_enable cjk multibyte)
85
86
	# many fun sandbox errors with econf
111
	# many fun sandbox errors with econf
112
	# Added ${myconf} for CJK conditional patching. See bug #134377.
87
	./configure \
113
	./configure \
88
		--host=${CHOST} \
114
		--host=${CHOST} \
89
		--prefix=/usr \
115
		--prefix=/usr \
90
		--mandir=/usr/share/man \
116
		--mandir=/usr/share/man \
91
		--infodir=\${inforoot} \
117
		--infodir=\${inforoot} \
92
		|| die
118
		${myconf} \
119
		|| die "./configure failed. :("
93
	emake || die
120
	emake || die
94
121
95
	if [ ! -f .dont-build-X ] ; then
122
	if [ ! -f .dont-build-X ] ; then
96
		cd ${S}/src/xditview
123
		cd ${S}/src/xditview
97
		xmkmf || die
124
		xmkmf || die "xmkmf failed. :("
98
		make depend all || die
125
		make depend all || die "make depend all failed. :("
99
	fi
126
	fi
100
}
127
}
101
128
Lines 106-112 Link Here
106
		manroot="${D}"/usr/share/man \
133
		manroot="${D}"/usr/share/man \
107
		inforoot="${D}"/usr/share/info \
134
		inforoot="${D}"/usr/share/info \
108
		docdir="${D}"/usr/share/doc/${PF} \
135
		docdir="${D}"/usr/share/doc/${PF} \
109
		install || die
136
		install || die "make install failed. :("
110
137
111
	# The following links are required for xman
138
	# The following links are required for xman
112
	dosym eqn /usr/bin/geqn
139
	dosym eqn /usr/bin/geqn
Lines 122-127 Link Here
122
			BINDIR=/usr/bin \
149
			BINDIR=/usr/bin \
123
			MANPATH=/usr/share/man \
150
			MANPATH=/usr/share/man \
124
			install \
151
			install \
125
			install.man || die
152
			install.man || die "make install install.man failed. :("
126
	fi
153
	fi
127
}
154
}

Return to bug 134377