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

Collapse All | Expand All

(-)/var/paludis/repositories/gentoo/app-text/texlive/texlive-2005.ebuild (-51 / +73 lines)
Lines 1-22 Link Here
1
# Copyright 1999-2007 Gentoo Foundation
1
# Copyright 1999-2007 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/app-text/texlive/texlive-2005.ebuild,v 1.4 2007/01/28 06:10:10 genone Exp $
3
# $Header:$
4
4
5
inherit eutils flag-o-matic toolchain-funcs versionator virtualx
5
inherit eutils flag-o-matic toolchain-funcs versionator virtualx
6
6
7
TEXMF_PATH=/var/lib/texmf
7
TEXMF_PATH=/var/lib/texmf
8
#TEXMF_PATH=/etc/texmf
8
9
9
DESCRIPTION="a complete TeX distribution"
10
DESCRIPTION="a complete TeX distribution"
10
HOMEPAGE="http://tug.org/texlive/"
11
HOMEPAGE="http://tug.org/texlive/"
11
SLOT="0"
12
SLOT="0"
12
LICENSE="GPL-2"
13
LICENSE="GPL-2"
13
14
14
SRC_URI="http://dev.gentoo.org/~ehmsen/texlive/${P}-src.tar.bz2
15
SRC_URI="http://134.60.104.12/gentoo/${P}-src.tar.bz2
15
	http://dev.gentoo.org/~ehmsen/texlive/${P}-texmf-dist.tar.bz2
16
	http://134.60.104.12/gentoo/${P}-texmf-dist.tar.bz2
16
	http://dev.gentoo.org/~ehmsen/texlive/${P}-texmf.tar.bz2"
17
	http://134.60.104.12/gentoo/${P}-texmf.tar.bz2"
17
18
18
KEYWORDS="~amd64 ~x86"
19
KEYWORDS="~amd64 ~x86"
19
IUSE="X doc tk Xaw3d lesstif motif neXt"
20
IUSE="X doc tk Xaw3d lesstif motif neXt png zlib"
20
21
21
# This is less than an ideal name
22
# This is less than an ideal name
22
PROVIDE="virtual/tetex"
23
PROVIDE="virtual/tetex"
Lines 81-93 Link Here
81
	unpack ${P}-texmf-dist.tar.bz2 || die "unpack texmf-dist"
82
	unpack ${P}-texmf-dist.tar.bz2 || die "unpack texmf-dist"
82
83
83
	epatch "${FILESDIR}/${PV}/${P}-use-system-libtool.patch" || die
84
	epatch "${FILESDIR}/${PV}/${P}-use-system-libtool.patch" || die
84
	epatch "${FILESDIR}/${PV}/${P}-amd64-xdvik-wp.patch" || die
85
	epatch "${FILESDIR}/${PV}/${P}-gentoo-texmf.patch" || die
85
	epatch "${FILESDIR}/${PV}/${P}-mptest.patch" || die
86
	epatch "${FILESDIR}/${PV}/${P}-mpware-libtool.patch" || die
86
	epatch "${FILESDIR}/${PV}/${P}-fmtutil-in.patch" || die
87
	epatch "${FILESDIR}/${PV}/${P}-xpdf-vulnerabilities.patch" || die
88
	epatch "${FILESDIR}/${PV}/${P}-pdftosrc-install.patch" || die
89
	epatch "${FILESDIR}/${PV}/${P}-create-empty-files.patch" || die
90
	epatch "${FILESDIR}/${PV}/${P}-gentoo-texmf-site.patch" || die
91
87
92
	sed -i -e "/mktexlsr/,+3d" -e "s/\(updmap-sys\)/\1 --nohash/" \
88
	sed -i -e "/mktexlsr/,+3d" -e "s/\(updmap-sys\)/\1 --nohash/" \
93
		Makefile.in || die "sed"
89
		Makefile.in || die "sed"
Lines 121-136 Link Here
121
		my_conf="${my_conf} --without-xdvik --without-oxdvik"
117
		my_conf="${my_conf} --without-xdvik --without-oxdvik"
122
	fi
118
	fi
123
119
120
	if use zlib ; then
121
		my_conf="${my_conf} --with-system-zlib"
122
	fi
123
124
	if use png ; then
125
		my_conf="${my_conf} --with-system-pnglib"
126
	fi
127
124
	econf --bindir=/usr/bin \
128
	econf --bindir=/usr/bin \
125
		--datadir=${S} \
129
		--datadir="${S}" \
126
		--with-system-wwwlib \
127
		--with-libwww-include=/usr/include/w3c-libwww \
128
		--with-system-ncurses \
130
		--with-system-ncurses \
129
		--with-system-pnglib \
131
		--with-system-freetype2 \
132
		--with-freetype2-include=/usr/include \
130
		--without-texinfo \
133
		--without-texinfo \
131
		--without-dialog \
134
		--without-dialog \
132
		--without-texi2html \
135
		--without-texi2html \
133
		--with-system-zlib \
134
		--disable-multiplatform \
136
		--disable-multiplatform \
135
		--with-epsfwin \
137
		--with-epsfwin \
136
		--with-mftalkwin \
138
		--with-mftalkwin \
Lines 139-158 Link Here
139
		--with-unitermwin \
141
		--with-unitermwin \
140
		--with-ps=gs \
142
		--with-ps=gs \
141
		--enable-ipc \
143
		--enable-ipc \
142
		--with-etex \
143
		--without-dvipng \
144
		--without-dvipng \
144
		--without-dvipdfm \
145
		--without-dvipdfm \
145
		--without-dvipdfmx \
146
		--without-dvipdfmx \
147
		--without-psutils \
148
		--without-t1utils \
146
		$(use_with X x) \
149
		$(use_with X x) \
147
		${my_conf} || die "econf"
150
		${my_conf} || die "econf"
148
151
149
	if use X && use ppc-macos ; then
152
	if use X && use ppc-macos ; then
150
		for f in $(find ${S} -name config.status) ; do
153
		for f in $(find "${S}" -name config.status) ; do
151
			sed -i -e "s:-ldl::g" $f
154
			sed -i -e "s:-ldl::g" $f
152
		done
155
		done
153
	fi
156
	fi
154
157
155
	emake -j1 CC="$(tc-getCC)" CXX="$(tc-getCXX)" texmf=${TEXMF_PATH:-/usr/share/texmf} || die "make"
158
	emake -j1 texmf=${TEXMF_PATH:-/usr/share/texmf} || die "make"
156
}
159
}
157
160
158
src_test() {
161
src_test() {
Lines 162-268 Link Here
162
165
163
src_install() {
166
src_install() {
164
	dodir /usr/share/
167
	dodir /usr/share/
165
	cp -R texmf ${D}/usr/share
168
	cp -R texmf "${D}/usr/share"
166
	cp -R texmf-dist ${D}/usr/share
169
	cp -R texmf-dist "${D}/usr/share"
167
170
168
	dodir ${TEXMF_PATH:-/usr/share/texmf}/web2c
171
	dodir ${TEXMF_PATH:-/usr/share/texmf}/web2c
169
	einstall bindir=${D}/usr/bin texmf=${D}${TEXMF_PATH:-/usr/share/texmf} || die "install"
172
	einstall \
173
		bindir="${D}/usr/bin" \		
174
		texmf="${D}${TEXMF_PATH:-/usr/share/texmf}" \
175
	|| die "install"
170
176
171
	dosbin ${FILESDIR}/${PV}/texmf-update
177
	dosbin "${FILESDIR}/texmf-update"
172
178
173
	docinto texk
179
	docinto texk
174
	cd ${S}/TeX/texk
180
	cd "${S}/texk"
175
	dodoc ChangeLog README
181
	dodoc ChangeLog README
176
182
177
	docinto kpathesa
183
	docinto kpathesa
178
	cd ${S}/TeX/texk/kpathsea
184
	cd "${S}/texk/kpathsea"
179
	dodoc BUGS ChangeLog NEWS PROJECTS README
185
	dodoc BUGS ChangeLog NEWS PROJECTS README
180
186
181
	docinto dviljk
187
	docinto dviljk
182
	cd ${S}/TeX/texk/dviljk
188
	cd "${S}/texk/dviljk"
183
	dodoc ChangeLog README NEWS
189
	dodoc ChangeLog README NEWS
184
190
185
	docinto dvipsk
191
	docinto dvipsk
186
	cd ${S}/TeX/texk/dvipsk
192
	cd "${S}/texk/dvipsk"
187
	dodoc ChangeLog README
193
	dodoc ChangeLog README
188
194
189
	docinto makeindexk
195
	docinto makeindexk
190
	cd ${S}/TeX/texk/makeindexk
196
	cd "${S}/texk/makeindexk"
191
	dodoc ChangeLog NEWS NOTES README
197
	dodoc ChangeLog NEWS NOTES README
192
198
193
	docinto ps2pkm
199
	docinto ps2pkm
194
	cd ${S}/TeX/texk/ps2pkm
200
	cd "${S}/texk/ps2pkm"
195
	dodoc ChangeLog README README.14m
201
	dodoc ChangeLog README README.14m
196
202
197
	docinto web2c
203
	docinto web2c
198
	cd ${S}/TeX/texk/web2c
204
	cd "${S}/texk/web2c"
199
	dodoc ChangeLog NEWS PROJECTS README
205
	dodoc ChangeLog NEWS PROJECTS README
200
206
201
	if use doc ; then
207
	if use doc ; then
202
		dodir /usr/share/doc/${PF}
208
		dodir /usr/share/doc/${PF}/texmf
203
		mv ${D}/usr/share/texmf/doc/* \
209
		mv ${D}/usr/share/texmf/doc/* \
204
			${D}/usr/share/doc/${PF} \
210
			"${D}/usr/share/doc/${PF}/texmf" \
205
			|| die "mv doc failed."
211
			|| die "mv texmf doc failed."
206
		cd ${D}/usr/share/texmf
212
		cd "${D}/usr/share/texmf"
207
		rmdir doc
213
		rmdir doc
208
		ln -s ../doc/${PF} doc || die "ln -s doc failed."
214
		ln -s ../doc/${PF}/texmf doc || die "ln -s doc failed."
215
		cd -
216
		dodir /usr/share/doc/${PF}/texmf-dist
217
		mv ${D}/usr/share/texmf-dist/doc/* \
218
			"${D}/usr/share/doc/${PF}/texmf-dist" \
219
			|| die "mv texmf-dist doc failed."
220
		cd "${D}/usr/share/texmf-dist"
221
		rmdir doc
222
		ln -s ../doc/${PF}/texmf-dist doc || die "ln -s doc failed."
209
		cd -
223
		cd -
210
	else
224
	else
211
		rm -rf ${D}/usr/share/texmf/doc
225
		rm -rf "${D}/usr/share/texmf/doc"
226
		rm -rf "${D}/usr/share/texmf-dist/doc"
212
	fi
227
	fi
213
228
214
	dodir /var/cache/fonts
229
	dodir /var/cache/fonts
215
230
216
	# root group name doesn't exist on Mac OS X
231
	# root group name doesn't exist on Mac OS X
217
	chown -R 0:0 ${D}/usr/share/texmf
232
	chown -R 0:0 "${D}/usr/share/texmf"
218
233
219
	dodir /etc/env.d
234
	dodir /etc/env.d
220
	echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c"' > ${D}/etc/env.d/98tetex
235
	echo 'CONFIG_PROTECT_MASK="/etc/texmf/web2c"' > "${D}/etc/env.d/98texlive"
221
	# populate /etc/texmf
236
	# populate /etc/texmf
222
	keepdir /etc/texmf/web2c
237
	keepdir /etc/texmf/web2c
223
	# _not_ ${TEXMF_PATH}
238
	# _not_ ${TEXMF_PATH}
224
	cd ${D}/usr/share/texmf
239
	cd "${D}/usr/share/texmf"
225
	for d in $(find . -name config -type d | sed -e "s:\./::g") ; do
240
	for d in $(find . -name config -type d | sed -e "s:\./::g") ; do
226
		dodir /etc/texmf/${d}
241
		dodir /etc/texmf/${d}
227
		for f in $(find ${D}usr/share/texmf/$d -maxdepth 1 -mindepth 1); do
242
		for f in $(find "${D}usr/share/texmf/$d" -maxdepth 1 -mindepth 1); do
228
			mv $f ${D}/etc/texmf/$d || die "mv $f failed"
243
			mv $f "${D}/etc/texmf/$d" || die "mv $f failed"
229
			dosym /etc/texmf/$d/$(basename $f) /usr/share/texmf/$d/$(basename $f)
244
			dosym /etc/texmf/$d/$(basename $f) /usr/share/texmf/$d/$(basename $f)
230
		done
245
		done
231
	done
246
	done
232
	cd -
247
	cd -
233
	cd ${D}/${TEXMF_PATH}
248
	cd "${D}/${TEXMF_PATH}"
234
	for f in $(find . -name '*.cnf' -o -name '*.cfg' -type f | sed -e "s:\./::g") ; do
249
	for f in $(find . -name '*.cnf' -o -name '*.cfg' -type f | sed -e "s:\./::g") ; do
235
		if [ "${f/config/}" != "${f}" ] ; then
250
		if [ "${f/config/}" != "${f}" ] ; then
236
			continue
251
			continue
237
		fi
252
		fi
238
		dodir /etc/texmf/$(dirname $f)
253
		dodir /etc/texmf/$(dirname $f)
239
		mv ${D}/${TEXMF_PATH}/$f ${D}/etc/texmf/$(dirname $f) || die "mv $f failed."
254
		mv "${D}/${TEXMF_PATH}/$f" "${D}/etc/texmf/$(dirname $f)" || die "mv $f failed."
240
		dosym /etc/texmf/$f ${TEXMF_PATH}/$f
255
		dosym /etc/texmf/$f ${TEXMF_PATH}/$f
241
	done
256
	done
242
257
243
	# take care of updmap.cfg, fmtutil.cnf and texmf.cnf
258
	# take care of updmap.cfg, fmtutil.cnf and texmf.cnf
244
	dodir /etc/texmf/{updmap.d,fmtutil.d,texmf.d}
259
	dodir /etc/texmf/{updmap.d,fmtutil.d,texmf.d}
245
	dosym /etc/texmf/web2c/updmap.cfg ${TEXMF_PATH}/web2c/updmap.cfg
260
	dosym /etc/texmf/web2c/updmap.cfg ${TEXMF_PATH}/web2c/updmap.cfg
246
	mv ${D}/usr/share/texmf/web2c/updmap.cfg ${D}/etc/texmf/updmap.d/00updmap.cfg
261
	dosym /etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf
247
	mv ${D}/etc/texmf/web2c/fmtutil.cnf ${D}/etc/texmf/fmtutil.d/00fmtutil.cnf
262
	dosym /etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf
248
	mv ${D}/etc/texmf/web2c/texmf.cnf ${D}/etc/texmf/texmf.d/00texmf.cnf
263
	mv "${D}/usr/share/texmf/web2c/updmap.cfg" "${D}/etc/texmf/updmap.d/00updmap.cfg"
264
	mv "${D}/usr/share/texmf/web2c/fmtutil.cnf" "${D}/etc/texmf/fmtutil.d/00fmtutil.cnf"
265
	mv "${S}/texk/kpathsea/texmf.cnf" "${D}/etc/texmf/texmf.d/00texmf.cnf"
266
	find ${D}/usr/share/texmf/web2c -name texmf.\* -exec rm -f {} \;
249
267
250
	# xdvi
268
	# xdvi
251
	if use X ; then
269
	if use X ; then
252
		dodir /etc/X11/app-defaults /etc/texmf/xdvi
270
		dodir /etc/X11/app-defaults /etc/texmf/xdvi
253
		mv ${D}${TEXMF_PATH}/xdvi/XDvi ${D}/etc/X11/app-defaults || die "mv XDvi failed"
271
		mv "${D}${TEXMF_PATH}/xdvi/XDvi" "${D}/etc/X11/app-defaults" || die "mv XDvi failed"
254
		dosym /etc/X11/app-defaults/XDvi ${TEXMF_PATH}/xdvi/XDvi
272
		dosym /etc/X11/app-defaults/XDvi ${TEXMF_PATH}/xdvi/XDvi
255
	fi
273
	fi
256
274
257
	doman ${S}/texk/web2c/pdftexdir/pdftosrc.1
258
259
	keepdir /usr/share/texmf-site
275
	keepdir /usr/share/texmf-site
260
276
261
	# the virtex symlink is not installed
277
	# the virtex symlink is not installed
262
	# The links has to be relative, since the targets
278
	# The links has to be relative, since the targets
263
	# is not present at this stage and MacOS doesn't
279
	# is not present at this stage and MacOS doesn't
264
	# like non-existing targets
280
	# like non-existing targets
265
	cd ${D}/usr/bin/
281
	cd "${D}/usr/bin/"
282
	ln -snf platex latex
283
	ln -snf pdftex pdflatex
266
	ln -snf tex virtex
284
	ln -snf tex virtex
267
	ln -snf pdftex pdfvirtex
285
	ln -snf pdftex pdfvirtex
268
}
286
}
Lines 270-275 Link Here
270
pkg_preinst() {
288
pkg_preinst() {
271
	ewarn "Removing ${ROOT}usr/share/texmf/web2c"
289
	ewarn "Removing ${ROOT}usr/share/texmf/web2c"
272
	rm -rf "${ROOT}usr/share/texmf/web2c"
290
	rm -rf "${ROOT}usr/share/texmf/web2c"
291
	ewarn "Removing ${ROOT}var/lib/texmf/web2c"
292
	rm -rf "${ROOT}var/lib/texmf/web2c"
293
	ewarn "Removing ${ROOT}etc/texmf/web2c"
294
	rm -rf "${ROOT}etc/texmf/web2c"
273
}
295
}
274
296
275
pkg_postinst() {
297
pkg_postinst() {

Return to bug 168177